@zeniai/web-app-ui 5.2.17-dev → 5.2.18-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-OroYq1dZ.js +1 -0
- package/dist/assets/AddressScreen-ApC_R0Wp.js +9 -0
- package/dist/assets/{AiCfoScreen-HMy5Y7Mq.js → AiCfoScreen-ceOXZKkH.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-ClKax7IT.js → BillPayApprovalRoutes-DNBT8bBe.js} +1 -1
- package/dist/assets/{BillPayRoutes-BChpGQL2.js → BillPayRoutes-Ee1gMZDl.js} +18 -18
- package/dist/assets/{BusinessVerificationPageScreen-BwMN9nGs.js → BusinessVerificationPageScreen-BrCTRscW.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-C_N9OShc.js +14 -0
- package/dist/assets/{ChargeCardRoutes-Dv5pDzqZ.js → ChargeCardRoutes-BnvieJVH.js} +1 -1
- package/dist/assets/CompanyPassportScreen-RJZfjyND.js +1 -0
- package/dist/assets/ConnectionAuthScreen-BeUh42uJ.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BxM3YPtm.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D_6fNZiA.js → CustomerOnboardingRoutes-CHFrWBuQ.js} +3 -3
- package/dist/assets/{DashboardRoutes-Cp_J4k4_.js → DashboardRoutes-DzdPS_ou.js} +4 -4
- package/dist/assets/DefaultTenantHome-D1Wy6Wl5.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-BkAznvqR.js +18 -0
- package/dist/assets/{DrawerScreen-CTCbWuBb.js → DrawerScreen-DbGHqqp3.js} +1 -1
- package/dist/assets/EntityDetailRoutes-BZZT4beI.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DRT8zgD0.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BuOhC0VV.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-But5JTd3.js +1 -0
- package/dist/assets/MagicLinkRoutes-BXYryYOa.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Djwwkjab.js +12 -0
- package/dist/assets/{MobileAppDrawer-C850zeFL.js → MobileAppDrawer-KiFiOGbB.js} +1 -1
- package/dist/assets/NotFoundScreen-CdBZ6E4V.js +1 -0
- package/dist/assets/NotificationRoutes-BuE5Ia0t.js +1 -0
- package/dist/assets/OAuthConsentScreen-BHoiJyyq.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CYJYOUC0.js +1 -0
- package/dist/assets/PeopleRoutes-DQ4ywy5y.js +22 -0
- package/dist/assets/PerformanceRoutes-DlI-5IYy.js +1 -0
- package/dist/assets/{Preview-BD6Y1F_q.js → Preview-C3t9OASa.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BlMcHgbG.js → QBOConnectionScreen-BcAa0XdH.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-nJxxaKUX.js → ReimbursementApprovalRoutes-vvvoQ_Sf.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DXovejDg.js → ReimbursementApprovalRuleDetailScreen-DOYdcnj3.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-41mQ1voL.js → ReimbursementRoutes-CVrOZVi7.js} +8 -8
- package/dist/assets/{ReportsRoutes-CPxhUqlo.js → ReportsRoutes-BSaDsWab.js} +1 -1
- package/dist/assets/RewardsRoutes-DsYtBmZx.js +1 -0
- package/dist/assets/{ScreenRoutes-DBgtMxcS.js → ScreenRoutes-_KkX47BV.js} +2 -2
- package/dist/assets/{SettingsRoutes-C3VXjgEl.js → SettingsRoutes-DqjN1ABZ.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BX3zI3tV.js → SetupPagesScreen-usZWca-_.js} +5 -5
- package/dist/assets/SignInScreen-BDE1HpBU.js +1 -0
- package/dist/assets/SignOutScreen-xueiP_tN.js +9 -0
- package/dist/assets/{TaskListScreen-DbBL-EqC.js → TaskListScreen-DduFWf5s.js} +2 -2
- package/dist/assets/TaskRoutes-C6C-H9ff.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-8oHAjr2u.js → TransactionDetailRoutes-BiA_QHF1.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Bfy3N_JT.js → TransactionDetailScreen-D0qCr6b1.js} +2 -2
- package/dist/assets/{TransactionListRoutes-C46bH8Mo.js → TransactionListRoutes-DIJytNYy.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CzmHsChK.js → TreasuryRoutes-BxXAoPv6.js} +6 -6
- package/dist/assets/{VendorsRoutes-CUyxWOUM.js → VendorsRoutes-C0IKd0L4.js} +16 -16
- package/dist/assets/WiseConfirmationScreen-BSv238Gl.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-8seJMANR.js → ZeniAccountRoutes-DyxLcHZW.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-Dyx3X86U.js +9 -0
- package/dist/assets/{accountMappingHelper-Cg1rcuy8.js → accountMappingHelper-B-kf-Qnc.js} +1 -1
- package/dist/assets/{analytics-CP-wGaZJ.js → analytics-DtYJ-EGT.js} +1 -1
- package/dist/assets/{analyticsHelper-BZTNTJma.js → analyticsHelper-CTlcOyiL.js} +1 -1
- package/dist/assets/{core-4nWRIid2.js → core-DnZcjy6X.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B-9vw5Be.js → decodeURIComponentSafe-CjxujRw-.js} +1 -1
- package/dist/assets/{dnd-DPx0nGIt.js → dnd-eoV-_JYH.js} +1 -1
- package/dist/assets/{empty-dwCpPdyI.js → empty-DkIaLxCd.js} +1 -1
- package/dist/assets/{empty-BWSUSl2t.js → empty-Dq2hLrCm.js} +1 -1
- package/dist/assets/{emptyVideoElement-Cgz9sC1U.js → emptyVideoElement-BFB9pddL.js} +1 -1
- package/dist/assets/{epic-BIxKmwU7.js → epic-Blr6eiMV.js} +1 -1
- package/dist/assets/getLocaleForTenant-CtnTFS0P.js +1 -0
- package/dist/assets/{index-C53rjstg.js → index-C8_nlYo6.js} +2 -2
- package/dist/assets/{index-D7c6Pfp9.js → index-CiCTnO2S.js} +1 -1
- package/dist/assets/{index-ot86Rern.js → index-DUKU6sVX.js} +1 -1
- package/dist/assets/{index-P8XH9v_Z.js → index-D_CZgugN.js} +1 -1
- package/dist/assets/{index-DmHtkhiK.js → index-Dmm4l94W.js} +1 -1
- package/dist/assets/{index-BEdY_Av6.js → index-Wtyhkk6J.js} +1 -1
- package/dist/assets/{index-CbGX11uA.js → index-nBWRmUT4.js} +13388 -13344
- package/dist/assets/{index-B89XzExo.js → index-nn6YvIGD.js} +1 -1
- package/dist/assets/{lexical-Dce73siJ.js → lexical-CSqytB8g.js} +1 -1
- package/dist/assets/{liveblocks-BqtYq8PY.js → liveblocks-DKL6viSK.js} +1 -1
- package/dist/assets/{lottie-C6mBeCcV.js → lottie-Dz5luYQG.js} +1 -1
- package/dist/assets/{mui-ChRNPf14.js → mui-sr6zger7.js} +1 -1
- package/dist/assets/{pathToGoBack-DjzKcd4A.js → pathToGoBack-DpO-gBzq.js} +1 -1
- package/dist/assets/{pdf-CHegScPw.js → pdf-BNSeVvBm.js} +4 -4
- package/dist/assets/{pdf-lib-xuF5byC3.js → pdf-lib-DwpnbCVp.js} +1 -1
- package/dist/assets/{plaid-j-SLH4pe.js → plaid-QvRDxgoN.js} +1 -1
- package/dist/assets/{pusher-BK7gFb-W.js → pusher-senIjtt-.js} +1 -1
- package/dist/assets/{react-YqzjdluA.js → react-BGDkRw8Y.js} +1 -1
- package/dist/assets/{react-CWkBMv_4.js → react-CBRcLxW-.js} +1 -1
- package/dist/assets/{react-Dy3J-4XE.js → react-CiyNePZ5.js} +1 -1
- package/dist/assets/{react-D_MXXpOM.js → react-ClmbMdlp.js} +1 -1
- package/dist/assets/{react-Bo9yX59J.js → react-CuKQRzYG.js} +1 -1
- package/dist/assets/{react-wzy7xDal.js → react-OAPKV4uC.js} +1 -1
- package/dist/assets/{recharts-UIIeT-6j.js → recharts-Bim6mdwu.js} +1 -1
- package/dist/assets/{routePaths-BYuMJjxP.js → routePaths-D0N7YUlE.js} +1 -1
- package/dist/assets/{sentry-BtWdTNDK.js → sentry-DFI2OQU2.js} +1 -1
- package/dist/assets/{url-CkFCyaeM.js → url-4e0ZWhZq.js} +1 -1
- package/dist/assets/{url-CUWwwyN4.js → url-p6YiHaLn.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-7YoEarS7.js → useAiCfoDashboardSuggestedQuestionsChips-Bcrl6X1X.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BqNcSAwL.js +1 -0
- package/dist/assets/useCashManagementBanner-rPbgM7YP.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-DCjAMeeL.js → useChargeCardPusherEvents-uhG5ouo_.js} +1 -1
- package/dist/assets/{useDeviceId-BVGc_c85.js → useDeviceId-DasP_-mC.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DZSBVmEz.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BMuxer3t.js → useInitialThreadRequest-Ch4ouOBD.js} +1 -1
- package/dist/assets/{utils-BGj88Dzy.js → utils-cHxIh7E8.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-MO-qZsKE.js → withTransactionSidePanel-CWy10IlG.js} +2 -2
- package/dist/assets/{zeni-epic-state-Brhydpej.js → zeni-epic-state-m4zoW3ek.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-B2KIG7En.js +0 -1
- package/dist/assets/AddressScreen-BRHUGjlq.js +0 -9
- package/dist/assets/CardsAiCfoScreen-DO_y52lp.js +0 -14
- package/dist/assets/CompanyPassportScreen-DpirfeBa.js +0 -1
- package/dist/assets/ConnectionAuthScreen-rOB6ynUK.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-C98l4ZVS.js +0 -1
- package/dist/assets/DefaultTenantHome-D0bfOiik.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-CEzBRH9X.js +0 -18
- package/dist/assets/EntityDetailRoutes-8jxY5Riu.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-BLGJhe2d.js +0 -25
- package/dist/assets/FeaturePreviewScreen-BYw0siNX.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-D5JpfjXx.js +0 -1
- package/dist/assets/MagicLinkRoutes-DJ8XQppN.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-Pc9aSzuu.js +0 -12
- package/dist/assets/NotFoundScreen-D8y3QSjF.js +0 -1
- package/dist/assets/NotificationRoutes-CgDlCmJS.js +0 -1
- package/dist/assets/OAuthConsentScreen-BHm1bSWe.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CxkAljmn.js +0 -1
- package/dist/assets/PeopleRoutes-Cwuko2wK.js +0 -22
- package/dist/assets/PerformanceRoutes-Cpl-d1r4.js +0 -1
- package/dist/assets/RewardsRoutes-BXExREiG.js +0 -1
- package/dist/assets/SignInScreen-DYVSrH1Q.js +0 -1
- package/dist/assets/SignOutScreen-D8IS2BPQ.js +0 -9
- package/dist/assets/TaskRoutes-CP206xuh.js +0 -9
- package/dist/assets/WiseConfirmationScreen-lyjRGpZ9.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-D_5y24R6.js +0 -9
- package/dist/assets/getLocaleForTenant-Bpp7IHaZ.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DuEP5Klm.js +0 -1
- package/dist/assets/useCashManagementBanner-_9igQwqA.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-BTnBt-Sy.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-nBWRmUT4.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DFI2OQU2.js"><link rel="modulepreload" crossorigin href="/assets/core-DnZcjy6X.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-m4zoW3ek.js"><link rel="modulepreload" crossorigin href="/assets/mui-sr6zger7.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DtYJ-EGT.js"><link rel="modulepreload" crossorigin href="/assets/utils-cHxIh7E8.js"><link rel="stylesheet" crossorigin href="/assets/index-Cx4f0JbF.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.18-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@sentry/core": "^9.42.1",
|
|
28
28
|
"@sentry/react": "^9.42.1",
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
|
-
"@zeniai/client-analytics": "2.0.
|
|
31
|
-
"@zeniai/client-epic-state": "5.1.
|
|
32
|
-
"@zeniai/web-components": "4.2.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.44",
|
|
31
|
+
"@zeniai/client-epic-state": "5.1.44",
|
|
32
|
+
"@zeniai/web-components": "4.2.42",
|
|
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-BqtYq8PY.js";import{A as d}from"./AddressScreen-BRHUGjlq.js";import i from"./NotFoundScreen-D8y3QSjF.js";import"./sentry-BtWdTNDK.js";import{o as s,p as r}from"./core-4nWRIid2.js";import"./zeni-epic-state-Brhydpej.js";import"./recharts-UIIeT-6j.js";import"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BqtYq8PY.js";import{a as h}from"./sentry-BtWdTNDK.js";import{h as T,u as _,g as E,i as j,j as $,n as D}from"./core-4nWRIid2.js";import{J as B,E as M,z as L,D as N,C as K,Z as z,e as C,h as S,s as F,m as b,v as R}from"./index-CbGX11uA.js";import{Ne as w,h_ as U,e$ as G,Nf as O,c7 as V,Ng as q,lo as H}from"./zeni-epic-state-Brhydpej.js";import{n as J}from"./mui-ChRNPf14.js";import Z from"./NotFoundScreen-D8y3QSjF.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]="84506e28-cda8-49e5-adbd-c1b9298ef761",e._sentryDebugIdIdentifier="sentry-dbid-84506e28-cda8-49e5-adbd-c1b9298ef761")}catch{}})();const Q=J.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,W=D((function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&O(t.roleMap),d=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=w(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}}),(function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=R(d?.pathnameStackToGoBack);let s=n.poppedPathname??I();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=X(a);e(H({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}}))(F);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=_(),n=E(),{addressId:s,addressType:u}=j(),g=B(),k=M(),v=L.getSignedInUser(),[f,x]=h.useState(s==null),p=$((m=>s!=null?w(m,s).fetchState:"Not-Started")),A=N();if(v==null)throw Error("Can't access address page without signing in...");const P=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{f||s==null||(x(!0),d(U(s,!1)))}),[f,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?r.jsx(K,{fetchState:p,style:{backgroundColor:k.colors.grey5}}):s!=null&&p==="Error"?(a(`${I(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:C,onLoad:P}),r.jsx(Q,{windowSize:g,children:r.jsx(W,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(Z,{})}const I=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},X=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,X as t};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-BqtYq8PY.js";import{a as l}from"./sentry-BtWdTNDK.js";import{u as pe,h as he,g as Ce,j as q,i as fe,n as Se}from"./core-4nWRIid2.js";import{Y as ge,de as be,z as ye,df as Pe,dh as z,di as Ie,ba as W,Z as we,e as $,dj as H,dt as Ee,a as ke,h as Ae,a9 as Te,dm as xe,dn as Ue,a4 as _e,dr as Oe,b6 as ve,ds as Qe}from"./index-CbGX11uA.js";import{gr as Fe,e_ as G,e$ as $e,fu as De,iQ as Le,iM as Ve,f0 as B,gb as je,g3 as Me,g7 as N,gc as Re,ge as qe,gf as He,gg as Be,gh as Ne}from"./zeni-epic-state-Brhydpej.js";import{D as ze,n as L,P as We,S as Ge}from"./mui-ChRNPf14.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="1584eedf-5e99-4c43-8dc8-c0560c150914",e._sentryDebugIdIdentifier="sentry-dbid-1584eedf-5e99-4c43-8dc8-c0560c150914")}catch{}})();const Y="chat-response-generated",X="cards/ask",Z="card_policy_hero";function D(e){return`/${e}/cards`}function J(e){return`/${e}/cards/policy`}const Ye=Se((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===Z?J(i):D(i);return{onEventReceived:(n,t)=>{if(n===Y&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=qe(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?$.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Qe(P,y),s.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,He(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Be({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(Ne({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&ve(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(N(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Re(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(N(""))},togglePageView:()=>{m(p,{state:z(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Me()),m((function(n){return`/${n}/${X}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(je({questionAnswerId:n,isCollapsed:t}))},...Oe(e,{isAiCardCreationEnabled:T,isCardPolicyEnabled:x,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m(D(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(Te(xe)),{spendManagement:{chargeCard:{cardsAiCfoHero:K,cardPolicyAiCfoHero:ee}}}=ke.getLocalizedStrings(),A=K.pageTitle,Xe=ee.pageTitle,Ze=K.chatHeaderSubtitle,Je=ee.chatHeaderSubtitle,St=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=ge(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o(Fe())}),[o]);const i=q((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=q((r=>$e(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,I=y?.referrer===Z,te=I?"card_policy":void 0,se=l.useMemo((()=>({title:I?Xe:A,subtitle:I?Je:Ze})),[I]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:z(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,S=ie?.isMasterTOSAccepted??!1,k=l.useRef(null);l.useEffect((()=>{if(S&&k.current!=null){const{question:r,shouldSubmit:w}=k.current;k.current=null,_(r),O(w),v.current=!1}}),[S]);const{visitedSessions:V}=Ie(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,j=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",M=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,w){return`/${r}/${X}/${w}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:V.map((r=>`private-encrypted-chat-${r}.${Y}`)),eventCallback:(r,w,me)=>me.onEventReceived(r,w)})),[V]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&j!=="In-Progress"&&M&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[j,M,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return g.jsxs(et,{children:[g.jsx(we,{analytics:$,onLoad:r=>r.trackPageLoaded(Ae.Event.aiCFOPage)}),S?g.jsx(Ye,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:A,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>{c(I?J(s):D(s),{state:{...d.state}})},onCompleteClick:()=>{S||n.userRoleId==null||(u!=null&&u!==""&&(k.current={question:u,shouldSubmit:P}),o(B(n.userRoleId)))}}),g.jsx(ze,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:tt,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:g.jsx(Ke,{onClick:r=>r.stopPropagation(),children:g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>h(!1),onCompleteClick:()=>{S||n.userRoleId==null||o(B(n.userRoleId)),h(!1)}})})})]})},Ke=L(Ge)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,et=L.div`
|
|
6
|
-
flex: 1 1 auto;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
min-height: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
`,tt=L(We)`
|
|
12
|
-
box-shadow: ${({theme:e})=>e.colors.elevation2};
|
|
13
|
-
color: ${({theme:e})=>e.colors.grey4};
|
|
14
|
-
`;export{St as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-BqtYq8PY.js";import{a as g}from"./sentry-BtWdTNDK.js";import{h as w,u as x,g as k,i as T,j as O,n as E}from"./core-4nWRIid2.js";import{z as C,be as P,Z as F,e as V,h as j,ag as b,bf as A,au as L,av as U,x as B}from"./index-CbGX11uA.js";import{e$ as h,gp as _,tZ as M,gk as R,c7 as z,PV as G,bn as Z,r_ as $,rO as Y,lg as H,mR as S,PW as W,bE as q,cB as N,m$ as J,n2 as K}from"./zeni-epic-state-Brhydpej.js";import"./mui-ChRNPf14.js";import{d as Q}from"./routePaths-BYuMJjxP.js";import{M as X}from"./MobileAppDrawer-C850zeFL.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]="114854a8-b6fb-425f-862a-a2b8525ec8f6",a._sentryDebugIdIdentifier="sentry-dbid-114854a8-b6fb-425f-862a-a2b8525ec8f6")}catch{}})();const ee=E((function(a){const t=R(a),i=C.getSignedInUser(),p=h(a),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Z(i)}}),(function(a,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(K())},onAddressClick:e=>{const n=Q(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:D}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:D.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(W(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(H({files:e}))},onDeleteFile:e=>{a(Y(e))},onEditFileName:(e,n)=>{a($(e,n.split(".")[0]))}}}))(A);function de(){const a=w(),t=x(),i=k(),{tenantEmailDomain:p}=T(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>h(s))),d=r.companyId??C.getSignedInUserTenant(p)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),t(_(d)))}),[c,n,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(P,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-BqtYq8PY.js";import{a}from"./sentry-BtWdTNDK.js";import{u as w,g as D,j as c,N as v}from"./core-4nWRIid2.js";import{Mp as A,e$ as O,g5 as _,ok as j,gy as h,g4 as U,fE as L,Mw as $}from"./zeni-epic-state-Brhydpej.js";import{u as k,z as m,L as C,a as F,o as H}from"./index-CbGX11uA.js";import{n as z}from"./mui-ChRNPf14.js";import{t as R}from"./getLocaleForTenant-Bpp7IHaZ.js";import{g as M,Q as P}from"./QBOConnectionScreen-BlMcHgbG.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./empty-dwCpPdyI.js";import"./pdf-lib-xuF5byC3.js";import"./index-DmHtkhiK.js";import"./url-CUWwwyN4.js";import"./index-ot86Rern.js";import"./decodeURIComponentSafe-B-9vw5Be.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]="dc5b6b59-9594-490c-827a-898b8c7d94ef",t._sentryDebugIdIdentifier="sentry-dbid-dc5b6b59-9594-490c-827a-898b8c7d94ef")}catch{}})();const G=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function pe(){const t=w(),i=D(),{setLoading:d,clearAllLoading:b}=k(),p=a.useRef(!1),f=a.useRef(!1),{code:x,realmId:y,state:T}=M(i.search),N=x!==""&&y!==""&&T!=="",I=c((l=>A(l))),e=c((l=>O(l))),n=c((l=>l.tenantState.fetchState)),r=c((l=>l.tenantState.activeTenantFetchState.fetchState)),o=m.getSignedInUser(),u=m.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect((()=>{d(C.CONNECTION_AUTH)}),[d]),a.useEffect((()=>{p.current||o==null||u==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(C.TENANT_FETCHING),t(_(o.userId,u))))}),[p,n,d]),a.useEffect((()=>{e.tenantId==null&&!f.current&&o!=null&&(f.current=!0,!(u==null||u!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))}),[f,n,r]),a.useEffect((()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(C.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))}),[E]),a.useEffect((()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),m.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),F.updateAppLocaleID(R($(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"&&m.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)}),[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()}),[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S!==!0?g.jsx(G,{children:g.jsx(P,{})}):g.jsx(v,{to:"/",replace:!0})}export{pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BqtYq8PY.js";import{z as n}from"./index-CbGX11uA.js";import{g as d}from"./QBOConnectionScreen-BlMcHgbG.js";import"./sentry-BtWdTNDK.js";import{g as p,N as s}from"./core-4nWRIid2.js";import"./zeni-epic-state-Brhydpej.js";import"./recharts-UIIeT-6j.js";import"./mui-ChRNPf14.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./empty-dwCpPdyI.js";import"./pdf-lib-xuF5byC3.js";import"./index-DmHtkhiK.js";import"./url-CUWwwyN4.js";import"./index-ot86Rern.js";import"./decodeURIComponentSafe-B-9vw5Be.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-BqtYq8PY.js";import{a as u}from"./sentry-BtWdTNDK.js";import{u as y,j as b,n as w,g as A,N as k}from"./core-4nWRIid2.js";import{Mp as N,e$ as _,g5 as U,Mq as L,ok as R,Mr as z}from"./zeni-epic-state-Brhydpej.js";import{u as $,z as f,L as T,t as I,a as j,b as O}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import{t as P}from"./getLocaleForTenant-Bpp7IHaZ.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="f4117c89-affc-4976-9d6c-f382572d2ce1",t._sentryDebugIdIdentifier="sentry-dbid-f4117c89-affc-4976-9d6c-f382572d2ce1")}catch{}})();const q=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=O(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=$(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(q,{})}const M=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],Q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of M)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BqtYq8PY.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-4nWRIid2.js";import{Qz as k,QG as _,gn as J,gm as W,gl as Y,jF as q,NG as K,rR as L,e$ as D,Q5 as V,jD as j,QA as v,QJ as F,jB as G,jY as T}from"./zeni-epic-state-Brhydpej.js";import{bz as M,J as R,w as N,z as U,E as z,v as p,i as S,C as Q,bA as X,o as O,bB as ee,x as te}from"./index-CbGX11uA.js";import{n as Z}from"./mui-ChRNPf14.js";import"./sentry-BtWdTNDK.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]="dbd96fa0-b496-4bf5-a774-7c048aace9e7",e._sentryDebugIdIdentifier="sentry-dbid-dbd96fa0-b496-4bf5-a774-7c048aace9e7")}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(Y(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((c=>k(c,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??$();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(F({data:c}))},onBackClick:()=>{if(e(j({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(X);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,{useFeatureGate:r}=N(),i=U.getSignedInUser(),b=h((u=>D(u))),g=z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return E(e,"ach",t,n)}function Se(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=Z.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ce=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(T(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??B();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(j({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??B(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=N(),b=z(),g=h((u=>D(u))),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const B=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as d}from"./sentry-BtWdTNDK.js";import{h as A,u as B,g as G,i as N,j as l,N as q,n as F,o as _,p as $}from"./core-4nWRIid2.js";import{OO as H,e$ as K,Oa as M,lI as R,KH as k,OT as W,NF as Y,kI as z,KI as S,Of as V,Og as X,NH as J,NG as L}from"./zeni-epic-state-Brhydpej.js";import{aX as Q,e as U,v as Z,x as tt}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import{d as I}from"./decodeURIComponentSafe-B-9vw5Be.js";import{w as et}from"./withTransactionSidePanel-MO-qZsKE.js";import{f as at,c as nt}from"./routePaths-BYuMJjxP.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import"./TransactionDetailScreen-Bfy3N_JT.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]="afb5a497-5d68-44bc-8488-710640d37763",a._sentryDebugIdIdentifier="sentry-dbid-afb5a497-5d68-44bc-8488-710640d37763")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:O,entityNameEncoded:x}=N(),r=I(O??""),p=I(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>K(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const E=l((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??D,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:b(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Ot({entityType:a}){return s.jsx(_,{children:s.jsx($,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Ot as EntityDetailRoutes,Ot as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-BqtYq8PY.js";import ua from"./NotFoundScreen-D8y3QSjF.js";import{a,b as nn}from"./sentry-BtWdTNDK.js";import{n as Ge,S as ma}from"./mui-ChRNPf14.js";import{u as ke,h as an,g as st,j as D,n as pa,i as Vt,o as ha,p as et}from"./core-4nWRIid2.js";import{e$ as Me,Tx as ga,ou as we,g0 as Ca,ss as Sa,Ty as tt,fD as Le,Tz as Ot,el as fa,fm as Ia,TA as zt,TB as Oe,pc as ka,TC as Ea,pp as ba,oM as on,oK as re,TD as sn,TE as ya,p5 as cn,ps as Ta,TF as ln,oF as va,r_ as Pa,fN as Ae,TG as je,uy as rn,EU as dn,TH as un,TI as Aa,ry as ct,OP as Mt,OR as wa,kL as Ra,OS as xa,kS as Da,c$ as Ua,vO as it,oS as mn,px as $e,p8 as Fa,TJ as _a,NH as Lt,NG as Ve,TK as jt,l7 as Ba,TL as Va,TM as Oa,TN as za,TO as Ma,oZ as La,pA as ze,TP as ja,TQ as $a,TR as qa,pH as Ga,kW as Na,kN as Ja,TS as Ya,kV as $t,P0 as Ka,TT as Za,TU as Ha,ru as Qa,r6 as Wa,py as Ie,r5 as nt,TV as Xa,TW as eo,TX as to,mq as no,bo as ao,ml as qt,m7 as oo,TY as so,gD as co,mi as io,xH as lo,TZ as ro,q6 as uo,q1 as mo,q5 as po,pS as ho,T_ as go,fQ as pn,pg as Co,oV as So,g1 as Gt,pC as fo,T$ as Io,U0 as ko,pz as hn,U1 as Eo,U2 as bo,U3 as yo,U4 as To,U5 as Nt,rG as vo,qZ as Po,NF as Ao,U6 as wo,U7 as Ro,kU as xo,U8 as Do,JI as Uo,kT as Fo,kI as _o,fP as Bo,qv as gn,qR as Vo,pw as Jt,pB as Oo,bE as zo,mf as Mo,mc as Lo,U9 as jo,pR as Yt,qN as Kt,qL as $o,Ua as qo,qA as Go,qg as No,qO as Jo,Ub as Yo,Uc as Ko,qk as Zo,Ud as Ho,qb as Qo,qj as Wo,qh as Xo,qU as es}from"./zeni-epic-state-Brhydpej.js";import{w as qe,i as Y,e as G,x as le,_ as Cn,a0 as Sn,cZ as ts,z as Ne,c_ as Zt,c$ as ns,d0 as as,d1 as os,au as Re,d2 as ss,aZ as Ht,C as fn,d3 as cs,ar as at,a as is,a9 as ls,d4 as rs,a4 as ds,d5 as us,Y as ms,d6 as ps,d7 as hs,A as gs,D as Cs,aS as Ss,d8 as fs,d9 as Is,be as ks,G as Es,aV as bs}from"./index-CbGX11uA.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import{f as Qt,a as ys,b as Ts,g as vs,C as Ps}from"./TransactionDetailScreen-Bfy3N_JT.js";import{w as As}from"./withTransactionSidePanel-MO-qZsKE.js";import{h as ws,v as Rs}from"./routePaths-BYuMJjxP.js";import{g as ot}from"./accountMappingHelper-Cg1rcuy8.js";import{D as xs}from"./DrawerScreen-CTCbWuBb.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./decodeURIComponentSafe-B-9vw5Be.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d315bbf5-853d-450e-a282-0b5956682d10",t._sentryDebugIdIdentifier="sentry-dbid-d315bbf5-853d-450e-a282-0b5956682d10")}catch{}})();const Ds=()=>{const t=ke(),s=an(),R=st(),y=D((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=D((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=D((m=>ga(m,y.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=In({mobileExploreReferrer:"Month-End Close Overview"}),x=a.useCallback(((m,O,te=!1)=>{t(we({tenantId:O,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),T=a.useCallback((m=>{const O=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,O??null),t(Ca(y.tenantId,m))}),[y.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[y.tenantId],h=a.useCallback((()=>{const m=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(r.month,r.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),x(r,y.tenantId,!0)}),[x,r,y.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=le(R.state?.pathnameStackToGoBack,R.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((O=>O.progress<100));if(m!=null)return void s(`./${m.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,r]),{areTenantIdsInSync:u}=Cn();return Sn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&x(r,y.tenantId)}),[x,r,l.fetchState,y.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Sa(r))}),[r,l.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&h()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),a.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=R.state?.referrer;G.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Us,{children:S.jsx(ts,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:T,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Us=Ge.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
|
-
`,Fs=nn.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:R,onFetchLinkTokenClick:y,onEstablishConnectionClick:A})=>{const i=ke(),{useFeatureGate:p}=qe(),{isFeatureEnabled:I}=p(Y.isReconV3Enabled),l=Ne.getSignedInUser(),C=D((f=>Me(f))),g=t.excludedAccountIDs,x=a.useMemo((()=>({userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:C?.tenantId??""})),[l?.userId,l?.zeniSessionId,C?.tenantId]),{accountReconciliationsByAccountID:T,monthYearPeriod:r,statementUploadChosen:h}=t,F=T[s],J=a.useRef(!1),u=a.useRef({}),m=a.useCallback((f=>{J.current=f}),[]),O=a.useCallback((f=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!0,backgroundCompletedSteps:f.completedSteps,startedAtMs:f.startedAtMs,totalDurationSeconds:f.totalDurationSeconds})),F!=null&&requestAnimationFrame((()=>{J.current||i(Le({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Zt(F)}]}))}))}),[i,r,F,s]),te=a.useCallback((()=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,s,r]),de=a.useCallback((f=>{i(Ot({accountId:s,selectedPeriod:r,backgroundCompletedSteps:f}))}),[i,r,s]),z=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r,backgroundCompletedSteps:0})),i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,r,s]);a.useEffect((()=>{Object.entries(T).forEach((([f,X])=>{const ue=X.statementParseStatus.fetchState,xe=u.current[f]??"Not-Started",Je=f===s&&J.current;X.statementProcessingDismissedToBackground!==!0||Je||xe!=="In-Progress"||ue!=="Completed"||i(Le({messageSection:"statement_parsing_complete",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Zt(X)},{variableName:"_transaction_count_",variableValue:String(ns(X))}]})),u.current[f]=ue}))}),[T,i,s]);const B=F?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??F?.accountReconEntity.statementMetaData?.statementUploadId,e=F?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,n=D((f=>e!=null&&e!==""?fa(Ia(f.userState,e)):"")),c=a.useCallback((()=>{i(zt({accountId:s,selectedPeriod:r}))}),[i,s,r]),d=a.useCallback((()=>{i(zt({accountId:s,selectedPeriod:r})),i(Oe({statementUploadChosen:!0}))}),[i,s,r]),E=(f,X)=>{i(Pa(f,X.split(".")[0]))},k=f=>{B!=null&&i(va({accountId:s,selectedPeriod:r,fileId:f,statementUploadId:B}))},v=()=>{i(Oe({statementUploadChosen:!1}))},b=f=>{i(Ta({accountId:s,selectedPeriod:r,payload:f}))},M=a.useCallback(((f,X,ue)=>{i(ka({accountId:f,selectedPeriod:X,statementUploadId:ue}))}),[i]),P=a.useCallback((f=>{i(Ea({accountId:s,selectedPeriod:r,statementUpdateLocalData:f}))}),[i,s,r]),Q=a.useCallback((()=>{B!=null&&i(ba({accountId:s,selectedPeriod:r,statementUploadId:B}))}),[i,s,r,B]),W=a.useCallback((()=>{i(Oe({statementUploadChosen:!0}))}),[i]),oe=f=>{i(ln({accountId:s,selectedPeriod:r,localData:{accountSource:f}}))},he=a.useCallback((()=>{i(on({accountId:s}))}),[i,s]),ge=a.useCallback((f=>{i(re(r,f)),R()}),[i,r,R]),q=a.useCallback((()=>{i(sn({accountId:s,selectedPeriod:r,statementProcessingFailed:!1})),i(ya({accountId:s,selectedPeriod:r}))}),[i,s,r]),Ce=a.useCallback((()=>{i(cn({accountId:s}))}),[i,s]),Ee=g.includes(s)?t.excludedAccountReconciliationByAccountID[s]:void 0;if(Ee!=null)return S.jsx(Wt,{children:S.jsx(Xt,{$isV3:I===!0,children:S.jsx(as,{excludedAccountReconciliation:Ee,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:I,onDismissClick:R,onIncludeIntoReconciliation:Ce})})});if(F!=null){const f=I===!0?S.jsx(os,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:R,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:y,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:x,openFilePicker:h,onStatementUploadSuccess:b,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he,onRetryParsing:M,onReviewClicked:ge,statementProcessingFailed:F.statementProcessingFailed,statementProcessingDismissedToBackground:F.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:q,onContinueInBackground:O,onClearStatementProcessingDismissedToBackground:te,onResetStatementProcessingProgress:z,onStatementProcessingProgressChange:de,onStatementFlowVisibilityChange:m,onReuploadStatement:W,onStatementFormDataChange:P,onStatementConfirmSave:Q,reconciledByName:n,onDismissDateConflict:c,onReuploadAfterDateConflict:d,isReconV3Enabled:I}):S.jsx(ss,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:R,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:y,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:x,openFilePicker:h,onStatementUploadSuccess:b,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he});return S.jsx(Wt,{children:S.jsx(Xt,{$isV3:I===!0,children:f})})}return null})),Wt=Ge.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,Xt=Ge.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: ${t=>t.$isV3===!0?"hidden":"auto"};
|
|
21
|
-
`;function _s({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:R,resetCustomerRequest:y}){const A=Ne.getSignedInUser();if(A==null)throw Error("Can't access Customer Request page without signing in...");const i=D((p=>Aa(p,t,A)));return a.useEffect((()=>{y()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(fn,{fetchState:"In-Progress"}):S.jsx(cs,{onCloseClick:s,addCustomerRequest:R,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const Bs=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,kn="reconciliation-status-updated",En="statement-status-updated",{common:{strings:{hyphen:Vs,comma:en,space:Os}},dateFormat:bn}=is.getLocalizedStrings(),tn=es,zs=pa((function(t,s){const{uncategorizedAccounts:R,vendorSearchAutoCompleteData:y,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,companyId:p,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:l}=s,C=Ne.getSignedInUser(),g=t.tenantState.currentTenantId,x={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:g??""},T=Ae(t),{selectedTransactionCategorizationTab:r}=T;return{expenseAutomationViewSelector:T,bulkUploadSelector:I===!0?T.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:y,authParams:x,receiptUploadEndpoint:`${Re.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ds}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Re.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:R,companyId:p,isTransactionActivityEnabled:l}}),(function(t,s){const{themeState:R,isAccountingClassesEnabled:y,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:p,location:I,vendorSearchAutoCompleteData:l,expenseAutomationViewSelector:C,currentTenant:g,uncategorizedAccounts:x,navigate:T,onClickCustomerRequest:r,handleEditClick:h,setActivityLogTransactionId:F,isReconV3Enabled:J}=s,{selectedPeriod:u,currentSelectedView:m,reconciliation:{selectedAccountId:O}}=C,{accountSettingsView:te}=C.jeSchedules,de=mn(u),z=$e(de.start),B=$e(de.end);return{onZeniLogoClick:()=>{R.toggle()},onUploadReceiptAttachment:e=>{G.trackMissingReceiptAttached(u.month,u.year),t(Po(e))},onUploadTransactionReceipt:(e,n,c,d,E,k)=>{t(Nt(e,n,{fetchState:"In-Progress"}));const v=()=>t(Nt(e,n,{fetchState:"Error"}));us(`${Re.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,k,n,c,d,E).then((b=>{b!=null?t(vo(e,b)):v()})).catch(v)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(To(e,n)),g!=null&&t(we({tenantId:g.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,d)=>{t(yo(e,{fetchState:n,error:c})),c!=null&&t(Le({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Os+Vs+d+en:en}]}))},onUpdateJESchedulesUIState:e=>{t(bo(e))},onUpdateMissingReceiptsUIState:e=>{t(Eo(e))},onFetchMissingReceiptsList:()=>{B!=null&&z!=null&&t(hn({start:z,end:B},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...p===!0?{onBulkUploadFiles:e=>{t(Xo(e))},onBulkUploadProgress:e=>{t(Wo(e))},onBulkUploadSuccess:e=>{t(Qo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Ho(e))},onConfirmBulkUploadMatch:(e,n,c,d,E)=>{t(Zo(e,n,c,d,E))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Ko())},onSetBulkUploadResultsTab:e=>{t(Yo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Jo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(No())},onSearchTransactionsForManualMatch:(e,n)=>{t(tn(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(tn(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Go(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(qo())},onFetchBulkUploadBatches:e=>{t(gn(e))},onFetchMoreBatchDetails:()=>{t($o())},onResetBulkUploadSort:()=>{t(Kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(ko())},onSearchTextChanged:e=>{const n=C.currentSelectedView,c=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(nt({selectedTab:c,uiState:{searchString:e}})),B!=null&&z!=null&&t(Ie(c,{start:z,end:B},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(Io({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(fo(i))},onClose:()=>{m==="reconciliation"&&O!=null&&t(Gt({selectedAccountId:void 0})),T("../")},onBack:()=>{m==="reconciliation"&&O!=null&&t(Gt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(So(e))},onSaveReconciliationReview:e=>{t(Co(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,c=le(I.state?.pathnameStackToGoBack,I.pathname);T(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:C.currentSelectedView}}),t(pn(e))},handleLogOutClick:()=>{const e=le(I.state?.pathnameStackToGoBack,I.pathname);T("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:d,accruedExpensesAccount:E}=n,k=ot(te.prepaidExpensesAccountList,c.selectedOptions),v=ot(te.fixedAssetsAccountList,d.selectedOptions),b=ot(te.accruedExpensesAccountList,E.selectedOptions),M={selectedPrepaidExpensesAccountIds:k.map((P=>P.accountId)),selectedFixedAssetsAccountIds:v.map((P=>P.accountId)),selectedAccruedExpensesAccountIds:b.map((P=>P.accountId))};t(go({data:M}))},onSaveJeAccountSettingsClick:()=>{t(ho())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:d,scheduleClass:E,scheduleExpenseCategory:k,vendor:v}=n,{allAccountList:b,allClassList:M,allDepreciationAccountList:P}=C.jeSchedules,Q=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((q=>q.id===v?.selectedOption)):void 0,W={id:Q?.zeniId??v?.selectedOption??"",name:Q?.name??v?.defaultOptions.find((q=>q.value===v?.selectedOption))?.label??"",logo:Q?.logo},oe=k?.selectedOption!=null?b.find((q=>q.qboId===k.selectedOption)):void 0,he=E?.selectedOption!=null?M.find((q=>q.classId===E.selectedOption)):void 0,ge=d?.selectedOption!=null?P.find((q=>q.qboId===d.selectedOption)):void 0;t(po({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:he?.classId,updatedAccumulatedDepreciationCategoryID:ge?.accountId,updatedVendor:{id:W.id,name:W.name}}}))},ignoreRecommendedJeSchedule(e,n){t(mo(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Lt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onCancelAutoComplete:()=>{t(Ve("common"))}},onPostJESchedule(e,n){t(uo({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ro())},handleJeScheduleClick:(e,n,c)=>{t(lo({selectedJEScheduleKey:n}));const d=le(I.state?.pathnameStackToGoBack,I.pathname);T(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{g!=null&&t(io(e,g.companyId,g.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:F,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(co())},onOpenFileAttachmentSnackBar:()=>{t(Le({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(so(e))},onUpdateFileAttachment:e=>{t(oo({files:e}))},previewMonthEndReport:(e,n,c,d)=>{g!=null&&t(qt(e,g.companyId,n,!0,c,d,g.tenantId))},saveMonthEndReport:(e,n,c,d)=>{g!=null&&t(qt(e,g.companyId,n,!1,c,d,g.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:d}=C;g!=null&&d?.auditScorePercentage!=null&&(t(no(g.companyId,e,g.tenantId)),G.trackInsightsEmailPage(c.month,c.year,!1,"draft",d.auditScorePercentage,ao().format(bn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,d,E,k,v,b,M,P,Q,W,oe)=>{t(to(e,n,c,d,x,E,k,v,b,M,P,Q,W,oe))},onCancelAutoComplete:()=>{t(Ve("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(jt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Ie(e,{start:z,end:B},!1,!1)),t(eo(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Xa(e)),t(Ie("autoCategorized",{start:z,end:B},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n})),B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,d,E,k,v)=>{B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!0,c,n,d,E,k,v))},resetTransactionCategorizationLocalData:(e,n,c,d,E,k,v,b)=>{t(Wa(e,n,c,d,b??null,E,k,!1,v))},updateSelectedVendorForTransaction:(e,n,c,d,E)=>{t($t({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:d,uncategorizedAccounts:x,updatedVendor:E,isAccountingClassesEnabled:y}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const d=I.state?.referrer;e==="autoCategorized"?G.trackTransactionsAutoCategorisedPage(u.month,u.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):G.trackTransactionsReviewPage(u.month,u.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Qa(e,n,c,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Ha({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,d,E,k,v)=>{const{transactionId:b,transaction:M,lineIds:P}=n;k!=null&&t(Ka({transactionId:b,customerUpdates:k})),t(Za({selectedTab:d,transactionId:b.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:x,updatedCustomer:k,selectedEntity:E,isAccountingClassesEnabled:y,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))},onFetchRecommendationsForEntityCategorization:(e,n,c,d,E,k,v)=>{const{transactionId:b,transaction:M,lineIds:P}=n;k!=null&&(t(Na({transactionId:b,vendorUpdates:{name:k.name,id:k.id?k.id:void 0}})),t(Ja({vendorId:k.id?k.id:void 0,localData:{vendorName:k.name,vendorId:k.id?k.id:void 0}}))),k?.id?(t($t({selectedTab:d,transactionId:b.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:x,updatedVendor:k,selectedEntity:E,isAccountingClassesEnabled:y,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))):t(Ya({selectedTab:d,transactionId:b.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(ze(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(ze(u,!0,!1,null,!1,!1))},markAsReview:(e,n,c,d)=>{G.trackFluxAnalysisReviewed(c.month,c.year,d??!1,e),t(Ga(n,e,c,d??!1))},onUpdateFluxAnalysisUIState:e=>{t(qa(e))},updateOperatingExpensesIdsForReview:e=>{t($a({operatingExpenseIds:e,selectedPeriod:u}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=Rs(e.id,e.qboId,s.tenantEmailDomain),c=le(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(ja({sectionId:e,selectedPeriod:u}))},onFetchReimbursementView:(e,n,c)=>{t(ze(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(u,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(rn("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=g?.companyId;c!=null&&(t(dn(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(un({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(ln({accountId:e,selectedPeriod:u,localData:{accountSource:"bank_statement"}})),t(Oe({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(u,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(La({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ma({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(za({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Oa({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const d=e.vendor?.id;c&&d!=null&&t(Ba(d)),t(Va({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,ct("bill"));const n=le(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{T(-1)},onReconListPageScroll:e=>{t(jt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Lt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onReconNodeCollapseToggled:(e,n)=>{t(_a({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(on({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(cn({accountId:e}))},onReconciliationPusherEventReceived:(e,n)=>{const c=n??{};if((e===kn||e===En)&&m==="reconciliation"&&(t(re(u,O,!0,!0)),J===!0)){const d=c.account_id;d!=null&&c.new_statement_data_status?.code==="processed"&&c.statement_upload_id!=null&&t(Fa({accountId:d,selectedPeriod:u,statementUploadId:c.statement_upload_id})),d==null||c.new_statement_data_status?.code!=="validation_failed"&&c.new_statement_data_status?.code!=="parsing_failed"&&c.new_statement_data_status?.code!=="processing_failed"||t(sn({accountId:d,selectedPeriod:u,statementProcessingFailed:!0}))}}}}),((t,s,R)=>{const{isMissingReceiptsBulkUploadEnabled:y,...A}=R;return(function(i,p,I){return{...i,...p,...I,onUploadTransactionReceipt:(l,C,g,x,T)=>{p.onUploadTransactionReceipt(l,C,g,x,T,i.authParams)}}})(t,s,A)}))(ls(rs)),Ms=As((function(t){const s=t.displayName??t.name??"Component",R=nn.memo(t),y=A=>{const i=ke(),p=(function(){const u=ke(),m=D((O=>Ae(O).reconciliation.selectedDrawerAccountId));return{isOpen:m!=null,selectedAccountId:m,openPanel:a.useCallback((O=>{u(je({selectedDrawerAccountId:O}))}),[u]),closePanel:a.useCallback((()=>{u(je({selectedDrawerAccountId:void 0}))}),[u])}})(),I=D((u=>Ae(u).reconciliation)),l=D((u=>Me(u))),C=a.useCallback(((u,m)=>{i(rn("expense_automation_reconcile",u,m))}),[i]),g=a.useCallback(((u,m)=>{const O=l?.companyId;O!=null&&(i(dn(u,O,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",m)),i(un({accountId:m,connectionInProgress:!0})))}),[i,l?.companyId]),x=a.useMemo((()=>{if(p.isOpen&&p.selectedAccountId!=null)return S.jsx(Fs,{reconciliation:I,selectedDrawerAccountId:p.selectedAccountId,onClose:p.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:g})}),[p.isOpen,p.selectedAccountId,p.closePanel,I,C,g]),T=a.useMemo((()=>({reconPanelContent:x,reconSidePanelIsOpen:p.isOpen,closeReconSidePanel:p.closePanel})),[x,p.isOpen,p.closePanel]),{useFeatureGate:r}=qe(),{isFeatureEnabled:h}=r(Y.isReconV3Enabled),F=a.useContext(Ht),J=a.useMemo((()=>p.isOpen?h===!0?{selectedItemId:p.selectedAccountId}:{closePanel:p.closePanel,selectedItemId:p.selectedAccountId}:F),[p.isOpen,p.closePanel,p.selectedAccountId,F,h]);return S.jsx(Ht.Provider,{value:J,children:S.jsx(R,{...A,...T})})};return y.displayName=`withReconSidePanel(${s})`,y})((({closeSidePanel:t,openTransactionPanel:s,panelContent:R,sidePanelIsFullView:y,sidePanelIsOpen:A,reconPanelContent:i,reconSidePanelIsOpen:p,closeReconSidePanel:I})=>{const{isAiCfoOpen:l,setIsAiCfoOpen:C}=ms(),g=ps(),{isOpen:x}=hs(),T=an(),r=st(),h=ke(),{isAiCfoAccessEnabled:F,onAskAiCfoClick:J}=In({mobileExploreReferrer:"Transaction categorization"}),u=a.useCallback((()=>{A===!0&&y!==!0&&t?.()}),[t,A,y]),{areTenantIdsInSync:m}=Cn(),O=(()=>{const o=D((N=>Ae(N))),w=st(),{currentSelectedViewFetchState:j,currentSelectedView:$,selectedPeriod:U}=o,ne=at($),Z=at(j.fetchState),ee=a.useCallback((N=>{const ae=w.state?.referrer;$==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?G.trackTransactionsReviewPage(U.month,U.year,o.transactionView.totalCountByTab.review,0,N,ae??null):G.trackTransactionsAutoCategorisedPage(U.month,U.year,o.transactionView.totalCountByTab.autoCategorized,0,N,ae??null)),$==="missing_receipts"&&G.trackMissingReceiptsPage(U.month,U.year,N,o.missingReceipts.transactions.length,ae??null),$==="je_schedules"&&G.trackMonthCloseScheduleListPage(U.month,U.year,N,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ae??null),$==="flux_analysis"&&G.trackFluxAnalysisPage(U.month,U.year,N,Bs(o.fluxAnalysis),ae??null),$==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&G.trackInsightsEmailPage(U.month,U.year,N,"draft",o.auditSummary.auditScorePercentage,null,ae??null)}),[U,o]);return a.useEffect((()=>{Z===j.fetchState&&$===ne||j.fetchState!=="Completed"||ee(!1)}),[$,j.fetchState,ne]),ee})(),te=gs(),[de,z]=a.useState(!1),B=D((o=>Mt(o))),e=D((o=>Me(o))),[n,c]=a.useState(!1),[d,E]=a.useState(!1),[k,v]=a.useState([]),[b,M]=a.useState(null),P=a.useCallback((()=>{M(null)}),[]),Q=b?.contentType==="activity"?b.detail.transactionId:void 0,W=a.useCallback((o=>{o!=null?(l&&C(!1),g(),u(),M({contentType:"activity",detail:{transactionId:o}})):M((w=>w?.contentType==="activity"?null:w))}),[u,l,g,C]),oe=a.useCallback((o=>{l&&C(!1),g(),u(),M({contentType:"transfer",detail:o})}),[u,l,g,C]),he=a.useCallback((()=>{g(),P(),u(),J()}),[u,P,J,g]),ge=a.useRef(l);a.useEffect((()=>{l===!0&&ge.current===!1&&(g(),P(),u()),ge.current=l}),[u,P,l,g]);const q=a.useRef(x);a.useEffect((()=>{x===!0&&q.current===!1&&(l&&C(!1),P(),A===!0&&y!==!0&&t?.()),q.current=x}),[P,t,x,l,C,y,A]);const Ce=A===!0&&y!==!0,Ee=a.useRef(Ce);a.useEffect((()=>{Ce&&!Ee.current&&(l&&C(!1),g(),P()),Ee.current=Ce}),[P,l,Ce,g,C]);const[f,X]=a.useState(!1),ue=a.useRef(!1),{selectedTab:xe}=Vt(),{tenantEmailDomain:Je}=Vt(),[Ye,lt]=a.useState(r.state?.message==="comingFromTransactionDetail"),rt=r.state?.message==="comingFromOverview",yn=Cs(),Ke=Ne.getSignedInUser(),{useDynamicConfig:Tn,useFeatureGate:se}=qe(),{configValue:vn}=Tn(Ss.enableUncategorizedExpenseCategory),ce=vn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:dt}=se(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:be}=se(Y.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Ze}=se(Y.isTransactionActivityEnabled),{isFeatureEnabled:ut}=se(Y.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:Pn}=se(Y.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:An}=se(Y.isProjectsTransactionsEnabled),{isFeatureEnabled:wn}=se(Y.isReconV3Enabled),{isFeatureEnabled:Rn}=se(Y.isJEScheduleCOTEnabled),xn=a.useCallback((o=>{const w=ct(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,w)}),[s]),Dn=D((o=>Ao(o,"common"))),L=D((o=>Ae(o))),{categoryOptions:Un,paymentAccountNames:Fn}=D((o=>wo(o.accountState))),_n=D((o=>Ro(o.classState))),{monthEndCloseChecksView:K,currentSelectedView:_,selectedPeriod:V,selectedTransactionCategorizationTab:He,currentSelectedViewBackgroundRefreshFetchState:Bn,currentSelectedViewFetchState:Se,jeSchedules:Qe,reconciliation:mt}=L;ys(_==="transaction_categorization");const Vn=L.transactionView.saveStatus.fetchState,pt=L.transactionView.transactions,ht=a.useRef(pt);ht.current=pt;const gt=D((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Ct=D((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),St=a.useRef(gt);St.current=gt;const ft=a.useRef(Ct);ft.current=Ct;const ie=Ts(Vn,(()=>{const o=[],w=ft.current,j=St.current,$=j!=null&&w!=null?j[w]:void 0;if($?.transactionReviewLocalDataById!=null)for(const ne of Object.values($.transactionReviewLocalDataById)){const Z=ne?.transactionReviewLocalData?.lineItemById;if(Z!=null)for(const ee of Object.values(Z)){const N=ee?.account;N?.accountId!=null&&o.push(N.accountId)}}const U=ht.current;for(const ne of U)for(const Z of ne.lines??[])"account"in Z&&Z.account?.accountId!=null&&o.push(Z.account.accountId);return o}));a.useEffect((()=>{_==="transaction_categorization"&&A!==!0||W(void 0)}),[_,W,A]),a.useEffect((()=>{p===!0&&I?.()}),[_,mt.selectedAccountId]);const On=L.transactionView.selectedTransactionCategorizationCompletedSubTab,De=`${He}|${On}`,Ue=a.useRef(null),It=a.useRef(null);a.useEffect((()=>{Ue.current!==null?Ue.current!==De&&(Ue.current=De,_==="transaction_categorization"&&P()):Ue.current=De}),[P,_,De]);const zn=D((o=>Q==null?void 0:xo(o.transactionState,Q))),me=zn?.qboId,kt=D((o=>me==null?void 0:Do(o,me)));a.useEffect((()=>{me!=null&&h(Uo(me))}),[h,me]);const{createTransferEntryStatus:Et,creditCardTransferAccountsList:bt,transferAccounts:yt}=L.transactionView,Tt=a.useCallback((o=>vs(h,o)),[h]),vt=a.useMemo((()=>_!=="transaction_categorization"||b==null?null:b.contentType==="activity"?Ze===!0?S.jsx(fs,{activityLogView:kt,qboId:me,onClose:()=>M(null),selectedTransactionId:b.detail.transactionId,isQuickViewCardStyle:!0},String(b.detail.transactionId)):null:b.contentType==="transfer"?S.jsx(Is,{createTransferEntryStatus:Et,transaction:b.detail,transferAccounts:b.detail.transactionType==="credit_card_payment"?bt:yt,onClose:()=>M(null),onCreateTransfer:Tt,isQuickViewCardStyle:!0},String(b.detail.transactionId)):null),[_,b,Ze,kt,me,Et,bt,yt,Tt]),Mn=vt!=null,{selectedAccountId:ye}=mt,Pt=at(Qe.accountSettingsView.saveState.fetchState),Ln=D((o=>Fo(o.accountState,o.accountListState,"accountList"))),jn=D((o=>_o(o))),Te=xe!=null?Bo(xe):_,$n=D((o=>o.entityAutoCompleteState.autoCompleteText.common));if(Sn({isDataReady:Se.fetchState==="Completed"}),Ke==null)throw Error("Can't access expense automation screen without signing in...");const At=mn(V),ve=$e(At.start),Pe=$e(At.end);if(ve==null||Pe==null)throw Error(`Invalid start - ${ve} and end - ${Pe} period from given ${V}`);const qn=a.useCallback((()=>{c(!1)}),[]),Gn=a.useCallback((()=>{E(!0)}),[]),Nn=a.useCallback((o=>{v(o),E(!1)}),[]),Jn=a.useCallback((()=>{v([])}),[]),Fe=L.missingReceipts.bulkUpload.phase,wt=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{be===!0&&_==="missing_receipts"&&Fe==="matching"&&wt!=null&&h(gn({cacheOverride:!0}))}),[be,_,Fe,wt,h]);const Rt=Ke?.userId,Yn=V.month,Kn=V.year,xt=e?.tenantId;a.useEffect((()=>{_==="missing_receipts"&&be!==!1&&Fe==="idle"&&Rt!=null&&xt!=null&&h(Vo())}),[_,be,Fe,Rt,xt,Yn,Kn,h]),a.useEffect((()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?z(!0):z(!1)}),[B.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{Te!=null&&_!==Te&&h(pn(Te))}),[Te]),a.useEffect((()=>{f===!1&&Se.fetchState==="Completed"&&m&&(X(!0),h(Jt(!1,!1,ce)))}),[f,Se,m,ce]),a.useEffect((()=>{const o={month:V.month,year:V.year},w=It.current;It.current=o,w===null||w.month===o.month&&w.year===o.year||!rt&&m&&(h(Jt(!1,!1,ce)),h(re(V,ye,!1,!1)))}),[V.month,V.year,m,ce]);const Dt=a.useCallback(((o=!1,w=!1)=>{const j={start:ve,end:Pe};switch(_){case"transaction_categorization":h(Ie(He,j,o,!Ye,void 0,void 0,w,void 0,ce)),lt(!1);break;case"flux_analysis":h(ze(V,o,w,null));break;case"month_end_insights":if(w===!1){const $=new Date(V.year,V.month,0),U=zo($.toDateString()).format(bn.analytics.YYYYDashMMDashDDFormat);h(Mo(!0,e.companyId,e.tenantId,U)),h(Lo(e.companyId,e.tenantId))}break;case"je_schedules":h(Oo(j,w));break;case"missing_receipts":h(hn(j,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,w));break;default:h(re(V,ye,o,w))}}),[_,ve,Pe,e.companyId,e.tenantId,He,V,ye,Ye,lt,ce]);a.useEffect((()=>{_===Te&&Se.fetchState==="Not-Started"&&m&&Dt(!0)}),[Se,ve,Pe,e.companyId,e.tenantId,m]),a.useEffect((()=>{rt||Ye||ue.current||Bn.fetchState==="In-Progress"||Se.fetchState!=="Completed"||(ue.current=!0,Dt(!0,!0))}),[]),a.useEffect((()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&K.fetchState!=="Error"&&e?.tenantId!=null&&h(we({tenantId:e.tenantId,period:V,refreshViewInBackground:!1}))}),[K.fetchState,e?.tenantId]),a.useEffect((()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?c(!0):c(!1)}),[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&m&&(h(we({tenantId:e.tenantId,period:V,refreshViewInBackground:!0})),h(jo({companyId:e.companyId})),T("../"))}),[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,e.tenantId,V,e.companyId,m]),a.useEffect((()=>{const o=setInterval((()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&h(we({tenantId:e.tenantId,period:V,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[K.fetchState,e.tenantId,V,h]),a.useEffect((()=>{const o=setInterval((()=>{_==="reconciliation"&&ye==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(re(V,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[_,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,re,ye,V]);const Zn=Qt();a.useEffect((()=>{const o=(K.monthEndCloseChecks?.monthEndCloseCheckList.find((w=>w.id==="month_end_insights"))?.isDisabled??!1)&&!dt;_!=="month_end_insights"||!o&&K.monthEndCloseChecks?.reportEmailSentDate==null||T("../")}),[_,K.monthEndCloseChecks]);const Hn=p===!0?i:R,Qn=p===!0||A===!0,Wn=p===!0?I:t;a.useEffect((()=>{Pt==="In-Progress"&&Qe.accountSettingsView.saveState.fetchState==="Completed"&&h(Yt())}),[Pt,Qe.accountSettingsView.saveState.fetchState,Yt]);const{transactionId:Ut,onSaveVendor:Xn,onSaveSuccess:ea,onCancel:ta,vendorViewDetails:na}=(({expenseAutomationViewSelector:o,closeDrawerHandler:w,currentSelectedView:j,isUncategorizedExpenseCategoryEnabled:$})=>{const U=ke();let ne,Z,ee;const N=Qt(),ae=o.transactionView;let Ft=()=>{};const{transactions:oa,selectedTransactionId:fe,selectedTransactionLineId:_e,transactionLocalData:sa}=ae;if(j==="transaction_categorization"){const We=sa.find((pe=>pe.transactionId===fe)),H=oa.find((pe=>pe.id===fe)),_t=_e!=null?We?.transactionReviewLocalData?.lineItemById[_e]:void 0,Bt=_t?.account;Z=_t?.class?.classId,ne=["Uncategorized Income","Uncategorized Expense"].includes(Bt?.accountName??"")?void 0:Bt?.accountId;const ia=ws(fe,H?.typeOfTransaction);H!=null&&ia&&(ee={id:fe,type:ct(H.typeOfTransaction)}),Ft=()=>{if(fe!=null&&_e!=null&&H!=null){const pe=ae.transactionLocalData.find((Be=>Be.transactionId===fe))?.transactionReviewLocalData;if(pe!=null&&H.lines!=null&&H.lines.length>0){const Be=pe.lineItemById[_e];let Xe=pe.selectedEntity;if(Ua(H)||(Xe=Be.selectedEntityLine),Xe!=null){const la=Xe,ra={transactionId:{id:H.id,type:H.type},transaction:H,lineIds:H.lines.map((da=>da.id))??[]};U(it({entity:la,amount:Be.amount.amount,transactionDetails:ra,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const ca=D((We=>Mt(We,void 0,ne,Z)));return{transactionId:ee,onSaveVendor:()=>{U(Da(ee,void 0,!1,!0))},onSaveSuccess:Ft,onCancel:()=>{ee!=null&&U(wa({transactionId:ee})),U(Ra()),U(xa()),w()},vendorViewDetails:ca}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{z(!1)},currentSelectedView:_,isUncategorizedExpenseCategoryEnabled:ce}),aa={events:e.companyId!=null?[`private-encrypted-${e.companyId}.${kn}`,`private-encrypted-${e.companyId}.${En}`]:[],eventCallback:(o,w,j)=>{j.onReconciliationPusherEventReceived(o,w)}};return yn?.loggedInUserRoleMap==null?K.fetchState==="Error"?S.jsx(ks,{onGoHome:()=>T("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(fn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(xs,{isOpen:d,drawerLeftMargin:new Es(0,0,300,650),onClose:()=>{E(!1)},children:S.jsx(Ls,{onClick:o=>o.stopPropagation(),children:S.jsx(_s,{companyId:e.companyId,closeCustomerRequestDrawer:()=>E(!1),addCustomerRequest:Nn,resetCustomerRequest:Jn})})}),Ut!=null&&de&&S.jsx(Ps,{isOpen:de,transactionId:Ut,onSaveVendor:Xn,onSaveSuccess:ea,onCancel:ta,vendorViewDetails:na}),S.jsx(zs,{...aa,navigate:T,location:r,themeState:te,categoryOptions:Un,classesForFilters:_n,accountsForFilters:Fn,vendorSearchAutoCompleteData:{autoCompleteText:$n,entityAutoCompleteView:Dn},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:be,monthEndInsightsPreviewMode:n,monthEndInsightsCustomerRequestData:k,isRealtimeInsightsFeatureEnabled:dt,isCreateTransferEntryFromExpenseEnabled:ut,isUncategorizedExpenseCategoryEnabled:ce,isAccountingClassesEnabled:jn,isProjectsTransactionsEnabled:An,isCOTEnabled:Zn,isJEScheduleCOTEnabled:Rn,currentTenant:e,companyId:e.companyId,signedInUser:Ke,isTransactionActivityEnabled:Ze,isRightPanelOpen:Mn,rightSidePanel:vt,onOpenTransferRightPanel:ut===!0?oe:void 0,uncategorizedAccounts:Ln,onClickCustomerRequest:Gn,handleEditClick:qn,tenantEmailDomain:Je,trackExpenseAutomationTabAnalytics:O,setActivityLogTransactionId:W,closeSidePanel:Wn,openTransactionPanel:s,sidePanelIsOpen:Qn,sidePanelIsFullView:p!==!0&&y,panelContent:Hn,isAiCfoAccessEnabled:F,onAskAiCfoClick:he,isExpenseAutomationCommentingEnabled:Pn,isReconV3Enabled:wn,onExpenseAutomationCommentingThreadClick:xn,sidePanelListPercent:p===!0?66:void 0}),ie.showPopup&&ie.popupType!=null&&S.jsx(bs,{popupType:ie.popupType,currencySymbol:ie.currencySymbol,accountId:ie.popupAccountId??"",accountName:ie.popupAccountName??"",onSubmit:ie.handleSubmit,onDismiss:ie.handleDismiss})]})}))),Ls=Ge(ma)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function dc(){return S.jsxs(ha,{children:[S.jsx(et,{path:"*",element:S.jsx(Ds,{})}),S.jsx(et,{path:"/:selectedTab/:selectedPeriod/*",element:S.jsx(Ms,{})}),S.jsx(et,{path:"*",element:S.jsx(ua,{})})]})}export{dc as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{a5 as i,a6 as l,a7 as p,v as f}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import m from"./NotFoundScreen-D8y3QSjF.js";import{h as b,g as u}from"./core-4nWRIid2.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]="c70580bc-4af3-4de4-ac46-b35ae2a6be4d",e._sentryDebugIdIdentifier="sentry-dbid-c70580bc-4af3-4de4-ac46-b35ae2a6be4d")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-BtWdTNDK.js";import{u,h as l,g as m}from"./core-4nWRIid2.js";import{hz as p,MN as g,MO as _}from"./zeni-epic-state-Brhydpej.js";import{u as b,L as h,z as y}from"./index-CbGX11uA.js";import"./liveblocks-BqtYq8PY.js";import"./recharts-UIIeT-6j.js";import"./mui-ChRNPf14.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="cedaf845-2fef-4ad4-9061-fcf1b9651295",e._sentryDebugIdIdentifier="sentry-dbid-cedaf845-2fef-4ad4-9061-fcf1b9651295")}catch{}})();function R(){const e=u(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),f=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&f!=null){const t=JSON.parse(f);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BqtYq8PY.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as N,N as te,o as ne,p}from"./core-4nWRIid2.js";import{MG as k,MH as v,MI as M,BC as B,Bo as T,MJ as D,MK as oe,ML as se,Bs as ie,fE as $,Bz as le,Bw as re}from"./zeni-epic-state-Brhydpej.js";import{J as g,o as r,r as de,e as j,m as G,s as ce,v as me,O as pe,x as H,w as ue,i as he,y as xe,A as ge,E as fe,B as we,C as be,Z as Se,Q as ye,S as ke,F as ve,G as je,H as $e}from"./index-CbGX11uA.js";import{n as m}from"./mui-ChRNPf14.js";import f from"./NotFoundScreen-D8y3QSjF.js";import{a as I}from"./sentry-BtWdTNDK.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="b245afc9-ada8-4ea7-97c7-75c36a326dca",e._sentryDebugIdIdentifier="sentry-dbid-b245afc9-ada8-4ea7-97c7-75c36a326dca")}catch{}})();const Ie=m.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}}))(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,De=x((function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ee=x((function(e){const t=k(e),n=v(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(M({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ne(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Me=x((function(e){const t=k(e),n=v(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}}))(xe);function Te(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},He=m(ke)`
|
|
38
|
-
width: ${r.sp4};
|
|
39
|
-
height: ${r.sp4};
|
|
40
|
-
margin-bottom: ${r.sp3};
|
|
41
|
-
margin-top: ${r.sp3};
|
|
42
|
-
margin-left: ${r.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,Ke=m.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,Ve=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,_e=m.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,We=x((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),K=n.pathname.includes("address"),w=g(),V=ge(),A=fe(),b=we(),_=()=>{V.toggle()},W=N((u=>k(u))),J=N((u=>v(u))),{authParams:U,fetchState:c,billAttachment:O,billFetchState:P,companyName:Z,currencySymbol:q,amount:Q}=W,{tenantId:z,userId:L,sessionId:E}=U,{fetchState:R,internationalBankAccountCreateStatus:X}=J;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))}),[b,c,s,o,d,t]),I.useEffect((()=>{b&&c==="Completed"&&($(L,E,z),l!=null&&t(re(l)))}),[c,b,L,E,z,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",Z,l??"",Je(n.pathname),q,Q))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:_}):null,a.jsx(_e,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:O,type:"bill"})}),a.jsx(Ve,{windowSize:w,children:e})]})]})}const Je=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BqtYq8PY.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as F,g as _,h as O,t as w,j as l,N as x}from"./core-4nWRIid2.js";import{z as r,E as P,a as V,f as A,e as N,h as $,n as B,Q,k as R}from"./index-CbGX11uA.js";import{e$ as W,Mr as q,MB as G,Ms as H,fE as J,g4 as K,Mx as X,gu as Y,c_ as Z,MC as ee,MD as te}from"./zeni-epic-state-Brhydpej.js";import{n as ne}from"./mui-ChRNPf14.js";import{u as ae}from"./useDeviceId-BVGc_c85.js";import{f as se}from"./analyticsHelper-BZTNTJma.js";import{t as ie}from"./getLocaleForTenant-Bpp7IHaZ.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="26bf91bf-a9b5-41ac-a73a-cb6ccfc5f161",t._sentryDebugIdIdentifier="sentry-dbid-26bf91bf-a9b5-41ac-a73a-cb6ccfc5f161")}catch{}})();const C=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Ce(){const t=F(),s=_(),m=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:c,twoFAPhoneNumber:D,magicLinkEmail:d,verifyDeviceFetchState:E,resendVerifyDeviceOTPFetchState:M}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),b=l((e=>q(e))),T=r.getSignedInUser(),v=P().mode;f.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,g)))}),[n,p,t,i,g,a?.zeniSessionId]),f.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),a.zeniSessionId),J(a.userId,a.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),Y().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[h,S,y,a,o,b,v,s.state,t]);const z=f.useCallback((()=>{m("/signin/auth")}),[m]),U=f.useCallback((()=>{i!=null&&c!=null&&d!=null&&t(ee(i,d,c))}),[i,c,t,d]),j=f.useCallback((e=>{i!=null&&n!=null&&d!=null&&c!=null&&t(te(e,i,d,c))}),[i,n,t,d,c]);if(I==="Completed"&&c!=null)return u.jsx(B,{phoneNumber:D,verifyOtpFetchState:E.fetchState,resendVerifyDeviceOTPFetchState:M,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:z});if(h==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||T!=null){const e=s.state?.origin??"/";return u.jsx(x,{to:e,state:{...s.state,origin:""}})}if(!C(n,p)||g==null||I==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(x,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&a?.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{Ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BqtYq8PY.js";import{h as n,n as e}from"./core-4nWRIid2.js";import{U as i}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import"./sentry-BtWdTNDK.js";import"./zeni-epic-state-Brhydpej.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as ct,a as mt,n as dt,j as E}from"./liveblocks-BqtYq8PY.js";import lt from"./NotFoundScreen-D8y3QSjF.js";import{a as k}from"./sentry-BtWdTNDK.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as q}from"./core-4nWRIid2.js";import{cx as St,fL as H,e$ as K,fZ as bt,fS as b,Ts as O,fV as d,fK as y,sM as F,yi as It,Tt,fJ as Ct,f$ as yt,sR as _t,Tu as $,bo as M,fD as w,sV as z,Tv as At,cJ as Et,cC as Nt}from"./zeni-epic-state-Brhydpej.js";import{_ as xt,z as Bt,w as wt,i as Rt,a0 as vt,cW as Dt,x as N,a9 as Pt,cX as Ut,aa as Gt,v as $t}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="28619c7e-9778-4597-a9c8-fe1bcb49fc90",t._sentryDebugIdIdentifier="sentry-dbid-28619c7e-9778-4597-a9c8-fe1bcb49fc90")}catch{}})();const Ft=(t,l)=>new Promise(((n,u)=>{const g=t.map((i=>new Promise((s=>{l(i),s()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((i=>{u(i)}))})),jt=kt((function(t,l){const n=H(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=K(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(z("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t($([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(F("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(z("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(x(r),t($([r],M())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Ft(s,x).then((()=>{t($(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S((e=>H(e))),o=S((e=>K(e))),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Mt({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const Q=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),v=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),D=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=Dt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:L,isLoading:W,fetchMore:J,isFetchingMore:X,hasFetchedAll:Z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,D]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&W===!1&&B!=null&&L!=null){const e=`dashboard_${o.companyId}`,p=B.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const G=L.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(X||Z===!0||J==null||J(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,X,T,Z,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];v==="all"?A.push("read","unread"):v!=="mentions"&&A.push(v),s(F("task_manager",C,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{u as T,g as A,j as o,N as R}from"./core-4nWRIid2.js";import{MQ as j,e$ as C,fR as P,MR as x,MS as z,MT as D,MU as L,ok as N,LN as k}from"./zeni-epic-state-Brhydpej.js";import{z as h,M as I}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="a8e0b81d-2257-4d8c-bcb7-43630c5dd631",n._sentryDebugIdIdentifier="sentry-dbid-a8e0b81d-2257-4d8c-bcb7-43630c5dd631")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo((()=>j(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>C(e))),l=o((e=>P(e))),d=o((e=>e.tenantState.fetchState)),b=o(x),y=o(z),c=o(D),[S,v]=r.useState(null),[E,M]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const U=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((_=>_.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{M("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(R,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BqtYq8PY.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-4nWRIid2.js";import{e$ as U,sA as R,s8 as X,Nl as v,s3 as S,bs as ee,bn as ae,bZ as te,s4 as se,Nm as oe,N8 as C,dL as re,wf as ne,Nn as ce,wC as ie,fI as le,fG as de}from"./zeni-epic-state-Brhydpej.js";import{z as me,_ as fe,a0 as pe,D as ue,w,i as N,Z as he,e as M,ap as ge,x as Fe}from"./index-CbGX11uA.js";import"./mui-ChRNPf14.js";import be from"./NotFoundScreen-D8y3QSjF.js";import{F as Ie}from"./FeaturePreviewScreen-BYw0siNX.js";import{a as g}from"./sentry-BtWdTNDK.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import{u as Se}from"./useInitialThreadRequest-BMuxer3t.js";import{t as Te}from"./routePaths-BYuMJjxP.js";import{M as ye}from"./MobileAppDrawer-C850zeFL.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="3e5fa4ad-958f-4b79-a5aa-ee910c33c0c8",s._sentryDebugIdIdentifier="sentry-dbid-3e5fa4ad-958f-4b79-a5aa-ee910c33c0c8")}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})}},xe=K((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:M}}),(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=Fe(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("../../")}}}))(ge);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>U(t))),$=y.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),A=d((t=>t.reportUIOptionsState.selectedForecast)),D=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,E,P)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}}),[c,p,e,l,i,m,u,R,S,F]);const k=ue(),B=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:L}=G(N.isReportsCommentingEnabled),W=Se(L?y?.companyId:void 0,{clearParams:l&&m}),[Y,Z]=g.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(xe,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{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(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BqtYq8PY.js";import{Nh as oe,e$ as J,kI as H,fI as Q,fG as ie,KL as ee,MX as re,vc as ke,Ni as Y,v1 as ve,vm as Ee,vg as le,v5 as ce,vk as Pe,vh as je,Nj as de,x1 as Le,fs as Te,gk as Ae,Nk as _,v9 as pe,v8 as ue,vp as Re,c7 as Fe}from"./zeni-epic-state-Brhydpej.js";import{J as me,w as ae,i as G,z as K,d as ge,g as fe,I as he,al as Ce,am as Oe,G as ye,o as O,K as be,a as M,an as Ve,_ as Ze,a0 as Be,Z as Ue,e as Se,h as $e,x as ze,ao as _e,D as Ge}from"./index-CbGX11uA.js";import{D as we,n as N,S as xe}from"./mui-ChRNPf14.js";import te from"./NotFoundScreen-D8y3QSjF.js";import{a as c}from"./sentry-BtWdTNDK.js";import{u as se,i as He,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-4nWRIid2.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import{M as Xe}from"./MobileAppDrawer-C850zeFL.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="15c1a0fc-ba67-480c-98f3-5fc84b414dea",e._sentryDebugIdIdentifier="sentry-dbid-15c1a0fc-ba67-480c-98f3-5fc84b414dea")}catch{}})();const qe={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=He(),r=g((l=>oe(l))),p=g((l=>J(l))),v=g((l=>H(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(G.isDebitCardFeatureEnabled),E=Q(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),b()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(G.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:R}=fe(p?.tenantId),y=!j||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Qe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Qe=N(xe)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,De=N(be.H6Regular)`
|
|
6
|
-
margin-top: ${O.sp7};
|
|
7
|
-
padding-left: ${O.sp8};
|
|
8
|
-
padding-right: ${O.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ie=N(be.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${O.sp8};
|
|
14
|
-
padding-right: ${O.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${O.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,ea={overlayWidth:new ye(100,100,48)},X=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>oe(o))),r=g((o=>J(o))),p=g((o=>H(o))),{useFeatureGate:v}=ae(),{isFeatureEnabled:D}=v(G.isDebitCardFeatureEnabled),I=Q(D,r),E=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(Y())},C=()=>{V===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=v(G.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:R}=fe(r?.tenantId),y=!j||R,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(Y()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:X.discardTitle}),descriptionComponent:a.jsx(Ie,{children:X.discardDescription}),primaryButtonText:X.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Ne((function(e,t){const d=de(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:Se}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(ce(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Ke(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),h=g((s=>J(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(G.isDebitCardFeatureEnabled),Z=g((s=>H(s))),k=!Q(V,h)&&Z,S=ee(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,v]=c.useState(!1),[D,I]=c.useState(!1),[E,L]=c.useState(!1),[T,B]=c.useState("off"),[U,x]=c.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>de(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),R=g((s=>Ae(s))),y=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),v(!0),n(pe()))}),[p,b,w,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ue(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),L(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:R,classListView:P,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(Je,{closeDrawerHandler:F,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:R,classListView:P,companyId:y,mode:u.uiState.mode}):null,a.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=Ge();return Fe(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
|