@zeniai/web-app-ui 5.3.96-dev → 5.3.97-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-BEj2Jzjh.js → AccountMappingScreen-pMoXS6Rn.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-BhGe8oi6.js → ActualMatchingMatchDetailScreen-2j1MK1Cs.js} +1 -1
- package/dist/assets/AddressRoutes-tA_EPTQS.js +1 -0
- package/dist/assets/AddressScreen-YJZ3XLLs.js +9 -0
- package/dist/assets/{AiCfoScreen-T9wsddnc.js → AiCfoScreen-F0FnLHcN.js} +1 -1
- package/dist/assets/{AppDrawer-BO5m3PED.js → AppDrawer-DSRQq0gS.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-B8F3GVxs.js → BillPayApprovalRoutes-Bruhx8rE.js} +1 -1
- package/dist/assets/{BillPayRoutes-DcSqsOgQ.js → BillPayRoutes-DUQj1hx4.js} +24 -24
- package/dist/assets/{BusinessVerificationPageScreen-JarRxoSX.js → BusinessVerificationPageScreen-BiU68eTf.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-Cdz5Oqoj.js → CardsAiCfoScreen-CUaeuUnr.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-fZYBlxkt.js → ChargeCardRoutes-ynRPxHBZ.js} +9 -9
- package/dist/assets/CompanyPassportScreen-BYufSIKe.js +1 -0
- package/dist/assets/ConnectionAuthScreen-DiTiPNDX.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C5aUZCcK.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D5GZ0VVR.js → CustomerOnboardingRoutes-CrsZJCTy.js} +3 -3
- package/dist/assets/DashboardRoutes-BRTIyx5r.js +20 -0
- package/dist/assets/{DefaultTenantHome-BcGsaBpe.js → DefaultTenantHome-BO7x19ip.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-KjWlwIBh.js +18 -0
- package/dist/assets/{DrawerScreen-37FDqOIx.js → DrawerScreen-DkAXkoMI.js} +1 -1
- package/dist/assets/EntityDetailRoutes-BzhW6WY7.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CxhAtnDQ.js → ExpenseAutomationRoutes-ZXNq7Qec.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-BvZfqhwT.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-DkrBLbDB.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-C3xMqTmq.js → InboxNotificationsProvider-DbPSBd88.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B-1POvyE.js → InvoicingRoutes-CuULXbYn.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-PBem0q8b.js → MagicLinkRoutes-D2nRpQw1.js} +22 -22
- package/dist/assets/MagicLinkSignInScreen-2Zd1Nril.js +12 -0
- package/dist/assets/{MobileAppDrawer-DfWAieCr.js → MobileAppDrawer-oi_jxOPF.js} +1 -1
- package/dist/assets/NotFoundScreen-CFVOeV9b.js +1 -0
- package/dist/assets/{NotificationRoutes-DvSviwho.js → NotificationRoutes-DUQWlfCi.js} +1 -1
- package/dist/assets/OAuthConsentScreen-XOLntP64.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-D9xLpCAH.js +1 -0
- package/dist/assets/{PaymentLinkScreen-JV3evKRP.js → PaymentLinkScreen-DEK-zZGM.js} +5 -5
- package/dist/assets/PeopleRoutes-lW9xpnrb.js +22 -0
- package/dist/assets/PerformanceRoutes-C5ibwB0q.js +1 -0
- package/dist/assets/{Preview-DwgMDfYC.js → Preview-DBGhtaN7.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D6uUWSjU.js → QBOConnectionScreen-DyZbiZk7.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CUiLb34T.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-meuFzn-o.js → ReimbursementApprovalRuleDetailScreen-WV0VKJY8.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-z4gQLteF.js → ReimbursementRoutes-CiCUWAKg.js} +9 -9
- package/dist/assets/{ReportsRoutes-S7M6Uyzv.js → ReportsRoutes-CXYlRE3O.js} +1 -1
- package/dist/assets/RewardsRoutes-gBJ6pm3X.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-ByJabNd7.js → ScheduleDetailsPrepaidExpensesScreen-C-oJpxCF.js} +5 -5
- package/dist/assets/{ScreenRoutes-DxeRaGXX.js → ScreenRoutes-czg4LVOl.js} +2 -2
- package/dist/assets/{SettingsRoutes-BRlBwm37.js → SettingsRoutes-Brh5uqPV.js} +6 -6
- package/dist/assets/{SetupPagesScreen-D3fdAxOs.js → SetupPagesScreen-DAeMUdyW.js} +5 -5
- package/dist/assets/SignInScreen-DNDACP8F.js +1 -0
- package/dist/assets/SignOutScreen-Bdz6Ft6M.js +9 -0
- package/dist/assets/{TaskListScreen-BcmmmrTo.js → TaskListScreen-DgIXYUys.js} +2 -2
- package/dist/assets/TaskRoutes-B5nKYrwF.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CWTTa-gP.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Dpzd-yXF.js → TransactionDetailScreen-B_dUf7sV.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Bu7PI8Rl.js → TransactionListRoutes-w-YEtt6F.js} +1 -1
- package/dist/assets/{TreasuryRoutes-D6tE6770.js → TreasuryRoutes-bD3OIF4R.js} +5 -5
- package/dist/assets/{VendorsRoutes-D_WhDWVM.js → VendorsRoutes-DTZh86cd.js} +18 -18
- package/dist/assets/WiseConfirmationScreen-DC5m1P5X.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CtYkEuA8.js → ZeniAccountRoutes-Cp_GiZAn.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-9zE8sMnF.js +9 -0
- package/dist/assets/{accountMappingHelper-BIdzFaKc.js → accountMappingHelper-BI6zMiQn.js} +1 -1
- package/dist/assets/{analytics-BreoHt0J.js → analytics-d11__KPJ.js} +1 -1
- package/dist/assets/{analyticsHelper-DbQsERTh.js → analyticsHelper-BWXp54-h.js} +1 -1
- package/dist/assets/{core-CSm69gJV.js → core-DN52-78R.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DD9Neunj.js → decodeURIComponentSafe-B3iHpNbe.js} +1 -1
- package/dist/assets/{dnd-BvLWSTOT.js → dnd-DmRCPujN.js} +1 -1
- package/dist/assets/{empty-BPKm1KLs.js → empty-FXto4em_.js} +1 -1
- package/dist/assets/{empty-D-Gn9Jdo.js → empty-_U_x9V4F.js} +1 -1
- package/dist/assets/{emptyVideoElement-LUxShx9x.js → emptyVideoElement-CqNU05fB.js} +1 -1
- package/dist/assets/epic-o7-NdXGE.js +2 -0
- package/dist/assets/expenseAutomationHelper-BEXB3_j0.js +1 -0
- package/dist/assets/getLocaleForTenant-C4ctFsVy.js +1 -0
- package/dist/assets/{index-B-RYxEU1.js → index-BcXg2TkN.js} +1 -1
- package/dist/assets/{index-C6_y02Df.js → index-CItQR0iB.js} +2 -2
- package/dist/assets/{index-Di0x3KLC.js → index-CcTOsN6n.js} +12970 -12970
- package/dist/assets/{index-mW6D32De.js → index-Dc7Kl8xP.js} +1 -1
- package/dist/assets/{index-Bx0cVQTh.js → index-GfEl-Dfx.js} +1 -1
- package/dist/assets/{index-DfmKliEE.js → index-GhKP-ylz.js} +1 -1
- package/dist/assets/{index-t_yPrnJX.js → index-OGT-__nJ.js} +1 -1
- package/dist/assets/{index-CSw2zedd.js → index-eTMT6pHH.js} +1 -1
- package/dist/assets/{lexical-CC3pmboN.js → lexical-LEeCUpN7.js} +1 -1
- package/dist/assets/{liveblocks-Css5YxVy.js → liveblocks-9GmpXxpV.js} +1 -1
- package/dist/assets/{lottie-scQSn0xo.js → lottie-yPmCb5yH.js} +1 -1
- package/dist/assets/{mui-CgZjFJJF.js → mui-DhQvsLdn.js} +1 -1
- package/dist/assets/{pathToGoBack-Cx0NwHdB.js → pathToGoBack-DJTUj6Ze.js} +1 -1
- package/dist/assets/{pdf-DXPt-TDj.js → pdf-cTO9wAGA.js} +3 -3
- package/dist/assets/{pdf-lib-kfbS5Id9.js → pdf-lib-CF1yLptT.js} +1 -1
- package/dist/assets/{plaid-vksPD1j4.js → plaid-DKx0sbcX.js} +1 -1
- package/dist/assets/{pusher-BpFLgay1.js → pusher-BAaWw3wT.js} +1 -1
- package/dist/assets/{react-BpwHczl-.js → react-BcUp-j0h.js} +1 -1
- package/dist/assets/{react-iYq3GXPy.js → react-Bl63jZN7.js} +1 -1
- package/dist/assets/{react-mGF_kQSA.js → react-BqKaOlqR.js} +1 -1
- package/dist/assets/{react-rwzOK-1r.js → react-CDZLt83I.js} +1 -1
- package/dist/assets/{react-DBgZvtMG.js → react-CGDLhvO_.js} +1 -1
- package/dist/assets/{react-BFVWe54o.js → react-CTglmHXr.js} +1 -1
- package/dist/assets/{recharts-DQBC-7lc.js → recharts-D1kT0p-5.js} +1 -1
- package/dist/assets/{routePaths-DNuW5jQV.js → routePaths-Cf2lH5Cm.js} +1 -1
- package/dist/assets/{sentry-BBNrx1Ml.js → sentry-BjL01Z0h.js} +1 -1
- package/dist/assets/{stripSplatSuffix-L-JRH5Ri.js → stripSplatSuffix-CsMQFMU-.js} +1 -1
- package/dist/assets/{url-CiYRfW83.js → url-BaKy2r5z.js} +1 -1
- package/dist/assets/{url-D0TdjO3t.js → url-CGtBtyoL.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-DkRrIUr5.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Dn4uN4J8.js → useAiCfoDashboardSuggestedQuestionsChips-CtcDCRqR.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BzzTTT3R.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-Bc01kHYP.js → useChargeCardPusherEvents-BM2UpqSx.js} +1 -1
- package/dist/assets/{useDeviceId-ClCFOYOX.js → useDeviceId-YMqu84TU.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DgdB9uv-.js → useEmailConnectResultRefresh-Dylp3fKb.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-2hi5iAsL.js → useInitialThreadRequest-CE-c1u_9.js} +1 -1
- package/dist/assets/useTaskManagerAccess-BxLSEWlO.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-Ypcuts7J.js → useTaskManagerPusherEvents-DcBcCFgV.js} +1 -1
- package/dist/assets/{utils-B8asVtkx.js → utils-BoByipD1.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bb5FevX_.js → withTransactionSidePanel-O7185yBB.js} +2 -2
- package/dist/assets/{zeni-epic-state-CQbasAjU.js → zeni-epic-state-kN_H0ghW.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-BVSHrg7z.js +0 -1
- package/dist/assets/AddressScreen-Doe_aPe9.js +0 -9
- package/dist/assets/CompanyPassportScreen-CoIn2qzM.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DYsUrO3M.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-cy1fiuJH.js +0 -1
- package/dist/assets/DashboardRoutes-DMdxy8l4.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-BbDPbcRA.js +0 -18
- package/dist/assets/EntityDetailRoutes-DVrb6Fuj.js +0 -1
- package/dist/assets/FeaturePreviewScreen-yUa195bz.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen--RhQBan-.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BcCW10cQ.js +0 -12
- package/dist/assets/NotFoundScreen-Bowln8Np.js +0 -1
- package/dist/assets/OAuthConsentScreen-CY6jrUj6.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Dhy9JC2p.js +0 -1
- package/dist/assets/PeopleRoutes-Cse3a3sb.js +0 -22
- package/dist/assets/PerformanceRoutes-CxRwjZ1i.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DHWyOWyD.js +0 -1
- package/dist/assets/RewardsRoutes-DjHnoowA.js +0 -1
- package/dist/assets/SignInScreen-Bq6wqyFV.js +0 -1
- package/dist/assets/SignOutScreen-CMyUFCH3.js +0 -9
- package/dist/assets/TaskRoutes-C4T84shI.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BnJFdHti.js +0 -1
- package/dist/assets/WiseConfirmationScreen-BhYBEIyb.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-F5yZU3cz.js +0 -9
- package/dist/assets/epic-B1XMIJyC.js +0 -2
- package/dist/assets/expenseAutomationHelper-Djn6yrb_.js +0 -1
- package/dist/assets/getLocaleForTenant-uCoslywF.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CekpYB8W.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Ba1QPj42.js +0 -1
- package/dist/assets/useTaskManagerAccess-D_aPdTiN.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-CcTOsN6n.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BjL01Z0h.js"><link rel="modulepreload" crossorigin href="/assets/core-DN52-78R.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-kN_H0ghW.js"><link rel="modulepreload" crossorigin href="/assets/mui-DhQvsLdn.js"><link rel="modulepreload" crossorigin href="/assets/analytics-d11__KPJ.js"><link rel="modulepreload" crossorigin href="/assets/utils-BoByipD1.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.97-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@sentry/core": "^9.42.1",
|
|
29
29
|
"@sentry/react": "^9.42.1",
|
|
30
30
|
"@stripe/stripe-js": "^4.4.0",
|
|
31
|
-
"@zeniai/client-analytics": "2.1.
|
|
32
|
-
"@zeniai/client-epic-state": "5.2.
|
|
33
|
-
"@zeniai/web-components": "4.4.
|
|
31
|
+
"@zeniai/client-analytics": "2.1.7",
|
|
32
|
+
"@zeniai/client-epic-state": "5.2.90",
|
|
33
|
+
"@zeniai/web-components": "4.4.33",
|
|
34
34
|
"color": "3.1.3",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
36
36
|
"dnd-core": "^16.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Css5YxVy.js";import{A as i}from"./AddressScreen-Doe_aPe9.js";import s from"./NotFoundScreen-Bowln8Np.js";import"./sentry-BBNrx1Ml.js";import{n as d,o as r}from"./core-CSm69gJV.js";import"./zeni-epic-state-CQbasAjU.js";import"./recharts-DQBC-7lc.js";import"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="81cbb5c1-1b56-4d87-a240-ae6c03b91825",t._sentryDebugIdIdentifier="sentry-dbid-81cbb5c1-1b56-4d87-a240-ae6c03b91825")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Css5YxVy.js";import{a as S}from"./sentry-BBNrx1Ml.js";import{h as T,u as P,g as j,i as E,j as B,l as L}from"./core-CSm69gJV.js";import{_ as M,z as V,V as $,a5 as D,a6 as K,k as _,K as m,a1 as z,Q as h,a2 as F}from"./index-Di0x3KLC.js";import{VY as C,it as N,fI as R,VZ as U,c9 as G,V_ as O,mL as q}from"./zeni-epic-state-CQbasAjU.js";import{u as H,n as Q}from"./mui-CgZjFJJF.js";import Y from"./NotFoundScreen-Bowln8Np.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="9be3d1fc-f45b-4bee-baf7-cba83fe49d9b",e._sentryDebugIdIdentifier="sentry-dbid-9be3d1fc-f45b-4bee-baf7-cba83fe49d9b")}catch{}})();const Z=Q.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
|
-
`,J=L((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=R(e),a=s.roleMap!=null&&U(s.roleMap),d=i||c==="user_address"||G(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=O(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=C(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=F(d?.pathnameStackToGoBack);let t=r.poppedPathname??k();const u=d?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(t=`${t}?${f}`)}o(t,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:a=>{const d=W(a);e(q({addressType:c,addressToCreate:d})),_?.trackSaveAddressClicked(m.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(z);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=P(),r=j(),{addressId:t,addressType:u}=E(),f=M(),v=H(),w=V.getSignedInUser(),[g,I]=S.useState(t==null),p=B((b=>t!=null?C(b,t).fetchState:"Not-Started")),x=$();if(w==null)throw Error("Can't access address page without signing in...");const A=b=>b.trackPageLoaded(t!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return S.useEffect((()=>{g||t==null||(I(!0),d(N(t,!1)))}),[g,t,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?n.jsx(D,{fetchState:p,style:{backgroundColor:v.colors.grey5}}):t!=null&&p==="Error"?(a(`${k(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(K,{analytics:_,onLoad:A}),n.jsx(Z,{windowSize:f,children:n.jsx(J,{location:r,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):n.jsx(Y,{})}const k=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},W=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,W as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-Css5YxVy.js";import{a as g}from"./sentry-BBNrx1Ml.js";import{h as w,u as x,g as k,i as T,j as O,l as E}from"./core-CSm69gJV.js";import{z as D,bq as F,a6 as P,k as V,K as L,q as C,br as j,ac as A,aE as U,p as B}from"./index-Di0x3KLC.js";import{fI as b,gL as M,B$ as R,gG as _,c9 as G,YQ as Y,bn as z,v2 as q,uS as $,mD as H,oc as S,YR as K,bF as Q,cF as N,on as Z,ox as J}from"./zeni-epic-state-CQbasAjU.js";import"./mui-CgZjFJJF.js";import{d as W}from"./routePaths-DNuW5jQV.js";import{M as X}from"./MobileAppDrawer-DfWAieCr.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="7ae13814-ea09-42a6-b7e2-cde0f9080c9e",a._sentryDebugIdIdentifier="sentry-dbid-7ae13814-ea09-42a6-b7e2-cde0f9080c9e")}catch{}})();const ee=E((function(a){const t=_(a),i=D.getSignedInUser(),p=b(a),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(a,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(J())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(Z({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(K(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(H({files:e}))},onDeleteFile:e=>{a($(e))},onEditFileName:(e,n)=>{a(q(e,n.split(".")[0]))}}}))(j);function de(){const a=w(),t=x(),i=k(),{tenantEmailDomain:p}=T(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>b(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,n,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(R())}),[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(L.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-Css5YxVy.js";import{a as o}from"./sentry-BBNrx1Ml.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-CSm69gJV.js";import{Uu as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UU as B,gk as A}from"./zeni-epic-state-CQbasAjU.js";import{u as J,z as E,L as T,G as K,D as M}from"./index-Di0x3KLC.js";import{n as X}from"./mui-CgZjFJJF.js";import{P as h,a as _}from"./AccountMappingScreen-BEj2Jzjh.js";import{t as Y}from"./getLocaleForTenant-uCoslywF.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-D6uUWSjU.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./MobileAppDrawer-DfWAieCr.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.js";import"./accountMappingHelper-BIdzFaKc.js";import"./empty-BPKm1KLs.js";import"./pdf-lib-kfbS5Id9.js";import"./index-B-RYxEU1.js";import"./url-D0TdjO3t.js";import"./index-t_yPrnJX.js";import"./decodeURIComponentSafe-DD9Neunj.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]="ac8543da-a61a-45c5-8309-12227e9655cf",t._sentryDebugIdIdentifier="sentry-dbid-ac8543da-a61a-45c5-8309-12227e9655cf")}catch{}})();const te=X.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${M.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function we(){const t=F(),i=R(),v=H(),{setLoading:d,clearAllLoading:m}=J(),S=o.useRef(!1),x=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:O,realmId:$,state:L}=Z(v.search),f=O!==""&&$!==""&&L!=="";f&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===_.pending,P=j===_.ready,y=C((s=>q(s))),e=C((s=>z(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,c=e?.externalConnections?.saveConnectionState,D=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{d(T.CONNECTION_AUTH)}),[d]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(T.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,d]),o.useEffect((()=>{e.tenantId==null&&!x.current&&a!=null&&(x.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(Q(a.userId)))}),[x,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||c!=="Error"||(d(T.CONNECTION_AUTH),t(U(a.userId,e.tenantId)))}),[c]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(V(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),W(a?.userId,a?.zeniSessionId,e.tenantId),K.updateAppLocaleID(Y(B(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(U(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{y.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(y.tenantsCoreDetailsInOrder)}),[y.tenantsCoreDetailsInOrder.length,n]);const b=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&c==="In-Progress"&&(p.current=!0)}),[u,c]),o.useEffect((()=>{if(!u||b)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&c==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):p.current&&c==="Error"?(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||D!==!0||(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,b,c,f,D,e.tenantEmailDomain,m,t,i]),b)return null;if(f||D!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return P?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Css5YxVy.js";import{z as m}from"./index-Di0x3KLC.js";import{g as n}from"./QBOConnectionScreen-D6uUWSjU.js";import"./sentry-BBNrx1Ml.js";import{g as p,N as a}from"./core-CSm69gJV.js";import"./zeni-epic-state-CQbasAjU.js";import"./recharts-DQBC-7lc.js";import"./mui-CgZjFJJF.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./empty-BPKm1KLs.js";import"./pdf-lib-kfbS5Id9.js";import"./index-B-RYxEU1.js";import"./url-D0TdjO3t.js";import"./index-t_yPrnJX.js";import"./decodeURIComponentSafe-DD9Neunj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-Css5YxVy.js";import{i as q,j as S,g as H,u as z,h as W,l as ne,k as oa,n as ht,o as P,N as In}from"./core-CSm69gJV.js";import{fI as Y,Ws as We,bF as sa,br as Ee,XQ as En,ke as wn,XR as Vt,XS as xn,kh as ft,XT as Qe,XU as Tn,km as Dn,XV as Gt,XW as Pn,kq as gt,XX as Ze,XY as On,XZ as Fn,WM as jn,ls as Rn,X_ as Mn,bn as Je,X$ as ra,Xq as le,bc as ia,lG as ca,lp as la,Xs as de,Xr as ae,fH as da,gd as Yn,gt as bt,Y0 as Bn,Y1 as Un,Y2 as ua,Y3 as Oe,Er as Ye,Es as Be,EQ as we,EK as ue,Ew as Ue,Y4 as Ln,c0 as Le,Y5 as Vn,Y6 as Gn,Y7 as ma,Y8 as Fe,Y9 as Nn,ek as et,Ax as pa,Ya as $n,Yb as ha,Yc as zn,Yd as Kn,Ye as qn,Yf as _t,Vo as St,uh as xe,m3 as Te,E_ as kt,AE as Xn,AL as Qn,Yg as Zn,Yh as Hn,Et as Nt,Yi as Wn,AA as ve,Av as fa,Yj as ge,Yk as $t,Yl as Jn,Ym as yt,Vn as At,CI as ga,Yn as eo,Yo as ba,Yp as to,Yq as ao,Yr as no,Ys as vt,CX as oo,D2 as so,Yt as ro,Yu as io,Ev as zt,Yv as co,CG as Ca,Yw as be,Yx as Kt,Yy as lo,bq as _a,F3 as Sa,Yz as uo,YA as ka,YB as mo,YC as po,YD as ho,YE as It,EX as fo,EZ as go,YF as bo,YG as Co,Eu as qt,YH as _o,F1 as ya,YI as Ce,YJ as Xt,YK as So,YL as ko,YM as Aa,lU as va,p$ as Ia,lZ as Ea,pZ as wa,pY as xa,pX as Ta,C3 as yo,dd as Ao,pU as vo,UL as Io,q9 as Eo,YN as wo,YO as xo,YP as To,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Yo,d$ as Bo}from"./zeni-epic-state-CQbasAjU.js";import{z as B,at as oe,p as O,k as x,G as X,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,K as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,_ as Fa,e as ja,ap as No,bf as $o,am as zo,c as wt,bg as Ra,v as re,bh as Ma,bi as Ya,as as Ba,bj as Ko,ag as Ne,V as $e,bk as qo,F as Xo,bl as Qo,$ as G,f as Zo,j as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as Ie}from"./index-Di0x3KLC.js";import{u as ns,n as xt}from"./mui-CgZjFJJF.js";import{a as b}from"./sentry-BBNrx1Ml.js";import{w as Ua}from"./withTransactionSidePanel-Bb5FevX_.js";import{c as La,t as De,f as me,b as Tt,a as Dt,v as os}from"./routePaths-DNuW5jQV.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-Ba1QPj42.js";import Me from"./NotFoundScreen-Bowln8Np.js";import{u as Pt}from"./useInitialThreadRequest-2hi5iAsL.js";import{t as Va}from"./analyticsHelper-DbQsERTh.js";import{C as ss}from"./CompanyPassportScreen-CoIn2qzM.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-Dn4uN4J8.js";import{F as is}from"./FeaturePreviewScreen-yUa195bz.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./TransactionDetailScreen-Dpzd-yXF.js";import"./decodeURIComponentSafe-DD9Neunj.js";import"./expenseAutomationHelper-Djn6yrb_.js";import"./stripSplatSuffix-L-JRH5Ri.js";import"./MobileAppDrawer-DfWAieCr.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.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]="48be95c4-f328-401e-8781-d1c255e3f5e4",e._sentryDebugIdIdentifier="sentry-dbid-48be95c4-f328-401e-8781-d1c255e3f5e4")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>Y(_))),{tenantEmailDomain:m}=q(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=W(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(wn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Vt({sortKey:_,sortOrder:A}))}),[]),w=b.useCallback((_=>{C(Vt({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=La({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&x.trackApAgingDetail("AP Aging",u.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:x,onTransactionClick:R,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:w,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=W(),t=S((k=>xn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>Y(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,w)=>{e(Qe({sortKey:w,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,w)=>{}),[]),v=b.useCallback(((k,w)=>{e(Qe({selectedDate:k,agingDateSelectionType:w})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:x,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:x,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:v,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((T=>Y(T))),{tenantEmailDomain:l}=q(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=W(),g=S((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((T,_)=>{u(Gt({sortKey:T,sortOrder:_}))}),[]),k=b.useCallback((T=>{u(Gt({downloadState:T}))}),[]),w=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const _=La({id:T.transactionId,type:T.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&x.trackArAgingDetail("AR Aging",c.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:x,onTransactionClick:w,onReload:y,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=W(),t=S((v=>Pn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((v=>Y(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,k)=>{e(Ze({sortKey:k,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),y=b.useCallback(((v,k)=>{e(Ze({selectedDate:v,agingDateSelectionType:k})),e(gt(v))}),[]),E=b.useCallback(((v,k)=>{e(On({nodeId:v,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:x,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:X.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:x}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=B.getSignedInUser(),n=Je(t);return{sectionTitle:X.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=xt.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
min-height: 100%;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,bs=xt.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`;function Cs({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=W(),i=z(),l=H(),{tenantEmailDomain:m}=q(),p=ns();return d.jsxs(gs,{children:[d.jsx(Vo,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:p.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:h=>{h.trim().length>=2?i(de({searchString:h,searchOrigin:"navbar"})):h.trim().length===0&&i(ae("navbar"))},onAutoCompleteEntity:h=>{n!=null&&x?.trackSearch(N.Event.search,_s(a),h.type,h.name,n);const f=me(h,m),c=O(l.state?.pathnameStackToGoBack,l.pathname);s(f,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:d.jsx(Go,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),d.jsx(bs,{children:a==="cash_balance"?d.jsx(hs,{}):d.jsx(fs,{})})]})}function Qt(){const e=H(),a=z(),t=S((c=>c.cashBalanceState.fetchState)),n=S((c=>c.cardBalanceState.fetchState)),o=B.getSignedInUser();if(o==null)throw Error("Can't access dashboard detail without signing in...");const r=ra((c=>{const u=ia(c,"/").split("/");return u[u.length-1]})(e.pathname));let s="Not-Started",i="";const l=X.getLocalizedStrings();switch(r){case"cash_balance":s=t,i=l.common.texts.cashBalance;break;case"card_balance":s=n,i=l.reportTitleById.card_balance;break;default:console.error(`${r} is not supported!`)}const{isAiCfoAccessEnabled:m,onAskAiCfoClick:p}=se({mobileExploreReferrer:r==="card_balance"?"Card Balance":"Cash Balance"});Ve({isDataReady:s==="Completed"});const h=S((c=>c.entityAutoCompleteState.autoCompleteText.navbar)),f=S((c=>le(c,"navbar")));return b.useEffect((()=>{s==="Not-Started"&&(function(c,u){switch(u){case"card_balance":c(la());break;case"cash_balance":c(ca());break;default:throw new Error(`balance report type ${u} is not yet supported`)}})(a,r)}),[o,a,s]),d.jsxs(d.Fragment,{children:[s==="Completed"?d.jsx(Ge,{analytics:x,onLoad:c=>((u,C)=>{switch(C){case"card_balance":u.trackPageLoaded(N.Event.cardBalance);break;case"cash_balance":u.trackPageLoaded(N.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,r)}):null,d.jsx(Cs,{title:i,reportId:r,autoCompleteText:h,entityAutoCompleteView:f,isAiCfoAccessEnabled:m,onAskAiCfoClick:p})]})}const _s=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Ss=[],Zt="insights_section";function ze(e){const{mobileExploreReferrer:a}=e,t=z(),n=W(),o=H(),{tenantEmailDomain:r}=q(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Oa(),l=Fa(),m=Ba(l),p=oa(),h=S((F=>F.tenantState.fetchState==="Completed"||F.tenantState.activeTenantFetchState.fetchState==="Completed"?Y(F):void 0)),f=h?.masterTOSInfo?.isMasterTOSAccepted??!1,c=S((F=>da(F))),u=c.uiState?.currentChatSessionId,C=c.allSessionsWithOrderedQuestionAnswers??Ss,g=B.getSignedInUser()?.userId,y=ja(),E=No()&&y&&r!=null,v=$o(),k=zo(!0),w=S((F=>v!=null?Yn(F,v):void 0)),{useDynamicConfig:R}=wt(),{configValue:T}=R(Ra.aiCfoMessageDynamicConfig),_=b.useMemo((()=>Array.isArray(T.default_message_list)?T.default_message_list:[]),[T.default_message_list]),A=b.useMemo((()=>_.slice(0,2)),[_]),U=v!=null&&w!=null&&w.fetchState!=="Completed"&&w.fetchState!=="Error"&&(k||w.fetchState==="In-Progress"),pe=b.useMemo((()=>{if(v==null||w?.fetchState==="Error")return A;if(U)return[];const F=(w?.suggestedQuestions??[]).map((J=>J.trim())).filter((J=>J.length>0)).slice(0,2);return F.length===0?A:F}),[A,U,v,w?.fetchState,w?.suggestedQuestions]),Pe=b.useCallback(((F,J)=>{if(g==null||F.trim()==="")return;if(!f)return void re({location:o,navigate:n,mergeState:{referrer:a,aiCfoInitialQuestion:F,aiCfoInitialSubmissionSource:Zt,aiCfoSuggestionIndex:J}});const qe=Ma(p.getState());if(m){const Xe=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Xe,referrer:a,aiCfoInitialQuestion:F,aiCfoShouldSubmit:!qe}})}else{if(qe)return t(bt(F)),void s(!0);i(F),s(!0),Ya(t,F,Zt,u,C,g,J,void 0)}}),[C,u,t,f,m,o,a,n,s,i,p,r,g]),_e=b.useCallback((()=>{if(f)if(m){const F=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:F,referrer:a}})}else s(!0);else re({location:o,navigate:n,mergeState:{referrer:a}})}),[f,m,o,a,n,s,r]);return b.useMemo((()=>{if(E)return{isSuggestedQuestionsLoading:U,onAskSomethingElseClick:_e,onSuggestedQuestionClick:Pe,suggestedQuestions:pe}}),[E,U,_e,Pe,pe])}const Ke=Ko,ks=ne((function(e){const a=Bn(e),t=Un(e),n=ua(e),{scrollPosition:o,...r}=n,s=X.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=B.getSignedInUser(),l=e.tenantState.currentTenantId,m=Y(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=le(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${oe}/statement`,authParams:h},analytics:x,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Ln(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(we("month")),e(ue(a.firstMonthOfFY,t)),e(Oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ye(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Be(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout((()=>e(Oe({resetLeftScroll:!0}))),50)},onElementCollapseStateChanged:(t,n)=>{e(Oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(Oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}}))(Ke),ys=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=se({mobileExploreReferrer:"DashboardCashInCashOut"}),i=ze({mobileExploreReferrer:"DashboardCashInCashOut"}),l=S((m=>ua(m))).mode==="compare_mode";return d.jsx(ks,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Le(o("dashboard_report_filters"))})},As=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=et(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},vs=ne((function(e){const a=Vn(e),t=Gn(e),n=ma(e),{scrollPosition:o,...r}=n,s=X.getLocalizedStrings().reportTitleById.cash_position,i=B.getSignedInUser(),l=e.tenantState.currentTenantId,m=Y(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=le(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${oe}/statement`,authParams:h},analytics:x,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Nn(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(Fe({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Fe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue(a.firstMonthOfFY,t)),e(Fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ye(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Be(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout((()=>e(Fe({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=As(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=De(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(Fe({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}}))(Ke),Is=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=se({mobileExploreReferrer:"DashboardCashPosition"}),i=ze({mobileExploreReferrer:"DashboardCashPosition"}),l=S((m=>ma(m))).mode==="compare_mode";return d.jsx(vs,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Le(o("dashboard_report_filters"))})},$=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!==t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))},Es=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=et(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},ws=ne((function(e){const a=pa(e),t=$n(e),n=ha(e),o=zn(e),r=Kn(e),s=qn(e),i=_t(e),{scrollPosition:l,...m}=i,p=t.reportTitle,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=St(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:x,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Jn(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(ge({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(ge({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue(a.firstMonthOfFY,t)),e(ge({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Be(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(ge({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Es(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?Tt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):De(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(ge({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e($t({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(ge({scrollPosition:t})):e($t({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ve(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t==="forecast_mode"?(e(Nt({viewMode:"account_group"})),e(fa(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(ge({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Burn Rate"),e(Nt({viewMode:t})),e(Wn({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Hn({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(Zn({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(Xn()),a.isAccountingProjectsEnabled&&e(Qn())},onResyncReports:()=>{e(kt(a.accountViewMode==="project"?"net_burn_or_income_by_projects":"net_burn_or_income_by_classes"))}}}))(Ke),xs=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),m=ze({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),p=S((_=>_t(_))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((_=>yt(_.forecastState,c??""))),C=S((_=>pa(_))),g=S((_=>At(_))),y=S((_=>Te(_))),E=S((_=>xe(_))),v=S((_=>ha(_).uiState.accountViewMode)),k=p.mode==="compare_mode",w=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const _=u?.forecastPeriod,A=w!=null&&_.endDate.isAfter(w?.endDate)===!0?w:_;a(ue(e.firstMonthOfFY,{startDate:A.endDate.startOf(f),endDate:A?.endDate}))}}),[c]);const R=$e(),T=Pt(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(ws,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:y,isAccountingProjectsEnabled:E,accountViewMode:v,isCompareModeOn:k,navigate:o,analytics:x,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:T,meetingUrl:Le(s("dashboard_report_filters"))})},Ts=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=et(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Ds=ne((function(e){const a=ga(e),t=eo(e),n=ba(e),o=to(e),r=ao(e),s=no(e),i=vt(e),{scrollPosition:l,...m}=i,p=X.getLocalizedStrings().common.texts.operatingExpenses,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=St(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:x,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(lo(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(be({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue(a.firstMonthOfFY,t)),e(be({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Be(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=Ts(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?Tt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):De(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(be({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e(Kt({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(be({scrollPosition:t})):e(Kt({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ve(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t=="forecast_mode"?(e(zt({viewMode:"account_group"})),e(Ca(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(be({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Operating Expenses"),e(zt({viewMode:t})),e(co({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(io({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(ro({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(oo()),a.isAccountingProjectsEnabled&&e(so())},onResyncReports:()=>{e(kt(a.accountViewMode==="project"?"operating_expenses_by_projects":"operating_expenses_by_classes"))}}}))(Ke),Ps=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardOpEx"}),m=ze({mobileExploreReferrer:"DashboardOpEx"}),p=S((A=>vt(A))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((A=>yt(A.forecastState,c??""))),C=S((A=>ga(A))),g=S((A=>At(A))),y=S((A=>Te(A))),E=S((A=>xe(A))),v=S((A=>ba(A).uiState.accountViewMode)),k=p.mode==="compare_mode",w=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const A=u?.forecastPeriod,U=w!=null&&A.endDate.isAfter(w?.endDate)===!0?w:A;a(ue(e.firstMonthOfFY,{startDate:U.endDate.startOf(f),endDate:U?.endDate}))}}),[c]);const R=$e(),T=R?.loggedInUserRole!=null&&_a(R?.loggedInUserRole)!==!0,_=Pt(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(Ds,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:y,isAccountingProjectsEnabled:E,accountViewMode:v,isCompareModeOn:k,navigate:o,forecastIdFromUrlPath:r,analytics:x,hasTransactionAccess:T,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:_,meetingUrl:Le(s("dashboard_report_filters"))})},Os=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=et(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Fs=ne((function(e){const a=Sa(e),t=uo(e),n=ka(e),o=mo(e),r=po(e),s=ho(e),i=It(e),{scrollPosition:l,...m}=i,p=X.getLocalizedStrings().common.texts.revenue,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=St(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:x,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(So(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ue(t,n)),e(Ce({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue(a.firstMonthOfFY,t)),e(Ce({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Be(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Os(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?Tt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):De(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(Ce({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e(Xt({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(Ce({scrollPosition:t})):e(Xt({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ve(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t==="forecast_mode"?(e(qt({viewMode:"account_group"})),e(ya(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(Ce({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Revenues"),e(qt({viewMode:t})),e(_o({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Co({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(bo({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(fo()),a.isAccountingProjectsEnabled&&e(go())},onResyncReports:()=>{e(kt(a.accountViewMode==="project"?"revenue_by_projects":"revenue_by_classes"))}}}))(Ke),js=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardRevenue"}),m=ze({mobileExploreReferrer:"DashboardRevenue"}),p=S((_=>It(_))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((_=>yt(_.forecastState,c??""))),C=S((_=>Sa(_))),g=C.dataAvailable,y=p.mode==="compare_mode",E=S((_=>Te(_))),v=S((_=>xe(_))),k=S((_=>ka(_).uiState.accountViewMode)),w=S((_=>At(_)));b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const _=u?.forecastPeriod,A=g!=null&&_.endDate.isAfter(g?.endDate)===!0?g:_;a(ue(e.firstMonthOfFY,{startDate:A.endDate.startOf(f),endDate:A?.endDate}))}}),[c]);const R=$e(),T=Pt(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(Fs,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:E,isAccountingProjectsEnabled:v,accountViewMode:k,isCompareModeOn:y,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:x,reportsResyncFetchState:w.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:T,meetingUrl:Le(s("dashboard_report_filters"))})},Rs=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},Ms=ne((function(e){const a=ko(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=le(e,"navbar");return{report:a,analytics:x,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}}),(function(e,a){return{onTimeframeSelectionChanged:t=>{x.trackTimeframeSwitch(Va(t),"Top Expenses"),e(Aa(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Rs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=De(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(de({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ae("navbar"))},onAutoCompleteEntity:t=>{const n=me(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}}))(qo),Ys=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return d.jsx(Ms,{tenantEmailDomain:a,location:t,navigate:n})},Bs=xt.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex: 1 1 auto;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
-
align-items: center;
|
|
20
|
-
`;function Us({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=W(),r=H(),{tenantEmailDomain:s}=q();let i;Ve({isDataReady:!0});const l={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=d.jsx(Ps,{...l});break;case"revenue":i=d.jsx(js,{...l});break;case"net_burn_or_income":i=d.jsx(xs,{...l});break;case"cash_position":i=d.jsx(Is,{...l});break;case"top_expenses":i=d.jsx(Ys,{...l});break;case"cash_in_cash_out":i=d.jsx(ys,{...l});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?d.jsx(Bs,{children:i}):null}function ie(){const e=H(),a=z(),{forecastId:t}=q();let n="Not-Started";const o=S((c=>vt(c).fetchState)),r=S((c=>It(c).fetchState)),s=S((c=>_t(c).fetchState)),i=S((c=>c.cashPositionState.fetchState)),l=S((c=>c.topExState.fetchState)),m=S((c=>c.cashInCashOutState.fetchState));if(B.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const p=S((c=>Y(c))),h=p?.company?.companyInfo?.firstMonthOfFY??1,f=ra((c=>{const u=ia(c,"/").split("/");return t!=null?u[u.length-3]:u[u.length-1]})(e.pathname));switch(f){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=l;break;case"cash_in_cash_out":n=m;break;default:console.error(`${f} is not supported!`)}return b.useEffect((()=>{n==="Not-Started"&&(function(c,u,C,g){switch(u){case"operating_expenses":c(Ta(!0)),g!=null&&(c(ve(C,!0,3,{id:g,index:0})),c(Ca(!1,g)));break;case"revenue":c(xa(!0)),g!=null&&(c(ve(C,!0,3,{id:g,index:0})),c(ya(!1,g)));break;case"net_burn_or_income":c(wa(!0)),g!=null&&(c(ve(C,!0,3,{id:g,index:0})),c(fa(!1,g)));break;case"cash_position":c(Ea(!0));break;case"top_expenses":c(Ia());break;case"cash_in_cash_out":c(va());break;default:throw new Error(`report type ${u} is not yet supported`)}})(a,f,h,t)}),[t]),d.jsxs(d.Fragment,{children:[n==="Completed"?d.jsx(Ge,{analytics:x,onLoad:c=>((u,C)=>{const g=e.state?.referrer;switch(C){case"operating_expenses":u.trackPageLoaded(N.Event.operatingExpenses,g);break;case"revenue":u.trackPageLoaded(N.Event.revenues,g);break;case"net_burn_or_income":u.trackPageLoaded(N.Event.burnRate,g);break;case"cash_position":u.trackPageLoaded(N.Event.cashPosition,g);break;case"top_expenses":u.trackPageLoaded(N.Event.topExpenses,g);break;case"cash_in_cash_out":u.trackPageLoaded(N.Event.cashInCashOut,g);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,f)}):null,d.jsx(Us,{firstMonthOfFY:h,fetchState:n,reportId:f,forecastId:t})]})}var it=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function ct(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),(function(){t(window.event)}))}function $a(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function za(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var Ot={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":it?173:189,"=":it?61:187,";":it?59:186,"'":222,"[":219,"]":221,"\\":220},ce={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ct={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},M={16:!1,18:!1,17:!1,91:!1},j={},He=1;He<20;He++)Ot["f".concat(He)]=111+He;var D=[],Ht=!1,Ka="all",Wt=[],tt=function(e){return Ot[e.toLowerCase()]||ce[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Jt(e){Ka=e||"all"}function Re(){return Ka||"all"}var lt=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;za(a).forEach((function(s){var i=s.split(r),l=i.length,m=i[l-1],p=m==="*"?"*":tt(m);if(j[p]){t||(t=Re());var h=l>1?$a(ce,i):[];j[p]=j[p].filter((function(f){return!((!n||f.method===n)&&f.scope===t&&(function(c,u){for(var C=c.length>=u.length?c:u,g=c.length>=u.length?u:c,y=!0,E=0;E<C.length;E++)g.indexOf(C[E])===-1&&(y=!1);return y})(f.mods,h))}))}}))};function ea(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,M)Object.prototype.hasOwnProperty.call(M,r)&&(!M[r]&&a.mods.indexOf(+r)>-1||M[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||M[16]||M[18]||M[17]||M[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function ta(e,a){var t=j["*"],n=e.keyCode||e.which||e.charCode;if(V.filter.call(this,e)){if(n!==93&&n!==224||(n=91),D.indexOf(n)===-1&&n!==229&&D.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(u){var C=Ct[u];e[u]&&D.indexOf(C)===-1?D.push(C):!e[u]&&D.indexOf(C)>-1?D.splice(D.indexOf(C),1):u==="metaKey"&&e[u]&&D.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(D=D.slice(D.indexOf(C))))})),n in M){for(var o in M[n]=!0,ce)ce[o]===n&&(V[o]=!0);if(!t)return}for(var r in M)Object.prototype.hasOwnProperty.call(M,r)&&(M[r]=e[Ct[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(D.indexOf(17)===-1&&D.push(17),D.indexOf(18)===-1&&D.push(18),M[17]=!0,M[18]=!0);var s=Re();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&ea(e,t[i],s,a);if(n in j){for(var l=0;l<j[n].length;l++)if((e.type==="keydown"&&j[n][l].keydown||e.type==="keyup"&&j[n][l].keyup)&&j[n][l].key){for(var m=j[n][l],p=m.splitKey,h=m.key.split(p),f=[],c=0;c<h.length;c++)f.push(tt(h[c]));f.sort().join("")===D.sort().join("")&&ea(e,m,s,a)}}}}function V(e,a,t){D=[];var n=za(e),o=[],r="all",s=document,i=0,l=!1,m=!0,p="+",h=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(l=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(h=a.capture),typeof a.splitKey=="string"&&(p=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(p)).length>1&&(o=$a(ce,e)),(e=(e=e[e.length-1])==="*"?"*":tt(e))in j||(j[e]=[]),j[e].push({keyup:l,keydown:m,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:p,element:s});s!==void 0&&!(function(f){return Wt.indexOf(f)>-1})(s)&&window&&(Wt.push(s),ct(s,"keydown",(function(f){ta(f,s)}),h),Ht||(Ht=!0,ct(window,"focus",(function(){D=[]}),h)),ct(s,"keyup",(function(f){ta(f,s),(function(c){var u=c.keyCode||c.which||c.charCode,C=D.indexOf(u);if(C>=0&&D.splice(C,1),c.key&&c.key.toLowerCase()==="meta"&&D.splice(0,D.length),u!==93&&u!==224||(u=91),u in M)for(var g in M[u]=!1,ce)ce[g]===u&&(V[g]=!1)})(f)}),h))}var dt={setScope:Jt,getScope:Re,deleteScope:function(e,a){var t,n;for(var o in e||(e=Re()),j)if(Object.prototype.hasOwnProperty.call(j,o))for(t=j[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;Re()===e&&Jt(a||"all")},getPressedKeyCodes:function(){return D.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=tt(e)),D.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(j).forEach((function(t){var n=j[t].find((function(o){return o.scope===a&&o.shortcut===e}));n&&n.method&&n.method()}))},unbind:function(e){if(e===void 0)Object.keys(j).forEach((function(s){return delete j[s]}));else if(Array.isArray(e))e.forEach((function(s){s.key&<(s)}));else if(typeof e=="object")e.key&<(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),lt({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:Ot,modifier:ce,modifierMap:Ct};for(var ut in dt)Object.prototype.hasOwnProperty.call(dt,ut)&&(V[ut]=dt[ut]);if(typeof window<"u"){var Ls=window.hotkeys;V.noConflict=function(e){return e&&window.hotkeys===V&&(window.hotkeys=Ls),V},window.hotkeys=V}V.filter=function(){return!0};var aa=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function Vs(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,l=o.keydown,m=o.filterPreventDefault,p=m===void 0||m,h=o.enabled,f=h===void 0||h,c=o.enableOnContentEditable,u=c!==void 0&&c,C=b.useRef(null),g=b.useCallback((function(y,E){var v,k;return s&&!s(y)?!p:!!(aa(y,["INPUT","TEXTAREA","SELECT"])&&!aa(y,r)||(v=y.target)!=null&&v.isContentEditable&&!u)||!!(C.current===null||document.activeElement===C.current||(k=C.current)!=null&&k.contains(document.activeElement))&&(a(y,E),!0)}),n?[C,r,s].concat(n):[C,r,s]);return b.useEffect((function(){if(f)return i&&l!==!0&&(t.keydown=!1),V(e,t||{},g),function(){return V.unbind(e,g)};V.unbind(e,g)}),[g,e,f]),C}V.isPressed;const Gs=[],mt="dashboard_card",te="ai_cfo_dashboard_card";function na(e,a){return a?e.some((t=>String(t)===te))?e.slice():[te,...e]:e.filter((t=>String(t)!==te))}const Ns=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","rewards_card"],$s=(e,a,t,n,o)=>({card:{dimension:Et(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),je=(e,a,t,n,o)=>({card:{dimension:Et(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e}),zs=(e,a,t,n)=>je(void 0,e,Ie,a,t),Ks=e=>{const a=Et(Ie);return a.height=Ie.height+10,{card:{dimension:a,cardType:te,cardIndex:e,fetchState:"Completed",disableAnimations:!1,spansFullDashboardWidth:!0}}},qs=ne((function(e,a){const t=Zs(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i}=a;let l=n.map(((m,p)=>{if(m==="reimbursement_promo_card"||m==="bill_pay_promo_card")return zs(t,m,p);if(m==="zeni_promo_card")return je({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,Ie,m,p);if(m==="information_card")return je(void 0,"Completed",Ie,m,p);if(m===te)return Ks(p);{const h=o.find((f=>f?.reportId===m));return h?(function(f,c,u,C){const g=f.reportId;switch(g){case"card_balance":case"cash_balance":return[$s(f,c,u,g,C)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"rewards_card":return[je(f,c,u,g,C)];case"net_burn_or_income_story_card":return[je(f,c,u,"net_burn_or_income_story_card",C)];default:return console.error(`card type ${g} not yet supported!`),[]}})(h,h.fetchState,Ie,p):[]}})).flat();return a.isSummaryCardsFiltered===!0&&(l=l.filter((m=>Ns.includes(m.card.cardType)==0)).filter((m=>{const p=m.data?.availableNumberOfPeriods;return p!=null?p>0:m.card.cardType!="top_expenses"||m.data==null||(function(h){if(h==null||h.length===0)return!0;let f=!0;for(const c of h)if(c.balance.available.amount!==0){f=!1;break}return f})(m.data.topExpenses.accountsOrdered)===!1}))),{cardDataArray:l,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:le(e,"navbar")},analytics:x,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}}),(function(e,a){const t=a.tenantId,n=B.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)x.trackDashboardCardClicked("cards promo",2),x.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&x.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(x.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),(function(i,l,m,p){if(l!==te)switch(l){case"card_balance":i(la());break;case"cash_balance":i(ca());break;case"operating_expenses":i(Ta(!0));break;case"revenue":i(xa(!0));break;case"net_burn_or_income":i(wa(!0));break;case"net_burn_or_income_story_card":i(Mo(!0));break;case"cash_position":i(Ea(!0));break;case"top_expenses":i(Ia());break;case"cash_in_cash_out":i(va());break;case"insights_dashboard":i(Ro());break;case"bill_pay_card":i(jo());break;case"reimbursement_card":i(Fo());break;case"company_details":i(Oo(m));break;case"task_card":i(Po());break;case"accounts_payable_aging":p.includes("accounts_payable_aging")===!1&&i(ft(Ee()));break;case"accounts_receivable_aging":i(gt(Ee()));break;case"rewards_card":p.includes("rewards_card")===!1&&i(Do(!0));break;default:throw new Error(`report type ${l} is not yet supported`)}})(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{x.trackTimeframeSwitch(Va(r),Qs(o),"Dashboard"),(function(s,i,l){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(we(l));break;case"top_expenses":s(Aa(l));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}})(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(To(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:o=>{if(o==="bill_pay_promo_card"){const r="../bills",s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}else if(o==="reimbursement_promo_card"){const r="../reimbursements",s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(x.trackUpdateBurnRateCalculatorSettings(r,s,wo(s)),e(xo(t,r,s)))}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(de({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(ae("navbar"))},onCancelAutoComplete:()=>{e(ae("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?me(o,a.tenantEmailDomain):os(o.zeniId,o.qboId,a.tenantEmailDomain);const s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}}))(as);function Xs(){const e=oa(),a=Fa(),t=Ba(a),{isAiCfoOpen:n,setIsAiCfoOpen:o,setAiCfoSidePanelQuestionToSubmit:r}=Oa(),s=W(),i=z(),l=H(),m=B.getSignedInUser(),{useFeatureGate:p,useDynamicConfig:h}=wt(),[f,c]=b.useState(!1),[u,C]=b.useState(!1),g=ja(),{tenantEmailDomain:y}=q(),{isAiCfoAccessEnabled:E,onAskAiCfoClick:v}=se({mobileExploreReferrer:"Dashboard"}),k=S((I=>I.tenantState.fetchState==="Completed"||I.tenantState.activeTenantFetchState.fetchState==="Completed"?Y(I):void 0)),w=k??B.getSignedInUserTenant(y),{isCardsShuttingDown:R,shutdownContent:T}=Xo(w?.tenantId,k?.company?.managementInfo?.receiverEmails),_=b.useMemo((()=>R===!0&&T!=null?d.jsx(Qo,{shutdownContent:T}):null),[R,T]),A=k?.masterTOSInfo?.isMasterTOSAccepted??!1,U=w.tenantId,pe=w.companyId;b.useEffect((()=>{f===!1&&l.state?.message==="activation"&&(i(yo(pe)),c(!0))}),[l.state,f,pe,i]),b.useEffect((()=>{g&&!u&&l.state?.message==="open_ai_cfo_drawer"&&(C(!0),A?(o(!0),s({pathname:l.pathname,search:l.search,hash:l.hash},{replace:!0,state:{...l.state,message:void 0}})):re({location:l,navigate:s,mergeState:{referrer:"Dashboard",message:void 0}}))}),[l,u,g,A,o,s]);const{isFeatureEnabled:Pe}=p(G.isApAgingFeatureEnabled),_e=Zo(),F=Ho(_e),{isFeatureEnabled:J}=p(G.isArAgingFeatureEnabled),{isFeatureEnabled:qe}=p(G.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Xe}=p(G.isReferralFeatureEnabled),{isFeatureEnabled:qa}=p(G.isChargeCardFeatureEnabled),{isFeatureEnabled:Xa}=p(G.isAiCfoFileUploadEnabled),{isFeatureEnabled:Qa}=p(G.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Za}=p(G.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ha}=p(G.aiAuditScorePercentage),{configValue:Ft}=h(Ra.zeniCardsConfig),Wa=Ft.charge_card_cashback_rate_per_transaction==null?.0175:Ft.charge_card_cashback_rate_per_transaction;if(l.state?.message==="activation"){const I=Wo(l.state?.pathnameStackToGoBack);s(l.pathname,{state:{...l.state,message:void 0,pathnameStackToGoBack:I.newStack}})}const[jt,Ja]=b.useState(!1),[at,en]=b.useState(!1);Vs("command+p, Control+p",(I=>{en(!at),I.preventDefault()}),{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[at]);const Rt=k?.externalConnections?.accounting[0]?.isValid;if(m==null)throw Error("Can't access dashboard without signing in...");const he=S((I=>Y(I)?.excludedResources)),tn=S((I=>I.expenseAutomationViewState.selectedPeriodByTenantId)),an=!!k?.companyReimbursementInfo?.info?.isReimbursementEnabled,nn=!!k?.companyBillPayInfo?.info?.isBillPayEnabled,on=$e(),K=[],Mt=he?.resources?.find((I=>I.resource==="/reports/top_expenses"))==null,sn=he?.resources?.find((I=>I.resource==="/reports/task_card"))==null,Yt=k?.userRole!=null&&_a(k?.userRole),rn=he?.resources?.find((I=>I.resource==="/bills"))==null&&!Yt,cn=he?.resources?.find((I=>I.resource==="/reimbursements"))==null,ln=Ao(on?.loggedInUserRoleMap),dn=k?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,un=k?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1;Mt===!1&&K.push("top_expenses"),sn===!1&&K.push("task_card"),rn===!1&&K.push("bill_pay_card","bill_pay_promo_card"),Pe===!1&&K.push("accounts_payable_aging"),J===!1&&K.push("accounts_receivable_aging"),(_e===!1||Yt)&&K.push("expense_automation_card"),cn===!1&&K.push("reimbursement_card","reimbursement_promo_card"),K.push("zeni_accounts_promo_card","treasury_promo_card"),Xe===!1&&K.push("rewards_card");const{areTenantIdsInSync:Bt}=Jo();b.useLayoutEffect((()=>{jt&&F===_e||Rt!==!0||!Bt||he?.fetchState!=="Completed"&&he?.fetchState!=="Error"||(Ja(!0),i(vo(m.userId,pe,U,!0,!1,K)))}),[jt,m,U,i,Mt,Rt,he?.fetchState,Bt]);const mn=S((I=>I.reportUIOptionsState.forecastOnDashboard.isForecastModeOn)),pn=S((I=>I.revenueState.uiState.selectedForecast?.id)),hn=S((I=>I.cardBalanceState.fetchState)),fe=S((I=>Io(I,K))),fn=fe.fetchState,gn=b.useMemo((()=>na(fe.cardsOrdered,E)),[fe.cardsOrdered,E]),bn=b.useMemo((()=>na(fe.cardsForDashboardUI,E)),[fe.cardsForDashboardUI,E]);Ve({isDataReady:!0});const{isSuggestedQuestionsLoading:Cn,suggestedPromptQuestions:_n}=rs(),Ut=S((I=>da(I))),Se=Ut.uiState?.currentChatSessionId,nt=Ut.allSessionsWithOrderedQuestionAnswers??Gs,{currentSessionQuestionAnswers:Sn}=es(nt,Se),Lt=Sn.length===0,kn=b.useCallback(((I,Q,ee)=>{const ke=m?.userId;if(ke==null)return;const L=I.trim();if(L.length===0&&Q.length===0)return;if(!A)return void re({location:l,navigate:s,mergeState:{referrer:"Dashboard",...L.length>0?{aiCfoInitialQuestion:L,aiCfoInitialSubmissionSource:mt,...typeof ee=="number"?{aiCfoSuggestionIndex:ee}:{}}:{}}});const Z=Ma(e.getState()),ye=()=>{const Ae=O(l.state?.pathnameStackToGoBack,l.pathname);s(`/${y}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Ae,referrer:"Dashboard",aiCfoInitialQuestion:L,aiCfoShouldSubmit:!Z&&L.length>0,aiCfoInitialSubmissionSource:mt,...typeof ee=="number"?{aiCfoSuggestionIndex:ee}:{}}})};return t?Q.length>0?void o(!0):void ye():Q.length>0?Z?(i(bt(L)),void o(!0)):(r(L.length>0?L:null),o(!0),void(L.length>0&&Ya(i,L,mt,Se,nt,ke,ee,Q.length>0?Q:void 0))):(Z&&i(bt(L)),void ye())}),[nt,Se,i,A,t,l,s,r,o,m?.userId,e,y]),yn=b.useCallback((()=>{A?o(!0):re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[A,l,s,o]),An=b.useCallback((()=>{if(!A)return void re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});if(y==null)return;const I=O(l.state?.pathnameStackToGoBack,l.pathname);s(`/${y}/ai-cfo/explore`,{state:{pathnameStackToGoBack:I,referrer:"Dashboard"}})}),[A,l,s,y]),vn=b.useCallback((()=>{if(A)if(t){if(y==null||k==null)return;const I=Se==null||Lt?`/${y}/ai-cfo/explore`:`/${y}/ai-cfo/${Se}`,Q=l.state?.pathnameStackToGoBack??[],ee=O(Q,l.pathname);s(I,{state:{...l.state,pathnameStackToGoBack:ee,[ts]:!0}})}else re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});else re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[A,t,l,s,y,k,Se,Lt]);return d.jsxs(d.Fragment,{children:[fn==="Completed"?d.jsx(Ge,{analytics:x,onLoad:I=>{I.trackPageLoaded(N.Event.dashboard)}}):null,d.jsx(qs,{cardsShutdownBanner:_,maxColumns:n?2:void 0,isAiCfoAccessEnabled:E,onAskAiCfoClick:v,onAiCfoDashboardOpenPanel:yn,onAiCfoDashboardOpenScopePage:vn,isAiCfoFileUploadEnabled:Xa===!0&&t===!1,onAiCfoDashboardPromptSubmit:kn,onAiCfoDashboardExpandToFullPage:An,aiCfoDashboardShouldClearPromptOnSubmit:A,aiCfoDashboardSuggestedPromptQuestions:_n,aiCfoDashboardSuggestedPromptQuestionsLoading:Cn,onDragAndDropCard:(I,Q)=>{if(I===te||Q===te)return;const ee=(function(Z,ye,Ae){const ot=Ae.indexOf(Z),st=Ae.indexOf(ye);if(ot===-1||st===-1||ot===st)return Ae;const rt=[...Ae];return rt.splice(ot,1),rt.splice(st,0,Z),rt})(I,Q,gn),ke=ee.filter((Z=>Z!==te)),L=fe.cardsOrdered;(ke.length!==L.length||ke.some(((Z,ye)=>Z!==L[ye])))&&i(Eo(ke))},dashboardReport:fe,passedCardsOrdered:bn,tenantId:U,companyId:pe,tenantEmailDomain:y,location:l,navigate:s,isApAgingFeatureEnabled:Pe,isArAgingFeatureEnabled:J,isBillPayEnabled:nn,isReimbursementEnabled:an,isSummaryCardsFiltered:at,isForecastOn:mn,selectedForecastOnDashboard:pn,isVisitingFirstTime:f,isZeniAccountEnabled:qe,isRewardsFeatureEnabled:Xe,selectedPeriod:tn[U],isChargeCardFeatureEnabled:qa,isUserHasCardsAccess:ln,cardsCreditLimit:dn,cashbackRate:Wa,isInterestedInChargeCard:un,cardBalanceFetchState:hn,christmasAnimationEnabled:Qa,newYearAnimationEnabled:Za,aiAuditScorePercentageEnabled:Ha})]})}const Qs=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},Zs=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map((a=>a.fetchState)).reduce(((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t));function pt(){return d.jsxs(ht,{children:[d.jsx(P,{path:"/",element:d.jsx(ie,{})}),d.jsx(P,{path:"/:forecastId",element:d.jsx(ie,{})}),d.jsx(P,{path:"/:forecastId/*",element:d.jsx(Me,{})})]})}function xr(){const e=$e(),a=e?.excludedResources?.find((m=>m.resource==="/reports/top_expenses"))==null,{useFeatureGate:t}=wt(),{isFeatureEnabled:n}=t(G.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(G.isArAgingFeatureEnabled),r=S((m=>Y(m))),{isFeatureEnabled:s}=t(G.isDebitCardFeatureEnabled),i=Yo(s,r),l=Bo(r);return i===!0||l===!0?d.jsx(ht,{children:d.jsx(P,{path:"/*",element:d.jsx(is,{})})}):d.jsxs(ht,{children:[d.jsx(P,{path:"/",element:d.jsx(Xs,{})}),d.jsx(P,{path:"cash_balance/*",element:d.jsx(Qt,{})}),d.jsx(P,{path:"card_balance/*",element:d.jsx(Qt,{})}),d.jsx(P,{path:"operating_expenses/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"operating_expenses/forecast/*",element:d.jsx(pt,{})}),d.jsx(P,{path:"revenue/forecast/*",element:d.jsx(pt,{})}),d.jsx(P,{path:"revenue/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"net_burn_or_income/forecast/*",element:d.jsx(pt,{})}),d.jsx(P,{path:"net_burn_or_income/*",element:d.jsx(ie,{})}),n===!0&&d.jsxs(d.Fragment,{children:[d.jsx(P,{path:"accounts_payable_aging/*",element:d.jsx(ls,{})}),d.jsx(P,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:d.jsx(cs,{})})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx(P,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:d.jsx(ds,{})}),d.jsx(P,{path:"accounts_receivable_aging/*",element:d.jsx(us,{})})]}),d.jsx(P,{path:"cash_position/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"top_expenses/*",element:a===!0?d.jsx(ie,{}):d.jsx(Me,{})}),d.jsx(P,{path:"cash_in_cash_out/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"company_details",element:d.jsx(ss,{})}),d.jsx(P,{path:"referrals/*",element:d.jsx(In,{to:"../../rewards/refer",replace:!0})}),d.jsx(P,{path:"*",element:d.jsx(Me,{})})]})}export{xr as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Css5YxVy.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-CSm69gJV.js";import{Zt as k,ZA as J,gJ as L,gI as M,gH as W,kT as X,Xr as q,uV as K,fI as D,Z0 as B,kR as T,Zu as S,ZD as F,kP as G,la as j}from"./zeni-epic-state-CQbasAjU.js";import{bL as Q,_ as R,c as N,z as Z,a2 as p,$ as v,a5 as U,bM as Y,D as _,bN as ee,p as te}from"./index-Di0x3KLC.js";import{u as H,n as O}from"./mui-CgZjFJJF.js";import"./sentry-BBNrx1Ml.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]="5fedb911-399e-4437-8397-13bdbea56776",e._sentryDebugIdIdentifier="sentry-dbid-5fedb911-399e-4437-8397-13bdbea56776")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(L(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(J(n,a,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.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
|
-
`,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),d=s.poppedPathname??P();n(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=V(),c=e??s,{useFeatureGate:r}=N(),i=Z.getSignedInUser(),b=h((u=>D(u))),g=H(),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(z,{vendorId:c,billId:d}),l.jsx(oe,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=O.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${_.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,de=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:c}=d;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=V(),c=e??s,r=Z.getSignedInUser(),{useFeatureGate:i}=N(),b=H(),g=h((u=>D(u))),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${_.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(z,{vendorId:c,billId:d}),l.jsx(de,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,Ie as D,z as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Css5YxVy.js";import{a as d}from"./sentry-BBNrx1Ml.js";import{h as q,u as A,g as G,i as N,j as c,N as W,l as X,n as F,o as O}from"./core-CSm69gJV.js";import{Xw as _,fI as M,WN as R,n3 as Y,SN as I,XB as $,Xq as z,m3 as V,SO as P,WS as H,WT as J,Xs as K,Xr as L}from"./zeni-epic-state-CQbasAjU.js";import{b6 as Q,k as U,a2 as Z,p as tt}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import{d as k}from"./decodeURIComponentSafe-DD9Neunj.js";import{w as et}from"./withTransactionSidePanel-Bb5FevX_.js";import{f as at,c as nt}from"./routePaths-DNuW5jQV.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./useAskAiCfoHostNavButtonProps-Ba1QPj42.js";import"./TransactionDetailScreen-Dpzd-yXF.js";import"./useInitialThreadRequest-2hi5iAsL.js";import"./expenseAutomationHelper-Djn6yrb_.js";import"./stripSplatSuffix-L-JRH5Ri.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="edb6af54-9219-4071-afdc-f3479caa2c4e",a._sentryDebugIdIdentifier="sentry-dbid-edb6af54-9219-4071-afdc-f3479caa2c4e")}catch{}})();const ot=X((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=q(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:x}=N(),r=k(w??""),p=k(x??""),f=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=c((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const S=c((n=>n.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&S==="Completed"&&(D(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,S]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(W,{to:b(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(F,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Css5YxVy.js";import{a as r}from"./sentry-BBNrx1Ml.js";import{au as f,av as i,Z as l,a2 as p}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import m from"./NotFoundScreen-Bowln8Np.js";import{h as b,g as u}from"./core-CSm69gJV.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]="c5cccb90-93ef-49b9-9d2f-d25df6a7e6b3",e._sentryDebugIdIdentifier="sentry-dbid-c5cccb90-93ef-49b9-9d2f-d25df6a7e6b3")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./sentry-BBNrx1Ml.js";import{u as l,h as f,g as m}from"./core-CSm69gJV.js";import{i0 as p,V8 as g,V9 as _}from"./zeni-epic-state-CQbasAjU.js";import{u as b,L as h,z as y}from"./index-Di0x3KLC.js";import"./liveblocks-Css5YxVy.js";import"./recharts-DQBC-7lc.js";import"./mui-CgZjFJJF.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.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]="a48ab914-268c-45f4-8c38-e3b31f5837ea",e._sentryDebugIdIdentifier="sentry-dbid-a48ab914-268c-45f4-8c38-e3b31f5837ea")}catch{}})();function V(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:d}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Css5YxVy.js";import{a as g}from"./sentry-BBNrx1Ml.js";import{u as O,g as _,h as w,t as V,j as l,N as U}from"./core-CSm69gJV.js";import{z as r,G as M,J as P,k as A,K as N,S as $,T as G,N as J}from"./index-Di0x3KLC.js";import{fI as K,Uw as Q,UZ as R,UQ as W,gl as Y,gn as Z,UV as q,gY as B,dk as H,U_ as X,U$ as ee}from"./zeni-epic-state-CQbasAjU.js";import{u as te,n as ne}from"./mui-CgZjFJJF.js";import{u as ae}from"./useDeviceId-ClCFOYOX.js";import{f as se}from"./analyticsHelper-DbQsERTh.js";import{t as ie}from"./getLocaleForTenant-uCoslywF.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="60662eca-6bf8-4aae-9f75-a0cb3959ea3e",t._sentryDebugIdIdentifier="sentry-dbid-60662eca-6bf8-4aae-9f75-a0cb3959ea3e")}catch{}})();const T=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Te(){const t=O(),s=_(),m=w(),[b]=V(),n=b.get("token"),p=b.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>K(e))),k=l((e=>Q(e))),D=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(R(n,i,f)))}),[n,p,t,i,f,a?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(W(k.tenantsInOrder),a.zeniSessionId),Y(a.userId,a.zeniSessionId,o.tenantId),t(Z(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(q("Completed")),M.updateAppLocaleID(ie(o)),se(a,o,v,void 0,k.tenantsInOrder),B().then((()=>{const e=J();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",H(o.productSettings))}),2e3))}),[I,S,y,a,o,k,v,s.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(X(i,c,d))}),[i,d,t,c]),F=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx($,{phoneNumber:C,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||D!=null){const e=s.state?.origin??"/";return u.jsx(U,{to:e,state:{...s.state,origin:""}})}if(!T(n,p)||f==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(U,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Css5YxVy.js";import{h as r,l as i}from"./core-CSm69gJV.js";import{ak as n}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import"./sentry-BBNrx1Ml.js";import"./zeni-epic-state-CQbasAjU.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-Css5YxVy.js";import{a as r}from"./sentry-BBNrx1Ml.js";import{u as A,g as j,j as o,N as C}from"./core-CSm69gJV.js";import{Vb as P,fI as V,gp as x,Vc as z,Vd as D,Ve as M,Vf as R,pW as k,TS as L}from"./zeni-epic-state-CQbasAjU.js";import{z as h,af as I}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="2a77b005-341b-4c7e-9615-b4707596923f",n._sentryDebugIdIdentifier="sentry-dbid-2a77b005-341b-4c7e-9615-b4707596923f")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),b=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),w=o(z),y=o(D),c=o(M),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const U=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(L(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Css5YxVy.js";import{h as G,u as Y,g as z,i as Q,j as d,l as H,n as J,o as S}from"./core-CSm69gJV.js";import{fI as v,Az as R,vc as K,W3 as M,v7 as T,bq as X,c0 as Z,v8 as ee,W4 as ae,VN as C,ek as te,Es as se,W5 as oe,EQ as re,e0 as ne,d$ as ce}from"./zeni-epic-state-CQbasAjU.js";import{ag as ie,z as le,ao as de,aq as fe,V as me,a6 as pe,k as w,aB as ue,p as he,c as ge,$ as Fe}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import be from"./NotFoundScreen-Bowln8Np.js";import{F as Ie}from"./FeaturePreviewScreen-yUa195bz.js";import{a as g}from"./sentry-BBNrx1Ml.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-Ba1QPj42.js";import{u as Ce}from"./useInitialThreadRequest-2hi5iAsL.js";import{t as Te}from"./routePaths-DNuW5jQV.js";import{M as ye}from"./MobileAppDrawer-DfWAieCr.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="f8f2f4cb-4273-4a9f-bb38-2f6b5407d453",s._sentryDebugIdIdentifier="sentry-dbid-f8f2f4cb-4273-4a9f-bb38-2f6b5407d453")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=Q(),[p,u]=g.useState(!1),[f,A]=g.useState(!1),F=le.getSignedInUser(),k=d((t=>v(t))),N=k.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>x.pandLByForecastID[t]!=null&&ee(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:$}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(K());else if(l&&!f){A(!0);const t=((m,P,O)=>P!=null?m.forecasts.findIndex((I=>I.id===P)):O!=null?m.forecasts.findIndex((I=>I.id===O)):m.forecasts.length>0?0:-1)(i,r,D?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(a(M(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,A,R,T,b]);const E=me(),q=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),B=Ce(k?.companyId,{clearParams:l&&f}),[_,V]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:_,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:N,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:q,isAiCfoAccessEnabled:W,onAskAiCfoClick:$,initialOpenThreadRequest:B,onClickMenuIcon:()=>{L(!0)}})]})}function Qe(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Qe as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Css5YxVy.js";import{V$ as re,fI as Y,m3 as H,e0 as N,d$ as le,SR as Q,Vo as ce,Di as Pe,W0 as J,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,W1 as ue,sx as Ve,g9 as Ae,gG as Re,W2 as _,Df as me,De as ge,Dv as Fe,c9 as Oe}from"./zeni-epic-state-CQbasAjU.js";import{_ as fe,c as X,$ as G,z as W,h as he,F as Ce,ad as ye,ax as be,ay as Ze,a9 as Se,D as F,ae as De,G as K,az as Be,ao as Ue,aq as $e,a6 as ze,k as we,K as _e,p as Ge,aA as He,V as We}from"./index-Di0x3KLC.js";import{D as xe,n as M,S as Ie}from"./mui-CgZjFJJF.js";import ae from"./NotFoundScreen-Bowln8Np.js";import{a as c}from"./sentry-BBNrx1Ml.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-CSm69gJV.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-Ba1QPj42.js";import{M as Ne}from"./MobileAppDrawer-DfWAieCr.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.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]="4aa16122-6f90-4ca1-afe8-b5e737c87d57",e._sentryDebugIdIdentifier="sentry-dbid-4aa16122-6f90-4ca1-afe8-b5e737c87d57")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>H(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(G.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=Q(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},V=()=>{O===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(G.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),y=!L||A,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,ke=M(De.H6Regular)`
|
|
6
|
-
margin-top: ${F.sp7};
|
|
7
|
-
padding-left: ${F.sp8};
|
|
8
|
-
padding-right: ${F.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=M(De.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${F.sp8};
|
|
14
|
-
padding-right: ${F.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${F.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>H(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(G.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),v=Q(r),T=ce(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(J())},C=()=>{O===!0?S(!0):w()},V={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(G.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:A}=Ce(r?.tenantId),y=!L||A,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Je((function(e,t){const d=ue(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(He);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),b=W.getSignedInUser(),h=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:O}=m(G.isDebitCardFeatureEnabled),Z=g((s=>H(s))),k=!N(O,h)&&Z,S=Q(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,v]=c.useState(!1),[T,B]=c.useState("off"),[U,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Re(s))),y=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(_e.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Ge(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Css5YxVy.js";import T from"./NotFoundScreen-Bowln8Np.js";import{a as r}from"./sentry-BBNrx1Ml.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-CSm69gJV.js";import{fI as B,a1E as b,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-CQbasAjU.js";import{I as L,z as I,aq as $,dL as G}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Ba1QPj42.js";import{M as J}from"./MobileAppDrawer-DfWAieCr.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.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]="a1303600-246d-4835-9e56-a0d9717258b9",e._sentryDebugIdIdentifier="sentry-dbid-a1303600-246d-4835-9e56-a0d9717258b9")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=L(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:u}=M(),g=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback(((a,i,E)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(g(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),f=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-Css5YxVy.js";import Z from"./NotFoundScreen-Bowln8Np.js";import{a as p}from"./sentry-BBNrx1Ml.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as q,o as b}from"./core-CSm69gJV.js";import{fI as E,ZI as h,Z_ as R,Od as U,O9 as L,Oc as f,O2 as N,_n as B,O6 as z,Of as K}from"./zeni-epic-state-CQbasAjU.js";import{z as T,w as _,c8 as F,q as $,bR as G,c9 as H}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import{u as J,R as x}from"./ReimbursementApprovalRuleDetailScreen-meuFzn-o.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="85a361d4-a598-4e51-8646-cf1108b1a993",e._sentryDebugIdIdentifier="sentry-dbid-85a361d4-a598-4e51-8646-cf1108b1a993")}catch{}})();const j="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(_(F)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),g=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,I,y)=>{o.endsWith(j)&&y.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=O((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(_(H)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(P,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));J();const I=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{I?.updateStatus.fetchState==="Completed"&&a(U())}),[I]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||g!=="Not-Started"||e||(w(!0),a(z(!1,!0)))}),[v,g,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const y={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...y})};function le(){return r.jsxs(q,{children:[r.jsx(b,{path:"/",element:r.jsx(X,{})}),r.jsx(b,{path:"/new",element:r.jsx(x,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(b,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Css5YxVy.js";import{z as j,a6 as S,k as u,K as b,e1 as k,c as I,$ as C}from"./index-Di0x3KLC.js";import"./mui-CgZjFJJF.js";import g from"./NotFoundScreen-Bowln8Np.js";import{a as m}from"./sentry-BBNrx1Ml.js";import{u as D,j as h,h as F,g as L,l as T,n as U,o as d,N as y}from"./core-CSm69gJV.js";import{fI as _,a2F as w,a2G as p,Ei as P,q3 as V,a2H as G,Eg as q}from"./zeni-epic-state-CQbasAjU.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.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]="2c2788ac-92f8-404e-809d-72e8c443da51",e._sentryDebugIdIdentifier="sentry-dbid-2c2788ac-92f8-404e-809d-72e8c443da51")}catch{}})();const z=T((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),H=()=>{const e=D(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>_(o))),c=F(),x=L(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),E=f?.firstName!=null?f.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(b.Event.inviteEmailViewed))(o)}):null,a.jsx(z,{navigate:c,location:x,currentTenant:r,companyName:v,userName:E,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-Css5YxVy.js";import{a as u,R as T,t as A}from"./sentry-BBNrx1Ml.js";import{u as z,h as D,j as l,g as M,N as O,l as P}from"./core-CSm69gJV.js";import{u as j,z as s,k as E,G as F,J as N,K as _,M as B,N as V,O as J,Q as v}from"./index-Di0x3KLC.js";import{fI as Q,Uw as W,UQ as Y,gl as $,gn as K,UV as R,gY as G,dk as H,UW as y,UX as X,UY as q,c0 as U}from"./zeni-epic-state-CQbasAjU.js";import{u as Z}from"./mui-CgZjFJJF.js";import{u as ee}from"./useDeviceId-ClCFOYOX.js";import{f as te}from"./analyticsHelper-DbQsERTh.js";import{t as ne}from"./getLocaleForTenant-uCoslywF.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.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]="85d53fa0-6696-4577-bf74-cfa76c194ea6",t._sentryDebugIdIdentifier="sentry-dbid-85d53fa0-6696-4577-bf74-cfa76c194ea6")}catch{}})();const ie=P((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(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 c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(q({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(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(X(n,a)))},clearSignInError:()=>{t(y())}}}))(J),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>Q(e))),I=l((e=>W(e))),m=M(),w=Z().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Y(I.tenantsInOrder),o.zeniSessionId),$(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(R("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),G().then((()=>{const e=V();e!=null&&N(e)})),setTimeout((()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",H(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?f.jsx(B,{onClose:()=>i(y()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Css5YxVy.js";import{a as i}from"./sentry-BBNrx1Ml.js";import{u as c,g as d,N as u}from"./core-CSm69gJV.js";import{z as a,k as n,K as m,a5 as p}from"./index-Di0x3KLC.js";import{g$ as g,Va as y}from"./zeni-epic-state-CQbasAjU.js";import{n as b}from"./mui-CgZjFJJF.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.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]="43125b13-2109-4c14-9a4a-16f24b22a610",t._sentryDebugIdIdentifier="sentry-dbid-43125b13-2109-4c14-9a4a-16f24b22a610")}catch{}})();function L(){const t=c(),e=d(),r=i.useRef(!1),f=a.isSignedIn(),o=e.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),y(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),a.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.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: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-Css5YxVy.js";import fe from"./NotFoundScreen-Bowln8Np.js";import{a as u}from"./sentry-BBNrx1Ml.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as be,l as Ee,n as Ie,o as h}from"./core-CSm69gJV.js";import{Qy as se,QB as De,Qv as Ce,a2I as Re,fI as te,a2J as ne,R0 as E,QP as b,Qs as _e,Rv as ye,Ro as Ge,a2K as oe,gk as ie,a2L as H,a2M as Ae,Qo as Ue,Ql as ve,v2 as Be,uS as xe,mD as we,QN as Pe,a2N as je,RH as Ke,QJ as Le,Ra as Fe,R7 as Ne,QE as Qe,R4 as $e,QZ as Ze}from"./zeni-epic-state-CQbasAjU.js";import{z as I,e2 as ze,I as Oe,c as Ve,$ as _,a2 as re,p as y,a6 as Me,k as W,K as qe,e3 as Je,Q as X,ac as He}from"./index-Di0x3KLC.js";import{n as We}from"./mui-CgZjFJJF.js";import{u as Xe}from"./useInitialThreadRequest-2hi5iAsL.js";import{M as Ye}from"./MobileAppDrawer-DfWAieCr.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as Y,e as na}from"./TaskListScreen-BcmmmrTo.js";import{u as oa}from"./useTaskManagerPusherEvents-Ypcuts7J.js";import"./recharts-DQBC-7lc.js";import"./analytics-BreoHt0J.js";import"./plaid-vksPD1j4.js";import"./dnd-BvLWSTOT.js";import"./stripe-cKAAJElX.js";import"./lottie-scQSn0xo.js";import"./lexical-CC3pmboN.js";import"./pdf-DXPt-TDj.js";import"./utils-B8asVtkx.js";import"./InboxNotificationsProvider-C3xMqTmq.js";import"./useTaskManagerAccess-D_aPdTiN.js";import"./useAskAiCfoHostNavButtonProps-Ba1QPj42.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]="4e380939-6c3e-42ab-9ebd-d33b7eeba771",e._sentryDebugIdIdentifier="sentry-dbid-4e380939-6c3e-42ab-9ebd-d33b7eeba771")}catch{}})();function ia(){const e=ee(),a=ae(),n=I.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,D,C)=>{a(De({name:i,content:D,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(ze,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const F=e=>e?.taskState?.taskByID,K=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([K,(e,a)=>{const n=K(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=K(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=Ee((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?H(e.taskGroupState,S):void 0,i=I.getSignedInUser(),D=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:D??""},v=ne(e),{tenantEmailDomain:B}=l,G=t.recurringSourceTaskId,x=G!=null?`${X.appUrl}/${B}/tasks/${encodeURIComponent(G)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:I.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:He.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${X.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:v,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((T=>H(e.taskGroupState,T))).filter((T=>T!=null&&!T.isDeleted)).map((T=>({id:T.id,name:T.name,isDefault:T.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e($e(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Qe(a.taskId))},onSnoozeTask:(s,i)=>{e(Ne(s,i))},onUnsnoozeTask:s=>{e(Fe(s))},onCreateSubtask:(s,i)=>{e(Le({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Ke({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=U(S),i=y(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(je({taskId:n}))},onDeleteTaskClick:()=>{e(Pe(n))},updateFilesEntity:s=>{e(we({files:s}))},onDeleteFile:s=>{e(xe(s))},onEditFileName:(s,i)=>{e(Be(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(E(!1,n))},onCreateTagClick:s=>{e(ve(s,n))},onDeleteTagClick:s=>{e(Ue(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(Je);function L(){const e=ee(),a=ae(),n=ge(),c=Oe(),{taskId:t,taskGroupId:l}=he(),d=g((o=>te(o))),S=Xe(d?.companyId),{useFeatureGate:s}=Ve(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:D}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=s(_.isTaskGroupAssigneesEnabled),[G,x]=u.useState(!1),[T,ce]=u.useState(!1),[N,le]=u.useState(!1),[Q,w]=u.useState(!1),R=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),$=g((o=>ne(o))),Z=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(E(!1,t)),t!=null&&a(b(t))}),[a,t]);const z=I.getSignedInUser()?.userId,de=I.isZeniUser(),ke=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),O=()=>{d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain))},V=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),O()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(z,k)]}),[d?.companyId,z]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(E(!0,t)),a(b(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((j,me,{isZeniUser:Se,storedSyncToken:Te,taskId:J})=>{if(j!==m.TASK_CREATED&&j!==m.TASK_UPDATED)return"none";const f=ea(me);return f==null?"none":f.parent_task_id===J?"refreshSubtasks":j!==m.TASK_UPDATED||f.task_id!==J?"none":f.is_deleted===!0?"leaveDeleted":f.is_private!==!0||Se?f.sync_token!=null&&f.sync_token===Te?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(E(!0,t)),a(b(t))):p==="refreshSubtasks"?a(b(t)):p==="leaveDeleted"?V():p==="leaveNoAccess"&&O();break}case m.TASKS_BULK_UPDATED:{const p=Y(k);if(p==null)break;p.task_ids.includes(t)&&a(E(!0,t)),a(b(t));break}case m.TASKS_BULK_DELETED:{const p=Y(k);if(p==null)break;if(p.task_ids.includes(t)){V();break}a(b(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(E(!0,t));break}}}}),u.useEffect((()=>{T||$.fetchState==="Completed"||(ce(!0),a(_e()))}),[T,a,$.fetchState]),u.useEffect((()=>{N||Z==="Completed"||(le(!0),a(ye()))}),[N,a,Z]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(Ge([t],null,{isArchived:!1})),w(!0))}),[a,t]);u.useEffect((()=>{if(Q)if(A!=="In-Progress"){if(R.current){if(A==="Error")return w(!1),void(R.current=!1);if(A==="Completed"){w(!1),R.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=U(o);e(k,{state:{pathnameStackToGoBack:y(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[Q,A,d,n,e]);const M=g((o=>oe(o,t))),P=M.fetchState,q=I.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(P==="Error"&&M.error?.code===400){const{tenantEmailDomain:o}=d,k=U(o),p=y(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(be,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[P==="Completed"?r.jsx(Me,{analytics:W,onLoad:o=>(k=>k.trackPageLoaded(qe.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(Ye,{isAppContentDrawerOpen:G,handleDrawerToggle:o=>{x(o)}}),r.jsx(ca,{analytics:W,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:q,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:P,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:D,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:B})]})]})}const la=We.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: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,U=e=>`/${e}/tasks`;function xa(){return r.jsxs(Ie,{children:[r.jsx(h,{path:"/new",element:r.jsx(L,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(h,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(h,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(h,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(h,{path:"*",element:r.jsx(fe,{})})]})}export{xa as default};
|