@zeniai/web-app-ui 5.4.6-qa → 5.4.7-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-D6HgzjWo.js +9 -0
- package/dist/assets/{ActualMatchingMatchDetailScreen-DUeW0FeC.js → ActualMatchingMatchDetailScreen-DrT4wLj3.js} +1 -1
- package/dist/assets/AddressRoutes-D7_KsY7f.js +1 -0
- package/dist/assets/{AddressScreen-p0IFMNFg.js → AddressScreen-yLBHCU8H.js} +2 -2
- package/dist/assets/{AiCfoScreen-BfgMLiU4.js → AiCfoScreen-C95CmuT8.js} +5 -5
- package/dist/assets/{AppDrawer-BIzjhsA0.js → AppDrawer-wuSLq_GC.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Bs7TBssf.js → BillPayApprovalRoutes-Cz4FnR8k.js} +1 -1
- package/dist/assets/{BillPayRoutes-7Fbpt50_.js → BillPayRoutes-lBcH3kG4.js} +7 -7
- package/dist/assets/{BusinessVerificationPageScreen-WqzTt6qr.js → BusinessVerificationPageScreen-CNBsygLT.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-lz2EFhk_.js → CardsAiCfoScreen-Dnj7L-Aq.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C8ZvDyvO.js → ChargeCardRoutes-BebvufWC.js} +7 -7
- package/dist/assets/CompanyPassportScreen-CWQymYC0.js +1 -0
- package/dist/assets/ConnectionAuthScreen-CTDny4hz.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CIry93lh.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-GZvUxipf.js → CustomerOnboardingRoutes-07XvuYSy.js} +3 -3
- package/dist/assets/{DashboardRoutes-Dl-mk1tS.js → DashboardRoutes-DtOF4t57.js} +4 -4
- package/dist/assets/{DefaultTenantHome-7LWmCmoi.js → DefaultTenantHome-CweSG_GQ.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-YrrlMQvW.js → DomesticWireDetailScreen-jf25UFiV.js} +4 -4
- package/dist/assets/{DrawerScreen-C4n50ad8.js → DrawerScreen-5p-VaDVX.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CacM-JPm.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-DwNC4xUT.js → ExpenseAutomationRoutes-Byqo8eZZ.js} +4 -4
- package/dist/assets/{FeaturePreviewScreen-DUpjhzBa.js → FeaturePreviewScreen-CCuIxuhc.js} +1 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BLlIOZQ7.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-Cp0oPhyn.js → InboxNotificationsProvider-yzTJ7wEQ.js} +1 -1
- package/dist/assets/{InvoicingRoutes-DyGqDLsr.js → InvoicingRoutes-D2PWzI_4.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-AGVR-z-R.js → MagicLinkRoutes-CaOpn3qT.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-DiZU5_QE.js +12 -0
- package/dist/assets/MobileAppDrawer-BixbLTmv.js +1 -0
- package/dist/assets/NotFoundScreen-BkN7W6JR.js +1 -0
- package/dist/assets/NotificationRoutes-BdD13Onr.js +1 -0
- package/dist/assets/OAuthConsentScreen-NFsa-sgn.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Bm0J5IMo.js +1 -0
- package/dist/assets/{PaymentLinkScreen-iO2zhR0_.js → PaymentLinkScreen-CVV3tuZg.js} +1 -1
- package/dist/assets/{PeopleRoutes-dRYeyEkw.js → PeopleRoutes-I7YtZIOQ.js} +5 -5
- package/dist/assets/PerformanceRoutes-Bh2GJMgS.js +1 -0
- package/dist/assets/{Preview-BCKzfdtC.js → Preview-C1srXT8b.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-r5X8FGIQ.js → QBOConnectionScreen-CMu1wr6r.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DPr_Xw2e.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C_iPjPlT.js → ReimbursementApprovalRuleDetailScreen-B-Gs9TwE.js} +1 -1
- package/dist/assets/ReimbursementRoutes-C5mKxHY0.js +68 -0
- package/dist/assets/{ReportsRoutes-DQn4zD_M.js → ReportsRoutes-rLspO2bh.js} +1 -1
- package/dist/assets/RewardsRoutes-BAg5LFP3.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-S_TRD8uL.js → ScheduleDetailsPrepaidExpensesScreen-CUlxxOT4.js} +5 -5
- package/dist/assets/ScreenRoutes-B27hAn5a.js +2 -0
- package/dist/assets/{SettingsRoutes-BwRfFRaL.js → SettingsRoutes-BafV6BMK.js} +6 -6
- package/dist/assets/{SetupPagesScreen-BvGqVswb.js → SetupPagesScreen-CYo2TZ1p.js} +5 -5
- package/dist/assets/SignInScreen-CT-WoxFu.js +1 -0
- package/dist/assets/SignOutScreen-CUkfHzEK.js +9 -0
- package/dist/assets/{TaskListScreen-B_rM9OHZ.js → TaskListScreen-CNDqJnu1.js} +2 -2
- package/dist/assets/TaskRoutes-BeXt3gMh.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CSoIoyzR.js +1 -0
- package/dist/assets/TransactionDetailScreen-D3daFCwt.js +5 -0
- package/dist/assets/{TransactionListRoutes-DntzfHHO.js → TransactionListRoutes-Cp-cSB8W.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CIEKPm1R.js → TreasuryRoutes-DnPKaz7R.js} +6 -6
- package/dist/assets/{VendorsRoutes-BJEgNAKV.js → VendorsRoutes-CY-uooJs.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-CdXrY5Nn.js +12 -0
- package/dist/assets/ZeniAccountRoutes-CaWZaYnh.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-C3LaZbC9.js +9 -0
- package/dist/assets/{accountMappingHelper-qy_s46Hj.js → accountMappingHelper-HDztJioo.js} +1 -1
- package/dist/assets/{analytics-BLeep1MS.js → analytics-D7SbUCRL.js} +1 -1
- package/dist/assets/{analyticsHelper-DW5cduzA.js → analyticsHelper-BNh1_jfv.js} +1 -1
- package/dist/assets/{core-CAh5rCuj.js → core-Bc2mnalE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-9S3zcxzZ.js → decodeURIComponentSafe-addd21BI.js} +1 -1
- package/dist/assets/{dnd-CrX2pTWR.js → dnd-B0zyAl0s.js} +1 -1
- package/dist/assets/{empty-DjSLUPoh.js → empty-CHx0Pvbk.js} +1 -1
- package/dist/assets/{empty-3-W7Grl0.js → empty-Nco5SaTV.js} +1 -1
- package/dist/assets/{emptyVideoElement-Dl0wMA4P.js → emptyVideoElement-B-mo7W39.js} +1 -1
- package/dist/assets/epic-BS7m068w.js +2 -0
- package/dist/assets/expenseAutomationHelper-6llqwO2d.js +1 -0
- package/dist/assets/{getLocaleForTenant-bfNzENpe.js → getLocaleForTenant-D-baUPRb.js} +1 -1
- package/dist/assets/{index-DtOneCvz.js → index-CtE8HnsY.js} +9414 -9414
- package/dist/assets/{index-BgMQtMJd.js → index-CyFWesiE.js} +1 -1
- package/dist/assets/{index-P2FyohD2.js → index-D3o0K0j9.js} +1 -1
- package/dist/assets/{index-DY2rccfR.js → index-DLOd76r9.js} +1 -1
- package/dist/assets/{index-DZNQ55yD.js → index-DLaXtkBa.js} +2 -2
- package/dist/assets/{index-xYxbPXxl.js → index-DcKiQFzt.js} +1 -1
- package/dist/assets/{index-C914hS8b.js → index-Dv6pUA2Y.js} +1 -1
- package/dist/assets/{index-SrluRRUS.js → index-L7bL_O40.js} +1 -1
- package/dist/assets/{lexical-Caj6E5Mq.js → lexical-CCch0Fzo.js} +1 -1
- package/dist/assets/{liveblocks-MCrpLltn.js → liveblocks-CevUFagi.js} +1 -1
- package/dist/assets/{lottie-xRtpxbQu.js → lottie-Dhd_0CJG.js} +1 -1
- package/dist/assets/{mui-D65-RCnL.js → mui-CUsYvTMG.js} +1 -1
- package/dist/assets/{pathToGoBack-DxXqfwM8.js → pathToGoBack-h9zXpfmB.js} +1 -1
- package/dist/assets/{pdf-BJQfcDMm.js → pdf-CuegwamZ.js} +3 -3
- package/dist/assets/{pdf-lib-H7CBLuxn.js → pdf-lib-C0hF4MJX.js} +1 -1
- package/dist/assets/{plaid-BLMTayxO.js → plaid-Dxz6lSJz.js} +1 -1
- package/dist/assets/{pusher-DO7geG4Q.js → pusher-Dov6Wpsh.js} +1 -1
- package/dist/assets/{react-CpKDfhGy.js → react-1IBu4NKN.js} +1 -1
- package/dist/assets/{react-wuXZEj6S.js → react-2Pr1ccsY.js} +1 -1
- package/dist/assets/{react-B9DWDj53.js → react-CuKi_1_s.js} +1 -1
- package/dist/assets/{react-Zn_qRkEQ.js → react-M3pe5IMI.js} +1 -1
- package/dist/assets/{react-dW8eloPB.js → react-VbHSu8I-.js} +1 -1
- package/dist/assets/{react-Bn1j06E6.js → react-kEWOHePJ.js} +1 -1
- package/dist/assets/{recharts-dm9pBwNL.js → recharts-BjkXpBn6.js} +1 -1
- package/dist/assets/{reportTimeframe-BvcIi7CW.js → reportTimeframe-CmNj9zQY.js} +1 -1
- package/dist/assets/{routePaths-CY1QL6df.js → routePaths-Dv28cYw1.js} +1 -1
- package/dist/assets/{sentry-VKV9InRh.js → sentry-BrSPpZKf.js} +1 -1
- package/dist/assets/{stripSplatSuffix-Dk-93TcV.js → stripSplatSuffix-wwIiiS3L.js} +1 -1
- package/dist/assets/{url-Cisremx1.js → url-2Ybk2sxg.js} +1 -1
- package/dist/assets/{url-DHW-P0JF.js → url-IFQJDLIg.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-CZpCt66v.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CS1N2-33.js → useAiCfoDashboardSuggestedQuestionsChips-C7G9HKEb.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-JRFYPtx4.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-CSi4eAbt.js → useChargeCardPusherEvents-D_qYIckD.js} +1 -1
- package/dist/assets/{useDeviceId-YdOwWWnw.js → useDeviceId-7gkngZ73.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-aPg3qWb4.js +1 -0
- package/dist/assets/{useEnsureVendorListLoaded-BN6cn_-b.js → useEnsureVendorListLoaded-nIoTpKXy.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CFiqVuk5.js → useInitialThreadRequest-gQdpW0fv.js} +1 -1
- package/dist/assets/useTaskManagerAccess-94Xv3cKO.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-xZZkhmGA.js → useTaskManagerPusherEvents-CdVgZy4d.js} +1 -1
- package/dist/assets/{utils-DRaLbDIg.js → utils-BKSIhN7N.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CEKL9vmB.js → withTransactionSidePanel-DDzMeSLR.js} +2 -2
- package/dist/assets/{zeni-epic-state-BbP34Aqp.js → zeni-epic-state-VmxO3Mnv.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AccountMappingScreen-CohTc0v4.js +0 -9
- package/dist/assets/AddressRoutes-xqFWfSGM.js +0 -1
- package/dist/assets/CompanyPassportScreen-Bca5R8ki.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DFsuMn26.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CMlJIa4p.js +0 -1
- package/dist/assets/EntityDetailRoutes-DAuCsR0B.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-N82hmlbs.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-myVmwr5U.js +0 -12
- package/dist/assets/MobileAppDrawer-D3J2lUPk.js +0 -1
- package/dist/assets/NotFoundScreen-Bu_5_beT.js +0 -1
- package/dist/assets/NotificationRoutes-T_awZYu2.js +0 -1
- package/dist/assets/OAuthConsentScreen-CQIGPoYo.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Bb5TI8zZ.js +0 -1
- package/dist/assets/PerformanceRoutes-CIGy_r0j.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-C61lKuXL.js +0 -1
- package/dist/assets/ReimbursementRoutes-C8jRQBDZ.js +0 -68
- package/dist/assets/RewardsRoutes-wWL8-dzP.js +0 -1
- package/dist/assets/ScreenRoutes-C4eCwrs-.js +0 -2
- package/dist/assets/SignInScreen-CYtUklXw.js +0 -1
- package/dist/assets/SignOutScreen-DEbT0Pds.js +0 -9
- package/dist/assets/TaskRoutes-Dsy3v7vH.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CXvYbIYv.js +0 -1
- package/dist/assets/TransactionDetailScreen-CB9xnJHu.js +0 -5
- package/dist/assets/WiseConfirmationScreen-DSrhxVMk.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CIslP6ey.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-DNRMt6k7.js +0 -9
- package/dist/assets/epic-VKtq_xpr.js +0 -2
- package/dist/assets/expenseAutomationHelper-Br3isSOz.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-Dc0_3FT_.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CviB8_e-.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-Od7PFitR.js +0 -1
- package/dist/assets/useTaskManagerAccess-6raGPFR-.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-CtE8HnsY.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BrSPpZKf.js"><link rel="modulepreload" crossorigin href="/assets/core-Bc2mnalE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-VmxO3Mnv.js"><link rel="modulepreload" crossorigin href="/assets/mui-CUsYvTMG.js"><link rel="modulepreload" crossorigin href="/assets/analytics-D7SbUCRL.js"><link rel="modulepreload" crossorigin href="/assets/utils-BKSIhN7N.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.4.
|
|
3
|
+
"version": "5.4.7-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@sentry/react": "^9.42.1",
|
|
30
30
|
"@stripe/stripe-js": "^4.4.0",
|
|
31
31
|
"@zeniai/client-analytics": "2.1.11",
|
|
32
|
-
"@zeniai/client-epic-state": "5.3.
|
|
33
|
-
"@zeniai/web-components": "4.4.
|
|
32
|
+
"@zeniai/client-epic-state": "5.3.2",
|
|
33
|
+
"@zeniai/web-components": "4.4.43",
|
|
34
34
|
"color": "3.1.3",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
36
36
|
"dnd-core": "^16.0.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as B}from"./liveblocks-MCrpLltn.js";import{a as o}from"./sentry-VKV9InRh.js";import{h as H,g as K,u as W,j as m,s as q,l as X}from"./core-CAh5rCuj.js";import{ag as Y,p as ee,c as R,z as te,q as G,ah as ne,j as ae,R as ce}from"./index-DtOneCvz.js";import{bn as se,fI as oe,gZ as ie,oF as Q,Vr as re,ic as J,gk as ue,ow as le,Vs as de,Vt as pe,uh as ge,m3 as me,ou as Ae,oq as be,oB as Ie,ie as fe,Vu as ye,Vv as Se}from"./zeni-epic-state-BbP34Aqp.js";import{n as he}from"./mui-D65-RCnL.js";import{M as Ee}from"./MobileAppDrawer-D3J2lUPk.js";import{q as $}from"./QBOConnectionScreen-r5X8FGIQ.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-qy_s46Hj.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="efc49d4a-d3ac-48b3-97dc-dea11feb4e05",a._sentryDebugIdIdentifier="sentry-dbid-efc49d4a-d3ac-48b3-97dc-dea11feb4e05")}catch{}})();const u="zeni_pending_projects_enable",l={pending:"pending",ready:"ready"},ve=he.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`,we=X((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(u),c=i===l.pending||i===l.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:A}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:v,vendorsAccountSection:w,filing1099Section:C}=r,{incomeAccount:x,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:V}=v,{prepaidExpensesAccount:p,fixedAssetsAccount:T,accruedExpensesAccount:O}=w,{bankAccount:M,expenseCategory1099:j}=C,b=h(e.accountMappingView.incomeAccountList,x.selectedOption),k=h(e.accountMappingView.expenseAccountList,F.selectedOption),I=h(e.accountMappingView.billPayAccountList,s.selectedOption),_=h(e.accountMappingView.reimbursementsAccountList,V.selectedOption),P=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),D=E(e.accountMappingView.fixedAssetsAccountList,T.selectedOptions),f=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,M.selectedOptions),y=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,j),t={selectedIncomeAccountId:b?.accountId,selectedExpenseAccountId:k?.accountId,selectedBillPayAccountId:I?.accountId,selectedReimbursementsAccountId:_?.accountId,selectedPrepaidExpensesAccountIds:P.map((n=>n.accountId)),selectedFixedAssetsAccountIds:D.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:f.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:y};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(ye())):a(J())},onSaveClick:()=>{a(fe()),A&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(Ie(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(u);d===l.pending||d===l.ready||a(r?Ae(e.currentTenant.companyId):be(e.currentTenant.companyId))}}}))(ne),_e=()=>{const a=Y(),e=H(),i=K(),c=W(),{useFeatureGate:A,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=A(R.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=A(R.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:v,isDynamicConfigLoading:w}=r("transaction_categorization_config"),C=!w&&v?.capitalization_enabled===!0,x=te.getSignedInUser(),F=se(x),s=m((t=>oe(t))),{capitalizableAccounts:V,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:T,currencySymbol:O}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),q),M=o.useCallback(((t,n)=>{c(Q(s.companyId,t,n))}),[c,s.companyId]),j=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[U,N]of g)N===null?delete n[U]:n[U]=N;const[S,Z]=g[0]??[];S!=null&&c(Q(s.companyId,S,Z,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),b=m((t=>re(t.accountState)),q),k=o.useMemo((()=>{const t={};for(const n of b)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[b]),[I,_]=o.useState(!1),[P,D]=o.useState(!1);o.useEffect((()=>{I===!1&&(c(J()),_(!0))}),[I]);const f=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(u)===l.pending&&(sessionStorage.removeItem(u),c(ue({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(u)===l.ready&&s?.companyId!=null&&(sessionStorage.removeItem(u),c(le(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{f&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(u,l.pending),c(de()),$.init("/connection/auth",s.tenantEmailDomain),$.handleClick())}),[f,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),y=t=>{D(t)};return B.jsxs(ve,{children:[B.jsx(Ee,{isAppContentDrawerOpen:P,handleDrawerToggle:y}),B.jsx(we,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:C,capitalizableAccounts:V,accountNamesById:k,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:T,onSaveCapitalizationAccountThreshold:M,onSaveCapitalizationAccountThresholds:j,location:i,isSettings:G(i),onClickMenuIcon:()=>y(!0)})]})};export{u as P,_e as U,l as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-MCrpLltn.js";import{A as i}from"./AddressScreen-p0IFMNFg.js";import s from"./NotFoundScreen-Bu_5_beT.js";import"./sentry-VKV9InRh.js";import{n as d,o as r}from"./core-CAh5rCuj.js";import"./zeni-epic-state-BbP34Aqp.js";import"./recharts-dm9pBwNL.js";import"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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]="da3bef66-2720-4570-8362-1786283303d9",t._sentryDebugIdIdentifier="sentry-dbid-da3bef66-2720-4570-8362-1786283303d9")}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 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-MCrpLltn.js";import{a as g}from"./sentry-VKV9InRh.js";import{h as w,u as x,g as k,i as T,j as O,l as E}from"./core-CAh5rCuj.js";import{z as D,bt as F,a6 as P,j as V,R as j,q as C,bu as L,ac as A,aE as U,k as B}from"./index-DtOneCvz.js";import{fI as h,gL as G,B$ as M,gG as R,ca as _,Z6 as z,bn as Z,v2 as Y,uS as $,mD as q,oc as S,Z7 as H,bG as J,cG as N,on as K,ox as Q}from"./zeni-epic-state-BbP34Aqp.js";import"./mui-D65-RCnL.js";import{d as W}from"./routePaths-CY1QL6df.js";import{M as X}from"./MobileAppDrawer-D3J2lUPk.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="767f940c-f084-4557-a776-a8683afe0238",n._sentryDebugIdIdentifier="sentry-dbid-767f940c-f084-4557-a776-a8683afe0238")}catch{}})();const ee=E((function(n){const t=R(n),i=D.getSignedInUser(),l=h(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Z(i)}}),(function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const a=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:b}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:b.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(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=>{n(H(e))},onCompanyOfficerUpdated:e=>{n(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=>{n(q({files:e}))},onDeleteFile:e=>{n($(e))},onEditFileName:(e,a)=>{n(Y(e,a.split(".")[0]))}}}))(L);function de(){const n=w(),t=x(),i=k(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>h(s))),d=r.companyId??D.getSignedInUserTenant(l)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(p(!0),t(G(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,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-MCrpLltn.js";import{a as o}from"./sentry-VKV9InRh.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-CAh5rCuj.js";import{UE as q,fI as z,go as G,pW as V,gP as A,gn as Q,gl as W,V2 as B,gk as O}from"./zeni-epic-state-BbP34Aqp.js";import{u as J,z as E,L as T,G as K,E as M}from"./index-DtOneCvz.js";import{n as X}from"./mui-D65-RCnL.js";import{P as h,a as _}from"./AccountMappingScreen-CohTc0v4.js";import{t as Y}from"./getLocaleForTenant-bfNzENpe.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-r5X8FGIQ.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./MobileAppDrawer-D3J2lUPk.js";import"./InboxNotificationsProvider-Cp0oPhyn.js";import"./useTaskManagerAccess-6raGPFR-.js";import"./accountMappingHelper-qy_s46Hj.js";import"./empty-3-W7Grl0.js";import"./pdf-lib-H7CBLuxn.js";import"./index-BgMQtMJd.js";import"./url-Cisremx1.js";import"./index-C914hS8b.js";import"./decodeURIComponentSafe-9S3zcxzZ.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]="3d6a6ae0-afc1-43eb-ae29-e52891e5a9ba",t._sentryDebugIdIdentifier="sentry-dbid-3d6a6ae0-afc1-43eb-ae29-e52891e5a9ba")}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:c,clearAllLoading:m}=J(),S=o.useRef(!1),b=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:U,realmId:$,state:L}=Z(v.search),f=U!==""&&$!==""&&L!=="";f&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===_.pending,P=j===_.ready,x=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,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{c(T.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(T.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!b.current&&a!=null&&(b.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[b,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(T.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(Q(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(A(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const D=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&&d==="In-Progress"&&(p.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||D)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):p.current&&d==="Error"?(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,D,d,f,y,e.tenantEmailDomain,m,t,i]),D)return null;if(f||y!==!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-MCrpLltn.js";import{z as m}from"./index-DtOneCvz.js";import{g as n}from"./QBOConnectionScreen-r5X8FGIQ.js";import"./sentry-VKV9InRh.js";import{g as p,N as a}from"./core-CAh5rCuj.js";import"./zeni-epic-state-BbP34Aqp.js";import"./recharts-dm9pBwNL.js";import"./mui-D65-RCnL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./empty-3-W7Grl0.js";import"./pdf-lib-H7CBLuxn.js";import"./index-BgMQtMJd.js";import"./url-Cisremx1.js";import"./index-C914hS8b.js";import"./decodeURIComponentSafe-9S3zcxzZ.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 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-MCrpLltn.js";import{a as c}from"./sentry-VKV9InRh.js";import{h as v,u as A,g as G,i as F,j as d,N as q,l as O,n as Y,o as N}from"./core-CAh5rCuj.js";import{XO as _,fI as W,WY as M,n3 as R,SX as k,XT as $,XB as z,m3 as V,SY as S,X1 as H,X2 as J,XD as K,XC as L}from"./zeni-epic-state-BbP34Aqp.js";import{b9 as Q,j as U,a2 as Z,k as tt}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import{d as b}from"./decodeURIComponentSafe-9S3zcxzZ.js";import{w as et}from"./withTransactionSidePanel-CEKL9vmB.js";import{f as nt,c as at}from"./routePaths-CY1QL6df.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import"./TransactionDetailScreen-CB9xnJHu.js";import"./useInitialThreadRequest-CFiqVuk5.js";import"./expenseAutomationHelper-Br3isSOz.js";import"./stripSplatSuffix-Dk-93TcV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="3eb5c4c9-8bec-4931-9793-5cd1c5783f05",n._sentryDebugIdIdentifier="sentry-dbid-3eb5c4c9-8bec-4931-9793-5cd1c5783f05")}catch{}})();const ot=O((function(n,t){const e=t.entity,o=$(n,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(n,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(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?n(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(L("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(H()),n(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??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&n(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};n(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:n,...t}){const e=v(),o=A(),l=G(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=b(j??""),p=b(x??""),u=rt(r,p),X=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},g=d((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),w=d((a=>W(a).company?.companyInfo.firstMonthOfFY??1)),f=d((a=>M(a.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const E=d((a=>a.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(X.length)})})),rt=(n,t)=>t!=null&&t.length>0&&n!=null&&n.length>0,I=(n=2)=>{let t="../";for(let e=0;e<n;e++)t=`${t}../`;return t};function wt({entityType:n}){return s.jsx(Y,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{wt as EntityDetailRoutes,wt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./sentry-VKV9InRh.js";import{u as l,h as f,g as m}from"./core-CAh5rCuj.js";import{i0 as p,Vi as g,Vj as _}from"./zeni-epic-state-BbP34Aqp.js";import{u as b,L as h,z as y}from"./index-DtOneCvz.js";import"./liveblocks-MCrpLltn.js";import"./recharts-dm9pBwNL.js";import"./mui-D65-RCnL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="0b8f01ad-26d5-4152-9207-2551113f4c2e",e._sentryDebugIdIdentifier="sentry-dbid-0b8f01ad-26d5-4152-9207-2551113f4c2e")}catch{}})();function R(){const e=l(),i=f(),r=m(),{setLoading:o,clearAllLoading:c}=b(),s=n.useRef(!1);return n.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),n.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();i(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-MCrpLltn.js";import{a as g}from"./sentry-VKV9InRh.js";import{u as F,g as _,h as O,t as w,j as l,N as T}from"./core-CAh5rCuj.js";import{z as r,G as M,N as P,j as A,R as N,X as G,Y as R,T as Y}from"./index-DtOneCvz.js";import{fI as W,UG as X,V7 as $,U_ as q,gl as B,gn as H,V3 as J,gY as K,dl as Q,V8 as Z,V9 as ee}from"./zeni-epic-state-BbP34Aqp.js";import{u as te,n as ne}from"./mui-D65-RCnL.js";import{u as se}from"./useDeviceId-YdOwWWnw.js";import{f as ae}from"./analyticsHelper-DW5cduzA.js";import{t as ie}from"./getLocaleForTenant-bfNzENpe.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="2ec2c7d3-74b9-4c53-87ab-d927b0e6528c",t._sentryDebugIdIdentifier="sentry-dbid-2ec2c7d3-74b9-4c53-87ab-d927b0e6528c")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=F(),a=_(),f=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=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)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),b=l((e=>X(e))),E=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(q(b.tenantsInOrder),s.zeniSessionId),B(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(J("Completed")),M.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),K().then((()=>{const e=Y();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",Q(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const U=g.useCallback((()=>{f("/signin/auth")}),[f]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(Z(i,c,d))}),[i,d,t,c]),V=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(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:V,onCancelVerifyDevice:U});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as B}from"./liveblocks-MCrpLltn.js";import{a as m}from"./sentry-VKV9InRh.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as _}from"./core-CAh5rCuj.js";import{fI as ne,UH as Me,UI as se,gc as xe,fH as Ne,UR as Re,UK as Ve,UL as Pe,q3 as Le,gp as Oe,UO as b,UT as je,UU as X,gq as qe,UV as He,ED as Ze,h5 as ze,cX as Ke,UW as We,gb as Ye,gr as Qe}from"./zeni-epic-state-BbP34Aqp.js";import{w as Xe,i as Je,l as ea,p as aa,d as ta,f as na,u as sa,c,g as oa,K as ia,z as ra,e as da,n as ca,Q as la,r as ua,o as ma,q as J,L as fa,C as ha,D as ba,k as S,j as ee,v as pa,V as ae,A as ga,B as Sa}from"./index-DtOneCvz.js";import{D as ka}from"./mui-D65-RCnL.js";import{u as Ea}from"./InboxNotificationsProvider-Cp0oPhyn.js";import{u as Ca}from"./useTaskManagerAccess-6raGPFR-.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="7199fdc3-1b70-4155-9215-424dcdbab63d",l._sentryDebugIdIdentifier="sentry-dbid-7199fdc3-1b70-4155-9215-424dcdbab63d")}catch{}})();const Ta=Xe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Ue(),F=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=m.useState(void 0),A=_("/:tenantEmailDomain/dashboard")!==null,M=_("/:tenantEmailDomain/reports")!==null,f=_("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Ve(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Pe(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),V=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),P=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:j,isFetchingMore:q,hasFetchedAll:H,fetchMore:Te}=Ea();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&q===!1&&H===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;U(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,q,H]),m.useEffect((()=>{C&&E&&!f&&L.fetchState==="Not-Started"&&F.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,E,f,L.fetchState,F.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(X({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(X({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:Ee},Z=s!=null?ra.getSignedInUserTenant(s):null,z=t((e=>Z?.tenantId!=null?qe(e,Z.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const K=t((e=>He(e,h).fetchState)),W=t((e=>Ze(e).fetchState)),ye=A&&(K==="Completed"||K==="Error")||M&&(W==="Completed"||W==="Error")||!A&&!M?void 0:"disabled",we=m.useMemo((()=>ze(o.userRole)),[o.userRole]),Ae=Ke(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&N.fetchState==="Completed"&&We(N.notificationSettings,p.userEmail,x,o,E),Y=da(),_e=Y&&ca(a);return B.jsx(ka,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:z!=null?[z]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:J(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:Y,onNotificationIconClick:()=>{i(!1);let e=V===0&&P>0?"notifications/comments":"notifications/tasks";J(a)&&(e=V===0&&P>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),Q=e.type,Be=ae(Q)&&Q!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Fe=ga(e.type);Sa(e.type)?(G!=null&&r(Qe()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Fe}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:_e,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Ye({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Fa=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Je(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Fa as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-MCrpLltn.js";import{h as r,l as i}from"./core-CAh5rCuj.js";import{ak as n}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import"./sentry-VKV9InRh.js";import"./zeni-epic-state-BbP34Aqp.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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{n as mt,b as lt,o as ft,j as N}from"./liveblocks-MCrpLltn.js";import ut from"./NotFoundScreen-Bu_5_beT.js";import{a as k}from"./sentry-VKV9InRh.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as K}from"./core-CAh5rCuj.js";import{cC as It,UK as Y,fI as z,h5 as Tt,UO as S,a1S as J,UU as m,UI as y,AO as F,GB as Ct,a1T as At,UH as yt,UW as Et,AT as _t,a1U as $,br as j,gk as w,AX as Q,a1V as Nt,cO as Bt,cH as Ut}from"./zeni-epic-state-BbP34Aqp.js";import{ao as wt,d as xt,p as vt,c as Dt,aq as Rt,dL as Gt,k as B,dM as Pt,w as Mt,dN as $t,i as jt,a2 as Ft}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import{u as Lt}from"./useTaskManagerAccess-6raGPFR-.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="cfc0fb7d-ef81-4b39-b56b-66f9e40b01f2",t._sentryDebugIdIdentifier="sentry-dbid-cfc0fb7d-ef81-4b39-b56b-66f9e40b01f2")}catch{}})();const Ot=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),qt=bt((function(t,l){const n=Y(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=z(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],j())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!Ut(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(y(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(J(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(Q("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Ot(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt($t)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=wt(),c=It(h??""),o=gt(),f=xt(),[I,v]=k.useState(!1),a=b((e=>Y(e))),s=b((e=>z(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((e=>S(e).notificationDetailsByTab.tasks.fetchState)),L=b((e=>S(e).currentTab)),D=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),R=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:U,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:O,isLoading:q,fetchMore:W,isFetchingMore:H,hasFetchedAll:X}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(J(c)),c==null){const e=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&U!=null){const e=`dashboard_${s.companyId}`,p=U.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect((()=>{P&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,R]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&q===!1&&U!=null&&O!=null){const e=`dashboard_${s.companyId}`,p=U.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=O.find((dt=>{return dt.id===((x=u).kind==="thread"?x.threadId:"subjectId"in x?x.subjectId:void 0);var x}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(H||X===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,H,C,X,q,U?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(K,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(K,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-MCrpLltn.js";import{a as r}from"./sentry-VKV9InRh.js";import{u as A,g as j,j as o,N as C}from"./core-CAh5rCuj.js";import{Vl as P,fI as V,gp as x,Vm as z,Vn as D,Vo as M,Vp as R,pW as k,U0 as L}from"./zeni-epic-state-BbP34Aqp.js";import{z as h,af as I}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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]="a2186d74-3437-4e2e-b827-ed9e4f4d0446",n._sentryDebugIdIdentifier="sentry-dbid-a2186d74-3437-4e2e-b827-ed9e4f4d0446")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),w=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)),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,U]=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((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=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]),c=S??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,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{U("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-MCrpLltn.js";import{h as V,u as Y,g as z,i as J,j as d,l as X,n as H,o as S}from"./core-CAh5rCuj.js";import{fI as v,Az as O,vc as K,We as w,v7 as T,bq as Q,c1 as Z,v8 as ee,Wf as ae,VX as C,ek as te,Es as se,Wg as oe,ER as re,e1 as ne,e0 as ce}from"./zeni-epic-state-BbP34Aqp.js";import{ag as ie,z as le,ao as de,aq as me,J as fe,a6 as pe,j as M,aB as ue,k as he,p as ge,c as Fe}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import Ie from"./NotFoundScreen-Bu_5_beT.js";import{F as be}from"./FeaturePreviewScreen-DUpjhzBa.js";import{a as g}from"./sentry-VKV9InRh.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import{u as Ce}from"./useInitialThreadRequest-CFiqVuk5.js";import{t as Te}from"./routePaths-CY1QL6df.js";import{M as ye}from"./MobileAppDrawer-D3J2lUPk.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./InboxNotificationsProvider-Cp0oPhyn.js";import"./useTaskManagerAccess-6raGPFR-.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]="24086607-27e9-40bf-8c68-8be06239fa28",s._sentryDebugIdIdentifier="sentry-dbid-24086607-27e9-40bf-8c68-8be06239fa28")}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=X((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:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(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),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,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=V(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=le.getSignedInUser(),k=d((t=>v(t))),q=k.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(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:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:W}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(K());else if(l&&!m){A(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):R!=null?f.forecasts.findIndex((b=>b.id===R)):f.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(w(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)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,I]);const E=fe(),_=E?.loggedInUserRole!=null&&Q(E.loggedInUserRole),N=Ce(k?.companyId,{clearParams:l&&m}),[$,G]=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=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:$,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,initialOpenThreadRequest:N,onClickMenuIcon:()=>{L(!0)}})]})}function Je(){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(be,{}):n.jsxs(H,{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(Ie,{})})]})}export{Je as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-MCrpLltn.js";import E from"./NotFoundScreen-Bu_5_beT.js";import{a as r}from"./sentry-VKV9InRh.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as O,n as z,o as h}from"./core-CAh5rCuj.js";import{fI as B,a1W as b,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-BbP34Aqp.js";import{l as W,z as I,aq as $,dO as G}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import{M as J}from"./MobileAppDrawer-D3J2lUPk.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./InboxNotificationsProvider-Cp0oPhyn.js";import"./useTaskManagerAccess-6raGPFR-.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]="60f23081-f8e7-4193-8ccf-0e863df98a66",e._sentryDebugIdIdentifier="sentry-dbid-60f23081-f8e7-4193-8ccf-0e863df98a66")}catch{}})();const K=O((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{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),L=()=>{const e=_(),t=v(),c=W(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=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:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-MCrpLltn.js";import q from"./NotFoundScreen-Bu_5_beT.js";import{a as p}from"./sentry-VKV9InRh.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as b}from"./core-CAh5rCuj.js";import{fI as E,Z_ as h,_g as w,Oe as U,Oa as L,Od as f,O3 as N,_F as B,O7 as F,Og as K}from"./zeni-epic-state-BbP34Aqp.js";import{z as _,w as T,cb as Z,q as $,bU as G,cc as H}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import{u as J}from"./useEnsureVendorListLoaded-BN6cn_-b.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-C_iPjPlT.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]="315bc95f-46c9-4f33-8e43-a173327fd1af",e._sentryDebugIdIdentifier="sentry-dbid-315bc95f-46c9-4f33-8e43-a173327fd1af")}catch{}})();const j="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(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"))}}}))(T(Z)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),g=u((o=>w(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]),_.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.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=w(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))}}}))(T(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,R]=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 y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),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||(R(!0),a(F(!1,!0)))}),[v,g,e,a]),_.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 I={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,...I})};function ue(){return r.jsxs(z,{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(q,{})})]})}export{ue as R};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-MCrpLltn.js";import{u as ae,j as v,h as Y,g as K,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-CAh5rCuj.js";import{fI as H,Oa as ct,$L as ge,ca as he,Ng as Fe,me as dt,Nv as ce,Nu as de,$M as ut,bn as fe,gZ as $e,$N as pt,XB as bt,m3 as Le,XC as ke,XD as gt,kR as ht,ZM as ft,l4 as St,N4 as It,CA as yt,kY as Rt,NR as Ne,$O as Pe,$P as Ce,$Q as At,$R as vt,$S as kt,NB as we,la as Ct,ZV as wt,Nt as Et,Ne as xt,$T as Bt,Nd as Tt,$U as Dt,Nl as Ee,NF as jt,NE as Ut,NA as Ft,$V as Me,S$ as $t,bo as Lt,No as Nt,O7 as Pt,$W as Mt,$X as _t,NN as Ot,NK as xe,Zg as Zt,Nb as zt,$Y as _e,OA as Be,OI as Gt,$Z as Vt,$_ as X,$$ as Ht,a00 as Oe,a01 as Wt,a02 as Ze,a03 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a04 as Xt,gk as Jt,Zt as Kt,a05 as Qt,a06 as He,Zx as Yt,_g as en,a07 as tn,_F as nn,OF as Te,OE as an,a08 as sn,a09 as on,a0a as rn,a0b as ln,a0c as mn,Z$ as cn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,U$ as Sn,dc as In,df as yn,de as Rn,cH as An}from"./zeni-epic-state-BbP34Aqp.js";import{bU as vn,l as We,$ as qe,p as oe,c as F,z as $,cT as Xe,a6 as re,j as E,aQ as De,E as j,ac as se,ad as kn,G as Je,cU as Cn,k as J,aq as Ke,cV as wn,J as le,cW as En,ao as xn,a9 as Bn,a5 as ye,R as Qe,w as Tn,bC as Dn,at as jn,ag as Un,cX as Fn,g as $n}from"./index-DtOneCvz.js";import{n as P,S as Ln,u as Ye}from"./mui-D65-RCnL.js";import pe from"./NotFoundScreen-Bu_5_beT.js";import{S as je}from"./SetupPagesScreen-BvGqVswb.js";import{F as et}from"./FeaturePreviewScreen-DUpjhzBa.js";import{a as g}from"./sentry-VKV9InRh.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import{u as tt}from"./useInitialThreadRequest-CFiqVuk5.js";import{D as Nn}from"./DrawerScreen-C4n50ad8.js";import{M as nt}from"./MobileAppDrawer-D3J2lUPk.js";import{F as Pn}from"./ScreenRoutes-C4eCwrs-.js";import{R as Mn}from"./ReimbursementApprovalRoutes-C61lKuXL.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./BusinessVerificationPageScreen-WqzTt6qr.js";import"./routePaths-CY1QL6df.js";import"./analyticsHelper-DW5cduzA.js";import"./InboxNotificationsProvider-Cp0oPhyn.js";import"./useTaskManagerAccess-6raGPFR-.js";import"./getLocaleForTenant-bfNzENpe.js";import"./useEnsureVendorListLoaded-BN6cn_-b.js";import"./ReimbursementApprovalRuleDetailScreen-C_iPjPlT.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]="71bf92f5-be37-4f81-8fd7-eeeaa3713346",e._sentryDebugIdIdentifier="sentry-dbid-71bf92f5-be37-4f81-8fd7-eeeaa3713346")}catch{}})();const at=e=>`/${e}/reimbursements`,_n=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=$.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=$e(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=$.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=J(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Y(),t=ae(),n=K(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=K().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=$.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),L=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(w?.userRole??[]);(function(){const b=ae(),_=v((Q=>H(Q))),O=_?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((Q=>Q.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Fe(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const M={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:M}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(_=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&_.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(_n,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,zn=P.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${kn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Gn=P.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Vn=P.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Hn=P.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=P.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=ee((function(e,t){const n=Me(e,t.reimbursementId),r=$.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Mt(n.remiActivities,_t(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=J(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=J(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function Xn(){const e=Y(),t=ae(),n=K(),r=n.hash.substring(1),m=We(),{reimbursementId:c}=ie(),d=$.getSignedInUser(),i=v((A=>H(A))),a=v((A=>Me(A,c??""))),o=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(i?.companyId,{clearParams:a.fetchState==="Completed"&&!o}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:I}=Re({mobileExploreReferrer:"Reimbursement Details"});Ke({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=oe(),{isFeatureEnabled:T}=u(F.isLimitedCategoryForReimbursement),[y,B]=g.useState(!1),[D,k]=g.useState(!1),[C,R]=g.useState(!1),{isFeatureEnabled:S}=u(F.isShowDeletedReimbursementsFeatureEnabled),w=v((A=>ge(A,c??""))),h=$t(i),L=Lt(i.userRole),U=a.fetchState;if(g.useEffect((()=>{y||c==null?y==1&&U==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(c,!1,S)))}),[y,c,t,U]),g.useEffect((()=>{S&&a.remiDetails?.isDeleted===!0||i.isZeni===!0&&d?.userEmailDomain==="zeni.ai"&&h===!1?R(!1):R(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find((A=>A.user.userId===d?.userId))!=null||a.remiDetails?.lastUpdatedBy===d?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,i.isZeni,h,d]),g.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||w.fetchState=="Completed"||w.fetchState=="In-Progress"||(k(!0),t(Fe(!1,T,S,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,c,t]),d==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(N,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:A=>(M=>{c!=null&&M.trackReimbursementReimbursementDetails(c)})(A)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:C,currentTenant:i,reimbursementId:c??"",themeState:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:I})]})}const Jn=ee((function(e,t){return{remisReviewView:_e(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(X())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(Be("approved",r??""));break;case"reject":e(Be("rejected",r??""))}}}}))(En);function Kn({tenantEmailDomain:e}){const t=Y(),n=v((d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((d=>_e(d))),m=le(),c=m?.loggedInUserRole?.includes("admin")===!0;return g.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Jn,{navigate:t,analytics:E,isAdmin:c,tenantEmailDomain:e})}const V=Yt(),st="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:Qn,common:me}=Je.getLocalizedStrings(),Yn=Qn.reimbursement.bulkActions,ea=P.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=ee((function(e,t){const n=ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=$.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(X()),e(Oe(i))},onSubtabChange:i=>{e(X()),e(Ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=J(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=J(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=J(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(X())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=Y(),t=ae(),n=K(),r=n.state,m=qe(),[c,d]=g.useState(null),i=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Ht(r.tab.toString());f!=null?t(Oe(f)):console.log("Warning:Not a valid remiListTab");const G=Wt(r.subTab.toString());G!=null?t(Ze(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(X())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:o}=a(F.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(F.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:p}=a(F.isReimbursementBulkActionEnabled),I=$.getSignedInUser(),u=v((f=>H(f))),[T,y]=g.useState(!1),[B,D]=g.useState(!1),k=le(),C=k?.loggedInUserRole?.includes("admin")===!0,R=v((f=>ze(f,V,p))),{areTenantIdsInSync:S}=xn(),w=R.fetchState,{isAiCfoAccessEnabled:h,onAskAiCfoClick:L}=Re({mobileExploreReferrer:"Reimbursement List"});if(Ke({isDataReady:w==="Completed"}),g.useEffect((()=>{!B&&S&&(D(!0),t(ue(V,!0,l,!1,!0)))}),[B,V,t,S]),I==null)throw Error("Can't access address page without signing in...");const U=!!u?.userRole&&qt(u),A=Se(k?.loggedInUserRoleMap),M=Ie(k?.loggedInUserRoleMap),b=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,_=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,O=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,Z=v((f=>$e(f.companyState,u.companyId))),W=Z?.company.featuresActivationInfo.connectedAccountProvider,z=f=>{y(f)},{isFeatureEnabled:Q}=a(F.isDebitCardFeatureEnabled),it=Ge(Q,u),ot=Ve(u),{remisProcessed:te,remisProcessing:Ae}=v((f=>Xt(f)));g.useEffect((()=>{te===Ae&&c!=null&&(t(Jt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:Yn.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Kt(c)}]})),t(Qt()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),d(null))}),[te,Ae]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(f,G,ve)=>{f.endsWith(be)?ve.onReimbursementApprovalRulesEventReceived?.(f):G.entity_type==="reimbursement"&&(d(G.operation_type),ve.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(et,{}):_&&(!U||A)||M&&b?s.jsxs(s.Fragment,{children:[w==="Completed"?s.jsx(re,{analytics:E,onLoad:f=>(G=>G.trackPageLoaded(Qe.Event.reimbursementHome))(f)}):null,s.jsx(nt,{isAppContentDrawerOpen:T,handleDrawerToggle:z}),s.jsxs(ea,{windowSize:m,children:[s.jsx(Nn,{isOpen:i,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(X())},children:s.jsx(ia,{onClick:f=>f.stopPropagation(),children:s.jsx(Kn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:o,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:V,isAdmin:C,isEmployee:U,entity:"reimbursement",onClickMenuIcon:()=>{z(!0)},createdByUserList:R.createdByUserList,createdByUserListFetchState:R.createdByUserListFetchState,isDownloadEnabled:R.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:p,bulkSubmissionLimit:R.remiBulkSubmissionLimit,bulkSubmissionFetchState:R.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:h,onAskAiCfoClick:L,...rt})]})]}):O&&A?s.jsx(N,{to:"../setup"}):k!=null&&He(u,k.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=P(Ln)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Fn),ra=()=>{const e=Un(),t=Y(),n=K(),{tenantEmailDomain:r}=ie(),m=Ye(),[c,d]=g.useState(!1),i=v((C=>H(C))),a=$.getSignedInUserTenant(r)?.companyId??i.companyId,o=$.getSignedInUser(),l=i.userRoleId,p=!!i.userRole?.includes("reimbursements_user"),I=le(),u=Se(I?.loggedInUserRoleMap),T=Ie(I?.loggedInUserRoleMap),y=!!i.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!i.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!i.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,k=C=>{d(C)};if(o==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&T&&y?s.jsx(N,{to:"../../../reimbursements"}):D&&u?s.jsx(N,{to:"../../reimbursements/setup"}):i.companyReimbursementInfo&&!D||i.userReimbursementInfo&&T&&y===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:C=>(R=>R.trackPageLoaded(Qe.Event.reimbursementPromoPage))(C)}),s.jsx(nt,{isAppContentDrawerOpen:c,handleDrawerToggle:k}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:i.userReimbursementInfo,userRoleId:l,isEmployee:p,onClickMenuIcon:()=>{k(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})};function _a(){const e=v((z=>H(z))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ye(),m=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:d}=oe(),{isFeatureEnabled:i}=d(F.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=d(F.isDebitCardFeatureEnabled),o=Ge(a,e),l=Ve(e),p=e?.userRole!=null&&pn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,y=Se(t?.loggedInUserRoleMap),B=T&&y,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,k=D&&hn(t?.loggedInUserRoleMap),C=$n(e,i,a)&&!p,R=C&&fn(t?.loggedInUserRoleMap),S=Sn(t?.loggedInUserRoleMap),w=In(t?.loggedInUserRoleMap),h=yn(t?.loggedInUserRoleMap),L=D&&w,U=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&h,A=Rn(t?.loggedInUserRoleMap),M=An(t?.loggedInUserRoleMap),b=Ie(t?.loggedInUserRoleMap),_=C&&A,{tenantEmailDomain:O}=ie(),Z=K(),W=n===!0&&(y||b&&c);return s.jsxs(mt,{children:[Z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"verification",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"verification"})}),s.jsx(x,{path:"setup",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"setup"})}),s.jsx(x,{path:"promo",element:s.jsx(ra,{})}),s.jsx(x,{path:"approval-rules/*",element:B?s.jsx(Mn,{}):s.jsx(Pn,{showZeniAccountRoute:L,isUserHasBillPayAccess:M,isUserHasReimbursementAccess:b,showTreasuryRoute:U,isTenantBankingOnly:o,showChargeCardRoute:_,tenantEmailDomain:O??""})}),W&&s.jsx(x,{path:"*",element:s.jsx(na,{})}),(o===!0||l===!0)&&s.jsx(x,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../promo"})}),m&&y&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):Z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"new",element:s.jsx(Ue,{})}),s.jsx(x,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(x,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(x,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]})}export{_a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-MCrpLltn.js";import{z as j,a6 as N,j as u,R as S,e5 as I,p as k,c as C}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import g from"./NotFoundScreen-Bu_5_beT.js";import{a as c}from"./sentry-VKV9InRh.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-CAh5rCuj.js";import{fI as U,a2Z as w,a2_ as p,Ei as P,q3 as V,a2$ as R,Eg as q}from"./zeni-epic-state-BbP34Aqp.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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]="de5fc163-2ead-47cd-a094-aee8b00a90ef",e._sentryDebugIdIdentifier="sentry-dbid-de5fc163-2ead-47cd-a094-aee8b00a90ef")}catch{}})();const z=_((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((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(R({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(I),G=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),x=L(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),b=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(z,{navigate:l,location:x,currentTenant:r,companyName:E,userName:b,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(G,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-Bu_5_beT.js","assets/sentry-VKV9InRh.js","assets/core-CAh5rCuj.js","assets/zeni-epic-state-BbP34Aqp.js","assets/index-DtOneCvz.js","assets/mui-D65-RCnL.js","assets/analytics-BLeep1MS.js","assets/utils-DRaLbDIg.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-Dl-mk1tS.js","assets/withTransactionSidePanel-CEKL9vmB.js","assets/useAskAiCfoHostNavButtonProps-CviB8_e-.js","assets/TransactionDetailScreen-CB9xnJHu.js","assets/decodeURIComponentSafe-9S3zcxzZ.js","assets/useInitialThreadRequest-CFiqVuk5.js","assets/routePaths-CY1QL6df.js","assets/expenseAutomationHelper-Br3isSOz.js","assets/stripSplatSuffix-Dk-93TcV.js","assets/reportTimeframe-BvcIi7CW.js","assets/analyticsHelper-DW5cduzA.js","assets/CompanyPassportScreen-Bca5R8ki.js","assets/MobileAppDrawer-D3J2lUPk.js","assets/InboxNotificationsProvider-Cp0oPhyn.js","assets/useTaskManagerAccess-6raGPFR-.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CS1N2-33.js","assets/FeaturePreviewScreen-DUpjhzBa.js","assets/BillPayRoutes-7Fbpt50_.js","assets/AddressScreen-p0IFMNFg.js","assets/DomesticWireDetailScreen-YrrlMQvW.js","assets/BusinessVerificationPageScreen-WqzTt6qr.js","assets/DrawerScreen-C4n50ad8.js","assets/SetupPagesScreen-BvGqVswb.js","assets/BillPayApprovalRoutes-Bs7TBssf.js","assets/useEnsureVendorListLoaded-BN6cn_-b.js","assets/ReimbursementApprovalRuleDetailScreen-C_iPjPlT.js","assets/getLocaleForTenant-bfNzENpe.js","assets/ReimbursementRoutes-C8jRQBDZ.js","assets/ReimbursementApprovalRoutes-C61lKuXL.js","assets/TransactionListRoutes-DntzfHHO.js","assets/ZeniAccountStatementScreen-DNRMt6k7.js","assets/SettingsRoutes-BwRfFRaL.js","assets/AccountMappingScreen-CohTc0v4.js","assets/QBOConnectionScreen-r5X8FGIQ.js","assets/empty-3-W7Grl0.js","assets/index-BgMQtMJd.js","assets/url-Cisremx1.js","assets/index-C914hS8b.js","assets/accountMappingHelper-qy_s46Hj.js","assets/useEmailConnectResultRefresh-Od7PFitR.js","assets/ReportsRoutes-DQn4zD_M.js","assets/ChargeCardRoutes-C8ZvDyvO.js","assets/useChargeCardPusherEvents-CSi4eAbt.js","assets/PeopleRoutes-dRYeyEkw.js","assets/ExpenseAutomationRoutes-DwNC4xUT.js","assets/useActualMatchingMatchDetail-Dc0_3FT_.js","assets/ScheduleDetailsPrepaidExpensesScreen-S_TRD8uL.js","assets/pathToGoBack-DxXqfwM8.js","assets/TreasuryRoutes-CIEKPm1R.js","assets/VendorsRoutes-BJEgNAKV.js","assets/ZeniAccountRoutes-CIslP6ey.js","assets/AddressRoutes-xqFWfSGM.js","assets/PandLWithForecastRoutes-Bb5TI8zZ.js","assets/CustomerOnboardingRoutes-GZvUxipf.js","assets/TransactionDetailRoutes-CXvYbIYv.js","assets/EntityDetailRoutes-DAuCsR0B.js","assets/InvoicingRoutes-DyGqDLsr.js","assets/NotificationRoutes-T_awZYu2.js","assets/PerformanceRoutes-CIGy_r0j.js","assets/ActualMatchingMatchDetailScreen-DUeW0FeC.js","assets/RewardsRoutes-wWL8-dzP.js","assets/TaskRoutes-Dsy3v7vH.js","assets/TaskListScreen-B_rM9OHZ.js","assets/useTaskManagerPusherEvents-xZZkhmGA.js","assets/AiCfoScreen-BfgMLiU4.js","assets/CardsAiCfoScreen-lz2EFhk_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fI as Es,e1 as ps,e0 as xs,Bo as gs,dk as Rs,ca as Is,gM as js,gc as Ts,dh as pe,cI as As,gq as fs,cA as Ds,bG as ys,br as bs,UX as Cs,v as vs,U_ as Os,bq as Ps,U$ as Us,bM as ws,bL as Fs,bu as Ls,cw as Vs,V0 as Hs,V1 as ks,dc as Bs,df as Ss,de as Ns,cH as Ms,cO as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as Ie,gP as je,go as Gs}from"./zeni-epic-state-BbP34Aqp.js";import{j as e}from"./liveblocks-MCrpLltn.js";import{a as U}from"./sentry-VKV9InRh.js";import{N as u,u as zs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Xs,o as n}from"./core-CAh5rCuj.js";import{H as l,u as Js,z as b,p as Ks,e as Qs,K as et,c as S,g as st,I as tt,J as nt,L as F,G as Ae,t as _,P as at,M as ot,j as ne}from"./index-DtOneCvz.js";import{u as rt}from"./mui-D65-RCnL.js";import{f as fe}from"./analyticsHelper-DW5cduzA.js";import{t as it}from"./getLocaleForTenant-bfNzENpe.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="c9157d49-a261-4de7-8a66-a95facaf2399",o._sentryDebugIdIdentifier="sentry-dbid-c9157d49-a261-4de7-8a66-a95facaf2399")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-Bu_5_beT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return o?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-Dl-mk1tS.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])),bills:()=>s((()=>import("./BillPayRoutes-7Fbpt50_.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-C8jRQBDZ.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DntzfHHO.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-BwRfFRaL.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-DQn4zD_M.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-C8ZvDyvO.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-dRYeyEkw.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DwNC4xUT.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-CIEKPm1R.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-BJEgNAKV.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CIslP6ey.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-DQn4zD_M.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),ht=l((()=>s((()=>import("./AddressRoutes-xqFWfSGM.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-dRYeyEkw.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-Bb5TI8zZ.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-GZvUxipf.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-BJEgNAKV.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-CXvYbIYv.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DAuCsR0B.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-Dl-mk1tS.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-7Fbpt50_.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-BwRfFRaL.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-DyGqDLsr.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-C8jRQBDZ.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-CIslP6ey.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-CIEKPm1R.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-DntzfHHO.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),yt=l((()=>s((()=>import("./ChargeCardRoutes-C8ZvDyvO.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),bt=l((()=>s((()=>import("./NotificationRoutes-T_awZYu2.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-CIGy_r0j.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-DwNC4xUT.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-DUeW0FeC.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Pt=l((()=>s((()=>import("./RewardsRoutes-wWL8-dzP.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),Ut=l((()=>s((()=>import("./TaskRoutes-Dsy3v7vH.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-BfgMLiU4.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-lz2EFhk_.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-Bu_5_beT.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-B_rM9OHZ.js").then((o=>o.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:H})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return v===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:v,clearLoading:H}=Js(),y=b.getSignedInUserTenant(i)?.tenantId,j=b.getSignedInUser(),X=hs(j),G=Ys(),[L,we]=U.useState(!1),r=$((a=>Es(a))),{useFeatureGate:k}=Ks(),M=Qs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,K=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,He=st(r,Ve,oe),{isCardsHidden:ke}=tt(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=$((a=>js(a)));if(i!=null){const a=b.getSignedInUserTenant(i);j!=null&&a!=null&&fe(j,r,V)}const Z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=bs();t.isAfter(d,"month")===!1?D(Cs(y,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,y]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,b]),U.useLayoutEffect((()=>{!vs(ie,Z)&&b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=b.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[y]),U.useEffect((()=>{b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=b.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(Gs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,y,j,O,D))}),[y,p]),U.useEffect((()=>{b.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),b.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const P=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:We}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=k(S.isAccrualEnabled),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Ke=Us(E?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!P,ss=Le&&!P,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=Hs(E?.loggedInUserRoleMap),rs=ks(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),g=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&g,R=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ge===!0||Ke===!0||os===!0||rs===!0;return b.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||X&&!ee)&&es&&Qe!==!0&&h===!1&&K===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||X?!L||te!==!1||ee||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Xe||Je?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ut,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(Ct,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&P===!1?e.jsx(vt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&P===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(bt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(yt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,$t as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-MCrpLltn.js";import{a as f,R as T,t as A}from"./sentry-VKV9InRh.js";import{u as z,h as D,j as d,g as j,N as M,l as P}from"./core-CAh5rCuj.js";import{u as O,z as s,j as E,G as V,N as _,R as F,S as N,T as B,U as G,W as v}from"./index-DtOneCvz.js";import{fI as R,UG as W,U_ as $,gl as J,gn as Y,V3 as H,gY as q,dl as K,V4 as U,V5 as Q,V6 as X,c1 as y}from"./zeni-epic-state-BbP34Aqp.js";import{u as Z}from"./mui-D65-RCnL.js";import{u as ee}from"./useDeviceId-YdOwWWnw.js";import{f as te}from"./analyticsHelper-DW5cduzA.js";import{t as ne}from"./getLocaleForTenant-bfNzENpe.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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]="9355ccce-45b4-47c4-a82c-6513282565d7",t._sentryDebugIdIdentifier="sentry-dbid-9355ccce-45b4-47c4-a82c-6513282565d7")}catch{}})();const ie=P((function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:c,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(U())}}}))(G),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),c=D(),{clearAllLoading:g}=O(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=d((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:C,accountUnlockTime:L}=d((e=>e.tenantState)),p=d((e=>e.tenantState.fetchState)),h=d((e=>e.tenantState.activeTenantFetchState.fetchState)),S=d((e=>e.tenantState.signInState)),o=d((e=>e.tenantState.loggedInUser)),r=d((e=>R(e))),I=d((e=>W(e))),m=j(),w=Z().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[k.fetchState,l]),f.useEffect((()=>{t(void 0)}),[]),f.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($(I.tenantsInOrder),o.zeniSessionId),J(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),V.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),q().then((()=>{const e=B();e!=null&&_(e)})),setTimeout((()=>{E.trackLogin(F.Event.loginSuccess,o.authProvider??"google",K(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 u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&L!=null?u.jsx(N,{onClose:()=>i(U()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-MCrpLltn.js";import{a as i}from"./sentry-VKV9InRh.js";import{u as l,g as d,N as u}from"./core-CAh5rCuj.js";import{z as n,j as a,R as m,a5 as p}from"./index-DtOneCvz.js";import{g$ as g,Vk as y}from"./zeni-epic-state-BbP34Aqp.js";import{n as b}from"./mui-D65-RCnL.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.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]="ee2b5ca5-a85e-493e-a745-3f02c3d30b74",e._sentryDebugIdIdentifier="sentry-dbid-ee2b5ca5-a85e-493e-a745-3f02c3d30b74")}catch{}})();function L(){const e=l(),t=d(),r=i.useRef(!1),c=n.isSignedIn(),o=t.state?.message==="logout"||c;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=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: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-MCrpLltn.js";import Te from"./NotFoundScreen-Bu_5_beT.js";import{a as u}from"./sentry-VKV9InRh.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as Ee,l as De,n as be,o as h}from"./core-CAh5rCuj.js";import{Qz as se,QC as Ie,Qw as Ce,a30 as Re,fI as te,a31 as ne,Q_ as D,QQ as E,Qt as _e,Rt as ye,Rm as Ge,a32 as oe,gk as ie,a33 as W,a34 as Ae,Qp as Ue,Qm as ve,v2 as we,uS as xe,mD as Be,QO as je,a35 as Pe,RF as Fe,QK as Ke,R8 as Le,R5 as Qe,QF as $e,R2 as Ne,QZ as Ze}from"./zeni-epic-state-BbP34Aqp.js";import{z as b,e6 as ze,l as Oe,p as Ve,c as _,a2 as re,k as y,a6 as qe,j as X,R as Me,e7 as Je,W as Y,ac as We}from"./index-DtOneCvz.js";import{n as Xe}from"./mui-D65-RCnL.js";import{u as Ye}from"./useInitialThreadRequest-CFiqVuk5.js";import{M as He}from"./MobileAppDrawer-D3J2lUPk.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as H,e as na}from"./TaskListScreen-B_rM9OHZ.js";import{u as oa}from"./useTaskManagerPusherEvents-xZZkhmGA.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./InboxNotificationsProvider-Cp0oPhyn.js";import"./useTaskManagerAccess-6raGPFR-.js";import"./useAskAiCfoHostNavButtonProps-CviB8_e-.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]="98fb233f-c0c5-4083-a979-27f0469930a2",e._sentryDebugIdIdentifier="sentry-dbid-98fb233f-c0c5-4083-a979-27f0469930a2")}catch{}})();function ia(){const e=ee(),a=ae(),n=b.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),k=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,I,C)=>{a(Ie({name:i,content:I,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:k,onSave:S})}const L=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([F,(e,a)=>{const n=F(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=De((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),k=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?W(e.taskGroupState,S):void 0,i=b.getSignedInUser(),I=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:I??""},v=ne(e),{tenantEmailDomain:w}=l,G=t.recurringSourceTaskId,x=G!=null?`${Y.appUrl}/${w}/tasks/${encodeURIComponent(G)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:b.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:We.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Y.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((f=>W(e.taskGroupState,f))).filter((f=>f!=null&&!f.isDeleted)).map((f=>({id:f.id,name:f.name,isDefault:f.isDefault}))),subtasks:t.subtasks,parentTaskRef:k,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:k}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Ne(n,s??k))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Qe(s,i))},onUnsnoozeTask:s=>{e(Le(s))},onCreateSubtask:(s,i)=>{e(Ke({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({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(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(Be({files:s}))},onDeleteFile:s=>{e(xe(s))},onEditFileName:(s,i)=>{e(we(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(D(!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 K(){const e=ee(),a=ae(),n=ge(),c=Oe(),{taskId:t,taskGroupId:l}=he(),k=g((o=>te(o))),S=Ye(k?.companyId),{useFeatureGate:s}=Ve(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:I}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:w}=s(_.isTaskGroupAssigneesEnabled),[G,x]=u.useState(!1),[f,ce]=u.useState(!1),[Q,le]=u.useState(!1),[$,B]=u.useState(!1),R=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),N=g((o=>ne(o))),Z=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(D(!1,t)),t!=null&&a(E(t))}),[a,t]);const z=b.getSignedInUser()?.userId,ke=b.isZeniUser(),de=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),O=()=>{k?.tenantEmailDomain!=null&&e(U(k.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],d=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(k?.companyId,o),...sa(z,d)]}),[k?.companyId,z]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(D(!0,t)),a(E(t)))},onEvent:(o,d)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:fe,taskId:J})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const T=ea(me);return T==null?"none":T.parent_task_id===J?"refreshSubtasks":P!==m.TASK_UPDATED||T.task_id!==J?"none":T.is_deleted===!0?"leaveDeleted":T.is_private!==!0||Se?T.sync_token!=null&&T.sync_token===fe?"none":"refreshTask":"leaveNoAccess"})(o,d,{isZeniUser:ke,storedSyncToken:de,taskId:t});p==="refreshTask"?(a(D(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?V():p==="leaveNoAccess"&&O();break}case m.TASKS_BULK_UPDATED:{const p=H(d);if(p==null)break;p.task_ids.includes(t)&&a(D(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=H(d);if(p==null)break;if(p.task_ids.includes(t)){V();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(d)?.task_id===t&&a(D(!0,t));break}}}}),u.useEffect((()=>{f||N.fetchState==="Completed"||(ce(!0),a(_e()))}),[f,a,N.fetchState]),u.useEffect((()=>{Q||Z==="Completed"||(le(!0),a(ye()))}),[Q,a,Z]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(Ge([t],null,{isArchived:!1})),B(!0))}),[a,t]);u.useEffect((()=>{if($)if(A!=="In-Progress"){if(R.current){if(A==="Error")return B(!1),void(R.current=!1);if(A==="Completed"){B(!1),R.current=!1;const{tenantEmailDomain:o}=k;if(n.state?.message==="triggerBackClick"){const d=re(n.state?.pathnameStackToGoBack);e(d.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:d.newStack}})}else{const d=U(o);e(d,{state:{pathnameStackToGoBack:y(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[$,A,k,n,e]);const q=g((o=>oe(o,t))),j=q.fetchState,M=b.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&q.error?.code===400){const{tenantEmailDomain:o}=k,d=U(o),p=y(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:d,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(qe,{analytics:X,onLoad:o=>(d=>d.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(He,{isAppContentDrawerOpen:G,handleDrawerToggle:o=>{x(o)}}),r.jsx(ca,{analytics:X,currentTenant:k,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:w})]})]})}const la=Xe.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(be,{children:[r.jsx(h,{path:"/new",element:r.jsx(K,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(K,{})}),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(K,{})}),r.jsx(h,{path:"*",element:r.jsx(Te,{})})]})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-MCrpLltn.js";import G from"./NotFoundScreen-Bu_5_beT.js";import{a as n}from"./sentry-VKV9InRh.js";import{u as ft,h as yt,g as bt,i as ht,j as o,n as St,o as f}from"./core-CAh5rCuj.js";import{fI as It,gZ as Lt,m3 as Tt,uh as jt,XG as Ct,XB as Et,XH as gt,R_ as At,R$ as kt,i3 as L,m1 as vt,ui as xt,RQ as Dt,Sp as Rt,XI as _t,XJ as Nt,RX as Mt,RU as Xt,XK as Ft,XL as wt,XM as Ht}from"./zeni-epic-state-BbP34Aqp.js";import{p as zt,J as Pt,c as P,b0 as Ut,z as qt,f as Bt,b1 as Gt,j as U,b2 as $t,ac as Jt,G as Kt}from"./index-DtOneCvz.js";import"./mui-D65-RCnL.js";import{d as Ot}from"./decodeURIComponentSafe-9S3zcxzZ.js";import{u as Vt}from"./useEnsureVendorListLoaded-BN6cn_-b.js";import{u as Zt,T}from"./TransactionDetailScreen-CB9xnJHu.js";import{c as Qt}from"./routePaths-CY1QL6df.js";import"./recharts-dm9pBwNL.js";import"./analytics-BLeep1MS.js";import"./plaid-BLMTayxO.js";import"./dnd-CrX2pTWR.js";import"./stripe-cKAAJElX.js";import"./lottie-xRtpxbQu.js";import"./lexical-Caj6E5Mq.js";import"./pdf-BJQfcDMm.js";import"./utils-DRaLbDIg.js";import"./useAskAiCfoHostNavButtonProps-CviB8_e-.js";import"./useInitialThreadRequest-CFiqVuk5.js";import"./expenseAutomationHelper-Br3isSOz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="ce90655d-1ed5-45e8-a2de-9552bf52ee81",e._sentryDebugIdIdentifier="sentry-dbid-ce90655d-1ed5-45e8-a2de-9552bf52ee81")}catch{}})();const Wt=["bank","credit_card","other_current_assets"],q=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:B}}=Kt.getLocalizedStrings();function Yt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:$}=ht(),{useFeatureGate:j}=zt(),J=Pt(),{isFeatureEnabled:K}=j(P.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(P.isProjectsTransactionsEnabled),O=Ot($??""),a=Ht.find((t=>t===O)),h=o((t=>It(t))),E=Ut(h.companyId,a),g=o((t=>Lt(t.companyState,h.companyId)?.company.companyLocaleInfo)),V=g?.currencyCode??B.currencyCode,Z=g?.currencySymbol??B.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=qt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",Q=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),W=o((t=>Tt(t))),D=o((t=>jt(t))),R=D&&C===!0,S=o((t=>t.projectListState)),_=o((t=>t.projectState)),Y=n.useMemo((()=>Ct(_,S).projects),[_,S]),I=o((t=>Et(t,"common"))),N=o((t=>t.accountListState.byReportId.accountList.fetchState)),M=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),X=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),F=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Bt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&N==="Not-Started"&&e(L("accountList"))}),[e,r,a,N]),n.useEffect((()=>{r&&M==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,M]),n.useEffect((()=>{r&&X==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Wt))}),[e,r,X]),n.useEffect((()=>{r&&F==="Not-Started"&&e(vt())}),[e,r,F]);const w=S.fetchState;n.useEffect((()=>{r&&R&&w==="Not-Started"&&e(xt())}),[e,r,R,w]),Vt(r),Zt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Gt(m.state)??[q(u)];d(Qt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(q(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Rt(t))}),[e]),H=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;H.current!==t&&(H.current=t,U.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),z=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===z));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,z]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(Nt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Mt(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&K===!0&&E&&J?.connectionName!=="netsuite"?c.jsx($t,{analytics:U,attachmentUploadEndpoint:Jt.accountMicroServiceBaseUrl,authParams:Q,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:W,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Y,currencyCode:V,currencySymbol:Z,bookCloseDate:h.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(wt(a)),onRemoveLine:t=>e(Ft(a,t)),onSubmit:()=>e(Xt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(G,{})}function Ce(){return c.jsxs(St,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Yt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(G,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
|