@zeniai/web-app-ui 5.2.2-dev → 5.2.3-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-DDXG_kNK.js +1 -0
- package/dist/assets/{AddressScreen-CUr-HVcT.js → AddressScreen-BtOzCXFh.js} +2 -2
- package/dist/assets/{AiCfoScreen-CQ5-XgG8.js → AiCfoScreen-uWZbUYJU.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-D2_kNfaY.js → BillPayApprovalRoutes-DBNwOrc9.js} +1 -1
- package/dist/assets/{BillPayRoutes-COEOJVsM.js → BillPayRoutes-CZg3tLma.js} +17 -17
- package/dist/assets/BusinessVerificationPageScreen-BJO3N4aI.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-HxTonb4Z.js → CardsAiCfoScreen-BaHcD5bd.js} +3 -3
- package/dist/assets/{ChargeCardRoutes-Br_JifOo.js → ChargeCardRoutes-BDr7Wpp2.js} +10 -10
- package/dist/assets/CompanyPassportScreen-CgMOUldv.js +1 -0
- package/dist/assets/ConnectionAuthScreen-CIELK18J.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C1MiVKfW.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D7xgi9kE.js → CustomerOnboardingRoutes-szs5YaFT.js} +4 -4
- package/dist/assets/{DashboardRoutes-CrUjulzU.js → DashboardRoutes-CqEqTG-q.js} +4 -4
- package/dist/assets/{DefaultTenantHome-CQVq15dz.js → DefaultTenantHome-B3it7aUC.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-D6ldO-v5.js +18 -0
- package/dist/assets/{DrawerScreen-BWm1l0_Z.js → DrawerScreen-BZIHG-iJ.js} +1 -1
- package/dist/assets/EntityDetailRoutes-Bq0acXd0.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CY3gwyyO.js → ExpenseAutomationRoutes-DTr3_gWW.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-BPUW_5KC.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-PL_f01P7.js +1 -0
- package/dist/assets/{MagicLinkRoutes-DQ1ug8CF.js → MagicLinkRoutes-DuFsZ2Eq.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-DbD5ghXu.js +12 -0
- package/dist/assets/MobileAppDrawer-DUA8Lay7.js +1 -0
- package/dist/assets/NotFoundScreen-B314Xa6t.js +1 -0
- package/dist/assets/NotificationRoutes-CDcyYyhL.js +1 -0
- package/dist/assets/OAuthConsentScreen-O2iLZgF8.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DHyD--lG.js +1 -0
- package/dist/assets/PeopleRoutes-DFw_evkY.js +22 -0
- package/dist/assets/PerformanceRoutes-BUjcMitb.js +1 -0
- package/dist/assets/{Preview-ChMTg4zf.js → Preview-DmA_5jAt.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CmRiNFSq.js → QBOConnectionScreen-RdiPTNMo.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CMiVs8Po.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Be3YasZE.js → ReimbursementApprovalRuleDetailScreen-B2zgMKIa.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BcC0c-hC.js → ReimbursementRoutes-BoKZcV1C.js} +10 -10
- package/dist/assets/{ReportsRoutes-Do7TO9Xv.js → ReportsRoutes-DbWvQfgf.js} +1 -1
- package/dist/assets/RewardsRoutes-B-e311Ed.js +1 -0
- package/dist/assets/ScreenRoutes-DmFUCsMU.js +2 -0
- package/dist/assets/SettingsRoutes-CQXKJAna.js +57 -0
- package/dist/assets/{SetupPagesScreen-Dvy2GpFH.js → SetupPagesScreen-BZtlpfQh.js} +5 -5
- package/dist/assets/{SignInScreen-BZWZX1Q0.js → SignInScreen-EBAhC-wy.js} +1 -1
- package/dist/assets/SignOutScreen-Bcc_zMXg.js +9 -0
- package/dist/assets/{TaskListScreen-CPjplYNX.js → TaskListScreen-CenYjOPZ.js} +2 -2
- package/dist/assets/TaskRoutes-Cyyv5CFi.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-BQtZsJD1.js → TransactionDetailRoutes-Xm9FzfXs.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-B1AYJUjQ.js → TransactionDetailScreen-SXa23sv8.js} +2 -2
- package/dist/assets/{TransactionListRoutes-De3qcM42.js → TransactionListRoutes-gIKSQcT7.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C1F9Ijug.js → TreasuryRoutes-DKrjcHSF.js} +6 -6
- package/dist/assets/{VendorsRoutes-XJ9cWDA2.js → VendorsRoutes-DkVc55j_.js} +23 -23
- package/dist/assets/WiseConfirmationScreen-DbekQU5I.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BXPbqBZ6.js → ZeniAccountRoutes-mC4kRmgc.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-BtAb3Raq.js +9 -0
- package/dist/assets/{accountMappingHelper-BXTm4qLL.js → accountMappingHelper-J0OcQc2L.js} +1 -1
- package/dist/assets/{analytics-B1ozuY-_.js → analytics-Ci054ctJ.js} +1 -1
- package/dist/assets/analyticsHelper-0Z_ii5dt.js +1 -0
- package/dist/assets/{core-jHXRcmGr.js → core-DXwLSsqn.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-C8Ut439h.js → decodeURIComponentSafe-BbzvGEmo.js} +1 -1
- package/dist/assets/{dnd-DXsHzzkY.js → dnd-BFL9IlQe.js} +1 -1
- package/dist/assets/{empty-CT_SeA8A.js → empty-Cv3ER6tQ.js} +1 -1
- package/dist/assets/{empty-DkofjAEy.js → empty-DpUFxs_n.js} +1 -1
- package/dist/assets/{emptyVideoElement-xWUlB5cO.js → emptyVideoElement-D04Keje3.js} +1 -1
- package/dist/assets/{epic-BU3yGtpS.js → epic-fjG6tcBj.js} +2 -2
- package/dist/assets/getLocaleForTenant-YGwofgWv.js +1 -0
- package/dist/assets/{index-Dd8kzaST.js → index-61HgEKPh.js} +1 -1
- package/dist/assets/{index-bO5KWXDm.js → index-B0pSShvk.js} +1 -1
- package/dist/assets/{index-D3N1b9aQ.js → index-BxpV0MpM.js} +13891 -13899
- package/dist/assets/{index-Cz79PJvB.js → index-CVcXqlHF.js} +1 -1
- package/dist/assets/{index-BsfTwJVJ.js → index-CVs7DNpe.js} +2 -2
- package/dist/assets/{index-BaVUy8OL.js → index-Cg02-3bW.js} +1 -1
- package/dist/assets/{index-CVfL0TVn.js → index-DGTgYWnK.js} +1 -1
- package/dist/assets/{index-gdhkfqne.js → index-e9nNUNV2.js} +1 -1
- package/dist/assets/{lexical-BsEGFMKX.js → lexical-t8hl9adA.js} +1 -1
- package/dist/assets/{liveblocks-Cl_SAGXq.js → liveblocks-DIKy4lot.js} +1 -1
- package/dist/assets/{lottie-BvP-9pT9.js → lottie-DAe41SWX.js} +1 -1
- package/dist/assets/{mui-DT0mOTYO.js → mui-BPWJk-fl.js} +2 -2
- package/dist/assets/{pathToGoBack-DeIlb7In.js → pathToGoBack-6O-km18d.js} +1 -1
- package/dist/assets/{pdf-CgzfzxbY.js → pdf-CG1NUThf.js} +3 -3
- package/dist/assets/{pdf-lib-BFqwhQQP.js → pdf-lib-Ko4-CUFO.js} +1 -1
- package/dist/assets/{plaid-NlhYlsbZ.js → plaid-CgXOv8Rh.js} +1 -1
- package/dist/assets/{pusher-Q2OMJpwL.js → pusher-_T7D1pQS.js} +1 -1
- package/dist/assets/{react-BXjQIhaM.js → react-BHrI4XX9.js} +1 -1
- package/dist/assets/{react-DyPd6pWl.js → react-CVvf4qEx.js} +1 -1
- package/dist/assets/{react-CzT5_e98.js → react-Cp9hwg2n.js} +1 -1
- package/dist/assets/{react-3JBqx4v7.js → react-DGBs1odx.js} +1 -1
- package/dist/assets/{react-CbTW5azc.js → react-k5dCLAFT.js} +1 -1
- package/dist/assets/{react-C69jv4Ir.js → react-uMnEgX8u.js} +1 -1
- package/dist/assets/{recharts-qvF3Dod3.js → recharts-BKU02zoL.js} +1 -1
- package/dist/assets/{routePaths-m79Ycpnf.js → routePaths-BZ65TmUh.js} +1 -1
- package/dist/assets/{sentry-4tqT1r6y.js → sentry-Dy6CjI9o.js} +1 -1
- package/dist/assets/{url-yIFPVih_.js → url-DHOGOqHo.js} +1 -1
- package/dist/assets/{url-CXugcAfw.js → url-QgpJHG1D.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-UffvQ0vC.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CaQ8KV1j.js +1 -0
- package/dist/assets/useCashManagementBanner-m4TLytI4.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-CTk-yEyL.js → useChargeCardPusherEvents-D6iq2dOY.js} +1 -1
- package/dist/assets/{useDeviceId-DYiky9LJ.js → useDeviceId-k_nSwj7f.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-B9Wz5ZE4.js → useEmailConnectResultRefresh-Csb_ew9X.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DE7N6h-n.js → useInitialThreadRequest-BNKJrNID.js} +1 -1
- package/dist/assets/{utils-Dc4uXotD.js → utils-BfVxqb_k.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C-SPdXRH.js → withTransactionSidePanel-Do9-2jkM.js} +1 -1
- package/dist/assets/{zeni-epic-state-BER7XwD9.js → zeni-epic-state-Cehmp_zm.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-BpuOCrFB.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-BwKYUVXz.js +0 -9
- package/dist/assets/CompanyPassportScreen-D5p8YGqx.js +0 -1
- package/dist/assets/ConnectionAuthScreen-C7C9oP-O.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DHYr81WM.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-mk_MQEQb.js +0 -18
- package/dist/assets/EntityDetailRoutes-B8mgxcsD.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C0EZ8JBW.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BwGxeepQ.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-tDhHVTnP.js +0 -12
- package/dist/assets/MobileAppDrawer-DJ3VpNqR.js +0 -1
- package/dist/assets/NotFoundScreen-CamJ30ZO.js +0 -1
- package/dist/assets/NotificationRoutes-DK8GwbT3.js +0 -1
- package/dist/assets/OAuthConsentScreen-Bk2mnH8v.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BTkp9Nfx.js +0 -1
- package/dist/assets/PeopleRoutes-BqJR3HeE.js +0 -22
- package/dist/assets/PerformanceRoutes-y59oCr7_.js +0 -1
- package/dist/assets/ReferralListScreen-joOUNqNx.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-CFENXyD5.js +0 -1
- package/dist/assets/RewardsRoutes-CxzqjLpY.js +0 -1
- package/dist/assets/ScreenRoutes-Ch7ptvuu.js +0 -2
- package/dist/assets/SettingsRoutes-BKO1Pjri.js +0 -57
- package/dist/assets/SignOutScreen-ej7zxFCM.js +0 -9
- package/dist/assets/TaskRoutes-D6e-kYJP.js +0 -9
- package/dist/assets/WiseConfirmationScreen-kawXhbh0.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DR8Npwal.js +0 -9
- package/dist/assets/analyticsHelper-mm28SP1t.js +0 -1
- package/dist/assets/getLocaleForTenant-BNQJePqV.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BunYETHX.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DNA9YGXg.js +0 -1
- package/dist/assets/useCashManagementBanner-TkTWt3zi.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-BxpV0MpM.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Dy6CjI9o.js"><link rel="modulepreload" crossorigin href="/assets/core-DXwLSsqn.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Cehmp_zm.js"><link rel="modulepreload" crossorigin href="/assets/mui-BPWJk-fl.js"><link rel="modulepreload" crossorigin href="/assets/analytics-Ci054ctJ.js"><link rel="modulepreload" crossorigin href="/assets/utils-BfVxqb_k.js"><link rel="stylesheet" crossorigin href="/assets/index-BUmr5maU.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.2.
|
|
3
|
+
"version": "5.2.3-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.1.
|
|
32
|
-
"@zeniai/web-components": "4.2.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.34",
|
|
31
|
+
"@zeniai/client-epic-state": "5.1.31",
|
|
32
|
+
"@zeniai/web-components": "4.2.24",
|
|
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-Cl_SAGXq.js";import{A as d}from"./AddressScreen-CUr-HVcT.js";import i from"./NotFoundScreen-CamJ30ZO.js";import"./sentry-4tqT1r6y.js";import{o as s,p as r}from"./core-jHXRcmGr.js";import"./zeni-epic-state-BER7XwD9.js";import"./recharts-qvF3Dod3.js";import"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-Cl_SAGXq.js";import{a as V}from"./sentry-4tqT1r6y.js";import{h as ae,g as ne,u as se,i as oe,j as k,N as ie,n as re}from"./core-jHXRcmGr.js";import{I as ce,C as ue,aS as de,z as E,D as pe,d as B,ag as x,f as z,bJ as le,au as me,v as P,av as M}from"./index-D3N1b9aQ.js";import{P_ as fe,eX as G,tC as ye,Kj as Se,zB as ge,D0 as Ie,FN as he,Gq as Te,Hq as be,Ql as De,Qm as Oe,Qn as Ce,Qo as ke,Qp as Ve,MM as we,Pn as Ae,M$ as Ne,E4 as Fe,N0 as _e,E8 as ve,ld as xe,gh as ze,gg as Ee,gf as Be,rC as Pe,rt as Me,rq as Re,l5 as Ue,tL as Le,tJ as R,bE as U,tX as L,cz as je}from"./zeni-epic-state-BER7XwD9.js";import{n as Ge}from"./mui-DT0mOTYO.js";import{d as j}from"./routePaths-m79Ycpnf.js";import{M as qe}from"./MobileAppDrawer-DJ3VpNqR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="dba6d6cf-89ad-4467-96df-1572eea018ba",t._sentryDebugIdIdentifier="sentry-dbid-dba6d6cf-89ad-4467-96df-1572eea018ba")}catch{}})();const Qe=Ge.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,$e=re(function(t,u){const{businessVerificationDetails:n}=u,i=G(t),y=E.getSignedInUser(),S=i.tenantId,l={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},T=we(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Ae(t.companyConfigState),s=Ne(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${me.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:T,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}},function(t,u){const{companyId:n,productType:i,currentTenant:y,navigate:S,location:l}=u,{tenantEmailDomain:T}=y;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:d,companyIndustryType:D,companyLegalName:O,companyTaxId:g,companyWebsite:m,companyPhone:I,primaryContactEmail:r,primaryContactName:o,primaryContactUserId:c,primaryContactSyncToken:b,syncToken:f,fileIds:a,incDate:p,typeOfIncorporation:w,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:h,companySourceOfFunds:q,companySourceOfFundsDescription:Q,transactionVolume:$,transactionVolumeDescription:J,purposeOfAccount:X,purposeOfAccountDescription:Z,regulatedStatus:H,regulatedStatusDescription:K,usNexus:W,usNexusTypes:Y}=e,_=D?.selectedOption,ee={companyId:n,companyDescription:s,companyIndustry:d.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:O,taxIdOrEIN:g,website:m!=""&&m!=null?je(m):void 0,phone:I,syncToken:f,fileIds:a,incDate:p!=null?U(p?.toString()):p,typeOfIncorporation:w?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:h?.selectedOptions.map(v=>v.length===2?v:M(v))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:Q,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:J,purposeOfAccount:X?.selectedOption??"",purposeOfAccountDescription:Z,regulatedStatus:H??"",regulatedStatusDescription:K,usNexus:W,usNexusTypes:Y?.selectedOptions??[]},te={userId:c,firstName:o.firstName,lastName:o.lastName,email:r,syncToken:b};t(L({companyDetails:ee,primaryContactDetails:te}))},onCompanyOfficerUpdated:e=>{const s=e.map(d=>{const{officerType:D,userId:O,name:g,email:m,nationalityCountryCode:I,ssn:r,dob:o,phone:c,syncToken:b,selectDocument:f,role:a,ownership:p,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F}=d;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:D,userId:O,firstName:g.firstName,lastName:g.lastName,email:m,ssn:r,nationalityCountryCode:I?.selectedOption!=null?M(I.selectedOption):void 0,phone:c,birthday:o!=null?U(o?.toString()):o,syncToken:b,titleAtCompany:a.selectedOption,ownershipInCompany:p,documentTypeSelectedForVerification:h,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});t(L({officers:s}))},onSaveDetailsClick:e=>{t(R(n,e,i))},onSendForVerificationClick:e=>{t(R(n,e,i,!0))},onAddressClick:e=>{const s=j(T,e),d=P(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:d}})},onRegisteredAddressClick:e=>{const s=j(T,e),d=P(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{t(Le({companyId:n})),S("../setup")},updateFilesEntity:e=>{t(Ue({files:e}))},onDeleteFile:e=>{t(Re(e))},onDeleteFileList:e=>{t(Me(e))},onEditFileName:(e,s)=>{t(Pe(e,s.split(".")[0]))},onGetOtp:e=>{t(Be(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Ee(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(ze(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(xe({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=_e(e.documentType);s!=null&&t(ve({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(Fe({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}})(le),tt=({productType:t})=>{const u=ae(),n=ne(),i=se(),[y,S]=V.useState(!1),[l,T]=V.useState(!1),{tenantEmailDomain:e}=oe(),s=ce(),{useDynamicConfig:d}=ue(),{configValue:D}=d(de.zeniAccountsConfig),O=fe(D),g=k(a=>{switch(t){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=k(a=>a.companyConfigState.fetchState),I=k(a=>a.userRoleConfigState.fetchState),r=k(a=>G(a)),o=r.companyId??E.getSignedInUserTenant(e)?.companyId;if(V.useEffect(()=>{m==="Not-Started"&&i(ye()),I==="Not-Started"&&i(Se(!0))},[m,I,i]),V.useEffect(()=>{if(!y&&g==="Not-Started"&&o!=null)switch(S(!0),t){case"zeni_accounts":i(be(o,!0));break;case"zeni_treasury":i(Te(o,!0));break;case"reimbursement":i(he(o,!0));break;case"charge_cards":i(Ie(o,!0));break;default:i(ge(o,!0))}},[y,g,o,i]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let c;switch(t){case"zeni_accounts":c=r.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":c=r.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":c=r.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||r.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":c=r.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:c=r.companyBillPayInfo?.info?.isBillPayTOSAccepted}const b=a=>{T(a)},f=k(a=>{switch(t){case"zeni_accounts":return Ve(a,o);case"zeni_treasury":return ke(a,o);case"charge_cards":return Ce(a,o);case"reimbursement":return Oe(a,o);default:return De(a,o)}});return c===!1?C.jsx(ie,{to:"../promo"}):C.jsxs(Qe,{children:[C.jsx(pe,{analytics:B,onLoad:a=>(p=>{switch(t){case"zeni_accounts":return p.trackPageLoaded(z.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return p.trackPageLoaded(z.Event.reimbursementBusinessVerification);default:return p.trackPageLoaded(z.Event.billPayBusinessVerification,x(n)?"Settings":void 0)}})(a)}),x(n)?C.jsx(qe,{isAppContentDrawerOpen:l,handleDrawerToggle:b}):null,C.jsx($e,{businessVerificationDetails:f,navigate:u,location:n,companyId:o,analytics:B,currentTenant:r,productType:t,isSettings:x(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{b(!0)},maxInsuredAmount:O.maxInsuredAmount})]})};export{tt as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-Cl_SAGXq.js";import{a as g}from"./sentry-4tqT1r6y.js";import{h as w,u as T,g as x,i as k,j as O,n as E}from"./core-jHXRcmGr.js";import{z as C,be as P,D as F,d as V,f as j,ag as b,bf as A,au as L,av as U,v as B}from"./index-D3N1b9aQ.js";import{eX as D,gj as M,tC as _,ge as z,c6 as G,Pn as R,bn as Y,rC as q,rq as H,l5 as Q,mG as S,Po as X,bE as Z,cz as N,mQ as $,mT as J}from"./zeni-epic-state-BER7XwD9.js";import"./mui-DT0mOTYO.js";import{d as K}from"./routePaths-m79Ycpnf.js";import{M as W}from"./MobileAppDrawer-DJ3VpNqR.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]="b2710fdd-1e62-4d0a-b4e7-4171e71eeaea",a._sentryDebugIdIdentifier="sentry-dbid-b2710fdd-1e62-4d0a-b4e7-4171e71eeaea")}catch{}})();const ee=E(function(a){const t=z(a),i=C.getSignedInUser(),l=D(a),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(a,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(J())},onAddressClick:e=>{const n=K(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a($({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(X(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(Q({files:e}))},onDeleteFile:e=>{a(H(e))},onEditFileName:(e,n)=>{a(q(e,n.split(".")[0]))}}})(A);function de(){const a=w(),t=T(),i=x(),{tenantEmailDomain:l}=k(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),t(M(d)))},[c,n,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(P,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-Cl_SAGXq.js";import{a}from"./sentry-4tqT1r6y.js";import{u as D,g as v,j as m,N as w}from"./core-jHXRcmGr.js";import{LW as A,eX as O,g1 as _,o9 as j,gs as h,g0 as L,fA as U,M1 as F}from"./zeni-epic-state-BER7XwD9.js";import{u as $,z as p,L as C,a as k,o as H}from"./index-D3N1b9aQ.js";import{n as z}from"./mui-DT0mOTYO.js";import{t as R}from"./getLocaleForTenant-BNQJePqV.js";import{g as P,Q as G}from"./QBOConnectionScreen-CmRiNFSq.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.js";import"./empty-CT_SeA8A.js";import"./pdf-lib-BFqwhQQP.js";import"./index-CVfL0TVn.js";import"./url-yIFPVih_.js";import"./index-Dd8kzaST.js";import"./decodeURIComponentSafe-C8Ut439h.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="b4b78fa5-2985-4494-adcd-66b73055d705",t._sentryDebugIdIdentifier="sentry-dbid-b4b78fa5-2985-4494-adcd-66b73055d705")}catch{}})();const M=z.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 ce(){const t=D(),i=v(),{setLoading:d,clearAllLoading:b}=$(),c=a.useRef(!1),f=a.useRef(!1),{code:x,realmId:T,state:y}=P(i.search),N=x!==""&&T!==""&&y!=="",I=m(l=>A(l)),e=m(l=>O(l)),n=m(l=>l.tenantState.fetchState),r=m(l=>l.tenantState.activeTenantFetchState.fetchState),o=p.getSignedInUser(),u=p.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(C.CONNECTION_AUTH)},[d]),a.useEffect(()=>{c.current||o==null||u==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(C.TENANT_FETCHING),t(_(o.userId,u))))},[c,n,d]),a.useEffect(()=>{e.tenantId==null&&!f.current&&o!=null&&(f.current=!0,!(u==null||u!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))},[f,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(C.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(L(e.tenantId)),p.saveActiveTenantDomainForUser(e.tenantEmailDomain),U(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(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:N||S===!1?g.jsx(M,{children:g.jsx(G,{})}):g.jsx(w,{to:"/",replace:!0})}export{ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Cl_SAGXq.js";import{z as n}from"./index-D3N1b9aQ.js";import{g as d}from"./QBOConnectionScreen-CmRiNFSq.js";import"./sentry-4tqT1r6y.js";import{g as p,N as s}from"./core-jHXRcmGr.js";import"./zeni-epic-state-BER7XwD9.js";import"./recharts-qvF3Dod3.js";import"./mui-DT0mOTYO.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.js";import"./empty-CT_SeA8A.js";import"./pdf-lib-BFqwhQQP.js";import"./index-CVfL0TVn.js";import"./url-yIFPVih_.js";import"./index-Dd8kzaST.js";import"./decodeURIComponentSafe-C8Ut439h.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]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Cl_SAGXq.js";import{h as w,g as C,j as f,n as A,i as B}from"./core-jHXRcmGr.js";import{Q4 as k,Qb as _,gh as q,gg as K,gf as W,ju as X,Nb as J,rt as L,eX as D,PC as V,js as T,Q5 as v,Qe as j,jq as F,jN as G}from"./zeni-epic-state-BER7XwD9.js";import{bB as M,K as N,C as R,z as U,y as O,p,G as S,B as Q,bC as Y,o as Z,bD as ee,v as te}from"./index-D3N1b9aQ.js";import{n as z}from"./mui-DT0mOTYO.js";import"./sentry-4tqT1r6y.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]="7d3ac624-3c1d-47b5-a44a-0e8757a17809",e._sentryDebugIdIdentifier="sentry-dbid-7d3ac624-3c1d-47b5-a44a-0e8757a17809")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=f(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.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=V(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(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??E();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(j({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function me({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),i=e??s,{useFeatureGate:r}=R(),d=U.getSignedInUser(),b=f(u=>D(u)),g=O(),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=f(u=>k(u,i)),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:i,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},he=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},fe=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(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 ve(e,t,n){return P(e,"ach",t,n)}function Se(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=z.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 ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(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:c}=t,{tenantEmailDomain:i}=c;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:d}=r;e(j({data:d}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),d=r.poppedPathname??$();a(d,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const d=se(i,r,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 r=p(t.location.state?.pathnameStackToGoBack),d=r.poppedPathname??$(0);t.navigate(d,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),i=e??s,r=U.getSignedInUser(),{useFeatureGate:d}=R(),b=O(),g=f(u=>D(u)),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=f(u=>k(u,i)),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:i,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{me as A,xe as D,H as V,he as a,se as b,ke as c,Se as d,fe as g,ge as i,ve as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cl_SAGXq.js";import{a as d}from"./sentry-4tqT1r6y.js";import{h as A,u as B,g as G,i as O,j as c,N as q,n as F,o as M,p as _}from"./core-jHXRcmGr.js";import{Oj as z,eX as K,NH as R,lx as W,Kc as k,Oo as X,Na as Y,kx as $,Kd as S,NM as H,NN as V,Nc as J,Nb as L}from"./zeni-epic-state-BER7XwD9.js";import{aX as Q,d as U,p as Z,v as tt}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{d as b}from"./decodeURIComponentSafe-C8Ut439h.js";import{w as et}from"./withTransactionSidePanel-C-SPdXRH.js";import{f as at,c as nt}from"./routePaths-m79Ycpnf.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.js";import"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import"./TransactionDetailScreen-B1AYJUjQ.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]="2bac4014-2d91-4ff7-ac9e-062c002b17f8",a._sentryDebugIdIdentifier="sentry-dbid-2bac4014-2d91-4ff7-ac9e-062c002b17f8")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=X(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&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}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:N}=O(),r=b(x??""),p=b(N??""),f=rt(r,p),j=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>K(n).company?.companyInfo.firstMonthOfFY??1),u=c(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(W(i)))},[m,f,i]);const E=c(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,w=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(j.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(M,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cl_SAGXq.js";import{a as r}from"./sentry-4tqT1r6y.js";import{a5 as f,a6 as l,a7 as p,p as m}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import c from"./NotFoundScreen-CamJ30ZO.js";import{h as u,g as b}from"./core-jHXRcmGr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b50ef9de-1e19-4e43-a9d6-fe41049e3584",e._sentryDebugIdIdentifier="sentry-dbid-b50ef9de-1e19-4e43-a9d6-fe41049e3584")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./sentry-4tqT1r6y.js";import{u as l,h as m,g as p}from"./core-jHXRcmGr.js";import{ht as f,Mi as g,Mj as _}from"./zeni-epic-state-BER7XwD9.js";import{u as b,L as h,z as y}from"./index-D3N1b9aQ.js";import"./liveblocks-Cl_SAGXq.js";import"./recharts-qvF3Dod3.js";import"./mui-DT0mOTYO.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="5a4e2792-9e7c-455b-9206-5ea0cc0a061b",e._sentryDebugIdIdentifier="sentry-dbid-5a4e2792-9e7c-455b-9206-5ea0cc0a061b")}catch{}})();function M(){const e=l(),n=m(),r=p(),{setLoading:o,clearAllLoading:d}=b(),a=i.useRef(!1);return i.useLayoutEffect(()=>{o(h.CONNECTION_AUTH)},[o]),i.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{M as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Cl_SAGXq.js";import{a as g}from"./sentry-4tqT1r6y.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-jHXRcmGr.js";import{z as r,y as A,a as P,e as V,d as N,f as W,s as Z,W as R,g as X}from"./index-D3N1b9aQ.js";import{eX as Y,LY as $,M6 as q,LZ as B,fA as G,g0 as H,M2 as J,go as K,cZ as Q,M7 as ee,M8 as te}from"./zeni-epic-state-BER7XwD9.js";import{n as ne}from"./mui-DT0mOTYO.js";import{u as ae}from"./useDeviceId-DYiky9LJ.js";import{f as se}from"./analyticsHelper-mm28SP1t.js";import{t as ie}from"./getLocaleForTenant-BNQJePqV.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="a5d449e8-ba34-433e-a0f8-ab8ab94ebdae",t._sentryDebugIdIdentifier="sentry-dbid-a5d449e8-ba34-433e-a0f8-ab8ab94ebdae")}catch{}})();const x=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function xe(){const t=F(),s=O(),m=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),b=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),h=l(e=>$(e)),E=r.getSignedInUser(),v=A().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))},[n,p,t,i,f,a?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(B(h.tenantsInOrder),a.zeniSessionId),G(a.userId,a.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(J("Completed")),P.updateAppLocaleID(ie(o)),se(a,o,v,void 0,h.tenantsInOrder),K().then(()=>{const e=X();e!=null&&V(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Q(o.productSettings))},2e3))},[I,S,k,a,o,h,v,s.state,t]);const M=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(b==="Completed"&&d!=null)return u.jsx(Z,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:M});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!x(n,p)||f==null||b==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||b==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-Cl_SAGXq.js";import{a as c}from"./sentry-4tqT1r6y.js";import{u as fe,j as n,i as Ye,g as We,h as Xe,l as P}from"./core-jHXRcmGr.js";import{eX as me,fF as qe,fG as pe,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cO as la,fX as ca,cU as ua,fq as fa,g0 as ma,g1 as pa,f$ as ha}from"./zeni-epic-state-BER7XwD9.js";import{a9 as ba,aa as Sa,x as ga,C as Ea,z as k,A as ka,u as Ca,G as r,i as ya,S as Ia,ab as Ta,I as Aa,c as _a,ac as wa,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,d as R,a1 as Ma,v as A,aj as x,ak as Pa}from"./index-D3N1b9aQ.js";import{D as Ra}from"./mui-DT0mOTYO.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f14c2e07-75ed-4868-a8dd-f8907a221dda",f._sentryDebugIdIdentifier="sentry-dbid-f14c2e07-75ed-4868-a8dd-f8907a221dda")}catch{}})();const xa=ba(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=We(),C=ga(),o=Xe(),U=Ke(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Qe(V),s=n(e=>me(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:be}=Ca(),[_,L]=c.useState(void 0),w=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const b=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),W=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),X=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:q,isLoading:K,isFetchingMore:Q,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&Q===!1&&J===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;L(q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,Q,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:_},"comments")))},[_,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=Aa(),te=n(e=>ia(e,S,b,Ae,Te).fetchState),ne=n(e=>ra(e).fetchState),Ue=w&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!w&&!z?void 0:"disabled",Ve=c.useMemo(()=>da(s.userRole),[s.userRole]),Be=la(Ve),Oe=s?.rewardsLastViewedTime==null,je=b?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,b.userEmail,Z,s),se=_a(),Le=se&&wa(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&X>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&X>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!he)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const h=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:h,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const h=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(ha()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{be($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Ga(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),b!=null&&(m(ma(e.tenantId)),m(pa(b.userId,e.tenantId,b.zeniSessionId)));const h=e;R.trackCompanySwitch(h.companyId,h.companyName,h.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&qe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-Cl_SAGXq.js";import{h as n,n as e}from"./core-jHXRcmGr.js";import{U as i}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import"./sentry-4tqT1r6y.js";import"./zeni-epic-state-BER7XwD9.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-Cl_SAGXq.js";import lt from"./NotFoundScreen-CamJ30ZO.js";import{a as k}from"./sentry-4tqT1r6y.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-jHXRcmGr.js";import{cv as St,fH as Y,eX as q,fV as bt,fO as b,SZ as J,fR as d,fG as y,so as M,xX as It,S_ as Ct,fF as Tt,fX as yt,st as _t,S$ as $,bo as F,fz as w,sx as W,T0 as At,cH as Et,cA as Nt}from"./zeni-epic-state-BER7XwD9.js";import{_ as xt,z as Bt,C as wt,G as Rt,a0 as vt,cY as Gt,v as N,a9 as Dt,cZ as Ut,aa as Pt,p as $t}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="dc5cbebb-d61e-4774-a031-a21b2af5395b",t._sentryDebugIdIdentifier="sentry-dbid-dc5cbebb-d61e-4774-a031-a21b2af5395b")}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=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=q(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:x,fetchMoreCommentsNotifications:R}=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"&&(x(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(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(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(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 R?.()},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"&&(x(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(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(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}})}}})(Dt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>q(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const K=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),v=S(e=>b(e).currentSubTab),Q=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),G=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=Gt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:H,fetchMore:L,isFetchingMore:X,hasFetchedAll:Z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(J(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Q.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!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"))}},[_,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 U=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{U&&G!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||G!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,G]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&H===!1&&B!=null&&z!=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),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(X||Z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,X,C,Z,H,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];v==="all"?A.push("read","unread"):v!=="mentions"&&A.push(v),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:K,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-Cl_SAGXq.js";import{a as r}from"./sentry-4tqT1r6y.js";import{u as T,g as A,j as o,N as j}from"./core-jHXRcmGr.js";import{Ml as C,eX as P,fN as x,Mm as z,Mn as D,Mo as L,Mp as N,o9 as R,Li as k}from"./zeni-epic-state-BER7XwD9.js";import{z as h,O as I}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="6c84d91b-0980-4da6-b8e5-488d533c45e3",n._sentryDebugIdIdentifier="sentry-dbid-6c84d91b-0980-4da6-b8e5-488d533c45e3")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[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(R(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=v??M;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(j,{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-Cl_SAGXq.js";import{h as z,u as H,g as K,i as X,j as d,n as Z,o as J,p as I}from"./core-jHXRcmGr.js";import{eX as P,sc as U,rM as Q,MS as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MT as oe,MF as C,dK as re,vU as ne,MU as ce,wf as ie,fE as le,fC as de}from"./zeni-epic-state-BER7XwD9.js";import{z as fe,_ as me,a0 as pe,I as ue,C as O,G as w,D as he,d as $,ap as Fe,v as ge}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import be from"./NotFoundScreen-CamJ30ZO.js";import{F as Ie}from"./FeaturePreviewScreen-C0EZ8JBW.js";import{a as F}from"./sentry-4tqT1r6y.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import{u as Se}from"./useInitialThreadRequest-DE7N6h-n.js";import{t as Te}from"./routePaths-m79Ycpnf.js";import{M as ye}from"./MobileAppDrawer-DJ3VpNqR.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="cf50b7b9-0f37-47e4-bf57-33e05ec76525",s._sentryDebugIdIdentifier="sentry-dbid-cf50b7b9-0f37-47e4-bf57-33e05ec76525")}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})}},ke=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(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(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,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{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("../../")}}})(Fe);function M(){const s=z(),e=H(),a=K(),{forecastId:o,tenantEmailDomain:r}=X(),[c,p]=F.useState(!1),[f,u]=F.useState(!1),h=fe.getSignedInUser(),y=d(t=>P(t)),_=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:G}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!c&&g)p(!0),l||e(Q());else if(l&&!f){u(!0);const t=((m,L,R)=>L!=null?m.forecasts.findIndex(b=>b.id===L):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&g&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,f,u,U,S,g]);const x=ue(),N=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:W}=O(),{isFeatureEnabled:E}=W(w.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&f}),[Y,V]=F.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:_,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:B,onAskAiCfoClick:G,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>P(c)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Cl_SAGXq.js";import{MO as ne,eX as Y,kx as z,fE as q,fC as oe,Kg as J,Ms as ie,uR as ke,MP as N,uG as Ee,u$ as Pe,uV as re,uK as le,uZ as je,uW as ve,MQ as de,wG as Le,fo as Te,ge as Re,MR as G,uO as ce,uN as pe,v2 as Oe,c6 as Ae}from"./zeni-epic-state-BER7XwD9.js";import{K as ue,C as ee,G as H,z as W,i as me,H as ge,M as fe,al as he,am as Fe,F as Ce,o as F,N as ye,a as be,an as Ve,_ as Ze,a0 as Be,D as Ue,d as Se,f as $e,v as Me,ao as Ge,I as He}from"./index-D3N1b9aQ.js";import{D as we,n as Q,S as xe}from"./mui-DT0mOTYO.js";import se from"./NotFoundScreen-CamJ30ZO.js";import{a as d}from"./sentry-4tqT1r6y.js";import{u as ae,i as Ke,j as g,h as _e,g as ze,n as We,o as te,p as M}from"./core-jHXRcmGr.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import{M as Xe}from"./MobileAppDrawer-DJ3VpNqR.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="e2ed2ba3-a10d-4ee7-94ec-4ef54c7d9c31",e._sentryDebugIdIdentifier="sentry-dbid-e2ed2ba3-a10d-4ee7-94ec-4ef54c7d9c31")}catch{}})();const Ne={overlayWidth:new Ce(100,100,48)},K=be.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g(l=>ne(l)),p=g(l=>Y(l)),E=g(l=>z(l)),{useFeatureGate:D}=ee(),{isFeatureEnabled:I}=D(H.isDebitCardFeatureEnabled),P=q(I,p),L=oe(p),T=J(p),B=ie(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},R=()=>{V===!0?S(!0):C()},$=c.companyView?.controllers?.map(l=>l.user),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(H.isChargeCardFeatureEnabled),v=me(p,j,I),{isCardsHidden:O}=ge(p?.tenantId),y=!v||O,A=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:A===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(T))},onCloseClick:R,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect(()=>{x===!1&&w!=null&&m(ke(w))},[x,w]),d.useEffect(()=>{r.updatePersonState.fetchState==="Completed"&&C()},[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:R,children:a.jsxs(qe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:K.discardTitle}),descriptionComponent:a.jsx(Ie,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:o,isEditPopup:!0}):null,a.jsx(Fe,{...s})]})})},qe=Q(xe)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,De=Q(ye.H6Regular)`
|
|
6
|
-
margin-top: ${F.sp7};
|
|
7
|
-
padding-left: ${F.sp8};
|
|
8
|
-
padding-right: ${F.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ie=Q(ye.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${F.sp8};
|
|
14
|
-
padding-right: ${F.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${F.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Je={overlayWidth:new Ce(100,100,48)},_=be.getLocalizedStrings().peoplePage.invitePage,ea=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g(o=>ne(o)),r=g(o=>Y(o)),p=g(o=>z(o)),{useFeatureGate:E}=ee(),{isFeatureEnabled:D}=E(H.isDebitCardFeatureEnabled),I=q(D,r),P=oe(r),L=J(r),T=ie(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(N())},C=()=>{V===!0?S(!0):x()},R={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map(o=>o.user),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),v=me(r,j,D),{isCardsHidden:O}=ge(r?.tenantId),y=!v||O,A=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(re({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?je(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:A===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return d.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(N()))},[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(aa,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:_.discardTitle}),descriptionComponent:a.jsx(Ie,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:R}):null,a.jsx(Ve,{...s})]})})},aa=Q(xe)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,sa=We(function(e,t){const c=de(e),n=W.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(e),analytics:Se}},function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(le(i,b))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(ce()),e(pe(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}})(Ge);function X({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=_e(),n=ae(),f=ze(),{areTenantIdsInSync:i}=Ze(),b=W.getSignedInUser(),h=g(s=>Y(s)),{useFeatureGate:m}=ee(),{isFeatureEnabled:V}=m(H.isDebitCardFeatureEnabled),Z=g(s=>z(s)),k=!q(V,h)&&Z,S=J(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=d.useState(!1),[D,I]=d.useState(!1),[P,L]=d.useState(!1),[T,B]=d.useState("off"),[U,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:$}=Qe({mobileExploreReferrer:"People"}),u=g(s=>de(s));Be({isDataReady:u.fetchState==="Completed"});const j=g(s=>Le(s.classState,s.classListState)),v=g(s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager")),O=g(s=>Re(s)),y=h?.companyId;d.useEffect(()=>{p&&T===u.uiState.mode||!i||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(ce()))},[p,b,w,n,u.uiState.mode,i]),d.useEffect(()=>{y!=null&&i&&n(pe(y,k))},[y,k,i]),d.useEffect(()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)},[e,t]),d.useEffect(()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const A=()=>{I(!1),L(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(ea,{closeDrawerHandler:A,isInvitePeopleDrawerOpen:D,managersListView:v,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Ye,{closeDrawerHandler:A,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(sa,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:v,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(G({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Me(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:R,onAskAiCfoClick:$})]})}function wa(){const e=He();return Ae(e?.loggedInUserRole??[])?a.jsxs(te,{children:[a.jsx(M,{path:"/",element:a.jsx(X,{})}),a.jsx(M,{path:"new",element:a.jsx(X,{isInvitePeopleDrawerOpen:!0})}),a.jsx(M,{path:":userId/edit",element:a.jsx(X,{isEditPeopleDrawerOpen:!0})}),a.jsx(M,{path:"*",element:a.jsx(se,{})})]}):a.jsx(te,{children:a.jsx(M,{path:"*",element:a.jsx(se,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cl_SAGXq.js";import E from"./NotFoundScreen-CamJ30ZO.js";import{a as r}from"./sentry-4tqT1r6y.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as b}from"./core-jHXRcmGr.js";import{eX as B,T1 as h,bq as F,bn as N,ie as V,fz as q}from"./zeni-epic-state-BER7XwD9.js";import{x as X,z as I,a0 as $,c_ as G}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import{M as J}from"./MobileAppDrawer-DJ3VpNqR.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="b30b460a-9319-4fd7-b1ad-78b8dac18517",e._sentryDebugIdIdentifier="sentry-dbid-b30b460a-9319-4fd7-b1ad-78b8dac18517")}catch{}})();const K=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),c=X(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),x=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),y=C||x||k,d=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(z,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cl_SAGXq.js";import{a as o}from"./sentry-4tqT1r6y.js";import{j as f,h as O,u as H,g as V,n as _}from"./core-jHXRcmGr.js";import{y as K,K as N,z as P,bg as W,F as M,_ as U,a0 as $,D as q,d as l,f as z,a9 as X,bh as G}from"./index-D3N1b9aQ.js";import{fI as J,eX as Q,Pp as R,Pq as Y,vK as Z,vA as g,fK as ee,bS as ae,vF as re,Pr as ne}from"./zeni-epic-state-BER7XwD9.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DT0mOTYO.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import{M as ce}from"./MobileAppDrawer-DJ3VpNqR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4a45892c-14ee-439a-b465-f1b70c8382f6",e._sentryDebugIdIdentifier="sentry-dbid-4a45892c-14ee-439a-b465-f1b70c8382f6")}catch{}})();const de={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=K(),n=N();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>J(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",pe=_(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(X(G));function ye({isReferralDrawerOpen:e}){const a=O(),r=H(),n=V(),[i,u]=o.useState(!1),[c,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),p=P.getSignedInUser(),C=f(t=>Q(t)),v=f(t=>R(t)),b=v.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),m=Y([v,w]),{areTenantIdsInSync:d}=U();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&d&&(u(!0),r(g(!0)))},[b,r,d]),o.useEffect(()=>{!c&&w.fetchState==="Not-Started"&&d&&(D(!0),r(ee(!0)))},[w,r,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});$({isDataReady:m===!0});const L={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,S,F)=>{F.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[m===!0?s.jsx(q,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(z.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...L})]})}export{ye as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-Cl_SAGXq.js";import O from"./NotFoundScreen-CamJ30ZO.js";import{a as p}from"./sentry-4tqT1r6y.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as W,p as g}from"./core-jHXRcmGr.js";import{eX as E,Qj as b,Qz as S,FF as V,EO as U,FE as d,Fv as $,QM as B,FH as _}from"./zeni-epic-state-BER7XwD9.js";import{z as N,a9 as L,b$ as Q,ag as T,bE as z,c0 as H}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{u as K,R as I}from"./ReimbursementApprovalRuleDetailScreen-Be3YasZE.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]="a1723cb0-164c-4fd8-856a-69a2e5e3e559",e._sentryDebugIdIdentifier="sentry-dbid-a1723cb0-164c-4fd8-856a-69a2e5e3e559")}catch{}})();const y="reimbursement-approval-rule-update",M=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(L(Q)),X=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(M,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",q=k(function(e){const o=b(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(_(t,!0))}}})(L(H)),G=()=>{const e=u(n=>E(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(X,{isLoading:s})},J=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(W,{children:[r.jsx(g,{path:"/",element:r.jsx(G,{})}),r.jsx(g,{path:"/new",element:r.jsx(I,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(I,{})}),r.jsx(g,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Cl_SAGXq.js";import{C as x,z as w,aS as h,D as E,d as p,f as F,d9 as P,G as T}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import m from"./NotFoundScreen-CamJ30ZO.js";import{a as d}from"./sentry-4tqT1r6y.js";import{u as L,j as y,h as V,g as A,n as R,o as U,p as u}from"./core-jHXRcmGr.js";import{eX as z,TF as C,P_ as G,TG as v,vK as K,fK as Y,TH as H,vI as O}from"./zeni-epic-state-BER7XwD9.js";import{R as j}from"./ReferralListScreen-joOUNqNx.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.js";import"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import"./MobileAppDrawer-DJ3VpNqR.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]="04ad0630-ba77-4b13-b4b5-b3994dbe3ef6",e._sentryDebugIdIdentifier="sentry-dbid-04ad0630-ba77-4b13-b4b5-b3994dbe3ef6")}catch{}})();const X=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=L(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=y(o=>z(o)),c=V(),D=A(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=y(o=>C(o)),_=f?.firstName!=null?f.firstName:"User",{configValue:b}=g(h.zeniCardsConfig),{configValue:S}=g(h.zeniAccountsConfig),k=G(S);d.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&i===!1&&(e(K()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(Y(!0)))},[l.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(X,{navigate:c,location:D,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:k.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(j,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{ue as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CrUjulzU.js","assets/sentry-4tqT1r6y.js","assets/core-jHXRcmGr.js","assets/zeni-epic-state-BER7XwD9.js","assets/index-D3N1b9aQ.js","assets/mui-DT0mOTYO.js","assets/analytics-B1ozuY-_.js","assets/utils-Dc4uXotD.js","assets/withTransactionSidePanel-C-SPdXRH.js","assets/useAskAiCfoHostNavButtonProps-DNA9YGXg.js","assets/TransactionDetailScreen-B1AYJUjQ.js","assets/decodeURIComponentSafe-C8Ut439h.js","assets/routePaths-m79Ycpnf.js","assets/NotFoundScreen-CamJ30ZO.js","assets/useInitialThreadRequest-DE7N6h-n.js","assets/analyticsHelper-mm28SP1t.js","assets/CompanyPassportScreen-D5p8YGqx.js","assets/MobileAppDrawer-DJ3VpNqR.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BunYETHX.js","assets/FeaturePreviewScreen-C0EZ8JBW.js","assets/ReferralListScreen-joOUNqNx.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-COEOJVsM.js","assets/AddressScreen-CUr-HVcT.js","assets/DomesticWireDetailScreen-mk_MQEQb.js","assets/DrawerScreen-BWm1l0_Z.js","assets/SetupPagesScreen-Dvy2GpFH.js","assets/BusinessVerificationPageScreen-BwKYUVXz.js","assets/BillPayApprovalRoutes-D2_kNfaY.js","assets/ReimbursementApprovalRuleDetailScreen-Be3YasZE.js","assets/getLocaleForTenant-BNQJePqV.js","assets/ReimbursementRoutes-BcC0c-hC.js","assets/ReimbursementApprovalRoutes-CFENXyD5.js","assets/TransactionListRoutes-De3qcM42.js","assets/ZeniAccountStatementScreen-DR8Npwal.js","assets/SettingsRoutes-BKO1Pjri.js","assets/accountMappingHelper-BXTm4qLL.js","assets/useEmailConnectResultRefresh-B9Wz5ZE4.js","assets/QBOConnectionScreen-CmRiNFSq.js","assets/empty-CT_SeA8A.js","assets/index-CVfL0TVn.js","assets/url-yIFPVih_.js","assets/index-Dd8kzaST.js","assets/ReportsRoutes-Do7TO9Xv.js","assets/ChargeCardRoutes-Br_JifOo.js","assets/useChargeCardPusherEvents-CTk-yEyL.js","assets/PeopleRoutes-BqJR3HeE.js","assets/ExpenseAutomationRoutes-CY3gwyyO.js","assets/TreasuryRoutes-C1F9Ijug.js","assets/useCashManagementBanner-TkTWt3zi.js","assets/VendorsRoutes-XJ9cWDA2.js","assets/pathToGoBack-DeIlb7In.js","assets/ZeniAccountRoutes-BXPbqBZ6.js","assets/AddressRoutes-BpuOCrFB.js","assets/PandLWithForecastRoutes-BTkp9Nfx.js","assets/CustomerOnboardingRoutes-D7xgi9kE.js","assets/TransactionDetailRoutes-BQtZsJD1.js","assets/EntityDetailRoutes-B8mgxcsD.js","assets/NotificationRoutes-DK8GwbT3.js","assets/PerformanceRoutes-y59oCr7_.js","assets/RewardsRoutes-CxzqjLpY.js","assets/TaskRoutes-D6e-kYJP.js","assets/TaskListScreen-CPjplYNX.js","assets/AiCfoScreen-CQ5-XgG8.js","assets/CardsAiCfoScreen-HxTonb4Z.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as t,bn as ls,eX as us,fE as ds,fC as cs,gk as ms,fr as _s,cV as pe,cB as hs,fU as Es,ct as ps,bE as Rs,bo as xs,fY as gs,v as Is,LZ as js,bs as Ts,L_ as As,bK as fs,bJ as Ds,bt as ys,cp as bs,L$ as Cs,M0 as vs,cR as Us,cU as ws,cT as Os,cA as Ps,cH as Fs,o9 as Re,fA as xe,gu as Ls,g0 as ge,gr as Ie,gs as je,g1 as Hs}from"./zeni-epic-state-BER7XwD9.js";import{j as e}from"./liveblocks-Cl_SAGXq.js";import{a as O}from"./sentry-4tqT1r6y.js";import{u as ks,h as Bs,i as Vs,g as Ss,j as G,l as Te,N as u,o as Ns,p as a}from"./core-jHXRcmGr.js";import{y as Zs,u as Ms,z as D,C as Gs,c as zs,S as $s,G as z,i as Ys,H as Ws,I as qs,L as F,a as Ae,t as _,P as Js,d as Q,l}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{f as fe}from"./analyticsHelper-mm28SP1t.js";import{t as Ks}from"./getLocaleForTenant-BNQJePqV.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.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]="5733d0b7-d82d-490d-b323-896f5e0bad07",o._sentryDebugIdIdentifier="sentry-dbid-5733d0b7-d82d-490d-b323-896f5e0bad07")}catch{}})();const Xs={dashboard:()=>t(()=>import("./DashboardRoutes-CrUjulzU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>t(()=>import("./BillPayRoutes-COEOJVsM.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>t(()=>import("./ReimbursementRoutes-BcC0c-hC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>t(()=>import("./TransactionListRoutes-De3qcM42.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>t(()=>import("./SettingsRoutes-BKO1Pjri.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>t(()=>import("./ReportsRoutes-Do7TO9Xv.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>t(()=>import("./ChargeCardRoutes-Br_JifOo.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>t(()=>import("./PeopleRoutes-BqJR3HeE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>t(()=>import("./ExpenseAutomationRoutes-CY3gwyyO.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>t(()=>import("./TreasuryRoutes-C1F9Ijug.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>t(()=>import("./VendorsRoutes-XJ9cWDA2.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>t(()=>import("./ZeniAccountRoutes-BXPbqBZ6.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l(()=>t(()=>import("./ReportsRoutes-Do7TO9Xv.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),st=l(()=>t(()=>import("./AddressRoutes-BpuOCrFB.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),tt=l(()=>t(()=>import("./PeopleRoutes-BqJR3HeE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),nt=l(()=>t(()=>import("./PandLWithForecastRoutes-BTkp9Nfx.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),at=l(()=>t(()=>import("./CustomerOnboardingRoutes-D7xgi9kE.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21]))),ot=l(()=>t(()=>import("./VendorsRoutes-XJ9cWDA2.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),rt=l(()=>t(()=>import("./TransactionDetailRoutes-BQtZsJD1.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),De=l(()=>t(()=>import("./EntityDetailRoutes-B8mgxcsD.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),it=l(()=>t(()=>import("./DashboardRoutes-CrUjulzU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),ye=l(()=>t(()=>import("./BillPayRoutes-COEOJVsM.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),lt=l(()=>t(()=>import("./SettingsRoutes-BKO1Pjri.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21]))),be=l(()=>t(()=>import("./ReimbursementRoutes-BcC0c-hC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ut=l(()=>t(()=>import("./ZeniAccountRoutes-BXPbqBZ6.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),dt=l(()=>t(()=>import("./TreasuryRoutes-C1F9Ijug.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),ct=l(()=>t(()=>import("./TransactionListRoutes-De3qcM42.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),mt=l(()=>t(()=>import("./ChargeCardRoutes-Br_JifOo.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),_t=l(()=>t(()=>import("./NotificationRoutes-DK8GwbT3.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),ht=l(()=>t(()=>import("./PerformanceRoutes-y59oCr7_.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),Et=l(()=>t(()=>import("./ExpenseAutomationRoutes-CY3gwyyO.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pt=l(()=>t(()=>import("./RewardsRoutes-CxzqjLpY.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),Rt=l(()=>t(()=>import("./TaskRoutes-D6e-kYJP.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),xt=l(()=>t(()=>import("./AiCfoScreen-CQ5-XgG8.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),Ce=l(()=>t(()=>import("./CardsAiCfoScreen-HxTonb4Z.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),b=l(()=>t(()=>import("./NotFoundScreen-CamJ30ZO.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),gt=l(()=>t(()=>import("./TaskListScreen-CPjplYNX.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function St({setTenantEmailDomain:o}){const T=ks(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=Ms(),v=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=ls(I),$=Ss(),[V,Pe]=O.useState(!1),r=G(n=>us(n)),{useFeatureGate:N}=Gs(),Z=zs(),te=$s(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),A=G(n=>n.tenantState.fetchState),j=G(n=>n.tenantState.activeTenantFetchState.fetchState),h=j==="Completed"||A==="Completed"?ds(ne,r):void 0,J=j==="Completed"||A==="Completed"?cs(r):void 0,ke=Ys(r,He,ne),{isCardsHidden:Be}=Ws(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),Y=G(n=>ms(n));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const M={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ze=hs(E?.loggedInUserRoleMap),oe=O.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(n=>M.tenantId!=null?Es(n,M.tenantId):void 0);O.useEffect(()=>{U(F.TENANT_FETCHING),o(i)},[i]),O.useEffect(()=>{if(X!=null&&v!=null){const n=X.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=ps(Number(f[0])),s=Number(f[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?T(gs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}},[X,v]),O.useEffect(()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Is(ae,M)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Ls(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()}(M,I,T,Me))},[M,ae,I,T,D]),O.useEffect(()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,f,d,s,c,S,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(W&&os){k(ge(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),W&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)));if(W){Q.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(Hs(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(c.userId,c.zeniSessionId)))}}(A,j,r,v,I,U,T))},[v,j]),O.useEffect(()=>{D.isSignedIn()&&A==="Completed"&&Y.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(Y.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,Y.tenantsBaseInOrder))},[Y,A,r,I]),O.useEffect(()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())},[j,A,v,V]);const ie=O.useRef(!1);O.useEffect(()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,function(n=Qs,f=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},f)}())},[j,V]);const w=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ge}=N(z.isReferralFeatureEnabled),ze=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,Ye=As(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&fs(E?.loggedInUserRoleMap),_e=Fe&&!w,qe=Le&&!w,Je=le&&Ds(E?.loggedInUserRoleMap),Ke=ue&&ys(E?.loggedInUserRoleMap),Xe=_e&&bs(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),R=Fs(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ss,g=qe&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||Ye===!0||Qe===!0||es===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&We===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||ze||$e?e.jsx(rt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(De,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Xe||Ke?e.jsx(st,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:Ge?e.jsx(pt,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:Z?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},y=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):T?e.jsx(Tt,{tenantEmailDomain:C}):B?e.jsx(jt,{tenantEmailDomain:C}):e.jsx(b,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{y as FallBackRoute,St as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-Cl_SAGXq.js";import{a as u}from"./sentry-4tqT1r6y.js";import{h as L,g as Q,u as _,j as S,s as le,n as H,i as Z,o as ne,p as v}from"./core-jHXRcmGr.js";import{bn as De,eX as P,gp as Me,m$ as re,Oi as Te,hF as he,O9 as _e,qR as Ue,kx as be,mX as Re,hH as Be,Ob as Fe,Oa as Oe,QB as Ve,zl as ze,EO as Le,Qa as Ne,Qj as $e,c6 as ae,cM as Qe,cN as He,bs as Ze,Ma as Ge,xN as Ke,QC as Xe,Hd as qe,Eu as Je,El as Se,Ei as Ye,xR as ye,Eo as Ce,Er as Ie,Ex as oe,ub as se,xQ as We,k9 as J,kc as Ee,QD as en,ld as nn,y4 as tn,N1 as an,N2 as on,k7 as sn,QE as cn,ka as ln,rj as rn,MY as dn,MZ as un,rn as pn,hq as gn,Mi as ee,hi as de,hf as mn,hn as fn,Mj as hn,y1 as bn,QF as Sn,QG as yn,EL as Cn,fC as Ae,fE as xe,QH as In,gd as En,Ms as An,y0 as ue,gi as pe,gh as xn,x$ as vn,gg as wn,gf as kn,QI as jn,fH as ve,QJ as Pn,QK as Dn,y7 as Mn,x_ as ge,QL as Tn,fX as _n,xX as Un,bZ as Rn,c5 as Bn,c4 as Fn,b_ as On,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as $n}from"./zeni-epic-state-BER7XwD9.js";import{C as Y,G as O,z as k,ag as we,bT as Qn,d as G,f as Hn,bE as Zn,I as K,B as ie,bU as Gn,i as ke,H as je,bV as Kn,ar as Xn,j as Pe,bW as qn,bX as Jn,bY as Yn,_ as Wn,bZ as et,v as nt,b_ as tt}from"./index-D3N1b9aQ.js";import{n as V}from"./mui-DT0mOTYO.js";import{M as B}from"./MobileAppDrawer-DJ3VpNqR.js";import{a as X,g as q,m as at}from"./accountMappingHelper-BXTm4qLL.js";import{t as ot,A as st}from"./AddressScreen-CUr-HVcT.js";import $ from"./NotFoundScreen-CamJ30ZO.js";import{g as it}from"./analyticsHelper-mm28SP1t.js";import{B as ct}from"./BusinessVerificationPageScreen-BwKYUVXz.js";import{C as lt}from"./CompanyPassportScreen-D5p8YGqx.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-B9Wz5ZE4.js";import{q as me}from"./QBOConnectionScreen-CmRiNFSq.js";import{B as ut}from"./BillPayApprovalRoutes-D2_kNfaY.js";import{R as pt}from"./ReimbursementApprovalRoutes-CFENXyD5.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./utils-Dc4uXotD.js";import"./routePaths-m79Ycpnf.js";import"./empty-CT_SeA8A.js";import"./pdf-lib-BFqwhQQP.js";import"./index-CVfL0TVn.js";import"./url-yIFPVih_.js";import"./index-Dd8kzaST.js";import"./decodeURIComponentSafe-C8Ut439h.js";import"./ReimbursementApprovalRuleDetailScreen-Be3YasZE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="34160ed7-d824-4caf-8f06-61a6c833ce31",e._sentryDebugIdIdentifier="sentry-dbid-34160ed7-d824-4caf-8f06-61a6c833ce31")}catch{}})();const gt=V.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,mt=H(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:be(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ue(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:a.isCapitalizationFeatureEnabled,capitalizableAccounts:a.capitalizableAccounts,accountNamesById:a.accountNamesById,capitalizableAccountOverrides:a.capitalizableAccountOverrides,isCapitalizationThresholdSaving:a.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:a.onSaveCapitalizationAccountThreshold}},function(e,a){const{navigate:s,location:c,isFiling1099FeatureEnabled:l}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:i,reimbursementsAccountSection:p,vendorsAccountSection:m,filing1099Section:f}=n,{incomeAccount:y,expenseAccount:g}=t,{billPayAccount:r}=i,{reimbursementsAccount:b}=p,{prepaidExpensesAccount:I,fixedAssetsAccount:w,accruedExpensesAccount:A}=m,{bankAccount:h,expenseCategory1099:E}=f,U=X(a.accountMappingView.incomeAccountList,y.selectedOption),M=X(a.accountMappingView.expenseAccountList,g.selectedOption),x=X(a.accountMappingView.billPayAccountList,r.selectedOption),R=X(a.accountMappingView.reimbursementsAccountList,b.selectedOption),D=q(a.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),N=q(a.accountMappingView.fixedAssetsAccountList,w.selectedOptions),F=q(a.accountMappingView.accruedExpensesAccountList,A.selectedOptions),d=q(a.accountMappingView.bankAccounts1099FilingAccountList,h.selectedOptions),C=at(a.accountMappingView.expenseAccounts1099FilingAccountList,E),T={selectedIncomeAccountId:U?.accountId,selectedExpenseAccountId:M?.accountId,selectedBillPayAccountId:x?.accountId,selectedReimbursementsAccountId:R?.accountId,selectedPrepaidExpensesAccountIds:D.map(j=>j.accountId),selectedFixedAssetsAccountIds:N.map(j=>j.accountId),selectedAccruedExpensesAccountIds:F.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:d.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:C};e(Oe({data:T}))},onBackClick:()=>{we(c)===!1?(s("../../dashboard"),e(Fe())):e(he())},onSaveClick:()=>{e(Be()),l&&G.track(Hn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Re(a.currentTenant.companyId,n))}}})(Qn),ft=()=>{const e=L(),a=Q(),s=_(),{useFeatureGate:c,useDynamicConfig:l}=Y(),{isFeatureEnabled:n}=c(O.isFiling1099FeatureEnabled),{isFeatureEnabled:t}=c(O.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:i,isDynamicConfigLoading:p}=l("transaction_categorization_config"),m=!p&&i?.capitalization_enabled===!0,f=k.getSignedInUser(),y=De(f),g=S(d=>P(d)),{capitalizableAccounts:r,capitalizableAccountOverrides:b,isCapitalizationThresholdSaving:I,currencySymbol:w}=S(d=>{const C=d.tenantState.currentTenantId,T=C!=null?d.tenantState.tenantsById[C]:void 0,j=Me(d.companyState,g.companyId);return{capitalizableAccounts:T?.capitalizableAccounts??null,capitalizableAccountOverrides:T?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:d.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}},le),A=u.useCallback((d,C)=>{s(re(g.companyId,d,C))},[s,g.companyId]),h=u.useCallback(d=>{const C={...b??{}},T=Object.entries(d);for(const[z,ce]of T)ce===null?delete C[z]:C[z]=ce;const[j,W]=T[0]??[];j!=null&&s(re(g.companyId,j,W,void 0,Object.keys(C).length>0?C:null))},[s,g.companyId,b]),E=S(d=>Te(d.accountState),le),U=u.useMemo(()=>{const d={};for(const C of E)C.accountId!=null&&C.accountName!=null&&(d[C.accountId]=C.accountName);return d},[E]),[M,x]=u.useState(!1),[R,D]=u.useState(!1);u.useEffect(()=>{M===!1&&(s(he()),x(!0))},[M]);const N=S(d=>_e(d)),F=d=>{D(d)};return o.jsxs(gt,{children:[o.jsx(B,{isAppContentDrawerOpen:R,handleDrawerToggle:F}),o.jsx(mt,{currentTenant:g,navigate:e,accountMappingView:N,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:t,isCapitalizationFeatureEnabled:m,capitalizableAccounts:r,accountNamesById:U,capitalizableAccountOverrides:b,currencySymbol:w,isCapitalizationThresholdSaving:I,onSaveCapitalizationAccountThreshold:A,onSaveCapitalizationAccountThresholds:h,location:a,isSettings:we(a),onClickMenuIcon:()=>F(!0)})]})},ht=V.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
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
|
-
`,bt=H(function(e,a){const s=P(e),c=Ne(e),l=$e(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(ae(s?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:l,analytics:G}},function(e,a){const{navigate:s,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Gn),St=()=>{const e=L(),a=Q(),s=_(),{tenantEmailDomain:c}=Z(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S(E=>P(E)),y=S(E=>E.billPaySetupApproverViewState.fetchState),g=S(E=>E.remiSetupApproverViewState.fetchState),r=S(E=>Ve(E)),{isApprovalRulesV3Enabled:b,isLoading:I}=Zn(f?.tenantId),w=f.companyId??k.getSignedInUserTenant(c)?.companyId;if(k.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const A=K();u.useEffect(()=>{p||y!=="Not-Started"||I||(m(!0),s(ze(!0,!0,b)))},[p,y,I,b,s]),u.useEffect(()=>{t||g!=="Not-Started"||I||(i(!0),s(Le(!0,!1,!1,b)))},[t,g,I,b,s]);const h=E=>{n(E)};return A?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(B,{isAppContentDrawerOpen:l,handleDrawerToggle:h}),o.jsx(bt,{navigate:e,location:a,companyId:w,currentTenant:f,roleMap:A.loggedInUserRoleMap,onClickMenuIcon:()=>{h(!0)}})]}):o.jsx(ie,{fetchState:r.fetchState})},yt=V.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=H(function(e,a){const{companyId:s,isZeniAccountEnabled:c,isChargeCardEnabled:l,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:i}=a,p=P(e);return{bankSetupView:Xe(e,s,n,t,c,l,i),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:G}},function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t,i)=>{e(se(t,n,i))},onEstablishConnectionClick:(n,t,i)=>{e(oe(n,l,t,i))},onUpdatePaymentAccountStatus:(n,t,i,p,m)=>{e(Ie(n,t,m,p,i))},onUpdatePaymentAccountLoginStatus:(n,t,i,p)=>{e(Ce(!1,n,p,i,t))},onEstablishConnectionSuccess:(n,t)=>{e(ye(t,n))},onUpdateAccountClick:(n,t,i,p,m)=>{e(m==="paymentAccount"?Se(n,t,i,p):Ye(p,n,t))},onUpdatePrimaryFundingAccount:(n,t,i)=>{e(Je(l,t,n,i))},onRemoveConnection:n=>{e(qe(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Kn),It=()=>{const e=L(),a=Q(),s=_(),{tenantEmailDomain:c}=Z(),l=K(),{useFeatureGate:n}=Y(),{isFeatureEnabled:t}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=n(O.isDebitCardFeatureEnabled),[p,m]=u.useState(!1),[f,y]=u.useState(!1),g=S(D=>P(D)),r=S(D=>D.settingsViewState.bankConnection.fetchState),b=Qe(g,l?.loggedInUserRoleMap),I=He(g,l?.loggedInUserRoleMap),w=g?.userRole!=null&&Ze(g.userRole),A=!!g.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!w,h=g.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!w,E=ke(g,t,i),U=Ge(g,l?.loggedInUserRoleMap)&&E,{isCardsHidden:M}=je(g?.tenantId),x=g.companyId??k.getSignedInUserTenant(c)?.companyId;if(k.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect(()=>{f||r==="Completed"||(y(!0),s(Ke(!1)))},[f,s,r]);const R=D=>{m(D)};return b||A||I||U?o.jsxs(yt,{children:[o.jsx(B,{isAppContentDrawerOpen:p,handleDrawerToggle:R}),o.jsx(Ct,{navigate:e,location:a,companyId:x,currentTenant:g,roleMap:l.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:I,isZeniAccountEnabled:A,isChargeCardEnabled:U,isChargeCardsHidden:M,isTreasuryEnabled:h,onClickMenuIcon:()=>{R(!0)}})]}):o.jsx($,{})},Et=V.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,At=H(function(e,a){const{companyId:s}=a,c=P(e),l=a.roleMap.bill_pay_admin,n=en(e,s),{uiState:t}=n,i=(ae(c?.userRole??[])||l)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:Pe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:i,analytics:G}},function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t)=>{e(se("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(oe(n,l,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ye("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,i)=>{e(Ie(n,t,"billing","billing_setup",i))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(Ce(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(Se(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ee(n))},handleConfirmCardSetupIntent:n=>{e(ln(n))},updateCardPaymentModalState:n=>{e(cn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,i)=>{e(sn(n,t,i))},handleFetchPaymentSources:()=>{e(J())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},onBillingAddressSave:n=>{e(tn(n))},onAddressEditHandler:n=>{if(n!=null){const t=ot(n);e(nn({addressType:"subscription_billing_address",addressToCreate:t}))}}}})(qn),xt=()=>{const e=L(),a=Q(),s=_(),{tenantEmailDomain:c}=Z(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S(h=>P(h)),y=S(h=>h.cardPaymentViewState),g=S(h=>h.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),r=Xn(y.addCardPaymentSourceStatus.fetchState),b=y.addCardPaymentSourceStatus.fetchState,I=f.companyId??k.getSignedInUserTenant(c)?.companyId;if(k.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=K();u.useEffect(()=>{I!=null&&s(We(I,!1))},[I,s]),u.useEffect(()=>{t||(i(!0),s(J()))},[t,s]),u.useEffect(()=>{p||(Ee(["card"]),m(!0))},[p]),u.useEffect(()=>{r==="In-Progress"&&b==="Completed"&&s(J())},[r,b]);const A=h=>{n(h)};return w?.loggedInUserRoleMap!=null?o.jsxs(Et,{children:[o.jsx(B,{isAppContentDrawerOpen:l,handleDrawerToggle:A}),o.jsx(At,{navigate:e,location:a,companyId:I,currentTenant:f,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{A(!0)},googleAPIKey:Pe.googleMapsAPIKey})]}):o.jsx(ie,{fetchState:g})},te="external_integrations",vt=H(function(e){const a=un(e,te);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(a.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,a){const{navigate:s,integrationsView:c,signedInUserEmail:l,tenantEmailDomain:n,tenantId:t}=a;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{me.init("/connection/auth",n),me.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(bn())},onSaveChargeBeeCredentials:(i,p)=>{const m=c.externalConnections?.revenue?.find(f=>f.connectionName==="chargebee")?.connectionId;m!=null&&e(fn(t,m,ee("revenue"),hn("chargebee"),{api_key:i,site:p}))},onConnectHubSpot:(i,p)=>{const m=c.externalConnections?.revenue?.find(f=>f.connectionName==="hubspot")?.connectionId;if(m!=null){const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:i,client_secret:p,connection_id:m,redirect_uri:f,tenant_id:t}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(i)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(f)}`}},onDisconnect:(i,p)=>{e(mn(t,i,ee(p)))},onConnectGmail:()=>{e(de(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(de(t,"outlook",window.location.href))},onSaveConnectorCredentials:i=>{e(gn(t,ee("payments"),i))},onNotifyMe:i=>{G.trackIntegrationsNotifyMeClicked("Settings",i),e(pn(te,i,l))}}})(Jn),wt=()=>{const e=L(),a=_(),{tenantEmailDomain:s}=Z();rt();const[c,l]=u.useState(!1),n=S(h=>h.tenantState.fetchState),t=S(h=>P(h)),i=t.companyId??k.getSignedInUserTenant(s)?.companyId,p=k.getSignedInUser(),m=K(),f=ae(t.userRole??[]);if(p==null)throw Error("Can't access Integrations page without signing in...");u.useEffect(()=>{a(rn(te))},[a]);const[y,g]=u.useState(!1);u.useEffect(()=>{y||(g(!0),a(J()))},[y,a]);const r=h=>{l(h)},b=S(h=>dn(h,i)),I=S(h=>h.plaidAccountViewState.external_account.plaidConnectionDetails),{plaidAccounts:w,onAddPlaidAccount:A}=dt({companyId:i??t.companyId});return m?.loggedInUserRoleMap!=null?o.jsxs(kt,{children:[o.jsx(B,{isAppContentDrawerOpen:c,handleDrawerToggle:r}),o.jsx(vt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:f,integrationsView:b,signedInUserEmail:p.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??s??"",tenantId:t.tenantId,saveChargeBeeState:b.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:b.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:b.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:b.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:b.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(b.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([h,E])=>[h,E?.message])),deleteConnectionState:b.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:b.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:w,onAddPlaidAccount:A,plaidConnectionDetails:I})]}):o.jsx(ie,{fetchState:n})},kt=V.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,jt=V.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,Pt=()=>{const e=_(),{tenantEmailDomain:a}=Z(),[s,c]=u.useState(!1),l=S(r=>P(r)).companyId??k.getSignedInUserTenant(a)?.companyId,n=k.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=S(r=>Sn(r,n.userId)),i=S(r=>yn(r,l,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:p}=i,m=r=>{c(r)},f=u.useCallback(r=>{e(se("user_reimbursement_account",r))},[]),y=u.useCallback(r=>{e(oe(r,l,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);u.useEffect(()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(Cn(n.userId))},[n.userId,t.fetchState]);const g=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return o.jsxs(jt,{children:[o.jsx(B,{isAppContentDrawerOpen:s,handleDrawerToggle:m}),o.jsx(Yn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:t,onFetchLinkTokenClick:f,onEstablishConnectionClick:y,onClickMenuIcon:()=>{m(!0)}})]})},Dt=V.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,fe=({appContent:e})=>{const a=_(),s=L(),c=Q(),[l,n]=u.useState(!1),t=S(d=>P(d)),{tenantEmailDomain:i}=t,p=t.companyId??k.getSignedInUserTenant(i)?.companyId;if(k.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:m}=Y(),f=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:y}=m(O.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=m(O.isDebitCardFeatureEnabled),r=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=S(d=>be(d)),I=Ae(t),w=xe(g,t),A=!w&&b,h=ke(t,y,g),{isCardsHidden:E}=je(t?.tenantId),U=!h||E,{areTenantIdsInSync:M}=Wn();u.useEffect(()=>{M&&a(In(p,A))},[p,a,A,M]);const x=S(d=>En(d,A)),R=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||p==null,D=An(t),N=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,F=d=>{n(d)};return o.jsxs(Dt,{children:[o.jsx(B,{isAppContentDrawerOpen:l,handleDrawerToggle:F}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:N===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:U,isTreasuryDisabled:r===!1,isLiteRoleDisabled:D===!1,onClickMenuIcon:()=>{F(!0)},isLoading:R,isBankingOnlyTenant:w,isCardsOnlyTenant:I,onAddressClick:d=>{const C=function(j,W){let z=`/${j}/settings/my_profile`;return z=z.concat(`/new/${W}`),z}(i,d),T=nt(c.state?.pathnameStackToGoBack,c.pathname);s(C,{state:{pathnameStackToGoBack:T}})},onGetOtp:d=>{const C={...x.myProfileLocalData,phone:d};a(ue({localData:C})),a(kn(d,"MyProfile"))},onResendOtp:d=>{a(wn(d,"MyProfile"))},onCancelClick:()=>{a(vn())},onSaveClick:()=>{a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(d,C)=>{a(xn(d,C,"MyProfile"))},onVerifyOtpSuccess:d=>{d!=null&&k.saveZeniOtpToken(d),a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:d=>{a(ue({localData:d}))}})]})};function Mt(){const e=_(),a=S(r=>P(r)).companyId,s=S(r=>jn(r)),c=S(r=>ve(r)),l=k.getSignedInUser(),[n,t]=u.useState(!1),i=u.useCallback(r=>{t(r)},[]),p=u.useCallback(r=>{e(Pn(r))},[]),m=u.useCallback(()=>{l?.userEmail!=null&&e(Dn({loggedInUserEmail:l.userEmail}))},[l?.userEmail]),f=u.useCallback(()=>{e(Mn())},[]);if(l==null)throw Error("Can't access Notification Settings page without signing in...");const y=u.useCallback(()=>{const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback(()=>{e(Tn())},[]);return u.useEffect(()=>{if(c.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))}},[s.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(B,{isAppContentDrawerOpen:n,handleDrawerToggle:i}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:p,onCancel:m,onSave:f,onClickMenuIcon:()=>{i(!0)},signedInUser:l,onRefresh:y,resetUpdateStatus:g})]})}function ga(e){const[a,s]=u.useState(!1),c=S(r=>ve(r)),l=S(r=>P(r)),n=K(),t=k.getSignedInUser(),i=_(),{useFeatureGate:p}=Y(),{isFeatureEnabled:m}=p(O.isDebitCardFeatureEnabled),f=t?.userEmail==null||c.fetchState!=="Completed"||_n(c.notificationSettings,t.userEmail,m,l);u.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(s(!0),i(Un()))},[c.fetchState,a]);const y=xe(m,l),g=Ae(l);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?Rn(l)?o.jsxs(ne,{children:[Bn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"accounting/*",element:o.jsx(ft,{})}),Fn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"approval_rules/*",element:o.jsx(Tt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),On(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"my_bank_connections",element:o.jsx(Pt,{})}),Vn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"bank_connections",element:o.jsx(It,{})}),zn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"business_verification",element:o.jsx(ct,{productType:y?"zeni_accounts":g?"charge_cards":it(l,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"company_details",element:o.jsx(lt,{})}),Nn(n?.loggedInUserRole??[],l)&&o.jsx(v,{path:"billing",element:o.jsx(xt,{})}),$n(n?.loggedInUserRole??[],m,l)&&o.jsx(v,{path:"integrations",element:o.jsx(wt,{})}),o.jsx(v,{path:"my_profile/new/:addressType",element:o.jsx(fe,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(v,{path:"my_profile",element:o.jsx(fe,{})}),f&&o.jsx(v,{path:"notifications",element:o.jsx(Mt,{})}),o.jsx(v,{path:"*",element:o.jsx($,{})})]}):o.jsx(ne,{children:o.jsx(v,{path:"*",element:o.jsx($,{})})}):null}function Tt(e){return o.jsxs(ne,{children:[o.jsx(v,{path:"/",element:o.jsx(St,{})}),o.jsx(v,{path:"bills/approval-rules/*",element:o.jsx(ut,{})}),o.jsx(v,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(pt,{}):o.jsx($,{})}),o.jsx(v,{path:"*",element:o.jsx($,{})})]})}export{ga as default};
|