@zeniai/web-app-ui 5.0.85-prod → 5.0.86-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-CGo30rdJ.js +1 -0
- package/dist/assets/{AddressScreen-C1X9W71J.js → AddressScreen-DqNplF9n.js} +2 -2
- package/dist/assets/AiCfoScreen-DY2bTh5X.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-BcGyYnYz.js +1 -0
- package/dist/assets/{BillPayRoutes-REyUIXZc.js → BillPayRoutes-Dksq93Nt.js} +18 -18
- package/dist/assets/{BusinessVerificationPageScreen-6S_he82a.js → BusinessVerificationPageScreen-YDSaAbpW.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-BzQ9RZyE.js → ChargeCardRoutes-o064oMRW.js} +9 -9
- package/dist/assets/CompanyPassportScreen-BLW99zDL.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bd0F-_VJ.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Cb43qCFz.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D8glvcbX.js → CustomerOnboardingRoutes-DJIij8xf.js} +4 -4
- package/dist/assets/DashboardRoutes-CS6nJI2P.js +20 -0
- package/dist/assets/{DefaultTenantHome-DKor79UJ.js → DefaultTenantHome-Bl9eDQpG.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CQO9Kbrv.js +18 -0
- package/dist/assets/DrawerScreen-E9PcStEO.js +1 -0
- package/dist/assets/EntityDetailRoutes-zw7M1lwQ.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BHuRnA1t.js +25 -0
- package/dist/assets/FeaturePreviewScreen-DtxT93sy.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-DvdLNXNC.js +1 -0
- package/dist/assets/{MagicLinkRoutes-DGjZZywf.js → MagicLinkRoutes-BszO-d0K.js} +21 -21
- package/dist/assets/MagicLinkSignInScreen-C_x0l97F.js +12 -0
- package/dist/assets/{MobileAppDrawer-e7vFdsZl.js → MobileAppDrawer-D8M7VXe9.js} +1 -1
- package/dist/assets/NotFoundScreen-BHqd2QHQ.js +1 -0
- package/dist/assets/{NotificationRoutes-iaZ8tHwP.js → NotificationRoutes-BF1vgjUU.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BR0rJGBP.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DY76dKM1.js +1 -0
- package/dist/assets/PeopleRoutes-BtQrBjKV.js +22 -0
- package/dist/assets/PerformanceRoutes-DMpi0fOi.js +1 -0
- package/dist/assets/{Preview-CG8KGDxi.js → Preview-C8bsUUOu.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B1ByBjAM.js → QBOConnectionScreen-vJXVqwWm.js} +1 -1
- package/dist/assets/{ReferralListScreen-CalwcRRw.js → ReferralListScreen-DMiRiZiL.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-CkwYBtEW.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BiJ5gYT6.js → ReimbursementApprovalRuleDetailScreen-CmXeAJ2V.js} +1 -1
- package/dist/assets/ReimbursementRoutes-C8zQyJK2.js +68 -0
- package/dist/assets/ReportsRoutes-BexYmhra.js +1 -0
- package/dist/assets/RewardsRoutes-DjXjgRiO.js +1 -0
- package/dist/assets/ScreenRoutes-BoNP2LIP.js +2 -0
- package/dist/assets/{SettingsRoutes-BY0Jw8iu.js → SettingsRoutes-DNp9Aol7.js} +7 -7
- package/dist/assets/{SetupPagesScreen-D2SgzhSy.js → SetupPagesScreen-D1bk7eBP.js} +5 -5
- package/dist/assets/SignInScreen-Cgfdytgb.js +1 -0
- package/dist/assets/SignOutScreen-kKi84Hfg.js +9 -0
- package/dist/assets/TaskListScreen-BVNYZTXx.js +9 -0
- package/dist/assets/TaskRoutes-BrThx6o_.js +9 -0
- package/dist/assets/TransactionDetailRoutes-6MCXCmqq.js +1 -0
- package/dist/assets/TransactionDetailScreen-DWs7y2E7.js +5 -0
- package/dist/assets/TransactionListRoutes-Y2-dK5Nn.js +1 -0
- package/dist/assets/TreasuryRoutes-DlQvHZ4w.js +37 -0
- package/dist/assets/{VendorsRoutes-B3LqHFQe.js → VendorsRoutes-HIQQTQSi.js} +28 -28
- package/dist/assets/WiseConfirmationScreen-C646Mco3.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BOuLb5XT.js → ZeniAccountRoutes-Kwn8sr_a.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-BmEJTL09.js +9 -0
- package/dist/assets/{accountMappingHelper-BMO3_Hcn.js → accountMappingHelper-5LvFlOj7.js} +1 -1
- package/dist/assets/{analytics-KTpmzBLZ.js → analytics-BE9oUBzD.js} +1 -1
- package/dist/assets/{analyticsHelper-BMXAUA8L.js → analyticsHelper-BEEOw1D6.js} +1 -1
- package/dist/assets/{core-DSm5EncT.js → core-D1cXuJMi.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B2XNfwZK.js → decodeURIComponentSafe-Did0aZyt.js} +1 -1
- package/dist/assets/{dnd-WfwuNh-I.js → dnd-DbPPTppj.js} +1 -1
- package/dist/assets/{empty-D4skTnQ7.js → empty-BHW5kDnt.js} +1 -1
- package/dist/assets/{empty-BLM9j6_P.js → empty-CfqAKA3M.js} +1 -1
- package/dist/assets/{emptyVideoElement-Cumej5oa.js → emptyVideoElement-BofOruLs.js} +1 -1
- package/dist/assets/epic-CUqueK5i.js +2 -0
- package/dist/assets/getLocaleForTenant-Dc-_DzRm.js +1 -0
- package/dist/assets/{index-BRuJhj8k.js → index-3aBFjHPN.js} +1 -1
- package/dist/assets/{index-CFp7xmpI.js → index-B4eiJr7Z.js} +1 -1
- package/dist/assets/{index-CJtuHmND.js → index-BSfz3Hzd.js} +1 -1
- package/dist/assets/{index-DxfNPg3T.js → index-CRe2wmI_.js} +1 -1
- package/dist/assets/{index-CFeaKA_G.js → index-DF3os92T.js} +2 -2
- package/dist/assets/{index-DqKAAek5.js → index-DjDfMTxy.js} +1 -1
- package/dist/assets/{index-Cu6TX6T-.js → index-Dr8ZNfvJ.js} +15411 -15406
- package/dist/assets/{index-D-ASMD0k.js → index-n6IrYjfy.js} +1 -1
- package/dist/assets/{lexical-uPMgP-4-.js → lexical-Du70nM1B.js} +1 -1
- package/dist/assets/{liveblocks-D5IOuNv9.js → liveblocks-Hyy2O23M.js} +1 -1
- package/dist/assets/{lottie-Bw23hVB7.js → lottie-qu8VyEpw.js} +1 -1
- package/dist/assets/{mui-aAb3ZK4t.js → mui-B2prtfNk.js} +1 -1
- package/dist/assets/{pathToGoBack-CjnK-RPC.js → pathToGoBack-C7gPpVBh.js} +1 -1
- package/dist/assets/{pdf-BLq3oklQ.js → pdf-Cvwxd6W6.js} +4 -4
- package/dist/assets/{pdf-lib-BW6r_g8A.js → pdf-lib-D1w2Ub95.js} +1 -1
- package/dist/assets/{plaid-Bq2q69xW.js → plaid-4w70Yh4I.js} +1 -1
- package/dist/assets/{pusher-KRJGbkWv.js → pusher-Bvm9V4qD.js} +1 -1
- package/dist/assets/{react-x0L0dyO0.js → react-B4GuIedn.js} +1 -1
- package/dist/assets/{react-4vFcWFvy.js → react-BCjBqrrm.js} +1 -1
- package/dist/assets/{react-D06hoWUG.js → react-BZq53fCf.js} +1 -1
- package/dist/assets/{react-CVr5kbJf.js → react-BfNTrsTo.js} +1 -1
- package/dist/assets/{react-BwM_qM5v.js → react-CBBEPwWt.js} +1 -1
- package/dist/assets/{react-CZ6W6ySb.js → react-CUSCkthZ.js} +1 -1
- package/dist/assets/{recharts-sq8NMPEu.js → recharts-CrZf7bKF.js} +1 -1
- package/dist/assets/routePaths-Dx_nnKk7.js +1 -0
- package/dist/assets/{sentry-Ctx5hlxQ.js → sentry-BTyPPF0t.js} +1 -1
- package/dist/assets/{url-C8YmYc76.js → url-CsQlFR2d.js} +1 -1
- package/dist/assets/{url-BdIiWJEz.js → url-Dq7O3gKi.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BxShjiqA.js +1 -0
- package/dist/assets/{useDeviceId-M1Q9D8TL.js → useDeviceId-D81NtSvK.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js +1 -0
- package/dist/assets/{useInitialThreadRequest-C9HocV07.js → useInitialThreadRequest-WHG7gHcH.js} +1 -1
- package/dist/assets/{utils-5dQGsDcn.js → utils-C_-saZ2j.js} +1 -1
- package/dist/assets/withTransactionSidePanel-DcRhIgzv.js +21 -0
- package/dist/assets/{zeni-epic-state-RX9kBvT9.js → zeni-epic-state-CbUjX_b3.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-C_SrcHIw.js +0 -1
- package/dist/assets/AiCfoScreen-WhA4JkLd.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-CxQX2aBa.js +0 -1
- package/dist/assets/CompanyPassportScreen-CUo32gRA.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BdePBTwE.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CllFwfVW.js +0 -1
- package/dist/assets/DashboardRoutes-C7apISiX.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-BjJiJDq1.js +0 -18
- package/dist/assets/DrawerScreen-D2pv5LV4.js +0 -1
- package/dist/assets/EntityDetailRoutes-DLg9gkZ_.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-D6ucvolb.js +0 -25
- package/dist/assets/FeaturePreviewScreen-DW0dk17I.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Z-Z5PVam.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-DXENsbqj.js +0 -12
- package/dist/assets/NotFoundScreen-BT06WKNU.js +0 -1
- package/dist/assets/OAuthConsentScreen-vGSNLv7Y.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BD5usFzC.js +0 -1
- package/dist/assets/PeopleRoutes-BbfuviKv.js +0 -22
- package/dist/assets/PerformanceRoutes-CSVKByC4.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-XiJZ8vd5.js +0 -1
- package/dist/assets/ReimbursementRoutes-DZGe7EIH.js +0 -68
- package/dist/assets/ReportsRoutes-C_To5MtR.js +0 -1
- package/dist/assets/RewardsRoutes-BK1T5N_P.js +0 -1
- package/dist/assets/ScreenRoutes-C-POyJhR.js +0 -2
- package/dist/assets/SignInScreen-DnG3RNpe.js +0 -1
- package/dist/assets/SignOutScreen-CvdI8gEw.js +0 -9
- package/dist/assets/TaskListScreen-Dic2Sptj.js +0 -9
- package/dist/assets/TaskRoutes-DEZA7NFE.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BUTf6YOV.js +0 -1
- package/dist/assets/TransactionDetailScreen-DRU44gV_.js +0 -5
- package/dist/assets/TransactionListRoutes-CRtqvb4u.js +0 -1
- package/dist/assets/TreasuryRoutes-XLugkaXo.js +0 -37
- package/dist/assets/WiseConfirmationScreen-BaKWf4dW.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CsADtZkI.js +0 -9
- package/dist/assets/epic-BjxrHn7-.js +0 -2
- package/dist/assets/getLocaleForTenant-Dks1F-do.js +0 -1
- package/dist/assets/routePaths-CTVn-kRm.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Cwg-MURp.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-CmADrtlH.js +0 -1
- package/dist/assets/withTransactionSidePanel-gQ2IORZA.js +0 -21
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-Dr8ZNfvJ.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BTyPPF0t.js"><link rel="modulepreload" crossorigin href="/assets/core-D1cXuJMi.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CbUjX_b3.js"><link rel="modulepreload" crossorigin href="/assets/mui-B2prtfNk.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BE9oUBzD.js"><link rel="modulepreload" crossorigin href="/assets/utils-C_-saZ2j.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.86-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@sentry/core": "^9.42.1",
|
|
28
28
|
"@sentry/react": "^9.42.1",
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
|
-
"@zeniai/client-analytics": "2.0.
|
|
31
|
-
"@zeniai/client-epic-state": "5.0.
|
|
32
|
-
"@zeniai/web-components": "4.0.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.14",
|
|
31
|
+
"@zeniai/client-epic-state": "5.0.47",
|
|
32
|
+
"@zeniai/web-components": "4.0.92",
|
|
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-D5IOuNv9.js";import{A as i}from"./AddressScreen-C1X9W71J.js";import s from"./NotFoundScreen-BT06WKNU.js";import"./sentry-Ctx5hlxQ.js";import{n as d,o as r}from"./core-DSm5EncT.js";import"./zeni-epic-state-RX9kBvT9.js";import"./recharts-sq8NMPEu.js";import"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-D5IOuNv9.js";import{a as l}from"./sentry-Ctx5hlxQ.js";import{h as de,j as me,u as pe,g as N,l as he,k as fe}from"./core-DSm5EncT.js";import{T as Se,cJ as ge,z as Ce,Z as ke,cK as be,cL as we,cM as V,cN as Ie,cO as J,k as U,A as q,e as T,cP as z,cQ as Ee,W as Pe,g as Te,a3 as ye,cR as xe,X as _e,r as ve,aY as Oe,cS as Ae}from"./index-Cu6TX6T-.js";import{fG as Qe,f5 as K,eQ as Ue,hC as je,Qe as De,eP as Fe,hM as Be,hI as Le,fw as W,fq as Me,fj as Re,fn as H,fr as Ge,fs as $e,ft as Ne,fu as Ve,fv as qe}from"./zeni-epic-state-RX9kBvT9.js";import{D as ze,n as b,S as We,P as He}from"./mui-aAb3ZK4t.js";import{p as Ye}from"./pathToGoBack-CjnK-RPC.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="157d290e-a0ab-4735-bbea-8b701974556a",s._sentryDebugIdIdentifier="sentry-dbid-157d290e-a0ab-4735-bbea-8b701974556a")}catch{}})();const X="chat-response-generated",Je=fe(function(s,r){const t=K(s),m=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose}},function(s,r){const{location:t,currentTenant:m,userId:c,navigate:S,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:u}=r;return{onEventReceived:(e,o)=>{if(e===X&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,p=$e(n.type),d=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:y}=J(C,d);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,d,Ae(y,a),n.metadata.message_id??null):T.trackAICFOChatAnswerGenerated(n.text,w?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Ne(n.visualization?.type??"")??null,d,n.summarized_title,n.metadata.message_id??null),s(Ve({chatSessionId:n.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),s(qe({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:c}))}},onSubmit:(e,o,n,p)=>{e&&Oe(s,e,o,f,C,c,p,n)},updateCurrentInput:e=>{s(H(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Ge(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ye(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(H(""))},togglePageView:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),u(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{f!=null&&s(Re());const e=ve(t.state?.pathnameStackToGoBack,t.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Me({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(ye(xe)),gt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Se(),t=de(),m=me(),c=pe(),[S,f]=l.useState(!1);l.useEffect(()=>{t(Qe())},[t]);const{customPageTitle:C}=ge(),u=N(i=>K(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),d=N(i=>Ue(i)),a=u.uiState.currentChatSessionId,w=d.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:Z}=be({isFileUploadEnabled:s,tenantEmailDomain:w}),x=we({currentTenant:d,currentChatSessionId:a,aiCfoView:u}),I=c.state,E=I?.aiCfoInitialQuestion,j=!!I?.aiCfoShouldSubmit;l.useEffect(()=>{const i=c.state;if(i?.[V]!==!0)return;f(!0);const g={...i};delete g[V],m(c,{replace:!0,state:g})},[c.pathname,c.search,c.state,m]);const[ee,_]=l.useState(null),[te,v]=l.useState(!1),D=l.useRef(!1);l.useEffect(()=>{D.current||E==null||E===""||(_(E),v(j),D.current=!0)},[E,j]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),B=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,L=l.useRef(!1);l.useEffect(()=>{L.current||B!=="month-end-email"||O==null||a!=null||e==null||(t(je("controller",e.userId,O,"MONTH_END_EMAIL")),L.current=!0)},[B,O,a,t,e]);const P=u.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(De()))},[P,a,t]);const se=d.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:M}=Ie(a),A=u.fetchState,Q=u.uiState.chatSessionsNextPageToken.hasMore||!u.uiState.chatSessionsFirstPageFetched,R=a!=null?u.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(u.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),$=u.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=J($,a),ne=oe.length===0;l.useEffect(()=>{k||p||m("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[k,p,m,c.state]);const ie=l.useCallback(()=>{const i=U(c.state?.pathnameStackToGoBack),g=d.tenantEmailDomain;m(i.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...c.state,pathnameStackToGoBack:i.newStack}})},[d.tenantEmailDomain,c.state,m]);l.useEffect(()=>{a!=null&&o!==a&&m(`../ai-cfo/${a}`,{state:{...c.state}})},[a,o]),l.useEffect(()=>{o!=null&&a==null&&o!=="new_chat"&&o!=="explore"&&t(Fe({sessionId:o,agentId:"controller"}))},[]);const le=l.useMemo(()=>({events:M.map(i=>`private-encrypted-chat-${i}.${X}`),eventCallback:(i,g,ue)=>ue.onEventReceived(i,g)}),[M]);l.useEffect(()=>{A!=="In-Progress"&&Q&&t(Be())},[A,Q,t]),l.useEffect(()=>{a!=null&&R!=="In-Progress"&&G&&e!=null&&A==="Completed"&&!Q&&t(Le(a,e.userId))},[R,G,a,e,t]);const re=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const ce=a!=null&&u.responseStateByChatSessionId?.[a]?.answer?.fetchState==="In-Progress";return!k&&p?h.jsxs(Xe,{children:[h.jsx(q,{analytics:T,onLoad:re}),x.drawerElement,h.jsx(Ze,{children:h.jsx(Y,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:u.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{d.userRoleId!=null&&t(W(d.userRoleId))}})})})]}):h.jsxs(Ke,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&x.drawerElement,h.jsx(Je,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:$,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:r,navigate:m,sessionFromUrl:o,location:c,isSubmitting:ce,isEmptyChatWithSession:ne,customPageTitle:C,currentTenant:d,emailLinkQuestion:ee??void 0,autoSubmitEmailLinkQuestion:te,onEmailLinkQuestionProcessed:ae,onMenuClick:p?x.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:Z,onUploadPromoClose:y}),h.jsx(ze,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:et,style:{width:p?"100%":`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(Y,{onClick:i=>i.stopPropagation(),children:h.jsx(z,{isTOSAccepted:k,acceptMasterTOSState:u.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>f(!1),onCompleteClick:()=>{k||d.userRoleId==null||t(W(d.userRoleId)),f(!1)}})})})]})},Y=b(We)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Ke=b.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,Xe=b.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,Ze=b.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,et=b(He)`
|
|
20
|
-
box-shadow: ${({theme:s})=>s.colors.elevation2};
|
|
21
|
-
color: ${({theme:s})=>s.colors.grey4};
|
|
22
|
-
`;export{gt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-D5IOuNv9.js";import{a as y}from"./sentry-Ctx5hlxQ.js";import{j as U,u as B,h as j,g as v,N as $,k as T,l as O,n as F,o as h}from"./core-DSm5EncT.js";import{eQ as N,MZ as R,MF as b,xr as x,xl as L,xp as I,xe as M,MH as z,xh as W,xt as q,xs as C}from"./zeni-epic-state-RX9kBvT9.js";import{m as P,z as k,x as V,a3 as H,by as Q,ac as _,bz as Z}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import{i as G}from"./ReimbursementApprovalRuleDetailScreen-BiJ5gYT6.js";import J from"./NotFoundScreen-BT06WKNU.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]="840dd8c1-03a7-44ba-9f52-68f8d8b8666c",e._sentryDebugIdIdentifier="sentry-dbid-840dd8c1-03a7-44ba-9f52-68f8d8b8666c")}catch{}})();const w="bill-approval-rule-update",K=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(z(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(H(Q)),X=()=>{const e=U(),o=B(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(K,{currentTenant:c,location:o,navigate:e,...f})},Y=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const E=!!G(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(Z);function D(){const e=U(),o=j(),t=B(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Y,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(F,{children:[l.jsx(h,{path:"/",element:l.jsx(X,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(J,{})})]})}export{se as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-D5IOuNv9.js";import{a as g}from"./sentry-Ctx5hlxQ.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-DSm5EncT.js";import{z as N,b1 as P,A as F,e as V,g as A,ac as C,b2 as j,aq as L,ar as M,r as U}from"./index-Cu6TX6T-.js";import{eQ as b,fE as B,rP as R,fz as _,c2 as z,Ma as G,bn as Q,pQ as Y,pE as q,ka as H,lG as S,Mb as Z,bE as $,cv as D,lO as J,lR as K}from"./zeni-epic-state-RX9kBvT9.js";import"./mui-aAb3ZK4t.js";import{c as W}from"./routePaths-CTVn-kRm.js";import{M as X}from"./MobileAppDrawer-e7vFdsZl.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="331402ed-e840-4f95-a3f5-ac6711e7d60c",n._sentryDebugIdIdentifier="sentry-dbid-331402ed-e840-4f95-a3f5-ac6711e7d60c")}catch{}})();const ee=E(function(n){const t=_(n),i=N.getSignedInUser(),l=b(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Q(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(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]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n(Y(e,a.split(".")[0]))}}})(j);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>b(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(B(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(R())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(P,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-D5IOuNv9.js";import{a}from"./sentry-Ctx5hlxQ.js";import{h as D,u as v,g as m,N as w}from"./core-DSm5EncT.js";import{IQ as A,eQ as O,fl as U,mx as _,fN as h,fk as j,eR as L,IX as k}from"./zeni-epic-state-RX9kBvT9.js";import{u as F,z as u,L as g,D as $,o as H}from"./index-Cu6TX6T-.js";import{n as Q}from"./mui-aAb3ZK4t.js";import{t as R}from"./getLocaleForTenant-Dks1F-do.js";import{g as z,Q as P}from"./QBOConnectionScreen-B1ByBjAM.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";import"./empty-BLM9j6_P.js";import"./pdf-lib-BW6r_g8A.js";import"./index-D-ASMD0k.js";import"./url-C8YmYc76.js";import"./index-BRuJhj8k.js";import"./decodeURIComponentSafe-B2XNfwZK.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]="a34130d6-502c-4dfc-89da-eeff561da64a",t._sentryDebugIdIdentifier="sentry-dbid-a34130d6-502c-4dfc-89da-eeff561da64a")}catch{}})();const G=Q.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:x}=F(),c=a.useRef(!1),p=a.useRef(!1),{code:N,realmId:T,state:y}=z(i.search),S=N!==""&&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=u.getSignedInUser(),f=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,b=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{c.current||o==null||f==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(U(o.userId,f))))},[c,n,d]),a.useEffect(()=>{e.tenantId==null&&!p.current&&o!=null&&(p.current=!0,!(f==null||f!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(_(o.userId)))},[p,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(j(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(R(k(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"&&u.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:S||b===!1?C.jsx(G,{children:C.jsx(P,{})}):C.jsx(w,{to:"/",replace:!0})}export{ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-D5IOuNv9.js";import{z as a}from"./index-Cu6TX6T-.js";import{g as n}from"./QBOConnectionScreen-B1ByBjAM.js";import"./sentry-Ctx5hlxQ.js";import{u as p,N as s}from"./core-DSm5EncT.js";import"./zeni-epic-state-RX9kBvT9.js";import"./recharts-sq8NMPEu.js";import"./mui-aAb3ZK4t.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";import"./empty-BLM9j6_P.js";import"./pdf-lib-BW6r_g8A.js";import"./index-D-ASMD0k.js";import"./url-C8YmYc76.js";import"./index-BRuJhj8k.js";import"./decodeURIComponentSafe-B2XNfwZK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-D5IOuNv9.js";import{l as $,g as S,u as q,h as N,j as Z,k as Q,s as Ka,n as st,o as w}from"./core-DSm5EncT.js";import{eQ as L,Ka as Ye,bE as Vt,bq as he,Ln as qa,i2 as Za,Lo as wt,Lp as Ha,i5 as rt,Lq as je,Lr as Qa,ia as Wa,Ls as Dt,Lt as Xa,ie as it,Lu as Me,Lv as Ja,cl as lt,Lw as en,Lx as tn,Ku as an,j8 as nn,Ly as on,bn as Ee,Lz as Nt,J_ as ae,bc as zt,jm as $t,mF as Kt,j5 as qt,K0 as ne,J$ as H,f5 as sn,eN as rn,fn as cn,LA as ln,LB as dn,LC as Zt,LD as _e,tT as Ie,tU as Te,uf as fe,u9 as oe,tY as xe,LE as un,LF as mn,LG as pn,LH as Ht,LI as ke,LJ as hn,dE as Ge,qo as Qt,LK as fn,LL as gn,LM as Cn,LN as dt,Jn as ut,jC as ge,un as mt,qw as bn,LO as _n,tV as Ft,qr as me,qn as Wt,LP as ie,LQ as kn,LR as pt,Jl as ht,sv as Xt,LS as Sn,LT as yn,LU as An,LV as ft,sI as vn,LW as En,tX as Ot,su as Jt,LX as ce,LY as In,bv as ea,ur as ta,LZ as Tn,L_ as xn,L$ as wn,M0 as gt,um as Dn,M1 as Fn,tW as Pt,uq as aa,M2 as le,M3 as On,M4 as Pn,M5 as na,jr as oa,mC as sa,jw as ra,mA as ia,mz as ca,my as la,rT as Bn,fd as Rn,cO as Ln,cP as jn,mv as Mn,f9 as Un,mM as Yn,Dv as Bt,M6 as Gn,M7 as Vn,M8 as Nn,M9 as zn,b5 as Ct,f0 as $n,gM as Kn,fE as qn,mG as Zn,i_ as Hn,mD as Qn,mB as Wn,eW as Xn,eU as Jn}from"./zeni-epic-state-RX9kBvT9.js";import{z as R,X as W,r as D,e as E,D as K,aR as eo,A as we,aS as da,g as G,aT as to,d as De,aU as ua,y as Ve,S as j,m as ao,aV as no,aW as oo,T as ma,Z as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,W as lo,aZ as uo,a_ as mo,an as po,k as ho,U as fo,a$ as go,b0 as ye}from"./index-Cu6TX6T-.js";import{n as bt}from"./mui-aAb3ZK4t.js";import{a as b}from"./sentry-Ctx5hlxQ.js";import{w as fa}from"./withTransactionSidePanel-gQ2IORZA.js";import{b as ga,t as Ce,e as se,a as _t,v as Co}from"./routePaths-CTVn-kRm.js";import{u as X}from"./useAskAiCfoHostNavButtonProps-Cwg-MURp.js";import{c as Fe,b as bo,u as _o}from"./useFetchSuggestedQuestionsWhenReady-CmADrtlH.js";import ve from"./NotFoundScreen-BT06WKNU.js";import{t as Ca}from"./analyticsHelper-BMXAUA8L.js";import{C as ko}from"./CompanyPassportScreen-CUo32gRA.js";import{F as So}from"./FeaturePreviewScreen-DW0dk17I.js";import{R as yo}from"./ReferralListScreen-CalwcRRw.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";import"./TransactionDetailScreen-DRU44gV_.js";import"./decodeURIComponentSafe-B2XNfwZK.js";import"./MobileAppDrawer-e7vFdsZl.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]="8bf362e3-8425-45ef-a6f2-41b1fff2e369",e._sentryDebugIdIdentifier="sentry-dbid-8bf362e3-8425-45ef-a6f2-41b1fff2e369")}catch{}})();const Ao=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=R.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),d=S(I=>L(I)),{tenantEmailDomain:p}=$(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${W}/agingDetailedReport`,timezone:Ye()}),[]),m=b.useMemo(()=>r!=null?Vt(r):he(),[r]),h=N(),f=Z(),k=S(I=>qa(I,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),C=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((I,z)=>{h(wt({sortKey:I,sortOrder:z}))},[]),T=b.useCallback(I=>{h(wt({downloadState:I}))},[]),M=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(p!=null){const z=ga({id:I.transactionId,type:I.transactionType},p);f(z);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(z,{state:{pathnameStackToGoBack:de}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&E.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:E,onTransactionClick:M,onReload:y,onBackClick:C,onColumnSortConfigChanged:A,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),vo=()=>{const e=N(),a=Z(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AP Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${W}/agingReport`,timezone:Ye()}),[]),g=t.apAgingUIState.selectedDate??he(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(je({searchString:A}))},[]),h=b.useCallback((A,T)=>{e(je({sortKey:T,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(je({downloadState:A}))},[]),y=b.useCallback((A,T)=>{},[]),C=b.useCallback((A,T)=>{e(je({selectedDate:A,agingDateSelectionType:T})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:A=>A.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:E,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:C,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Eo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=$(),s=R.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${W}/agingDetailedReport`,timezone:Ye()}),[]),c=b.useMemo(()=>r!=null?Vt(r):he(),[r]),m=N(),h=Z(),f=S(F=>Qa(F,c,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Wa(o,c))},[c]),y=b.useCallback(()=>{h("../../",{relative:"path"})},[]),C=b.useCallback((F,I)=>{m(Dt({sortKey:F,sortOrder:I}))},[]),A=b.useCallback(F=>{m(Dt({downloadState:F}))},[]),T=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const I=ga({id:F.transactionId,type:F.transactionType},d);h(I);const z=D(p.state?.pathnameStackToGoBack,p.pathname);h(I,{state:{pathnameStackToGoBack:z}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&E.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:E,onTransactionClick:T,onReload:k,onBackClick:y,onColumnSortConfigChanged:C,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=N(),a=Z(),t=S(C=>Xa(C)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AR Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(C=>L(C)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${W}/agingReport`,timezone:Ye()}),[]),_=t.arAgingUIState.selectedDate??he(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(C=>{e(Me({searchString:C}))},[]),m=b.useCallback((C,A)=>{e(Me({sortKey:A,sortOrder:C}))},[]),h=b.useCallback(C=>{a(`./${C}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=b.useCallback(C=>{e(Me({downloadState:C}))},[]),k=b.useCallback((C,A)=>{e(Me({selectedDate:C,agingDateSelectionType:A})),e(it(C))},[]),y=b.useCallback((C,A)=>{e(Ja({nodeId:C,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:C=>C.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:E,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ba=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Ce(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?E.trackZeniAccountsCashBalancePromoClicked("Move Money"):(E.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else E.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const To=Q(function(e){const a=en(e).accountsInOrder.map((n,o)=>ba(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:E}},_a)(ua),xo=Q(function(e){const a=on(e).accountsInOrder.map((o,r)=>ba(o,r)),t=R.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:E}},_a)(ua);function wo(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(To,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Fo=bt.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
min-height: 100%;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Oo=bt.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`;function Po({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=Z(),i=N(),d=q(),{tenantEmailDomain:p}=$(),_=ao();return l.jsxs(Fo,{children:[l.jsx(no,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:_.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:g=>{g.trim().length>=2?i(ne({searchString:g,searchOrigin:"navbar"})):g.trim().length===0&&i(H("navbar"))},onAutoCompleteEntity:g=>{n!=null&&E?.trackSearch(G.Event.search,Bo(a),g.type,g.name,n);const u=se(g,p),c=D(d.state?.pathnameStackToGoBack,d.pathname);s(u,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:l.jsx(oo,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),l.jsx(Oo,{children:a==="cash_balance"?l.jsx(wo,{}):l.jsx(Do,{})})]})}function Rt(){const e=q(),a=N(),{useFeatureGate:t}=Ve(),{isFeatureEnabled:n}=t(j.isDepositAccountsFeatureEnabled),o=S(h=>h.cashBalanceState.fetchState),r=S(h=>h.cardBalanceState.fetchState),s=R.getSignedInUser();if(s==null)throw Error("Can't access dashboard detail without signing in...");const i=Nt((h=>{const f=zt(h,"/").split("/");return f[f.length-1]})(e.pathname));let d="Not-Started",p="";const _=K.getLocalizedStrings();switch(i){case"cash_balance":d=o,p=_.reportTitleById.cash_balance;break;case"card_balance":d=r,p=_.reportTitleById.card_balance;break;default:console.error(`${i} is not supported!`)}const{isAiCfoAccessEnabled:g,onAskAiCfoClick:u}=X({mobileExploreReferrer:i==="card_balance"?"Card Balance":"Cash Balance"});Fe({isDataReady:d==="Completed"});const c=S(h=>h.entityAutoCompleteState.autoCompleteText.navbar),m=S(h=>ae(h,"navbar"));return b.useEffect(()=>{d==="Not-Started"&&function(h,f,k){switch(f){case"card_balance":h(qt());break;case"cash_balance":h($t()),k===!0&&h(Kt());break;default:throw new Error(`balance report type ${f} is not yet supported`)}}(a,i,n)},[s,a,d]),l.jsxs(l.Fragment,{children:[d==="Completed"?l.jsx(we,{analytics:E,onLoad:h=>((f,k)=>{switch(k){case"card_balance":f.trackPageLoaded(G.Event.cardBalance);break;case"cash_balance":f.trackPageLoaded(G.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${k}!`)}})(h,i)}):null,l.jsx(Po,{title:p,reportId:i,autoCompleteText:c,entityAutoCompleteView:m,isAiCfoAccessEnabled:g,onAskAiCfoClick:u})]})}const Bo=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Ro=[];function Oe(e){const{mobileExploreReferrer:a}=e,t=N(),n=Z(),o=q(),{tenantEmailDomain:r}=$(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=ma(),d=so(),p=lo(d),_=Ka(),g=S(P=>sn(P)),u=g.uiState?.currentChatSessionId,c=g.allSessionsWithOrderedQuestionAnswers??Ro,m=R.getSignedInUser()?.userId,h=pa(),f=bo()&&h&&r!=null,k=ro(),y=_o(!0),C=S(P=>k!=null?rn(P,k):void 0),{useDynamicConfig:A}=Ve(),{configValue:T}=A(ha.aiCfoMessageDynamicConfig),M=b.useMemo(()=>Array.isArray(T.default_message_list)?T.default_message_list:[],[T.default_message_list]),F=b.useMemo(()=>M.slice(0,2),[M]),I=k!=null&&C!=null&&C.fetchState!=="Completed"&&C.fetchState!=="Error"&&(y||C.fetchState==="In-Progress"),z=b.useMemo(()=>{if(k==null||C?.fetchState==="Error")return F;if(I)return[];const P=(C?.suggestedQuestions??[]).map(J=>J.trim()).filter(J=>J.length>0).slice(0,2);return P.length===0?F:P},[F,I,k,C?.fetchState,C?.suggestedQuestions]),de=b.useCallback((P,J)=>{if(m==null||P.trim()==="")return;const Be=io(_.getState());if(p){const ze=D(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:ze,referrer:a,aiCfoInitialQuestion:P,aiCfoShouldSubmit:!Be}})}else{if(Be)return t(cn(P)),void s(!0);i(P),s(!0),co(t,P,"insights_section",u,c,m,J,void 0)}},[c,u,t,p,o.pathname,o.state,a,n,s,i,_,r,m]),be=b.useCallback(()=>{if(p){const P=D(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:P,referrer:a}})}else s(!0)},[p,o.pathname,o.state,a,n,s,r]);return b.useMemo(()=>{if(f)return{isSuggestedQuestionsLoading:I,onAskSomethingElseClick:be,onSuggestedQuestionClick:de,suggestedQuestions:z}},[f,I,be,de,z])}const Pe=uo,Lo=Q(function(e){const a=ln(e),t=dn(e),n=Zt(e),{scrollPosition:o,...r}=n,s=K.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=R.getSignedInUser(),d=e.tenantState.currentTenantId,p=L(e),_=p?.companyName??"",g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,c=ae(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:_,statementEndPoint:`${W}/statement`,authParams:g},analytics:E,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(un(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(xe(t,n)),e(_e({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(fe("month")),e(oe(a.firstMonthOfFY,t)),e(_e({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ie(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Te(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(_e({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(_e({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(_e({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Pe),jo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=X({mobileExploreReferrer:"DashboardCashInCashOut"}),s=Oe({mobileExploreReferrer:"DashboardCashInCashOut"}),i=S(d=>Zt(d)).mode==="compare_mode";return l.jsx(Lo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},Mo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ge(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Uo=Q(function(e){const a=mn(e),t=pn(e),n=Ht(e),{scrollPosition:o,...r}=n,s=K.getLocalizedStrings().reportTitleById.cash_position,i=R.getSignedInUser(),d=e.tenantState.currentTenantId,p=L(e),_=p?.companyName??"",g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,c=ae(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:_,statementEndPoint:`${W}/statement`,authParams:g},analytics:E,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(hn(t))},onTimeframeSelectionChanged:t=>{e(fe(t)),setTimeout(()=>e(ke({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(xe(t,n)),e(ke({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(oe(a.firstMonthOfFY,t)),e(ke({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ie(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Te(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(ke({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Mo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Ce(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(ke({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Pe),Yo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=X({mobileExploreReferrer:"DashboardCashPosition"}),s=Oe({mobileExploreReferrer:"DashboardCashPosition"}),i=S(d=>Ht(d)).mode==="compare_mode";return l.jsx(Uo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},V=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!=t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))};function Je(){return l.jsxs(st,{children:[l.jsx(w,{path:"/",element:l.jsx(ee,{})}),l.jsx(w,{path:"/:forecastId",element:l.jsx(ee,{})}),l.jsx(w,{path:"/:forecastId/*",element:l.jsx(ve,{})})]})}const Go=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ge(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Vo=Q(function(e){const a=Qt(e),t=fn(e),n=gn(e),o=Cn(e),r=dt(e),{scrollPosition:s,...i}=r,d=t.reportTitle,p=R.getSignedInUser(),_=e.tenantState.currentTenantId,g=L(e),u=g?.companyName??"",c={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:_??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,h=ae(e,"navbar"),f=ut(g);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${W}/statement`,authParams:c},analytics:E,isZeniUser:Ee(p),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:h},isZeniCOAUsed:f,isAccountingClassesEnabled:ge(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(kn(t))},onTimeframeSelectionChanged:t=>{e(fe(t)),setTimeout(()=>e(ie({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(xe(t,n)),e(ie({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(oe(a.firstMonthOfFY,t)),e(ie({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ie(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Te(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&V(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(ie({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Go(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?_t(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Ce(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(ie({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(ie({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(me(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?pe:kt,n)),t==="forecast_mode"?(e(Ft({viewMode:"account_group"})),e(Wt(!1,n?.id)),n!=null&&V(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):V(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(ie({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(Ft({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(_n({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(bn())},onResyncReports:()=>{e(mt("net_burn_or_income_by_classes"))}}})(Pe),No=e=>{const a=N(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=X({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),d=Oe({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),p=S(C=>dt(C)),_=p.isForecastModeOn,g=p.timeframe,u=p.selectedForecast?.id,c=S(C=>pt(C.forecastState,u??"")),m=S(C=>Qt(C)),h=S(C=>ht(C)),f=S(C=>ge(C)),k=p.mode==="compare_mode",y=m.dataAvailable;return b.useEffect(()=>{if(u!=null&&_===!0&&(V(_,r,u,o),c!=null)){const C=c?.forecastPeriod,A=y!=null&&C.endDate.isAfter(y?.endDate)===!0?y:C;a(oe(e.firstMonthOfFY,{startDate:A.endDate.startOf(g),endDate:A?.endDate}))}},[u]),l.jsx(Vo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:k,navigate:o,analytics:E,reportsResyncFetchState:h.reportsResyncFetchState,insightsSectionAiCfoInfo:d,isAiCfoAccessEnabled:s,onAskAiCfoClick:i})},zo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ge(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},$o=Q(function(e){const a=Xt(e),t=Sn(e),n=yn(e),o=An(e),r=ft(e),{scrollPosition:s,...i}=r,d=K.getLocalizedStrings().reportTitleById.operating_expenses,p=R.getSignedInUser(),_=e.tenantState.currentTenantId,g=L(e),u=g?.companyName??"",c={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:_??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,h=ae(e,"navbar"),f=ut(g);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${W}/statement`,authParams:c},analytics:E,isZeniUser:Ee(p),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:h},isZeniCOAUsed:f,isAccountingClassesEnabled:ge(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(In(t))},onTimeframeSelectionChanged:t=>{e(fe(t)),setTimeout(()=>e(ce({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(xe(t,n)),e(ce({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(oe(a.firstMonthOfFY,t)),e(ce({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ie(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Te(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&V(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(ce({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=zo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?_t(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Ce(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(ce({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(ce({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(me(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?pe:kt,n)),t=="forecast_mode"?(e(Ot({viewMode:"account_group"})),e(Jt(!1,n?.id)),n!=null&&V(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):V(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(ce({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Ot({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(En({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(vn())},onResyncReports:()=>{e(mt("operating_expenses_by_classes"))}}})(Pe),Ko=e=>{const a=N(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=X({mobileExploreReferrer:"DashboardOpEx"}),d=Oe({mobileExploreReferrer:"DashboardOpEx"}),p=S(T=>ft(T)),_=p.isForecastModeOn,g=p.timeframe,u=p.selectedForecast?.id,c=S(T=>pt(T.forecastState,u??"")),m=S(T=>Xt(T)),h=S(T=>ht(T)),f=S(T=>ge(T)),k=p.mode==="compare_mode",y=m.dataAvailable;b.useEffect(()=>{if(u!=null&&_===!0&&(V(_,r,u,o),c!=null)){const T=c?.forecastPeriod,M=y!=null&&T.endDate.isAfter(y?.endDate)===!0?y:T;a(oe(e.firstMonthOfFY,{startDate:M.endDate.startOf(g),endDate:M?.endDate}))}},[u]);const C=De(),A=C?.loggedInUserRole!=null&&ea(C?.loggedInUserRole)!==!0;return l.jsx($o,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:k,navigate:o,forecastIdFromUrlPath:r,analytics:E,hasTransactionAccess:A,reportsResyncFetchState:h.reportsResyncFetchState,insightsSectionAiCfoInfo:d,isAiCfoAccessEnabled:s,onAskAiCfoClick:i})},qo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ge(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Zo=Q(function(e){const a=ta(e),t=Tn(e),n=xn(e),o=wn(e),r=gt(e),{scrollPosition:s,...i}=r,d=K.getLocalizedStrings().reportTitleById.revenue,p=R.getSignedInUser(),_=e.tenantState.currentTenantId,g=L(e),u=g?.companyName??"",c={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:_??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,h=ae(e,"navbar"),f=ut(g);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${W}/statement`,authParams:c},analytics:E,isZeniUser:Ee(p),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:h},isZeniCOAUsed:f,isAccountingClassesEnabled:ge(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(On(t))},onTimeframeSelectionChanged:t=>{e(fe(t)),setTimeout(()=>e(le({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(xe(t,n)),e(le({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(oe(a.firstMonthOfFY,t)),e(le({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ie(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Te(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&V(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(le({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=qo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?_t(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Ce(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(le({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(le({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(me(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?pe:kt,n)),t==="forecast_mode"?(e(Pt({viewMode:"account_group"})),e(aa(!1,n?.id)),n!=null&&V(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):V(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(le({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Pt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Fn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(Dn())},onResyncReports:()=>{e(mt("revenue_by_classes"))}}})(Pe),Ho=e=>{const a=N(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=X({mobileExploreReferrer:"DashboardRevenue"}),d=Oe({mobileExploreReferrer:"DashboardRevenue"}),p=S(y=>gt(y)),_=p.isForecastModeOn,g=p.timeframe,u=p.selectedForecast?.id,c=S(y=>pt(y.forecastState,u??"")),m=S(y=>ta(y)).dataAvailable,h=p.mode==="compare_mode",f=S(y=>ge(y)),k=S(y=>ht(y));return b.useEffect(()=>{if(u!=null&&_===!0&&(V(_,r,u,o),c!=null)){const y=c?.forecastPeriod,C=m!=null&&y.endDate.isAfter(m?.endDate)===!0?m:y;a(oe(e.firstMonthOfFY,{startDate:C.endDate.startOf(g),endDate:C?.endDate}))}},[u]),l.jsx(Zo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:f,isCompareModeOn:h,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:E,reportsResyncFetchState:k.reportsResyncFetchState,insightsSectionAiCfoInfo:d,isAiCfoAccessEnabled:s,onAskAiCfoClick:i})},Qo=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},Wo=Q(function(e){const a=Pn(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=ae(e,"navbar");return{report:a,analytics:E,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{E.trackTimeframeSwitch(Ca(t),"Top Expenses"),e(na(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Qo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Ce(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ne({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(H("navbar"))},onAutoCompleteEntity:t=>{const n=se(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(mo),Xo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return l.jsx(Wo,{tenantEmailDomain:a,location:t,navigate:n})},Jo=bt.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex: 1 1 auto;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
-
align-items: center;
|
|
20
|
-
`,pe=3,kt=1;function es({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=Z(),r=q(),{tenantEmailDomain:s}=$();let i;Fe({isDataReady:!0});const d={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=l.jsx(Ko,{...d});break;case"revenue":i=l.jsx(Ho,{...d});break;case"net_burn_or_income":i=l.jsx(No,{...d});break;case"cash_position":i=l.jsx(Yo,{...d});break;case"top_expenses":i=l.jsx(Xo,{...d});break;case"cash_in_cash_out":i=l.jsx(jo,{...d});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?l.jsx(Jo,{children:i}):null}function ee(){const e=q(),a=N(),{forecastId:t}=$();let n="Not-Started";const o=S(c=>ft(c).fetchState),r=S(c=>gt(c).fetchState),s=S(c=>dt(c).fetchState),i=S(c=>c.cashPositionState.fetchState),d=S(c=>c.topExState.fetchState),p=S(c=>c.cashInCashOutState.fetchState);if(R.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const _=S(c=>L(c)),g=_?.company?.companyInfo?.firstMonthOfFY??1,u=Nt((c=>{const m=zt(c,"/").split("/");return t!=null?m[m.length-3]:m[m.length-1]})(e.pathname));switch(u){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=d;break;case"cash_in_cash_out":n=p;break;default:console.error(`${u} is not supported!`)}return b.useEffect(()=>{n==="Not-Started"&&function(c,m,h,f){switch(m){case"operating_expenses":c(la(!0)),f!=null&&(c(me(h,!0,pe,{id:f,index:0})),c(Jt(!1,f)));break;case"revenue":c(ca(!0)),f!=null&&(c(me(h,!0,pe,{id:f,index:0})),c(aa(!1,f)));break;case"net_burn_or_income":c(ia(!0)),f!=null&&(c(me(h,!0,pe,{id:f,index:0})),c(Wt(!1,f)));break;case"cash_position":c(ra(!0));break;case"top_expenses":c(sa());break;case"cash_in_cash_out":c(oa());break;default:throw new Error(`report type ${m} is not yet supported`)}}(a,u,g,t)},[t]),l.jsxs(l.Fragment,{children:[n==="Completed"?l.jsx(we,{analytics:E,onLoad:c=>((m,h)=>{const f=e.state?.referrer;switch(h){case"operating_expenses":m.trackPageLoaded(G.Event.operatingExpenses,f);break;case"revenue":m.trackPageLoaded(G.Event.revenues,f);break;case"net_burn_or_income":m.trackPageLoaded(G.Event.burnRate,f);break;case"cash_position":m.trackPageLoaded(G.Event.cashPosition,f);break;case"top_expenses":m.trackPageLoaded(G.Event.topExpenses,f);break;case"cash_in_cash_out":m.trackPageLoaded(G.Event.cashInCashOut,f);break;default:console.error(`Analytics: Not tracking Page Loaded for ${h}!`)}})(c,u)}):null,l.jsx(es,{firstMonthOfFY:g,fetchState:n,reportId:u,forecastId:t})]})}var et=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function tt(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function ka(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function Sa(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var St={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":et?173:189,"=":et?61:187,";":et?59:186,"'":222,"[":219,"]":221,"\\":220},te={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},ct={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},B={16:!1,18:!1,17:!1,91:!1},O={},Ue=1;Ue<20;Ue++)St["f".concat(Ue)]=111+Ue;var x=[],Lt=!1,ya="all",jt=[],Ne=function(e){return St[e.toLowerCase()]||te[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Mt(e){ya=e||"all"}function Ae(){return ya||"all"}var at=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;Sa(a).forEach(function(s){var i=s.split(r),d=i.length,p=i[d-1],_=p==="*"?"*":Ne(p);if(O[_]){t||(t=Ae());var g=d>1?ka(te,i):[];O[_]=O[_].filter(function(u){return!((!n||u.method===n)&&u.scope===t&&function(c,m){for(var h=c.length>=m.length?c:m,f=c.length>=m.length?m:c,k=!0,y=0;y<h.length;y++)f.indexOf(h[y])===-1&&(k=!1);return k}(u.mods,g))})}})};function Ut(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,B)Object.prototype.hasOwnProperty.call(B,r)&&(!B[r]&&a.mods.indexOf(+r)>-1||B[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||B[16]||B[18]||B[17]||B[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Yt(e,a){var t=O["*"],n=e.keyCode||e.which||e.charCode;if(U.filter.call(this,e)){if(n!==93&&n!==224||(n=91),x.indexOf(n)===-1&&n!==229&&x.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(m){var h=ct[m];e[m]&&x.indexOf(h)===-1?x.push(h):!e[m]&&x.indexOf(h)>-1?x.splice(x.indexOf(h),1):m==="metaKey"&&e[m]&&x.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(x=x.slice(x.indexOf(h))))}),n in B){for(var o in B[n]=!0,te)te[o]===n&&(U[o]=!0);if(!t)return}for(var r in B)Object.prototype.hasOwnProperty.call(B,r)&&(B[r]=e[ct[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(x.indexOf(17)===-1&&x.push(17),x.indexOf(18)===-1&&x.push(18),B[17]=!0,B[18]=!0);var s=Ae();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&Ut(e,t[i],s,a);if(n in O){for(var d=0;d<O[n].length;d++)if((e.type==="keydown"&&O[n][d].keydown||e.type==="keyup"&&O[n][d].keyup)&&O[n][d].key){for(var p=O[n][d],_=p.splitKey,g=p.key.split(_),u=[],c=0;c<g.length;c++)u.push(Ne(g[c]));u.sort().join("")===x.sort().join("")&&Ut(e,p,s,a)}}}}function U(e,a,t){x=[];var n=Sa(e),o=[],r="all",s=document,i=0,d=!1,p=!0,_="+",g=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(d=a.keyup),a.keydown!==void 0&&(p=a.keydown),a.capture!==void 0&&(g=a.capture),typeof a.splitKey=="string"&&(_=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(_)).length>1&&(o=ka(te,e)),(e=(e=e[e.length-1])==="*"?"*":Ne(e))in O||(O[e]=[]),O[e].push({keyup:d,keydown:p,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:_,element:s});s!==void 0&&!function(u){return jt.indexOf(u)>-1}(s)&&window&&(jt.push(s),tt(s,"keydown",function(u){Yt(u,s)},g),Lt||(Lt=!0,tt(window,"focus",function(){x=[]},g)),tt(s,"keyup",function(u){Yt(u,s),function(c){var m=c.keyCode||c.which||c.charCode,h=x.indexOf(m);if(h>=0&&x.splice(h,1),c.key&&c.key.toLowerCase()==="meta"&&x.splice(0,x.length),m!==93&&m!==224||(m=91),m in B)for(var f in B[m]=!1,te)te[f]===m&&(U[f]=!1)}(u)},g))}var nt={setScope:Mt,getScope:Ae,deleteScope:function(e,a){var t,n;for(var o in e||(e=Ae()),O)if(Object.prototype.hasOwnProperty.call(O,o))for(t=O[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;Ae()===e&&Mt(a||"all")},getPressedKeyCodes:function(){return x.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=Ne(e)),x.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(O).forEach(function(t){var n=O[t].find(function(o){return o.scope===a&&o.shortcut===e});n&&n.method&&n.method()})},unbind:function(e){if(e===void 0)Object.keys(O).forEach(function(s){return delete O[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&at(s)});else if(typeof e=="object")e.key&&at(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),at({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:St,modifier:te,modifierMap:ct};for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(U[ot]=nt[ot]);if(typeof window<"u"){var ts=window.hotkeys;U.noConflict=function(e){return e&&window.hotkeys===U&&(window.hotkeys=ts),U},window.hotkeys=U}U.filter=function(){return!0};var Gt=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function as(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,d=o.keydown,p=o.filterPreventDefault,_=p===void 0||p,g=o.enabled,u=g===void 0||g,c=o.enableOnContentEditable,m=c!==void 0&&c,h=b.useRef(null),f=b.useCallback(function(k,y){var C,A;return s&&!s(k)?!_:!!(Gt(k,["INPUT","TEXTAREA","SELECT"])&&!Gt(k,r)||(C=k.target)!=null&&C.isContentEditable&&!m)||!!(h.current===null||document.activeElement===h.current||(A=h.current)!=null&&A.contains(document.activeElement))&&(a(k,y),!0)},n?[h,r,s].concat(n):[h,r,s]);return b.useEffect(function(){if(u)return i&&d!==!0&&(t.keydown=!1),U(e,t||{},f),function(){return U.unbind(e,f)};U.unbind(e,f)},[f,e,u]),h}U.isPressed;const ns=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","zeni_accounts_promo_card","rewards_card","treasury_promo_card"],os=(e,a,t,n,o)=>({card:{dimension:Ct(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),Se=(e,a,t,n,o)=>({card:{dimension:Ct(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e}),ss=(e,a,t,n)=>Se(void 0,e,ye,a,t),rs=(e,a,t,n,o)=>({card:{dimension:Ct(ye),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),is=Q(function(e,a){const t=ds(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i,treasuryFundDetails:d,hasUserSeenTreasuryVideo:p,treasuryFetchState:_}=a;let g=n.map((u,c)=>{if(u==="reimbursement_promo_card"||u==="bill_pay_promo_card")return ss(t,u,c);if(u==="zeni_promo_card")return Se({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,ye,u,c);if(u==="treasury_promo_card")return rs(_,u,c,d,p);if(u==="information_card")return Se(void 0,"Completed",ye,u,c);{const m=o.find(h=>h?.reportId===u);return m?function(h,f,k,y){const C=h.reportId;switch(C){case"card_balance":case"cash_balance":return[os(h,f,k,C,y)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"zeni_accounts_promo_card":case"rewards_card":return[Se(h,f,k,C,y)];case"net_burn_or_income_story_card":return[Se(h,f,k,"net_burn_or_income_story_card",y)];default:return console.error(`card type ${C} not yet supported!`),[]}}(m,m.fetchState,ye,c):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(g=g.filter(u=>ns.includes(u.card.cardType)==0).filter(u=>{const c=u.data?.availableNumberOfPeriods;return c!=null?c>0:u.card.cardType!="top_expenses"||u.data==null||function(m){if(m==null||m.length===0)return!0;let h=!0;for(const f of m)if(f.balance.available.amount!==0){h=!1;break}return h}(u.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:g,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:ae(e,"navbar")},analytics:E,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=R.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)E.trackDashboardCardClicked("cards promo",2),E.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&E.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(E.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isZeniAccountEnabled===!1&&s.push("zeni_accounts_promo_card"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),function(i,d,p,_){switch(d){case"card_balance":i(qt());break;case"cash_balance":i($t());break;case"operating_expenses":i(la(!0));break;case"revenue":i(ca(!0));break;case"net_burn_or_income":i(ia(!0));break;case"net_burn_or_income_story_card":i(Wn(!0));break;case"cash_position":i(ra(!0));break;case"top_expenses":i(sa());break;case"cash_in_cash_out":i(oa());break;case"insights_dashboard":i(Qn());break;case"bill_pay_card":i(Hn());break;case"reimbursement_card":i(Zn());break;case"company_details":i(qn(p));break;case"task_card":i(Kn());break;case"accounts_payable_aging":_.includes("accounts_payable_aging")===!1&&i(rt(he()));break;case"accounts_receivable_aging":i(it(he()));break;case"zeni_accounts_promo_card":_.includes("zeni_accounts_promo_card")===!1&&i(Kt());break;case"rewards_card":_.includes("rewards_card")===!1&&i($n(!0));break;default:throw new Error(`report type ${d} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{E.trackTimeframeSwitch(Ca(r),ls(o),"Dashboard"),function(s,i,d){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(fe(d));break;case"top_expenses":s(na(d));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(zn(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:(o,r)=>{if(o==="bill_pay_promo_card"){const s="../bills",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){R.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(E.trackUpdateBurnRateCalculatorSettings(r,s,Vn(s)),e(Nn(t,r,s)))},onVideoPlay:()=>{e(Bt())},onVideoClose:()=>{e(Bt()),e(Gn())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ne({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(H("navbar"))},onCancelAutoComplete:()=>{e(H("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?se(o,a.tenantEmailDomain):Co(o.zeniId,o.qboId,a.tenantEmailDomain);const s=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(go);function cs(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=ma(),t=Z(),n=N(),o=q(),r=R.getSignedInUser(),{useFeatureGate:s,useDynamicConfig:i}=Ve(),d=Ee(r),[p,_]=b.useState(!1),[g,u]=b.useState(!1),c=pa(),{tenantEmailDomain:m}=$(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:f}=X({mobileExploreReferrer:"Dashboard"}),k=S(v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?L(v):void 0),y=k??R.getSignedInUserTenant(m),C=y.tenantId,A=y.companyId;b.useEffect(()=>{p===!1&&o.state?.message==="activation"&&(n(Bn(A)),_(!0))},[o.state,p,A,n]),b.useEffect(()=>{c&&!g&&o.state?.message==="open_ai_cfo_drawer"&&(a(!0),u(!0),t(o.pathname,{replace:!0,state:{...o.state,message:void 0}}))},[o.state,g,c,a,t,o.pathname]);const{isFeatureEnabled:T}=s(j.isApAgingFeatureEnabled),{isFeatureEnabled:M}=s(j.isExpenseAutomationEnabled),{isFeatureEnabled:F}=s(j.isExpenseAutomationEnabledV2),I=F||M&&d,{isFeatureEnabled:z}=s(j.isTreasuryEnabled),de=po(I),{isFeatureEnabled:be}=s(j.isArAgingFeatureEnabled),{isFeatureEnabled:P}=s(j.isDepositAccountsFeatureEnabled),{isFeatureEnabled:J}=s(j.isReferralFeatureEnabled),{isFeatureEnabled:Be}=s(j.isChargeCardFeatureEnabled),{isFeatureEnabled:ze}=s(j.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Aa}=s(j.isDashboardSidebarNewYearAnimationEnabled),{configValue:yt}=i(ha.zeniCardsConfig),va=yt.charge_card_cashback_rate_per_transaction==null?.0175:yt.charge_card_cashback_rate_per_transaction;if(o.state?.message==="activation"){const v=ho(o.state?.pathnameStackToGoBack);t(o.pathname,{state:{...o.state,message:void 0,pathnameStackToGoBack:v.newStack}})}const[At,Ea]=b.useState(!1),[$e,Ia]=b.useState(!1);as("command+p, Control+p",v=>{Ia(!$e),v.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[$e]);const vt=k?.externalConnections?.accounting[0]?.isValid;if(r==null)throw Error("Can't access dashboard without signing in...");const re=S(v=>L(v)?.excludedResources),Ta=S(v=>v.expenseAutomationViewState.selectedPeriodByTenantId),xa=!!k?.companyReimbursementInfo?.info?.isReimbursementEnabled,wa=!!k?.companyBillPayInfo?.info?.isBillPayEnabled,Da=S(v=>v.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Fa=k?.company!=null&&Rn(k.company),Ke=z&&Fa,qe=De(),Oa=lt(qe?.loggedInUserRoleMap),Y=[],Et=re?.resources?.find(v=>v.resource==="/reports/top_expenses")==null,Pa=re?.resources?.find(v=>v.resource==="/reports/task_card")==null,Ze=k?.userRole!=null&&ea(k?.userRole),Ba=re?.resources?.find(v=>v.resource==="/bills")==null&&!Ze,Ra=re?.resources?.find(v=>v.resource==="/reimbursements")==null,La=Ln(qe?.loggedInUserRoleMap),ja=jn(qe?.loggedInUserRoleMap),Ma=k?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,Ua=k?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,Ya=S(v=>v.treasurySetupViewState.treasuryFundsDetails).fundsDetails;Et===!1&&Y.push("top_expenses"),Pa===!1&&Y.push("task_card"),Ba===!1&&Y.push("bill_pay_card","bill_pay_promo_card"),T===!1&&Y.push("accounts_payable_aging"),be===!1&&Y.push("accounts_receivable_aging"),(I===!1||Ze)&&Y.push("expense_automation_card"),Ra===!1&&Y.push("reimbursement_card","reimbursement_promo_card"),P===!1&&Y.push("zeni_accounts_promo_card"),J===!1&&Y.push("rewards_card"),Ke===!1&&Y.push("treasury_promo_card");const{areTenantIdsInSync:It}=fo();b.useLayoutEffect(()=>{At&&de===I||vt!==!0||!It||re?.fetchState!=="Completed"&&re?.fetchState!=="Error"||(Ea(!0),n(Mn(r.userId,A,C,!0,!1,Y)))},[At,r,C,n,Et,vt,re?.fetchState,It]);const Ga=S(v=>v.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Va=S(v=>v.revenueState.uiState.selectedForecast?.id),Na=S(v=>v.cardBalanceState.fetchState),ue=S(v=>Un(v,Y,r,F,M,Ke)),za=ue.fetchState;Fe({isDataReady:!0});const Tt=k?.isTreasuryVideoViewed===!0||ue.isTreasuryVideoClosed===!0;return l.jsxs(l.Fragment,{children:[za==="Completed"?l.jsx(we,{analytics:E,onLoad:v=>{v.trackPageLoaded(G.Event.dashboard),Ke&&!Tt&&v.trackTreasuryPromoView("Dashboard Promo Video")}}):null,l.jsx(is,{maxColumns:e?2:void 0,isAiCfoAccessEnabled:h,onAskAiCfoClick:f,onDragAndDropCard:(v,$a)=>{const xt=function(Re,He,Le){const Qe=Le.indexOf(Re),We=Le.indexOf(He);if(Qe===-1||We===-1||Qe===We)return Le;const Xe=[...Le];return Xe.splice(Qe,1),Xe.splice(We,0,Re),Xe}(v,$a,ue.cardsOrdered);xt.some((Re,He)=>Re!==ue.cardsOrdered[He])&&n(Yn(xt))},dashboardReport:ue,passedCardsOrdered:ue.cardsForDashboardUI,tenantId:C,companyId:A,tenantEmailDomain:m,location:o,navigate:t,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:be,isBillPayEnabled:wa,isReimbursementEnabled:xa,isSummaryCardsFiltered:$e,isForecastOn:Ga,selectedForecastOnDashboard:Va,isVisitingFirstTime:p,isZeniAccountEnabled:P,isRewardsFeatureEnabled:J,hasZeniAccountsAdminAccess:Oa,isExpenseAutomationEnabledForUser:I&&Ze===!1,selectedPeriod:Ta[C],isChargeCardFeatureEnabled:Be,isUserHasCardsAccess:La,isUserHasTreasuryAccess:ja,cardsCreditLimit:Ma,cashbackRate:va,isInterestedInChargeCard:Ua,cardBalanceFetchState:Na,christmasAnimationEnabled:ze,newYearAnimationEnabled:Aa,treasuryFundDetails:Ya,hasUserSeenTreasuryVideo:Tt,treasuryFetchState:Da})]})}const ls=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},ds=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function Ms(){const e=De(),a=e?.excludedResources?.find(p=>p.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=Ve(),{isFeatureEnabled:n}=t(j.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(j.isArAgingFeatureEnabled),r=S(p=>L(p)),{isFeatureEnabled:s}=t(j.isDebitCardFeatureEnabled),i=Xn(s,r),d=Jn(r);return i===!0||d===!0?l.jsx(st,{children:l.jsx(w,{path:"/*",element:l.jsx(So,{})})}):l.jsxs(st,{children:[l.jsx(w,{path:"/",element:l.jsx(cs,{})}),l.jsx(w,{path:"cash_balance/*",element:l.jsx(Rt,{})}),l.jsx(w,{path:"card_balance/*",element:l.jsx(Rt,{})}),l.jsx(w,{path:"operating_expenses/*",element:l.jsx(ee,{})}),l.jsx(w,{path:"operating_expenses/forecast/*",element:l.jsx(Je,{})}),l.jsx(w,{path:"revenue/forecast/*",element:l.jsx(Je,{})}),l.jsx(w,{path:"revenue/*",element:l.jsx(ee,{})}),l.jsx(w,{path:"net_burn_or_income/forecast/*",element:l.jsx(Je,{})}),l.jsx(w,{path:"net_burn_or_income/*",element:l.jsx(ee,{})}),n===!0&&l.jsxs(l.Fragment,{children:[l.jsx(w,{path:"accounts_payable_aging/*",element:l.jsx(vo,{})}),l.jsx(w,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:l.jsx(Ao,{})})]}),o&&l.jsxs(l.Fragment,{children:[l.jsx(w,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:l.jsx(Eo,{})}),l.jsx(w,{path:"accounts_receivable_aging/*",element:l.jsx(Io,{})})]}),l.jsx(w,{path:"cash_position/*",element:l.jsx(ee,{})}),l.jsx(w,{path:"top_expenses/*",element:a===!0?l.jsx(ee,{}):l.jsx(ve,{})}),l.jsx(w,{path:"cash_in_cash_out/*",element:l.jsx(ee,{})}),l.jsx(w,{path:"company_details",element:l.jsx(ko,{})}),l.jsx(w,{path:"referrals/*",element:l.jsx(yo,{})}),l.jsx(w,{path:"*",element:l.jsx(ve,{})})]})}export{Ms as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-D5IOuNv9.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-DSm5EncT.js";import{MT as k,M_ as O,fC as J,fB as Q,fA as W,iz as q,J$ as K,pH as L,eQ as V,Mp as D,ix as T,MU as S,N1 as F,iv as G,iS as j}from"./zeni-epic-state-RX9kBvT9.js";import{bn as X,Z as N,y as R,z as U,m as Z,k as b,S as v,x as _,bo as Y,o as z,bp as ee,r as te}from"./index-Cu6TX6T-.js";import{n as H}from"./mui-aAb3ZK4t.js";import"./sentry-Ctx5hlxQ.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]="78a1ffe5-fe7c-47d5-961c-f07dd2c7ea2d",e._sentryDebugIdIdentifier="sentry-dbid-78a1ffe5-fe7c-47d5-961c-f07dd2c7ea2d")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(Q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(O(n,a,o))}}})(X);function M({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=b(a.state?.pathnameStackToGoBack),r=s.poppedPathname??E();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=b(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??E(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,{useFeatureGate:d}=R(),c=U.getSignedInUser(),p=h(u=>V(u)),g=Z(),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,i)),{isFeatureEnabled:I}=d(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(_,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(M,{vendorId:i,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:p,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},$=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return $(e,"ach",t,n)}function ve(e,t,n){return $(e,"domestic",t,n)}function ge(e,t,n){return $(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},de=H.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:i}=r;return{onFetchBankName:d=>{e(j(d))},onSaveHandler:d=>{e(G(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:c}=d;e(F({data:c}))},onCancel:()=>{(()=>{const d=b(o.state?.pathnameStackToGoBack),c=d.poppedPathname??P();a(c,{state:{pathnameStackToGoBack:d.newStack}})})(),e(S())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(i,d,n),p=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:p}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=b(t.location.state?.pathnameStackToGoBack),c=d.poppedPathname??P(0);t.navigate(c,{state:{pathnameStackToGoBack:d.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,d=U.getSignedInUser(),{useFeatureGate:c}=R(),p=Z(),g=h(u=>V(u)),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,i)),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(_,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:p.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${p.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(M,{vendorId:i,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,M as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-D5IOuNv9.js";import{Z as c,F as l,m as f}from"./index-Cu6TX6T-.js";import{D as b}from"./mui-aAb3ZK4t.js";import"./sentry-Ctx5hlxQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b5be3e28-c03d-4845-afab-c42c4b43f04b",e._sentryDebugIdIdentifier="sentry-dbid-b5be3e28-c03d-4845-afab-c42c4b43f04b")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=c(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D5IOuNv9.js";import{a as d}from"./sentry-Ctx5hlxQ.js";import{j as B,h as G,u as q,l as K,g as l,N as F,k as O,n as _,o as N}from"./core-DSm5EncT.js";import{L6 as H,eQ as $,Kv as J,kC as L,H4 as C,Lb as M,J_ as R,jC as W,H5 as S,KA as Y,KB as z,K0 as Q,J$ as V}from"./zeni-epic-state-RX9kBvT9.js";import{aO as U,e as X,k as Z,r as tt}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import{d as k}from"./decodeURIComponentSafe-B2XNfwZK.js";import{w as et}from"./withTransactionSidePanel-gQ2IORZA.js";import{e as at,b as nt}from"./routePaths-CTVn-kRm.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";import"./useAskAiCfoHostNavButtonProps-Cwg-MURp.js";import"./useFetchSuggestedQuestionsWhenReady-CmADrtlH.js";import"./TransactionDetailScreen-DRU44gV_.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]="ff8535d6-d554-4068-aaf1-b8ef8f62d631",a._sentryDebugIdIdentifier="sentry-dbid-ff8535d6-d554-4068-aaf1-b8ef8f62d631")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:R(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:W(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Q({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(V("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Y()),a(z()),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(C(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:j,entityNameEncoded:x}=K(),r=k(j??""),f=k(x??""),p=rt(r,f),v=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l(n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>$(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>J(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(L(i)))},[m,p,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,A=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(C(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(v.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(_,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-D5IOuNv9.js";import xn from"./NotFoundScreen-BT06WKNU.js";import{a,b as Tt}from"./sentry-Ctx5hlxQ.js";import{n as Fe,S as Rn}from"./mui-aAb3ZK4t.js";import{h as ce,j as wt,u as qe,g as U,k as Dn,l as rt,n as Un,o as ze}from"./core-DSm5EncT.js";import{eQ as Re,Pq as Fn,mH as Se,fg as Bn,qi as _n,mZ as xt,ni as Rt,Pr as Dt,ns as Mn,Ps as Ut,mS as On,pQ as Vn,e$ as pe,Pt as De,so as Ft,Bz as Bt,Pu as _t,Pv as jn,pv as Je,L7 as dt,L9 as zn,jF as Ln,La as $n,jM as Gn,cW as qn,tr as Ne,n3 as Mt,nx as Ue,Pw as Jn,K0 as ut,J$ as Te,Px as mt,k1 as Nn,Py as Yn,Pz as Kn,PA as Qn,PB as Hn,na as Wn,mX as ie,nA as we,PC as Zn,PD as Xn,PE as ea,nH as ta,jQ as na,jH as aa,PF as oa,jP as ht,Lh as sa,PG as ca,PH as ia,pr as la,p6 as ra,ny as ge,p5 as Le,PI as da,PJ as ua,lk as ma,bq as ha,lf as pt,l1 as pa,PK as ga,gO as gt,fS as Ca,lc as Sa,vk as Ia,PL as fa,o6 as ka,o1 as Ea,o5 as va,nS as ya,PM as ba,f2 as Ot,nl as Pa,n6 as Aa,fh as Ct,nC as Ta,PN as wa,nz as Vt,PO as xa,PP as Ra,PQ as Da,PR as Ua,PS as St,pD as Fa,oY as Ba,J_ as _a,jO as Ma,PT as Oa,G5 as Va,jN as ja,jC as za,f1 as La,ox as jt,oQ as $a,nw as It,nB as Ga,bE as qa,l9 as Ja,l6 as Na,PU as Ya,nR as ft,oO as kt,oM as Ka,oC as Qa,oh as Ha,oP as Wa,PV as Za,PW as Xa,ol as eo,PX as to,ob as no,ok as ao,oi as oo,oT as so}from"./zeni-epic-state-RX9kBvT9.js";import{y as zt,S as Ce,e as z,r as H,U as Lt,cw as co,z as Be,cx as io,aq as xe,cy as lo,aQ as Et,x as $t,cz as ro,an as $e,D as uo,cA as mo,X as ho,cB as po,T as go,cC as Co,cD as So,v as Io,d as fo,aK as ko,b1 as Eo,F as vo,cE as yo}from"./index-Cu6TX6T-.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-Cwg-MURp.js";import{c as qt}from"./useFetchSuggestedQuestionsWhenReady-CmADrtlH.js";import{c as vt,C as bo}from"./TransactionDetailScreen-DRU44gV_.js";import{w as Po}from"./withTransactionSidePanel-gQ2IORZA.js";import{h as Ao,v as To}from"./routePaths-CTVn-kRm.js";import{g as Ge}from"./accountMappingHelper-BMO3_Hcn.js";import{D as wo}from"./DrawerScreen-D2pv5LV4.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";import"./decodeURIComponentSafe-B2XNfwZK.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]="d6437a37-149f-4501-bb90-f1a5e584a508",t._sentryDebugIdIdentifier="sentry-dbid-d6437a37-149f-4501-bb90-f1a5e584a508")}catch{}})();const xo=()=>{const t=ce(),i=wt(),P=qe(),f=U(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Fn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=P.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=P.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(P.state?.pathnameStackToGoBack,P.pathname),A=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=P.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:A,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=Fe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Do=Tt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:P,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=ce(),u=Be.getSignedInUser(),o=U(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:y,statementUploadChosen:r}=t,B=m[i],h=B?.accountReconEntity.statementMetaData?.statementUploadId,A=(e,n)=>{g(Vn(e,n.split(".")[0]))},I=e=>{h!=null&&g(On({accountId:i,selectedPeriod:y,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(Mn({accountId:i,selectedPeriod:y,payload:e}))},K=e=>{g(Ut({accountId:i,selectedPeriod:y,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),V=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),_=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return B!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:y,onDismissClick:P,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:A,onDeleteFile:I,onSelectSourceType:K,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):_!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(lo,{excludedAccountReconciliation:_,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:V})})}):null}),yt=Fe.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,bt=Fe.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
`;function Uo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:P,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=U(u=>jn(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(ro,{onCloseClick:i,addCustomerRequest:P,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const Fo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Bo,comma:Pt,space:_o}},dateFormat:Jt}=uo.getLocalizedStrings(),At=so,Mo=Dn(function(t,i){const{uncategorizedAccounts:P,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,y={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=pe(t),{selectedTransactionCategorizationTab:B}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:B,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:P,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:P,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:y,navigate:r,onClickCustomerRequest:B,handleEditClick:h,setActivityLogTransactionId:A}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:K}=S.jeSchedules,te=Mt(I),V=Ue(te.start),_=Ue(te.end);return{onZeniLogoClick:()=>{P.toggle()},onUploadReceiptAttachment:e=>{z.trackMissingReceiptAttached(I.month,I.year),t(Ba(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const b=()=>t(St(e,n,{fetchState:"Error"}));po(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(T=>{T!=null?t(Fa(e,T)):b()}).catch(b)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ua(e,n)),m!=null&&t(Se({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Da(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?_o+Bo+l+Pt:Pt}]}))},onUpdateJESchedulesUIState:e=>{t(Ra(e))},onUpdateMissingReceiptsUIState:e=>{t(xa(e))},onFetchMissingReceiptsList:()=>{_!=null&&V!=null&&t(Vt({start:V,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(eo(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Za(e))},onSetBulkUploadCompletedSubTab:e=>{t(Wa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ha())},onSearchTransactionsForManualMatch:(e,n)=>{t(At(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(At(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Qa(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(wa())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Le({selectedTab:s,uiState:{searchString:e}})),_!=null&&V!=null&&t(ge(s,{start:V,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(Ta(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Aa(e))},onSaveReconciliationReview:e=>{t(Pa(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(Ot(e))},handleLogOutClick:()=>{const e=H(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=Ge(K.prepaidExpensesAccountList,s.selectedOptions),b=Ge(K.fixedAssetsAccountList,l.selectedOptions),T=Ge(K.accruedExpensesAccountList,k.selectedOptions),M={selectedPrepaidExpensesAccountIds:p.map(w=>w.accountId),selectedFixedAssetsAccountIds:b.map(w=>w.accountId),selectedAccruedExpensesAccountIds:T.map(w=>w.accountId)};t(ba({data:M}))},onSaveJeAccountSettingsClick:()=>{t(ya())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:b}=n,{allAccountList:T,allClassList:M,allDepreciationAccountList:w}=S.jeSchedules,$=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find(G=>G.id===b?.selectedOption):void 0,Ie={id:$?.zeniId??b?.selectedOption??"",name:$?.name??b?.defaultOptions.find(G=>G.value===b?.selectedOption)?.label??"",logo:$?.logo},fe=p?.selectedOption!=null?T.find(G=>G.qboId===p.selectedOption):void 0,ke=k?.selectedOption!=null?M.find(G=>G.classId===k.selectedOption):void 0,ne=l?.selectedOption!=null?w.find(G=>G.qboId===l.selectedOption):void 0;t(va({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:fe?.accountId,updatedClassId:ke?.classId,updatedAccumulatedDepreciationCategoryID:ne?.accountId,updatedVendor:{id:Ie.id,name:Ie.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ea(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Te("common"))},onCancelAutoComplete:()=>{t(Te("common"))}},onPostJESchedule(e,n){t(ka({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(fa())},handleJeScheduleClick:(e,n,s)=>{t(Ia({selectedJEScheduleKey:n}));const l=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(Sa(e,m.companyId,m.tenantId))},onClickCustomerRequest:B,setActivityLogTransactionId:A,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ca())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(ga(e))},onUpdateFileAttachment:e=>{t(pa({files:e}))},previewMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(ma(m.companyId,e,m.tenantId)),z.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,ha().format(Jt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,b,T,M,w,$)=>{t(ua(e,n,s,l,y,k,p,b,T,M,w,$,f))},onCancelAutoComplete:()=>{t(Te("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),_!=null&&V!=null&&(t(ge(e,{start:V,end:_},!1,!1)),t(da(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n})),_!=null&&V!=null&&t(ge(e,{start:V,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,b)=>{_!=null&&V!=null&&t(ge(e,{start:V,end:_},!0,s,n,l,k,p,b))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,b,T)=>{t(ra(e,n,s,l,T??null,k,p,!1,b))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:y,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?z.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):z.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(la(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(ia({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,b)=>{const{transactionId:T,transaction:M,lineIds:w}=n;p!=null&&t(sa({transactionId:T,customerUpdates:p})),t(ca({selectedTab:l,transactionId:T.id,lineId:w[0],selectedTransaction:M,uncategorizedAccounts:y,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ne(k,e,n,s,!0,E,b))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,b)=>{const{transactionId:T,transaction:M,lineIds:w}=n;p!=null&&(t(na({transactionId:T,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(aa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:T.id,lineId:w[0],selectedTransaction:M,uncategorizedAccounts:y,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ne(k,e,n,s,!0,E,b))):t(oa({selectedTab:l,transactionId:T.id,lineId:w[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{z.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(ta(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ea(e))},updateOperatingExpensesIdsForReview:e=>{t(Xn({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=To(e.id,e.qboId,i.tenantEmailDomain),s=H(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Zn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(we(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(ie(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ie(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Wn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Qn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Kn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Nn(l)),t(Yn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,Je("bill"));const n=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Te("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Jn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,P)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=P;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,y,r)=>{u.onUploadTransactionReceipt(v,S,m,y,r,g.authParams)}}}(t,i,E)})(mo),Oo=Po(function(t){const i=t.displayName??t.name??"Component",P=Tt.memo(t),f=E=>{const g=ce(),u=function(){const A=ce(),I=U(d=>pe(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{A(De({selectedDrawerAccountId:d}))},[A]),closePanel:a.useCallback(()=>{A(De({selectedDrawerAccountId:void 0}))},[A])}}(),o=U(A=>pe(A).reconciliation),v=U(A=>Re(A)),S=a.useCallback((A,I)=>{g(Ft("expense_automation_reconcile",A,I))},[g]),m=a.useCallback((A,I)=>{const d=v?.companyId;d!=null&&(g(Bt(A,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),y=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Do,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[y,u.isOpen,u.closePanel]),B=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:B,[u.isOpen,u.closePanel,u.selectedAccountId,B]);return C.jsx(Et.Provider,{value:h,children:C.jsx(P,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:P,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=go(),m=Co(),{isOpen:y}=So(),r=wt(),B=qe(),h=ce(),{isAiCfoAccessEnabled:A,onAskAiCfoClick:I}=Gt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=Lt(),K=(()=>{const c=U(q=>pe(q)),j=qe(),{currentSelectedViewFetchState:Y,currentSelectedView:O,selectedPeriod:F}=c,he=$e(O),X=$e(Y.fetchState),be=a.useCallback(q=>{const Q=j.state?.referrer;O==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?z.trackTransactionsReviewPage(F.month,F.year,c.transactionView.totalCountByTab.review,0,q,Q??null):z.trackTransactionsAutoCategorisedPage(F.month,F.year,c.transactionView.totalCountByTab.autoCategorized,0,q,Q??null)),O==="missing_receipts"&&z.trackMissingReceiptsPage(F.month,F.year,q,c.missingReceipts.transactions.length,Q??null),O==="je_schedules"&&z.trackMonthCloseScheduleListPage(F.month,F.year,q,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,Q??null),O==="flux_analysis"&&z.trackFluxAnalysisPage(F.month,F.year,q,Fo(c.fluxAnalysis),Q??null),O==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&z.trackInsightsEmailPage(F.month,F.year,q,"draft",c.auditSummary.auditScorePercentage,null,Q??null)},[F,c]);return a.useEffect(()=>{X===Y.fetchState&&O===he||Y.fetchState!=="Completed"||be(!1)},[O,Y.fetchState,he]),be})(),te=Io(),[V,_]=a.useState(!1),e=U(c=>dt(c)),n=U(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[b,T]=a.useState([]),[M,w]=a.useState(void 0),$=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),w(c)},[d,v,m,S]),Ie=a.useCallback(()=>{m(),w(void 0),d(),I()},[d,I,m]),fe=a.useRef(v);a.useEffect(()=>{v===!0&&fe.current===!1&&(m(),w(void 0),d()),fe.current=v},[d,v,m]);const ke=a.useRef(y);a.useEffect(()=>{y===!0&&ke.current===!1&&(v&&S(!1),w(void 0),E===!0&&f!==!0&&t?.()),ke.current=y},[t,y,v,S,f,E]);const ne=E===!0&&f!==!0,G=a.useRef(ne);a.useEffect(()=>{ne&&!G.current&&(v&&S(!1),m(),w(void 0)),G.current=ne},[v,ne,m,S]);const[Ye,Nt]=a.useState(!1),Ke=a.useRef(!1),{selectedTab:Qe}=rt(),{tenantEmailDomain:Yt}=rt(),[_e,He]=a.useState(B.state?.message==="comingFromTransactionDetail"),We=B.state?.message==="comingFromOverview",Kt=fo(),Me=Be.getSignedInUser(),{useDynamicConfig:Qt,useFeatureGate:Ee}=zt(),{configValue:Ht}=Qt(ko.enableUncategorizedExpenseCategory),W=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=Ee(Ce.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:le}=Ee(Ce.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=Ee(Ce.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=Ee(Ce.isExpenseAutomationCommentingEnabled),Zt=a.useCallback(c=>{const j=Je(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,j)},[i]),Xt=U(c=>_a(c,"common")),L=U(c=>pe(c)),{monthEndCloseChecksView:N,currentSelectedView:x,selectedPeriod:D,selectedTransactionCategorizationTab:ae,currentSelectedViewBackgroundRefreshFetchState:en,currentSelectedViewFetchState:Z,jeSchedules:Oe,reconciliation:tn}=L;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||$(void 0)},[x,$,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==ae&&(ve.current=ae,x==="transaction_categorization"&&$(void 0)):ve.current=ae},[x,ae,$]);const nn=U(c=>M==null?void 0:Ma(c.transactionState,M)),oe=nn?.qboId,an=U(c=>oe==null?void 0:Oa(c,oe));a.useEffect(()=>{oe!=null&&h(Va(oe))},[h,oe]);const{selectedAccountId:re}=tn,et=$e(Oe.accountSettingsView.saveState.fetchState),on=U(c=>ja(c.accountState,c.accountListState,"accountList")),sn=U(c=>za(c)),de=Qe!=null?La(Qe):x,cn=U(c=>c.entityAutoCompleteState.autoCompleteText.common);if(qt({isDataReady:Z.fetchState==="Completed"}),Me==null)throw Error("Can't access expense automation screen without signing in...");const tt=Mt(D),ue=Ue(tt.start),me=Ue(tt.end);if(ue==null||me==null)throw Error(`Invalid start - ${ue} and end - ${me} period from given ${D}`);const ln=a.useCallback(()=>{l(!1)},[]),rn=a.useCallback(()=>{p(!0)},[]),dn=a.useCallback(c=>{T(c),p(!1)},[]),un=a.useCallback(()=>{T([])},[]),ye=L.missingReceipts.bulkUpload.phase,nt=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{le===!0&&x==="missing_receipts"&&ye==="matching"&&nt!=null&&h(jt({cacheOverride:!0}))},[le,x,ye,nt,h]);const at=Me?.userId,mn=D.month,hn=D.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&le!==!1&&ye==="idle"&&at!=null&&ot!=null&&h($a())},[x,le,ye,at,ot,mn,hn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?_(!0):_(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{de!=null&&x!==de&&h(Ot(de))},[de]),a.useEffect(()=>{Ye!==!1||Z.fetchState!=="Completed"&&Z.fetchState!=="Error"||!R||(Nt(!0),h(It(!1,!1,W)))},[Ye,Z,R,W]),a.useEffect(()=>{!We&&R&&(h(It(!1,!1,W)),h(ie(D,re,!1,!1)))},[D.month,D.year,R,W]);const st=a.useCallback((c=!1,j=!1)=>{const Y={start:ue,end:me};switch(x){case"transaction_categorization":h(ge(ae,Y,c,!_e,void 0,void 0,j,void 0,W)),He(!1);break;case"flux_analysis":h(we(D,c,j,null));break;case"month_end_insights":if(j===!1){const O=new Date(D.year,D.month,0),F=qa(O.toDateString()).format(Jt.analytics.YYYYDashMMDashDDFormat);h(Ja(!0,n.companyId,n.tenantId,F)),h(Na(n.companyId,n.tenantId))}break;case"je_schedules":h(Ga(Y,j));break;case"missing_receipts":h(Vt(Y,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,j));break;default:h(ie(D,re,c,j))}},[x,ue,me,n.companyId,n.tenantId,ae,D,re,_e,He,W]);a.useEffect(()=>{x===de&&Z.fetchState==="Not-Started"&&R&&st(!0)},[Z,ue,me,n.companyId,n.tenantId,R]),a.useEffect(()=>{We||_e||Ke.current||en.fetchState==="In-Progress"||Z.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),a.useEffect(()=>{N.fetchState!=="In-Progress"&&N.fetchState!=="Completed"&&h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!1}))},[N.fetchState,n.tenantId]),a.useEffect(()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!0})),h(Ya({companyId:n.companyId})),r("../"))},[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,D,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{N.fetchState!=="In-Progress"&&N.fetchState==="Completed"&&h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[N.fetchState,n.tenantId,D,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&re==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(ie(D,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,ie,re,D]);const pn=vt();a.useEffect(()=>{const c=(N.monthEndCloseChecks?.monthEndCloseCheckList.find(j=>j.id==="month_end_insights")?.isDisabled??!1)&&!Ze;x!=="month_end_insights"||!c&&N.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,N.monthEndCloseChecks]);const gn=u===!0?g:P,Cn=u===!0||E===!0,Sn=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&Oe.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,Oe.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:c,closeDrawerHandler:j,currentSelectedView:Y})=>{const O=ce();let F,he,X;const be=vt(),q=c.transactionView;let Q=()=>{};const{transactions:vn,selectedTransactionId:se,selectedTransactionLineId:Pe,transactionLocalData:yn}=q;if(Y==="transaction_categorization"){const Ve=yn.find(ee=>ee.transactionId===se),J=vn.find(ee=>ee.id===se),it=Pe!=null?Ve?.transactionReviewLocalData?.lineItemById[Pe]:void 0,lt=it?.account;he=it?.class?.classId,F=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const Pn=Ao(se,J?.typeOfTransaction);J!=null&&Pn&&(X={id:se,type:Je(J.typeOfTransaction)}),Q=()=>{if(se!=null&&Pe!=null&&J!=null){const ee=q.transactionLocalData.find(Ae=>Ae.transactionId===se)?.transactionReviewLocalData;if(ee!=null&&J.lines!=null&&J.lines.length>0){const Ae=ee.lineItemById[Pe];let je=ee.selectedEntity;if(qn(J)||(je=Ae.selectedEntityLine),je!=null){const An=je,Tn={transactionId:{id:J.id,type:J.type},transaction:J,lineIds:J.lines.map(wn=>wn.id)??[]};O(Ne(An,Ae.amount.amount,Tn,!1,!0,be))}}}}}const bn=U(Ve=>dt(Ve,void 0,F,he));return{transactionId:X,onSaveVendor:()=>{O(Gn(X,void 0,!1,!0))},onSaveSuccess:Q,onCancel:()=>{X!=null&&O(zn({transactionId:X})),O(Ln()),O($n()),j()},vendorViewDetails:bn}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{_(!1)},currentSelectedView:x});return Kt?.loggedInUserRoleMap==null?N.fetchState==="Error"?C.jsx(Eo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(wo,{isOpen:k,drawerLeftMargin:new vo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(Vo,{onClick:c=>c.stopPropagation(),children:C.jsx(Uo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&V&&C.jsx(bo,{isOpen:V,transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}),C.jsx(Mo,{navigate:r,location:B,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:Xt},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:le,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:b,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:W,isAccountingClassesEnabled:sn,isCOTEnabled:pn,currentTenant:n,companyId:n.companyId,signedInUser:Me,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?M:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&M!=null?C.jsx(yo,{activityLogView:an,qboId:oe,onClose:()=>$(void 0),selectedTransactionId:M},String(M)):null,uncategorizedAccounts:on,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Yt,trackExpenseAutomationTabAnalytics:K,setActivityLogTransactionId:$,closeSidePanel:Sn,openTransactionPanel:i,sidePanelIsOpen:Cn,sidePanelIsFullView:u!==!0&&f,panelContent:gn,isAiCfoAccessEnabled:A,onAskAiCfoClick:Ie,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:Zt,sidePanelListPercent:u===!0?66:void 0})]})})),Vo=Fe(Rn)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function rs(){return C.jsxs(Un,{children:[C.jsx(ze,{path:"*",element:C.jsx(xo,{})}),C.jsx(ze,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Oo,{})}),C.jsx(ze,{path:"*",element:C.jsx(xn,{})})]})}export{rs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D5IOuNv9.js";import{a as r}from"./sentry-Ctx5hlxQ.js";import{Y as i,$ as l,a0 as p,k as m}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import f from"./NotFoundScreen-BT06WKNU.js";import{j as u,u as b}from"./core-DSm5EncT.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]="38164943-7e55-44dc-9548-c9d1b513ec33",e._sentryDebugIdIdentifier="sentry-dbid-38164943-7e55-44dc-9548-c9d1b513ec33")}catch{}})();const D=()=>{const e=u(),t=b(),o=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(t.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),a=i(t.pathname);return a!=null?s.jsx(l,{menuItem:p(a),onDemoClick:o,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t};export{D as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Ctx5hlxQ.js";import{h as l,j as f,u as m}from"./core-DSm5EncT.js";import{gv as p,Jc as g,Jd as b}from"./zeni-epic-state-RX9kBvT9.js";import{u as _,L as h,z as y}from"./index-Cu6TX6T-.js";import"./liveblocks-D5IOuNv9.js";import"./recharts-sq8NMPEu.js";import"./mui-aAb3ZK4t.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.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]="b08a22db-e1b7-48cc-aff0-08c345244467",e._sentryDebugIdIdentifier="sentry-dbid-b08a22db-e1b7-48cc-aff0-08c345244467")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=_(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,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{C as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-D5IOuNv9.js";import{a as g}from"./sentry-Ctx5hlxQ.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-DSm5EncT.js";import{z as r,m as P,D as V,f as A,e as J,g as N,H as R,B as q,h as B}from"./index-Cu6TX6T-.js";import{eQ as H,IS as Q,J0 as W,IT as Y,eR as $,fk as G,IY as K,fJ as X,cU as Z,J1 as ee,J2 as te}from"./zeni-epic-state-RX9kBvT9.js";import{n as ne}from"./mui-aAb3ZK4t.js";import{u as se}from"./useDeviceId-M1Q9D8TL.js";import{f as ae}from"./analyticsHelper-BMXAUA8L.js";import{t as ie}from"./getLocaleForTenant-Dks1F-do.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="2032468d-8272-4175-8a60-6fba06085db1",t._sentryDebugIdIdentifier="sentry-dbid-2032468d-8272-4175-8a60-6fba06085db1")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>H(e)),b=l(e=>Q(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(W(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(Y(b.tenantsInOrder),s.zeniSessionId),$(s.userId,s.zeniSessionId,o.tenantId),t(G(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),X().then(()=>{const e=B();e!=null&&A(e)}),setTimeout(()=>{J.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,v,a.state,t]);const U=g.useCallback(()=>{m("/signin/auth")},[m]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-D5IOuNv9.js";import{j as i,k as n}from"./core-DSm5EncT.js";import{Q as e}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import"./sentry-Ctx5hlxQ.js";import"./zeni-epic-state-RX9kBvT9.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.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]="38433470-5748-45c8-9d22-f3cba6aaf7d5",o._sentryDebugIdIdentifier="sentry-dbid-38433470-5748-45c8-9d22-f3cba6aaf7d5")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function h(){const o=i();return r.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-D5IOuNv9.js";import{a as r}from"./sentry-Ctx5hlxQ.js";import{h as A,u as J,g as o,N as j}from"./core-DSm5EncT.js";import{Jf as x,eQ as C,f3 as P,Jg as z,Jh as D,Ji as M,Jj as R,mx as k,Ib as L}from"./zeni-epic-state-RX9kBvT9.js";import{z as h,J as I}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="f18f55df-3deb-454f-9aac-9f12df325a52",n._sentryDebugIdIdentifier="sentry-dbid-f18f55df-3deb-454f-9aac-9f12df325a52")}catch{}})();function ee(){const n=A(),a=J(),{params:t,error:i}=r.useMemo(()=>x(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o(e=>C(e)),l=o(e=>P(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[f,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-D5IOuNv9.js";import{j as Q,h as Y,u as z,l as Z,g as d,k as H,n as K,o as I}from"./core-DSm5EncT.js";import{eQ as R,qq as P,p_ as X,JO as v,pV as S,bv as ee,bn as ae,bT as te,pW as se,JP as oe,JA as C,dE as re,tU as ne,JQ as ce,uf as ie,eW as le,eU as de}from"./zeni-epic-state-RX9kBvT9.js";import{z as me,U as fe,d as pe,y as M,S as $,A as ue,e as w,al as he,r as ge}from"./index-Cu6TX6T-.js";import"./mui-aAb3ZK4t.js";import Fe from"./NotFoundScreen-BT06WKNU.js";import{F as be}from"./FeaturePreviewScreen-DW0dk17I.js";import{a as g}from"./sentry-Ctx5hlxQ.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-Cwg-MURp.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-CmADrtlH.js";import{u as Se}from"./useInitialThreadRequest-C9HocV07.js";import{t as Te}from"./routePaths-CTVn-kRm.js";import{M as ye}from"./MobileAppDrawer-e7vFdsZl.js";import"./recharts-sq8NMPEu.js";import"./analytics-KTpmzBLZ.js";import"./plaid-Bq2q69xW.js";import"./dnd-WfwuNh-I.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bw23hVB7.js";import"./lexical-uPMgP-4-.js";import"./pdf-BLq3oklQ.js";import"./utils-5dQGsDcn.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]="ffac67e5-46ee-4714-8d56-4a3b6f717ec7",s._sentryDebugIdIdentifier="sentry-dbid-ffac67e5-46ee-4714-8d56-4a3b6f717ec7")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=H(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:w}},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 m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function O(){const s=Q(),e=Y(),a=z(),{forecastId:o,tenantEmailDomain:r}=Z(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>R(t)),W=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),A=d(t=>t.profitAndLossState),k=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:_}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,U)=>L!=null?f.forecasts.findIndex(b=>b.id===L):U!=null?f.forecasts.findIndex(b=>b.id===U):f.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.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&&!x(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,m,u,P,S,F]);const D=pe(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=M(),{isFeatureEnabled:E}=N($.isReportsCommentingEnabled),V=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,J]=g.useState(!1),j=t=>{J(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:W,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:q,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:V,onClickMenuIcon:()=>{j(!0)}})]})}function Qe(){const s=d(c=>R(c)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Qe as PandLWithForecastRoutes,Qe as default};
|