@zeniai/web-app-ui 5.0.77-qa → 5.0.78-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/AddressRoutes-BhkbfnzS.js +1 -0
- package/dist/assets/AddressScreen-BmR-OoZ_.js +9 -0
- package/dist/assets/{AiCfoScreen-9dFOdDvS.js → AiCfoScreen-C8ZpEKvV.js} +5 -5
- package/dist/assets/BillPayApprovalRoutes-CzEk_nhg.js +1 -0
- package/dist/assets/{BillPayRoutes-DRXDrSZP.js → BillPayRoutes-BYOQqAtg.js} +28 -28
- package/dist/assets/BusinessVerificationPageScreen-DsFRoHnS.js +9 -0
- package/dist/assets/{ChargeCardRoutes-C9NA04uL.js → ChargeCardRoutes-UrbQPmqH.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-BWjh-1tt.js → CompanyPassportScreen-DfcahYi3.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-KRY6Oem5.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CtDlGb6t.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-ClmI94EA.js +23 -0
- package/dist/assets/{DashboardRoutes-BR-AxyQo.js → DashboardRoutes-D6LkoAS1.js} +4 -4
- package/dist/assets/{DefaultTenantHome-C74gAQVt.js → DefaultTenantHome-C_HBx_e-.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-loJ8GquO.js +18 -0
- package/dist/assets/{DrawerScreen-DzkaoOWL.js → DrawerScreen-sfY6PIZF.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DzARLOVe.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-But3rf3J.js → ExpenseAutomationRoutes-mHXp4ejt.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-BbijPpnJ.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-Cqm6jDxt.js +1 -0
- package/dist/assets/{MagicLinkRoutes-Chwo-qkP.js → MagicLinkRoutes-DOskkrWK.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CRHf1Pq5.js +12 -0
- package/dist/assets/{MobileAppDrawer-B3x5wY10.js → MobileAppDrawer-DrdSJdo1.js} +1 -1
- package/dist/assets/NotFoundScreen-C5GqrkuK.js +1 -0
- package/dist/assets/NotificationRoutes-2PbblZyO.js +1 -0
- package/dist/assets/OAuthConsentScreen-BJ1rRrOX.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C-wtMSOq.js +1 -0
- package/dist/assets/PeopleRoutes-DW6v38OQ.js +22 -0
- package/dist/assets/PerformanceRoutes-SuLEsbMN.js +1 -0
- package/dist/assets/{Preview-B7yw63qf.js → Preview-TxzQXr3i.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CzbbjqA7.js → QBOConnectionScreen-BCkDW1I6.js} +1 -1
- package/dist/assets/ReferralListScreen-DYfKAeQl.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-B6agiTbB.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js → ReimbursementApprovalRuleDetailScreen-O71vUBoF.js} +1 -1
- package/dist/assets/ReimbursementRoutes-D5zdl8gM.js +68 -0
- package/dist/assets/ReportsRoutes-BDvJqZZF.js +1 -0
- package/dist/assets/RewardsRoutes-CrQQoiRC.js +1 -0
- package/dist/assets/ScreenRoutes-DCX1O3Md.js +2 -0
- package/dist/assets/{SettingsRoutes-B6i5o_xZ.js → SettingsRoutes-88kae7-O.js} +7 -7
- package/dist/assets/{SetupPagesScreen-D9wDjvOC.js → SetupPagesScreen-Ccazxtke.js} +5 -5
- package/dist/assets/SignInScreen-mIfi177N.js +1 -0
- package/dist/assets/SignOutScreen-DIeOz12t.js +9 -0
- package/dist/assets/{TaskListScreen-BXp_P6Ec.js → TaskListScreen-BfyHzekg.js} +2 -2
- package/dist/assets/TaskRoutes-Bmq0PDng.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CALv3lzc.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DRZw6o-C.js → TransactionDetailScreen-DVUrpN27.js} +2 -2
- package/dist/assets/{TransactionListRoutes-BOekcd9c.js → TransactionListRoutes-ZGPTqV4b.js} +1 -1
- package/dist/assets/TreasuryRoutes-mN-Tiy6z.js +37 -0
- package/dist/assets/{VendorsRoutes-ZfxM-ykJ.js → VendorsRoutes-Cx_ts7OM.js} +28 -28
- package/dist/assets/WiseConfirmationScreen-BVKaZUB7.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CpvkXgX6.js → ZeniAccountRoutes-DLsDt2CE.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-z63ZBClm.js +9 -0
- package/dist/assets/{accountMappingHelper-D6x0RpVY.js → accountMappingHelper-DpGnVAea.js} +1 -1
- package/dist/assets/{analytics-CgRNtlDm.js → analytics-Dwe2jubl.js} +1 -1
- package/dist/assets/{analyticsHelper-BunVJ4K_.js → analyticsHelper-VfNEEHsS.js} +1 -1
- package/dist/assets/{core-uYqCzel8.js → core-XIdi9yav.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DCnYf30M.js → decodeURIComponentSafe-CqshbMyv.js} +1 -1
- package/dist/assets/{dnd-BSWou54V.js → dnd-C8_bqxJQ.js} +1 -1
- package/dist/assets/{empty-CKinwWZY.js → empty-CP3zMx39.js} +1 -1
- package/dist/assets/{empty-BFCAZWzA.js → empty-CwZgS-VN.js} +1 -1
- package/dist/assets/{emptyVideoElement-E29-Nor3.js → emptyVideoElement-BnCGoR33.js} +1 -1
- package/dist/assets/epic-Bd7YYQOZ.js +2 -0
- package/dist/assets/getLocaleForTenant-CJ_gALMc.js +1 -0
- package/dist/assets/{index-DojfCsv7.js → index-BFHwjIZ6.js} +12640 -12668
- package/dist/assets/{index-8d_FSGLw.js → index-BGt9CQn-.js} +1 -1
- package/dist/assets/{index-BsLHs9Ab.js → index-BuT_Em2K.js} +1 -1
- package/dist/assets/{index-DWPRup5s.js → index-BwOJsH8g.js} +1 -1
- package/dist/assets/{index-Dl7Wgss6.js → index-C5MHMUJX.js} +1 -1
- package/dist/assets/{index-F3uqdkEv.js → index-CT8IgTpZ.js} +2 -2
- package/dist/assets/{index-DeBaxB_L.js → index-DZp35-bi.js} +1 -1
- package/dist/assets/{index-CxWCBC6O.js → index-hYoHMc0Z.js} +1 -1
- package/dist/assets/{lexical-DbCoEckm.js → lexical-L3dbahzM.js} +1 -1
- package/dist/assets/{liveblocks-CfCKAQeM.js → liveblocks-BTKJAzKw.js} +1 -1
- package/dist/assets/{lottie-Dc_IH0fS.js → lottie-B4nk2ufU.js} +1 -1
- package/dist/assets/{mui-CTbUXhla.js → mui-D-cfPqvW.js} +1 -1
- package/dist/assets/{pathToGoBack-Y7yporNq.js → pathToGoBack-CEbHtWH4.js} +1 -1
- package/dist/assets/{pdf-lib-CNgiyR2K.js → pdf-lib-DNtyO1c9.js} +1 -1
- package/dist/assets/{pdf-O9N1jd2N.js → pdf-vaniLLX-.js} +3 -3
- package/dist/assets/{plaid-Bio3MiLm.js → plaid-_FJLoBl-.js} +1 -1
- package/dist/assets/{pusher--jGYOMJ8.js → pusher-DxLcqjAa.js} +1 -1
- package/dist/assets/{react-BYbqG6ZW.js → react-AWyiT1J_.js} +1 -1
- package/dist/assets/{react-D9RjhqSo.js → react-B6KkVX_w.js} +1 -1
- package/dist/assets/{react-BaqpebX1.js → react-BDdVRErx.js} +1 -1
- package/dist/assets/{react-KPWjcD7D.js → react-CZ7HzwCB.js} +1 -1
- package/dist/assets/{react-kWXzqyUF.js → react-DW2dmFYn.js} +1 -1
- package/dist/assets/{react-DqfAPb7w.js → react-PsEdw6eg.js} +1 -1
- package/dist/assets/{recharts-BUFoogHS.js → recharts-Db9qTggV.js} +1 -1
- package/dist/assets/{routePaths-DoAvT9jx.js → routePaths-DYhINZNz.js} +1 -1
- package/dist/assets/{sentry-131ydzJg.js → sentry-BidZRtdZ.js} +1 -1
- package/dist/assets/{url-BRm_J7V6.js → url-B1tfhvRN.js} +1 -1
- package/dist/assets/{url-DlWfObPw.js → url-CX5VwIV_.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DvEC_Rfy.js +1 -0
- package/dist/assets/{useDeviceId-CBU-vDdN.js → useDeviceId-rJ9quQG0.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js → useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Dbj0dyeX.js → useInitialThreadRequest-1r6joKrr.js} +1 -1
- package/dist/assets/{utils-BkkIzijx.js → utils-DDxx6oUt.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DN0z2FuE.js → withTransactionSidePanel-_oROnP2L.js} +3 -3
- package/dist/assets/{zeni-epic-state-BmAPZlsC.js → zeni-epic-state-znLEvSss.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-O04th73J.js +0 -1
- package/dist/assets/AddressScreen-Bk_munT3.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-COiJeUFT.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-CnAB8eUQ.js +0 -9
- package/dist/assets/ConnectionAuthScreen-D6DaHf5c.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-3eEcB707.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-l7rM0eut.js +0 -23
- package/dist/assets/DomesticWireDetailScreen-CWWX1EFM.js +0 -18
- package/dist/assets/EntityDetailRoutes-B7e2LtGS.js +0 -1
- package/dist/assets/FeaturePreviewScreen-B2O-98_e.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-DexCFc1l.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-DWsNyqtg.js +0 -12
- package/dist/assets/NotFoundScreen-t1ueGvDG.js +0 -1
- package/dist/assets/NotificationRoutes-CIdj2V-n.js +0 -1
- package/dist/assets/OAuthConsentScreen-CP2RFaGU.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BXYFz1ZW.js +0 -1
- package/dist/assets/PeopleRoutes-MqrPexG5.js +0 -22
- package/dist/assets/PerformanceRoutes-B1RTm-Zq.js +0 -1
- package/dist/assets/ReferralListScreen-DTQFACuG.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-Dclz8XkB.js +0 -1
- package/dist/assets/ReimbursementRoutes-Dd9IEYb-.js +0 -68
- package/dist/assets/ReportsRoutes-B9O7T9pm.js +0 -1
- package/dist/assets/RewardsRoutes-DN2HacCh.js +0 -1
- package/dist/assets/ScreenRoutes-BsLKoqEt.js +0 -2
- package/dist/assets/SignInScreen-D68DdO0g.js +0 -1
- package/dist/assets/SignOutScreen-CiC1xhyM.js +0 -9
- package/dist/assets/TaskRoutes-Dne-2qND.js +0 -9
- package/dist/assets/TransactionDetailRoutes-C1ih2pnm.js +0 -1
- package/dist/assets/TreasuryRoutes-BMXt9CZJ.js +0 -37
- package/dist/assets/WiseConfirmationScreen-D5IG7vtp.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-C_K9i07r.js +0 -9
- package/dist/assets/epic-dPIWYPli.js +0 -2
- package/dist/assets/getLocaleForTenant-BVZe9vGW.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-It-lF7wN.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-BFHwjIZ6.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BidZRtdZ.js"><link rel="modulepreload" crossorigin href="/assets/core-XIdi9yav.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-znLEvSss.js"><link rel="modulepreload" crossorigin href="/assets/mui-D-cfPqvW.js"><link rel="modulepreload" crossorigin href="/assets/analytics-Dwe2jubl.js"><link rel="modulepreload" crossorigin href="/assets/utils-DDxx6oUt.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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.0.
|
|
3
|
+
"version": "5.0.78-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@sentry/core": "^9.42.1",
|
|
28
28
|
"@sentry/react": "^9.42.1",
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
|
-
"@zeniai/client-analytics": "2.0.
|
|
31
|
-
"@zeniai/client-epic-state": "5.0.
|
|
32
|
-
"@zeniai/web-components": "4.0.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.9",
|
|
31
|
+
"@zeniai/client-epic-state": "5.0.42",
|
|
32
|
+
"@zeniai/web-components": "4.0.84",
|
|
33
33
|
"color": "3.1.3",
|
|
34
34
|
"cross-fetch": "^4.0.0",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CfCKAQeM.js";import{A as i}from"./AddressScreen-Bk_munT3.js";import s from"./NotFoundScreen-t1ueGvDG.js";import"./sentry-131ydzJg.js";import{n as d,o as r}from"./core-uYqCzel8.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CfCKAQeM.js";import{a as h}from"./sentry-131ydzJg.js";import{j as T,h as _,u as j,l as E,g as $,k as B}from"./core-uYqCzel8.js";import{Z as K,m as M,z as D,c as L,x as R,A as z,d as C,f as S,k as F,h as b,p as N}from"./index-DojfCsv7.js";import{J$ as k,gY as U,eQ as G,K0 as O,c2 as V,K1 as q,ki as H}from"./zeni-epic-state-BmAPZlsC.js";import{n as J}from"./mui-CTbUXhla.js";import Q from"./NotFoundScreen-t1ueGvDG.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]="590c23ad-8bc3-46aa-920f-04189908b03a",e._sentryDebugIdIdentifier="sentry-dbid-590c23ad-8bc3-46aa-920f-04189908b03a")}catch{}})();const Y=J.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
|
-
`,Z=B(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&O(t.roleMap),r=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const r=i.state,n=N(r?.pathnameStackToGoBack);let s=n.poppedPathname??w();const u=r?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const r=W(a);e(H({addressType:c,addressToCreate:r})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(F);function de({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),r=_(),n=j(),{addressId:s,addressType:u}=E(),g=K(),x=M(),I=D.getSignedInUser(),[f,v]=h.useState(s==null),p=$(m=>s!=null?k(m,s).fetchState:"Not-Started"),A=L();if(I==null)throw Error("Can't access address page without signing in...");const P=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect(()=>{f||s==null||(v(!0),r(U(s,!1)))},[f,s,r]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?d.jsx(R,{fetchState:p,style:{backgroundColor:x.colors.grey5}}):s!=null&&p==="Error"?(a(`${w(1)}/new`,{replace:!0}),d.jsx(d.Fragment,{})):d.jsxs(d.Fragment,{children:[d.jsx(z,{analytics:C,onLoad:P}),d.jsx(Y,{windowSize:g,children:d.jsx(Z,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):d.jsx(Q,{})}const w=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},W=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{de as A,W as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CfCKAQeM.js";import{a as y}from"./sentry-131ydzJg.js";import{j as U,u as B,h as j,g as f,N,k as T,l as O,n as $,o as h}from"./core-uYqCzel8.js";import{eQ as F,Ni as R,M_ as b,xM as x,xG as L,xK as I,xz as z,N0 as M,xC as W,xO as q,xN as E}from"./zeni-epic-state-BmAPZlsC.js";import{m as P,z as k,x as V,a3 as G,by as K,ac as _,bz as Q}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{i as H}from"./ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js";import J from"./NotFoundScreen-t1ueGvDG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="853cd5e6-385e-47ed-8b6e-8b6bbdd64aa0",e._sentryDebugIdIdentifier="sentry-dbid-853cd5e6-385e-47ed-8b6e-8b6bbdd64aa0")}catch{}})();const w="bill-approval-rule-update",X=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(M(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(z(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(G(K)),Y=()=>{const e=U(),o=B(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=f(i=>i.billPaySetupApproverViewState.fetchState),c=f(i=>F(i)),r=f(i=>R(i)),g=f(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const v={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(X,{currentTenant:c,location:o,navigate:e,...v})},Z=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(v=>{const i=v.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=v.actors.selectedNonUsers.map(S=>{const C=!!H(S.value);return{type:C?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!C}}),m=i.concat(A);g.push({action:v.stepType.selectedOption,actors:m,operator:m.length>1?v.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(Q);function D(){const e=U(),o=j(),t=B(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=f(r=>b(r)),d=f(r=>R(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs($,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(J,{})})]})}export{se as B};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-CfCKAQeM.js";import{a as V}from"./sentry-131ydzJg.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-uYqCzel8.js";import{c as ce,y as ue,aK as de,z,A as pe,d as B,ac as F,f as E,bu as le,aq as me,q as R,ar as P}from"./index-DojfCsv7.js";import{N6 as fe,eQ as q,s8 as ye,Hx as Se,xR as ge,Ay as Ie,D5 as he,DK as be,ED as De,Nt as Oe,Nu as Te,Nv as ke,Nw as Ce,Nx as Ve,K0 as Ne,Mv as we,Kc as Ae,ki as ve,fC as _e,fB as xe,fA as Fe,q9 as Ee,q0 as ze,pZ as Be,ka as Re,sh as Pe,sf as M,bE as L,st as U,cv as Me}from"./zeni-epic-state-BmAPZlsC.js";import{n as Le}from"./mui-CTbUXhla.js";import{c as j}from"./routePaths-DoAvT9jx.js";import{M as Ue}from"./MobileAppDrawer-B3x5wY10.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]="76e87a2e-eedb-4eef-948c-56662e3db6c7",e._sentryDebugIdIdentifier="sentry-dbid-76e87a2e-eedb-4eef-948c-56662e3db6c7")}catch{}})();const je=Le.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
|
-
`,qe=re(function(e,d){const{businessVerificationDetails:i}=d,r=q(e),y=z.getSignedInUser(),S=r.tenantId,l={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},b=Ne(d.roleMap)&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=we(e.companyConfigState),s=Ae(e.userRoleConfigState);return{businessVerificationDetails:i,verficationDetailsFetchState:i.fetchState,isRefreshingViewInBackground:i.isRefreshingViewInBackground,allNationalityCountries:i.allNationalityCountries,filesEndPoint:`${me.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:s.companyTitles}},function(e,d){const{companyId:i,productType:r,currentTenant:y,navigate:S,location:l}=d,{tenantEmailDomain:b}=y;return{onCompanyDetailsChanged:t=>{const{companyDescription:s,companyIndustry:p,companyIndustryType:O,companyLegalName:T,companyTaxId:g,companyWebsite:m,companyPhone:I,primaryContactEmail:c,primaryContactName:n,primaryContactUserId:u,primaryContactSyncToken:D,syncToken:f,fileIds:a,incDate:o,typeOfIncorporation:N,stateOfIncorporation:w,sourceOfFunds:A,companySubIndustry:v,countriesOfOperations:h,companySourceOfFunds:G,companySourceOfFundsDescription:K,transactionVolume:Z,transactionVolumeDescription:$,purposeOfAccount:H,purposeOfAccountDescription:Q,regulatedStatus:W,regulatedStatusDescription:J,usNexus:X,usNexusTypes:Y}=t,_=O?.selectedOption,ee={companyId:i,companyDescription:s,companyIndustry:p.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:T,taxIdOrEIN:g,website:m!=""&&m!=null?Me(m):void 0,phone:I,syncToken:f,fileIds:a,incDate:o!=null?L(o?.toString()):o,typeOfIncorporation:N?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:A?.selectedOption??"",companySubIndustry:v?.selectedOption??"",countriesOfOperations:h?.selectedOptions.map(x=>x.length===2?x:P(x))??[],companySourceOfFunds:G?.selectedOption??"",companySourceOfFundsDescription:K,transactionVolume:Z?.selectedOption??"",transactionVolumeDescription:$,purposeOfAccount:H?.selectedOption??"",purposeOfAccountDescription:Q,regulatedStatus:W??"",regulatedStatusDescription:J,usNexus:X,usNexusTypes:Y?.selectedOptions??[]},te={userId:u,firstName:n.firstName,lastName:n.lastName,email:c,syncToken:D};e(U({companyDetails:ee,primaryContactDetails:te}))},onCompanyOfficerUpdated:t=>{const s=t.map(p=>{const{officerType:O,userId:T,name:g,email:m,nationalityCountryCode:I,ssn:c,dob:n,phone:u,syncToken:D,selectDocument:f,role:a,ownership:o,isSelectedForVerification:N,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:v}=p;let h;return f.selectDocumentType==="driverLicense"?h="driving_license":f.selectDocumentType==="passport"?h="passport":f.selectDocumentType==="stateId"?h="id_document":f.selectDocumentType==="ssnCard"&&(h="social_security_card"),{officerType:O,userId:T,firstName:g.firstName,lastName:g.lastName,email:m,ssn:c,nationalityCountryCode:I?.selectedOption!=null?P(I.selectedOption):void 0,phone:u,birthday:n!=null?L(n?.toString()):n,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:o,documentTypeSelectedForVerification:h,isSelectedForVerification:N,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:v,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(U({officers:s}))},onSaveDetailsClick:t=>{e(M(i,t,r))},onSendForVerificationClick:t=>{e(M(i,t,r,!0))},onAddressClick:t=>{const s=j(b,t),p=R(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onRegisteredAddressClick:t=>{const s=j(b,t),p=R(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onBackClick:()=>{e(Pe({companyId:i})),S("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Be(t))},onDeleteFileList:t=>{e(ze(t))},onEditFileName:(t,s)=>{e(Ee(t,s.split(".")[0]))},onGetOtp:t=>{e(Fe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(xe(t,"SpendManagementSetup"))},onVerifyOtp:(t,s)=>{e(_e(t,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,s)=>{e(ve({addressType:t,addressToCreate:s}))}}})(le),Xe=({productType:e})=>{const d=ae(),i=ne(),r=se(),[y,S]=V.useState(!1),[l,b]=V.useState(!1),{tenantEmailDomain:t}=ie(),s=ce(),{useDynamicConfig:p}=ue(),{configValue:O}=p(de.zeniAccountsConfig),T=fe(O),g=C(a=>{switch(e){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}}),m=C(a=>a.companyConfigState.fetchState),I=C(a=>a.userRoleConfigState.fetchState),c=C(a=>q(a)),n=c.companyId??z.getSignedInUserTenant(t)?.companyId;if(V.useEffect(()=>{m==="Not-Started"&&r(ye()),I==="Not-Started"&&r(Se(!0))},[m,I,r]),V.useEffect(()=>{if(!y&&g==="Not-Started"&&n!=null)switch(S(!0),e){case"zeni_accounts":r(De(n,!0));break;case"zeni_treasury":r(be(n,!0));break;case"reimbursement":r(he(n,!0));break;case"charge_cards":r(Ie(n,!0));break;default:r(ge(n,!0))}},[y,g,n,r]),z.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let u;switch(e){case"zeni_accounts":u=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":u=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":u=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":u=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:u=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{b(a)},f=C(a=>{let o;switch(e){case"zeni_accounts":o=Ve(a,n);break;case"zeni_treasury":o=Ce(a,n);break;case"charge_cards":o=ke(a,n);break;case"reimbursement":o=Te(a,n);break;default:o=Oe(a,n)}return o});return u===!1?k.jsx(oe,{to:"../promo"}):k.jsxs(je,{children:[k.jsx(pe,{analytics:B,onLoad:a=>(o=>{switch(e){case"zeni_accounts":return o.trackPageLoaded(E.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return o.trackPageLoaded(E.Event.reimbursementBusinessVerification);default:return o.trackPageLoaded(E.Event.billPayBusinessVerification,F(i)?"Settings":void 0)}})(a)}),F(i)?k.jsx(Ue,{isAppContentDrawerOpen:l,handleDrawerToggle:D}):null,k.jsx(qe,{businessVerificationDetails:f,navigate:d,location:i,companyId:n,analytics:B,currentTenant:c,productType:e,isSettings:F(i),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:T.maxInsuredAmount})]})};export{Xe as B};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-CfCKAQeM.js";import{a}from"./sentry-131ydzJg.js";import{h as D,u as v,g as u,N as w}from"./core-uYqCzel8.js";import{J9 as A,eQ as O,fl as U,mS as _,fN as E,fk as j,eR as L,Jg as k}from"./zeni-epic-state-BmAPZlsC.js";import{u as F,z as p,L as g,D as $,o as H}from"./index-DojfCsv7.js";import{n as R}from"./mui-CTbUXhla.js";import{t as z}from"./getLocaleForTenant-BVZe9vGW.js";import{g as Q,Q as J}from"./QBOConnectionScreen-CzbbjqA7.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./empty-CKinwWZY.js";import"./pdf-lib-CNgiyR2K.js";import"./index-DeBaxB_L.js";import"./url-BRm_J7V6.js";import"./index-CxWCBC6O.js";import"./decodeURIComponentSafe-DCnYf30M.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="0a98b192-a0c4-4670-822f-b14995350685",t._sentryDebugIdIdentifier="sentry-dbid-0a98b192-a0c4-4670-822f-b14995350685")}catch{}})();const P=R.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 ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function fe(){const t=D(),d=v(),{setLoading:i,clearAllLoading:b}=F(),f=a.useRef(!1),c=a.useRef(!1),{code:x,realmId:N,state:S}=Q(d.search),T=x!==""&&N!==""&&S!=="",I=u(l=>A(l)),e=u(l=>O(l)),n=u(l=>l.tenantState.fetchState),r=u(l=>l.tenantState.activeTenantFetchState.fetchState),o=p.getSignedInUser(),m=p.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,h=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{i(g.CONNECTION_AUTH)},[i]),a.useEffect(()=>{f.current||o==null||m==null||(f.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(i(g.TENANT_FETCHING),t(U(o.userId,m))))},[f,n,i]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(_(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||h!=="Error"||(i(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(j(e.tenantId)),p.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(z(k(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&p.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:T||y===!1?C.jsx(P,{children:C.jsx(J,{})}):C.jsx(w,{to:"/",replace:!0})}export{fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-CfCKAQeM.js";import{z as a}from"./index-DojfCsv7.js";import{g as n}from"./QBOConnectionScreen-CzbbjqA7.js";import"./sentry-131ydzJg.js";import{u as p,N as s}from"./core-uYqCzel8.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./empty-CKinwWZY.js";import"./pdf-lib-CNgiyR2K.js";import"./index-DeBaxB_L.js";import"./url-BRm_J7V6.js";import"./index-CxWCBC6O.js";import"./decodeURIComponentSafe-DCnYf30M.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]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CfCKAQeM.js";import{t as Ke,A as Ce}from"./AddressScreen-Bk_munT3.js";import $e from"./NotFoundScreen-t1ueGvDG.js";import{a as g}from"./sentry-131ydzJg.js";import{j as se,u as oe,h as ie,l as re,g as D,N as E,k as ce,i as ze,n as Me,o as z}from"./core-uYqCzel8.js";import{s as de,c as le,z as B,y as ue,m as qe,S as _,q as V,A as W,d as N,x as je,f as X,am as Qe,Z as Ze,an as ke,h as te,ao as He,ap as Ie,o as We,aq as Je,ar as Ee,as as Xe}from"./index-DojfCsv7.js";import{bn as Ye,eQ as ee,fd as et,eW as pe,eU as me,bv as tt,mQ as at,f9 as nt,bO as st,je as ae,jh as ve,JF as ot,bT as it,c2 as ge,sm as fe,s7 as rt,Ka as Y,sn as _e,Hx as ct,ki as Ue,Kb as Ve,Kc as dt,Kd as lt,Ke as ut,jc as pt,jf as mt,s9 as Be,sl as gt,bE as xe,cv as ft,sz as Te,q9 as ht,pZ as yt,ka as bt,fC as St,fB as Ct,fA as kt,Kf as It,s1 as Et,sA as xt,sD as Tt,sG as Ot,sM as At,cU as Pt}from"./zeni-epic-state-BmAPZlsC.js";import{n as he}from"./mui-CTbUXhla.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-CzbbjqA7.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./empty-CKinwWZY.js";import"./pdf-lib-CNgiyR2K.js";import"./index-DeBaxB_L.js";import"./url-BRm_J7V6.js";import"./index-CxWCBC6O.js";import"./decodeURIComponentSafe-DCnYf30M.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="ba99d4c4-3f6b-4f7b-9d5a-2602d7ddcf32",t._sentryDebugIdIdentifier="sentry-dbid-ba99d4c4-3f6b-4f7b-9d5a-2602d7ddcf32")}catch{}})();const wt=ce(function(t,s){const o=[];s.isApAgingFeatureEnabled===!1&&o.push("accounts_payable_aging"),s.isArAgingFeatureEnabled===!1&&o.push("accounts_receivable_aging"),s.shouldFetchZeniAccountsPromoCard===!1&&o.push("zeni_accounts_promo_card"),s.shouldFetchRewardsPlanCard===!1&&o.push("rewards_card"),s.isExpenseAutomationEnabledForUser===!1&&o.push("expense_automation_card");const u=nt(t,o,s.signedInUser,s.isExpenseAutomationFeatureEnabledV2,s.isExpenseAutomationEnabledForUser,s.isTreasuryEnabled);return{dashboardFetchState:st(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,s){const{themeState:o,navigate:u,location:d}=s;return{onZeniLogoClick:()=>{o.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Qe),jt=()=>{const t=se(),s=oe(),o=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),f=Ye(i),{useFeatureGate:m}=ue(),I=qe(),{isFeatureEnabled:x}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:T}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),K=C||U&&f,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),G=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),A=me(c),P=[],Q=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,$=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!M,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&P.push("top_expenses"),$===!1&&P.push("task_card"),v===!1&&P.push("bill_pay_card","bill_pay_promo_card"),q===!1&&P.push("reimbursement_card","reimbursement_promo_card"),k===!1&&P.push("zeni_accounts_promo_card"),h===!1&&P.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||A||(r(!0),o(at(i.userId,R,c.tenantId,!0,!1,P)))},[d,O,j,A,i,c.tenantId,o]),g.useEffect(()=>{(j||A)&&setTimeout(()=>{b(!0)},5e3)},[j,A]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(s.state?.pathnameStackToGoBack,s.pathname);if(j)return a.jsx(E,{to:"../../checking",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}});if(A)return a.jsx(E,{to:"../../cards",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:N,onLoad:l=>(Z=>Z.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:s,themeState:u,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:T,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:K,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=he.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
5
|
-
`,Ae=he.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
align-items: center;
|
|
9
|
-
min-width: calc(100% - ${Ie}px);
|
|
10
|
-
padding-left: ${Ie}px;
|
|
11
|
-
flex: 1;
|
|
12
|
-
|
|
13
|
-
${t=>t.theme.breakpoints.down("md")} {
|
|
14
|
-
width: 100%;
|
|
15
|
-
padding-left: ${We.sp0};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
${t=>t.windowSize!=="small"?"overflow: auto;":""}
|
|
19
|
-
`,Pe=ce(function(t,s){const{companyId:o,isAdmin:u,currentTenant:d,isOnAddressPage:r}=s,p=B.getSignedInUser(),b=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:b??""},n=ee(t),i=fe(t,o),f=Ve(t),m=ge(d?.userRole??[])&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",I=dt(t.userRoleConfigState);return{onboardingCustomerView:i,analytics:N,isRefreshingViewInBackground:!1,isDisabled:m,companyTitles:I.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Je.fileMicroServiceBaseUrl,authParams:e},signedInUser:B.getSignedInUser(),currentTenant:d,isAdmin:u,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:f,isCardPaymentPopupOpen:!1,stripeKey:te.stripeKey}},function(t,s){const{companyId:o,currentTenant:u,themeState:d,navigate:r,location:p}=s,{tenantEmailDomain:b}=u;return{onFetchLinkTokenClick:(e,n)=>{t(At(e,n))},onEstablishConnectionClick:(e,n)=>{t(Ot(e,n))},onUpdatePaymentAccountStatus:(e,n,i)=>{t(Tt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(xt(!1,e,n))},onEstablishConnectionSuccess:()=>{t(Et(o,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),ne.handleClick()},updateQBOPopupState:e=>{t(Y({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(i=>{const{officerType:f,userId:m,name:I,email:x,ssn:T,nationalityCountryCode:k,dob:h,phone:U,syncToken:C,selectDocument:F,role:K,ownership:c,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,isPhoneVerified:O}=i;let S;return F.selectDocumentType==="driverLicense"?S="driving_license":F.selectDocumentType==="passport"?S="passport":F.selectDocumentType==="stateId"?S="id_document":F.selectDocumentType==="ssnCard"&&(S="social_security_card"),{officerType:f,userId:m,firstName:I.firstName,lastName:I.lastName,email:x,ssn:T,nationalityCountryCode:k?.selectedOption!=null?Ee(k.selectedOption):void 0,phone:U,birthday:h!=null?xe(h?.toString()):h,syncToken:C,titleAtCompany:K.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:S,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(Te({officers:n}))},onGetOtp:(e,n)=>{t(kt(e,"CustomerOnboarding")),n!=null&&t(It({officerType:n,phone:e}))},onResendOtp:e=>{t(Ct(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(St(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(bt({files:e}))},onDeleteFile:e=>{t(yt(e))},onEditFileName:(e,n)=>{t(ht(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:i,companyIndustryType:f,companyLegalName:m,companyTaxId:I,companyWebsite:x,companyPhone:T,primaryContactEmail:k,primaryContactName:h,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:K,typeOfIncorporation:c,stateOfIncorporation:L,incDate:w,companySourceOfFunds:G,companySourceOfFundsDescription:O,companySubIndustry:S,countriesOfOperations:R,purposeOfAccount:j,purposeOfAccountDescription:A,regulatedStatus:P,regulatedStatusDescription:Q,transactionVolume:$,transactionVolumeDescription:M,usNexus:v,usNexusTypes:q}=e,l={companyId:o,companyDescription:n,companyIndustry:i.selectedOption,companyIndustryType:f?.selectedOption??"",companyLegalName:m,taxIdOrEIN:I,website:x!=""&&x!=null?ft(x):void 0,phone:T,syncToken:F,fileIds:K,incDate:w!=null?xe(w?.toString()):w,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:G?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:S?.selectedOption??"",countriesOfOperations:R?.selectedOptions.map(H=>H.length===2?H:Ee(H))??[],purposeOfAccount:j?.selectedOption??"",purposeOfAccountDescription:A,regulatedStatus:P??"",regulatedStatusDescription:Q,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:M,usNexus:v,usNexusTypes:q?.selectedOptions??[]},Z={userId:U,firstName:h.firstName,lastName:h.lastName,email:k,syncToken:C};t(Te({companyDetails:l,primaryContactDetails:Z}))},onAddressClick:(e,n)=>{const i=De(b,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onRegisteredAddressClick:(e,n)=>{const i=De(b,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onUpdateCustomerView:(e,n,i)=>{t(gt(o,!1,n,i,e))},onAddressEditHandler:e=>{if(e!=null){const n=Ke(e);t(Ue({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);t(Be(o,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(_e({step:e}))},onZeniLogoClick:()=>{d.toggle()},handleLogOutClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleCreateCardSetupIntent:e=>{t(ve(e))},handleConfirmCardSetupIntent:e=>{t(mt(e))},updateCardPaymentModalState:e=>{t(Y({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,i)=>{t(pt(e,n,i))},handleFetchPaymentSources:()=>{t(ae())},resetCardPaymentViewState:()=>{t(ut())},handleResetCardPaymentErrorStatuses:()=>{t(lt())},redirectToProductSuitePage:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r(`/${b}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})}}})(He),J=({taxCFOCustomer:t=!1,isOnAddressPage:s=!1,appContent:o})=>{const u=se(),d=oe(),r=ie(),p=Ze(),b=de(),[e,n]=g.useState(!1),[i,f]=g.useState(!1),[m,I]=g.useState(!1),{tenantEmailDomain:x}=re(),T=le(),{useFeatureGate:k}=ue(),{isFeatureEnabled:h}=k(_.isDebitCardFeatureEnabled),U=ze("/:tenantEmailDomain/onboarding")!==null&&d.search?.includes("code"),C=D(y=>y.onboardingCustomerViewState.fetchState),F=D(y=>y.onboardingCustomerViewState.currentStep),K=D(y=>y.onboardingCustomerViewState.uiState),c=D(y=>ee(y)),L=D(y=>y.userRoleConfigState.fetchState),w=D(y=>y.cardPaymentViewState),G=ke(w.addCardPaymentSourceStatus.fetchState),O=w.addCardPaymentSourceStatus.fetchState,{code:S,realmId:R,state:j}=Dt(d.search),A=c.externalConnections?.accounting[0],P=A?.connectionType,Q=A?.connectionName,$=A?.connectionId??"",M=B.getSignedInUser()?.userId??"";g.useEffect(()=>{i||(f(!0),r(ae()))},[i,r]),g.useEffect(()=>{m||(ve(["card"]),I(!0))},[m]),g.useEffect(()=>{G==="In-Progress"&&O==="Completed"&&r(ae())},[G,O]),g.useEffect(()=>{Ft(S,R,j,$,M)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(ot(c.tenantId,{connection_type:P??"accounting",connection_name:Q??"quickbooks_online",authorization_code:S,realm_id:R,connection_id:$,user_id:M},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(R,$),u(d.pathname))},[S,R,j,d.pathname,C]),g.useEffect(()=>{ne.isInitiated===!1&&C==="Completed"&&ne.init("/onboarding/auth",c.tenantEmailDomain)},[C]);const v=c.companyId??B.getSignedInUserTenant(x)?.companyId,q=ge(c?.userRole??[]),l=D(y=>fe(y,v));g.useEffect(()=>{e||C!=="Not-Started"||v==null||(n(!0),r(rt(v,!0,!U)))},[e,C,v]),g.useEffect(()=>{c.externalConnections?.saveConnectionState!=="Completed"&&c.externalConnections?.saveConnectionState!=="Error"||!K.isQBOPopupOpen||F!=="qbo_connection"||r(Y({isQBOPopupOpen:!1}))},[c.externalConnections?.saveConnectionState]),g.useEffect(()=>{C==="Completed"&&U&&(r(_e({step:"qbo_connection"})),r(Y({isQBOPopupOpen:!0})))},[U,C]),g.useEffect(()=>{L==="Not-Started"&&r(ct(!0))},[L,r]);const Z=ke(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&Z==null&&r(Ue({addressType:"company_registered_address",addressToCreate:l.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[l.companyDetailsLocalData?.addressStatus?.addressToCreate,l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const H=l.isInterimEmailSent;if(B.getSignedInUser()==null)throw Error("Can't access onboarding flow without signing in...");const Le=pe(h,c),Ge=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,be=y=>y.trackPageLoaded(X.Event.onboardingPage),Se=c.productSettings.isOtherProductsEnabled,Re=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!Se)return Re?a.jsx(E,{to:"../../treasury"}):Le?a.jsx(E,{to:"../../checking"}):Ge?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"});const y=l.updateStatus.fetchState==="In-Progress";if(Se&&!y)return t?a.jsxs(Oe,{children:[a.jsx(W,{analytics:N,onLoad:Ne=>be(Ne)}),a.jsx(Pe,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:s,themeState:b,googleAPIKey:te.googleMapsAPIKey}),o!=null?a.jsx(Ae,{windowSize:p,children:o}):null]}):a.jsx(E,{to:"../../onboarding/thankyou"})}else if(ye===!1&&T?.loggedInUserRoleMap!=null)return H===!0?a.jsx(E,{to:"../../onboarding/thankyou"}):a.jsxs(Oe,{children:[a.jsx(W,{analytics:N,onLoad:y=>be(y)}),a.jsx(Pe,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:s,themeState:b,googleAPIKey:te.googleMapsAPIKey}),o!=null?a.jsx(Ae,{windowSize:p,children:o}):null]});return null};function De(t,s,o){let u=`/${t}/onboarding/address`;return u=o!=null?u.concat(`/edit/${s}/${encodeURIComponent(o)}`):u.concat(`/new/${s}`),u}const Fe=he.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100vh;
|
|
22
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
23
|
-
`,we=ce(function(t,s){const{companyId:o,currentTenant:u}=s,d=fe(t,o),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,s){const{currentTenant:o,themeState:u,navigate:d,location:r}=s,{tenantEmailDomain:p}=o;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d("/signout",{replace:!0,state:{pathnameStackToGoBack:b,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleUpdatePaymentAddressDetailClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d(`/${p}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:b,message:"UpdatePaymentAddressDetail"}})}}})(Xe),vt=()=>{const t=se(),s=ie(),o=oe(),u=de(),{useFeatureGate:d}=ue(),{isFeatureEnabled:r}=d(_.isDebitCardFeatureEnabled),{tenantEmailDomain:p}=re(),b=le(),[e,n]=g.useState(!1);g.useEffect(()=>{e===!1&&o.state?.message==="OnboardingThankyou"&&n(!0)},[o.state]);const i=D(h=>ee(h)),f=i.productSettings.isOtherProductsEnabled;g.useEffect(()=>{s(Be(m,!1,!f))},[]);const m=i.companyId??B.getSignedInUserTenant(p)?.companyId;if(b.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const I=pe(r,i),x=me(i),T=D(h=>h.onboardingCustomerViewState.updateStatus.fetchState),k=i.company?.companyOnboardingInfo.isOnboardingCompleted;return k!==!0||f?T==="Completed"&&k===!0&&f&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(W,{analytics:N,onLoad:h=>{h.trackPageLoaded(X.Event.onboardingLandingPage,"Onboarding",Pt(i.productSettings))}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:f,location:o,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):T==="Completed"&&k===!1&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(W,{analytics:N,onLoad:h=>{h.trackPageLoaded(X.Event.onboardingInterimPage)}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:f,location:o,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(je,{fetchState:T}):I?a.jsx(E,{to:"../../checking"}):x?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"})};function sa(){return a.jsxs(Me,{children:[a.jsx(z,{path:"/",element:a.jsx(J,{})}),a.jsx(z,{path:"/billing/edit",element:a.jsx(J,{taxCFOCustomer:!0})}),a.jsx(z,{path:"/thankyou",element:a.jsx(vt,{})}),a.jsx(z,{path:"/activation",element:a.jsx(jt,{})}),a.jsx(z,{path:"/address/edit/:addressType/:addressId",element:a.jsx(J,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(z,{path:"/address/new/:addressType",element:a.jsx(J,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(z,{path:"*",element:a.jsx($e,{})})]})}export{sa as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CfCKAQeM.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-uYqCzel8.js";import{Nc as k,Nj as q,fC as K,fB as M,fA as Q,iz as W,Kk as J,q0 as L,eQ as V,MK as D,ix as T,Nd as S,Nm as F,iv as G,iS as j}from"./zeni-epic-state-BmAPZlsC.js";import{bn as X,Z as N,y as R,z as U,m as Z,p,S as v,x as z,bo as Y,o as O,bp as ee,q as te}from"./index-DojfCsv7.js";import{n as H}from"./mui-CTbUXhla.js";import"./sentry-131ydzJg.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]="6f010c9c-f9fb-4c23-94d1-f3357dc98752",e._sentryDebugIdIdentifier="sentry-dbid-6f010c9c-f9fb-4c23-94d1-f3357dc98752")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(Q(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(K(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,{useFeatureGate:c}=R(),d=U.getSignedInUser(),b=h(u=>V(u)),g=Z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,i)),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(_,{vendorId:i,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},ce=H.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:i}=r;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:d}=c;e(F({data:d}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),d=c.poppedPathname??$();a(d,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const d=se(i,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(d,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),d=c.poppedPathname??$(0);t.navigate(d,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,c=U.getSignedInUser(),{useFeatureGate:d}=R(),b=Z(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,i)),{isFeatureEnabled:I}=d(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(_,{vendorId:i,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,_ as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as d}from"./sentry-131ydzJg.js";import{j as A,h as B,u as K,l as G,g as l,N as F,k as O,n as N,o as W}from"./core-uYqCzel8.js";import{Lr as _,eQ as H,KQ as L,kC as M,Hp as k,Lw as Q,Kj as R,jC as V,Hq as S,KV as Y,KW as $,Kl as z,Kk as J}from"./zeni-epic-state-BmAPZlsC.js";import{aO as U,d as X,p as Z,q as tt}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{d as b}from"./decodeURIComponentSafe-DCnYf30M.js";import{w as et}from"./withTransactionSidePanel-DN0z2FuE.js";import{e as at,b as nt}from"./routePaths-DoAvT9jx.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import"./TransactionDetailScreen-DRZw6o-C.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="44e034a2-e3b7-466a-8b38-2784ed16bdab",a._sentryDebugIdIdentifier="sentry-dbid-44e034a2-e3b7-466a-8b38-2784ed16bdab")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=Q(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:R(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Y()),a($()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(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};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=K(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:I,entityIdEncoded:j,entityNameEncoded:w}=G(),r=b(j??""),p=b(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),q=l(n=>H(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>L(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(M(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.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:q,tenantEmailDomain:I,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:C(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as r}from"./sentry-131ydzJg.js";import{_ as c,$ as l,a0 as p,p as m}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import f from"./NotFoundScreen-t1ueGvDG.js";import{j as u,u as b}from"./core-uYqCzel8.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]="2e827b03-3332-44c2-8c4e-3d6d0e2a5436",e._sentryDebugIdIdentifier="sentry-dbid-2e827b03-3332-44c2-8c4e-3d6d0e2a5436")}catch{}})();const j=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(t.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:a,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-131ydzJg.js";import{h as l,j as f,u as m}from"./core-uYqCzel8.js";import{gv as p,Jx as g,Jy as _}from"./zeni-epic-state-BmAPZlsC.js";import{u as b,L as h,z as y}from"./index-DojfCsv7.js";import"./liveblocks-CfCKAQeM.js";import"./recharts-BUFoogHS.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="38346526-e167-43b6-a777-34fdf3173551",e._sentryDebugIdIdentifier="sentry-dbid-38346526-e167-43b6-a777-34fdf3173551")}catch{}})();function z(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);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 d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{z as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{h as J,u as O,j as _,q as w,g as l,N as T}from"./core-uYqCzel8.js";import{z as r,m as M,D as P,e as V,d as A,f as N,N as R,B as q,g as B}from"./index-DojfCsv7.js";import{eQ as Q,Jb as W,Jl as $,Jc as G,eR as H,fk as K,Jh as X,fJ as Y,cU as Z,Jm as ee,Jn as te}from"./zeni-epic-state-BmAPZlsC.js";import{n as ne}from"./mui-CTbUXhla.js";import{u as se}from"./useDeviceId-CBU-vDdN.js";import{f as ae}from"./analyticsHelper-BunVJ4K_.js";import{t as ie}from"./getLocaleForTenant-BVZe9vGW.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="951a49f8-742e-4756-982e-3e89053b500e",t._sentryDebugIdIdentifier="sentry-dbid-951a49f8-742e-4756-982e-3e89053b500e")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=J(),a=O(),f=_(),[y]=w(),n=y.get("token"),p=y.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),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Q(e)),k=l(e=>W(e)),E=r.getSignedInUser(),v=M().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(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(k.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=B();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const U=g.useCallback(()=>{f("/signin/auth")},[f]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="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||I==="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??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{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 e}from"./liveblocks-CfCKAQeM.js";import{j as r,k as i}from"./core-uYqCzel8.js";import{V as n}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import"./sentry-131ydzJg.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="0ce71e59-2b4b-4c28-a118-eb2a6980d8c5",o._sentryDebugIdIdentifier="sentry-dbid-0ce71e59-2b4b-4c28-a118-eb2a6980d8c5")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-CfCKAQeM.js";import lt from"./NotFoundScreen-t1ueGvDG.js";import{a as k}from"./sentry-131ydzJg.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as Q}from"./core-uYqCzel8.js";import{cr as St,eZ as X,eQ as H,fc as bt,f4 as b,PG as Y,f8 as d,eY as y,qX as M,wg as It,PH as Ct,eX as Tt,ff as yt,r0 as Et,PI as $,bq as F,gO as x,r4 as W,PJ as _t,cC as At,cw as Nt}from"./zeni-epic-state-BmAPZlsC.js";import{U as wt,z as Bt,y as xt,S as Pt,ct as Rt,q as N,a3 as Ut,cu as Dt,a4 as Gt,p as vt}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as Ft}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="efdb618e-c397-405e-97c2-07a756ddd09c",t._sentryDebugIdIdentifier="sentry-dbid-efdb618e-c397-405e-97c2-07a756ddd09c")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:w,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(W("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Y(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(W("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=vt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Ut(Dt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ft({isDataReady:!0});const Z=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:B,isLoading:E,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:J,isFetchingMore:L,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Y(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(E===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[E,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=E||D===!0||C!==!0||E||D===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(E===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),_=p.map(f=>f.id),it=p.map(f=>{const v=q.find(rt=>rt.id===f.threadId);return v!=null?{inboxNotification:{...f,threadId:v.id},thread:v}:(L||O===!0||J==null||J(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,D,L,C,O,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",T,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return A.jsxs(gt,{children:[A.jsx(Q,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(Q,{path:"*",element:A.jsx(lt,{})})]})}export{ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-CfCKAQeM.js";import{a as r}from"./sentry-131ydzJg.js";import{h as T,u as C,g as o,N as D}from"./core-uYqCzel8.js";import{JA as J,eQ as P,f3 as j,JB as x,JC as z,JD as M,JE as R,mS as k,Iw as L}from"./zeni-epic-state-BmAPZlsC.js";import{z as h,K as I}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="4008888b-bb46-4859-abce-911369b21d97",n._sentryDebugIdIdentifier="sentry-dbid-4008888b-bb46-4859-abce-911369b21d97")}catch{}})();function ee(){const n=T(),s=C(),{params:t,error:i}=r.useMemo(()=>J(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),u=o(M),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(A=>A.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:E??y,isApproving:w==="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{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(D,{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-CfCKAQeM.js";import{j as Y,h as z,u as J,l as Q,g as d,k as Z,n as H,o as I}from"./core-uYqCzel8.js";import{eQ as v,qL as P,qj as X,K7 as O,qe as S,bv as ee,bn as ae,bT as te,qf as se,K8 as oe,JV as C,dE as re,ud as ne,K9 as ie,uA as ce,eW as le,eU as de}from"./zeni-epic-state-BmAPZlsC.js";import{z as me,U as fe,c as pe,y as q,S as M,A as ue,d as $,al as he,q as ge}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import Fe from"./NotFoundScreen-t1ueGvDG.js";import{F as be}from"./FeaturePreviewScreen-B2O-98_e.js";import{a as g}from"./sentry-131ydzJg.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{u as Se}from"./useInitialThreadRequest-Dbj0dyeX.js";import{t as Te}from"./routePaths-DoAvT9jx.js";import{M as ye}from"./MobileAppDrawer-B3x5wY10.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="b334a3bc-3040-465a-ae53-e4e7a0028569",s._sentryDebugIdIdentifier="sentry-dbid-b334a3bc-3040-465a-ae53-e4e7a0028569")}catch{}})();const T=(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=Z(function(s){const e=oe(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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,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("../../")}}})(he);function R(){const s=Y(),e=z(),a=J(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),A=d(t=>t.profitAndLossState),k=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,U)=>L!=null?f.forecasts.findIndex(b=>b.id===L):U!=null?f.forecasts.findIndex(b=>b.id===U):f.forecasts.length>0?0:-1)(c,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const D=pe(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=q(),{isFeatureEnabled:j}=_(M.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[K,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:K,handleDrawerToggle:E}),n.jsx(Ae,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(i=>v(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(H,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{K2 as te,eQ as N,jC as H,eW as Y,eU as ne,Ht as Q,JI as oe,tl as Ee,K3 as q,t9 as ke,tu as Ie,to as ie,td as re,ts as Pe,tp as je,K4 as le,u$ as Te,K5 as Le,fz as ve,K6 as K,ti as de,tg as ce,tx as Fe,c2 as Ae}from"./zeni-epic-state-BmAPZlsC.js";import{Z as pe,y as X,S as E,z as M,a6 as ue,I as me,ah as ge,ai as Re,G as he,o as R,J as fe,D as Ce,aj as Oe,U as Ve,A as Ue,d as be,f as Ze,q as Be,ak as $e,c as Ke}from"./index-DojfCsv7.js";import{D as ye,n as W,S as we}from"./mui-CTbUXhla.js";import ae from"./NotFoundScreen-t1ueGvDG.js";import{a as r}from"./sentry-131ydzJg.js";import{h as ee,l as ze,g as m,j as Ge,u as He,k as Me,n as se,o as $}from"./core-uYqCzel8.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as _e}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as Je}from"./MobileAppDrawer-B3x5wY10.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="008a0447-26ec-4395-ad0b-398ec6c80a5a",a._sentryDebugIdIdentifier="sentry-dbid-008a0447-26ec-4395-ad0b-398ec6c80a5a")}catch{}})();const qe={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Ne=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>N(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=Q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(q()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Ye=W(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=W(fe.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=W(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>N(i)),u=m(i=>H(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(q())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(q()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=M.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})($e);function J({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=M.getSignedInUser(),h=m(e=>N(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!Y(O,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));_e({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Ne,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Je,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,_)=>{n(K({sortKey:e,sortOrder:_}))},onRowClick:e=>{const _=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(_,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(J,{})}),s.jsx($,{path:"new",element:s.jsx(J,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(J,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CfCKAQeM.js";import E from"./NotFoundScreen-t1ueGvDG.js";import{a as r}from"./sentry-131ydzJg.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-uYqCzel8.js";import{eQ as B,PK as b,bo as F,bn as N,hi as V,gO as K}from"./zeni-epic-state-BmAPZlsC.js";import{s as Q,z as I,cv as $}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as G}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as H}from"./MobileAppDrawer-B3x5wY10.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="fd35d4cd-8789-4153-922c-202dcf6ce8cc",e._sentryDebugIdIdentifier="sentry-dbid-fd35d4cd-8789-4153-922c-202dcf6ce8cc")}catch{}})();const J=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)}}})($),L=()=>{const e=_(),t=v(),c=Q(),o=p(s=>B(s)),{aggregatedReportViewState:n}=p(s=>b(s)),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=S||k||x,d=r.useCallback((s,i,T)=>{u(V({fromMonth:s,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(K({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((s,i)=>{d(s,i,!1)},[d]),g=s=>{C(s)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?a.jsxs(a.Fragment,{children:[a.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),a.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):a.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function pe(){return a.jsxs(z,{children:[a.jsx(h,{path:"*",element:a.jsx(L,{})}),a.jsx(h,{path:"*",element:a.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as o}from"./sentry-131ydzJg.js";import{g as f,j as B,h as H,u as L,k as M}from"./core-uYqCzel8.js";import{m as W,Z as F,z as R,b3 as U,G as z,U as N,A as $,d as l,f as G,a3 as Q,b4 as Z}from"./index-DojfCsv7.js";import{e_ as q,eQ as J,Mx as P,My as K,u3 as X,tV as g,f0 as Y,bO as ee,t_ as re,Mz as ae}from"./zeni-epic-state-BmAPZlsC.js";import{D as ne,e as te,n as se,S as oe}from"./mui-CTbUXhla.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as de}from"./MobileAppDrawer-B3x5wY10.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0b707827-130f-41c9-9c16-4d853d7461c1",e._sentryDebugIdIdentifier="sentry-dbid-0b707827-130f-41c9-9c16-4d853d7461c1")}catch{}})();const ce={overlayWidth:new z(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=W(),n=F();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",pe=M(function(e){const r=P(e),a=e.referralViewState.rewardsPlanFetchState,n=ee([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ae({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Q(Z));function Se({isReferralDrawerOpen:e}){const r=B(),a=H(),n=L(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,m]=o.useState(!1),p=R.getSignedInUser(),C=f(t=>J(t)),h=f(t=>P(t)),y=h.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),b=K([h,w]),{areTenantIdsInSync:c}=N();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(X()),E(!0))},[]),o.useEffect(()=>{!i&&y==="Not-Started"&&c&&(u(!0),a(g(!0)))},[y,a,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),a(Y(!0)))},[w,a,c]),o.useEffect(()=>{m(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:b===!0});const V={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,S,_)=>{_.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx($,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(G.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{m(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...V})]})}export{Se as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CfCKAQeM.js";import R from"./NotFoundScreen-t1ueGvDG.js";import{a as p}from"./sentry-131ydzJg.js";import{j as C,u as I,h as A,g as u,N as E,k as D,n as k,o as c}from"./core-uYqCzel8.js";import{eQ as N,Nr as g,NH as S,D0 as T,C9 as V,C$ as m,CS as U,NX as _}from"./zeni-epic-state-BmAPZlsC.js";import{m as $,z as O,x as W,a3 as z,bJ as B,ac as H}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8f2e3902-e30b-4f44-a9fc-8be5e0aa9d5a",e._sentryDebugIdIdentifier="sentry-dbid-8f2e3902-e30b-4f44-a9fc-8be5e0aa9d5a")}catch{}})();const f="reimbursement-approval-rule-update",J=D(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(_(!1))},onBackClick:()=>{H(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(z(B)),P=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>N(n)),w=$(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),O.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${f}`]:[],eventCallback:(n,Q,x)=>{n.endsWith(f)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(J,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(P,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{j as K,h as re,u as H,l as Q,g as E,N as M,k as q,i as mt,n as ct,o as v}from"./core-uYqCzel8.js";import{eQ as V,NY as le,c2 as me,C4 as Be,jN as dt,Ch as ne,Cg as ae,NZ as ut,bn as ce,fK as Te,N_ as pt,Kj as bt,jC as De,Kk as Se,Kl as gt,ix as ht,Nd as ft,iM as St,BU as It,sJ as yt,iE as Rt,CE as je,N$ as Fe,O0 as Ct,O1 as At,O2 as kt,O3 as vt,O4 as Et,Co as Ie,iS as wt,Nm as xt,Ci as Bt,C2 as Tt,O5 as Dt,C1 as jt,O6 as Ft,Ca as ye,Cs as Ut,Cr as Lt,Cn as Ot,O7 as Ue,Ht as Pt,bo as $t,Cd as Mt,CW as Nt,O8 as _t,O9 as zt,CA as Gt,Cx as Re,MI as Zt,B$ as Ht,Oa as Le,Dj as Ce,Dr as Vt,Ob as Wt,Oc as G,Od as Kt,Oe,Of as qt,Og as Pe,Oh as $e,CM as se,bt as Jt,bG as de,cC as ue,eW as Me,eU as Ne,Oi as Yt,gO as Qt,MV as Xt,Oj as en,Ok as _e,MZ as tn,NH as nn,Ol as an,NX as sn,Do as Ae,Dn as on,Om as rn,On as ln,Oo as mn,Op as cn,Oq as dn,Ns as un,De as pn,Di as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jd as yn,cN as Rn,cP as Cn,cO as An,cw as kn}from"./zeni-epic-state-BmAPZlsC.js";import{s as ze,Z as Ge,y as X,S as A,z as P,bK as Ze,A as ee,d as k,aE as ke,o as j,aq as Y,I as vn,D as He,bL as En,q as Z,bM as wn,c as te,bN as xn,U as Bn,G as Tn,x as pe,f as Ve,a3 as Dn,bb as jn,Y as Fn,m as We,bO as Un,a6 as Ln}from"./index-DojfCsv7.js";import{n as N,S as On}from"./mui-CTbUXhla.js";import ie from"./NotFoundScreen-t1ueGvDG.js";import{S as ve}from"./SetupPagesScreen-D9wDjvOC.js";import{F as Ke}from"./FeaturePreviewScreen-B2O-98_e.js";import{a as f}from"./sentry-131ydzJg.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{u as qe}from"./useInitialThreadRequest-Dbj0dyeX.js";import{c as Je}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{D as Pn}from"./DrawerScreen-DzkaoOWL.js";import{M as Ye}from"./MobileAppDrawer-B3x5wY10.js";import{R as $n}from"./ReimbursementApprovalRoutes-Dclz8XkB.js";import{FallBackRoute as Mn}from"./ScreenRoutes-BsLKoqEt.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./analyticsHelper-BunVJ4K_.js";import"./routePaths-DoAvT9jx.js";import"./BusinessVerificationPageScreen-CnAB8eUQ.js";import"./ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js";import"./getLocaleForTenant-BVZe9vGW.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]="f66d0d15-bd30-4ea8-a4a8-1bff78bad55a",e._sentryDebugIdIdentifier="sentry-dbid-f66d0d15-bd30-4ea8-a4a8-1bff78bad55a")}catch{}})();const Qe=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),_n=q(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(vt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Qe(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=K(),t=re(),n=H(),{reimbursementId:r}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(A.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(A.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ze,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:k,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(ke,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ke,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(_n,{initialOpenThreadRequest:O??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.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
|
-
`,Gn=N.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${vn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Zn=N.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
|
-
`,Hn=N.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
|
-
`,Vn=N.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=N.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Kn=q(function(e,t){const n=Ue(e,t.reimbursementId),r=P.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,zt(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Qe(o),i=Z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{k.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?k.trackReimbursementCancelAndDeleteReimbursement(n):k.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function qn(){const e=K(),t=re(),n=H(),r=n.hash.substring(1),d=ze(),{reimbursementId:c}=Q(),m=P.getSignedInUser(),o=E(y=>V(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});Je({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=X(),{isFeatureEnabled:T}=h(A.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[D,C]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(A.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(A.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),O=Pt(o),U=$t(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(Mt(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&O===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,O,m]),f.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(C(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Ze,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:k,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Kn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const Jn=q(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ce("approved",r??""));break;case"reject":e(Ce("rejected",r??""))}}}})(xn);function Yn(){const e=K(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Jn,{navigate:e,analytics:k,isAdmin:d})}const z=tn(),Xe="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Qn,common:we}=He.getLocalizedStrings(),xe=Qn.reimbursement.bulkActions,Xn=N.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
|
-
`,ea=q(function(e,t){const n=$e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=P.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:k,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Oe(o))},onSubtabChange:o=>{e(G()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=Z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=Z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;k?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&k.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&k.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(Ae("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ae("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Xe&&e(an())}}})(Dn(jn));function ta(){const e=K(),t=re(),n=H(),r=n.state,d=Ge(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Kt(r.tab.toString());S!=null?t(Oe(S)):console.log("Warning:Not a valid remiListTab");const _=qt(r.subTab.toString());_!=null?t(Pe(_)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=X(),{isFeatureEnabled:i}=a(A.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(A.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(A.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(A.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),u=E(S=>V(S)),[w,D]=f.useState(!1),[C,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>$e(S,z,h)),{areTenantIdsInSync:g}=Bn(),O=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=be({mobileExploreReferrer:"Reimbursement List"});if(Je({isDataReady:O==="Completed"}),f.useEffect(()=>{!C&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[C,z,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&Jt(u),p=de(x?.loggedInUserRoleMap),W=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>Te(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{D(S)},{isFeatureEnabled:it}=a(A.isDebitCardFeatureEnabled),ot=Me(it,u),rt=Ne(u),{remisProcessed:J,remisProcessing:he}=E(S=>Yt(S));f.useEffect(()=>{J===he&&c!=null&&(t(Qt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:J>1?xe.reports:xe.report},{variableName:"_has_",variableValue:J>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Xt(c)}]})),t(en()),setTimeout(()=>{t(se(z,!0,l,!1,!0,!0))},3e3),m(null))},[J,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Xe}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,_,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):_.entity_type==="reimbursement"&&(m(_.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Ke,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[O==="Completed"?s.jsx(ee,{analytics:k,onLoad:S=>(_=>_.trackPageLoaded(Ve.Event.reimbursementHome))(S)}):null,s.jsx(Ye,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Xn,{windowSize:d,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Yn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:B,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(M,{to:"../setup"}):x!=null&&_e(u,x.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=N(On)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,ia=q(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:k,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",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(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=K(),t=H(),{tenantEmailDomain:n}=Q(),r=We(),[d,c]=f.useState(!1),m=E(C=>V(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,D=C=>{c(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(M,{to:"../../../reimbursements"}):w&&R?s.jsx(M,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:k,onLoad:C=>(F=>F.trackPageLoaded(Ve.Event.reimbursementPromoPage))(C)}),s.jsx(Ye,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{D(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=E(W=>V(W)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=We(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=X(),{isFeatureEnabled:o}=m(A.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(A.isDebitCardFeatureEnabled),i=Me(a,e),l=Ne(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=T&&u,{isFeatureEnabled:D}=m(A.isDepositAccountsFeatureEnabled),C=D&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=yn(t?.loggedInUserRoleMap),B=Rn(t?.loggedInUserRoleMap),I=Cn(t?.loggedInUserRoleMap),g=An(t?.loggedInUserRoleMap),O=kn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:$}=Q(),y=H(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[y.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(v,{path:"verification",element:s.jsx(ve,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(v,{path:"setup",element:s.jsx(ve,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"setup"})}),s.jsx(v,{path:"promo",element:s.jsx(oa,{})}),s.jsx(v,{path:"approval-rules/*",element:w?s.jsx($n,{}):s.jsx(Mn,{isUserHasZeniAccountsAccess:B,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:O,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:$??""})}),p&&s.jsx(v,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(v,{path:"/*",element:s.jsx(Ke,{})}),t!=null&&_e(e,t?.loggedInUserRoleMap)&&s.jsx(v,{path:"*",element:s.jsx(M,{to:"../promo"})}),d&&u&&s.jsx(v,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):y.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(v,{path:"new",element:s.jsx(Ee,{})}),s.jsx(v,{path:":reimbursementId",element:s.jsx(qn,{})}),s.jsx(v,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(v,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(v,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(v,{path:"*",element:s.jsx(ie,{})})]})}export{Pa as default};
|