@zeniai/web-app-ui 5.0.93-qa → 5.0.94-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-HF97OiuD.js +1 -0
- package/dist/assets/AddressScreen-D79PPd-o.js +9 -0
- package/dist/assets/AiCfoScreen-CrvwqXvB.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-Btsu3H48.js → BillPayApprovalRoutes-CHeXH92D.js} +1 -1
- package/dist/assets/{BillPayRoutes-CZNt9nN-.js → BillPayRoutes-BTV6oUW7.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Bpubo3oO.js → BusinessVerificationPageScreen-COhCODO3.js} +2 -2
- package/dist/assets/ChargeCardRoutes-jlodpUTF.js +71 -0
- package/dist/assets/{CompanyPassportScreen-BN0_lZh1.js → CompanyPassportScreen-oolpa5Ca.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CpX3K7rD.js → ConnectionAuthScreen-CmfFicXn.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-dJPDlAs9.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DE5g8gop.js → CustomerOnboardingRoutes-Dc6Ovlz3.js} +4 -4
- package/dist/assets/{DashboardRoutes-LjpSDL97.js → DashboardRoutes-BU1BeRRW.js} +3 -3
- package/dist/assets/{DefaultTenantHome-B3GQtREy.js → DefaultTenantHome-Ch-_hudk.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-xS5yR7KI.js → DomesticWireDetailScreen-C4hZPJdB.js} +3 -3
- package/dist/assets/DrawerScreen-Dhr1itui.js +1 -0
- package/dist/assets/EntityDetailRoutes-DtAVASvN.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-0uEo0sF6.js → ExpenseAutomationRoutes-Dt21PcAV.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-1ynGY-A8.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-V8qKg5-6.js → HubSpotOAuthCallbackScreen-DI3niet7.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Cew60Z39.js → MagicLinkRoutes-CcECDB6W.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-C-0tiAXs.js +12 -0
- package/dist/assets/{MobileAppDrawer-CPI95lgy.js → MobileAppDrawer-D38LtL34.js} +1 -1
- package/dist/assets/NotFoundScreen-Dz0534r9.js +1 -0
- package/dist/assets/{NotificationRoutes-CQtvYBtP.js → NotificationRoutes-B-vlIUTm.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CbMZbxsS.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Z2m1-YQn.js +1 -0
- package/dist/assets/PeopleRoutes-B-Kt1ScJ.js +22 -0
- package/dist/assets/PerformanceRoutes-BzPr2Nnu.js +1 -0
- package/dist/assets/{Preview-D3Uiphuo.js → Preview-CX79dadf.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-iMpRDnN4.js → QBOConnectionScreen-DiKCakpQ.js} +1 -1
- package/dist/assets/{ReferralListScreen-yxuUKjxd.js → ReferralListScreen-kpr6aOuh.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-Det6cqdB.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CBzX3JSO.js → ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B8qr_kkC.js → ReimbursementRoutes-DTIV_kcP.js} +4 -4
- package/dist/assets/{ReportsRoutes-D1LUbrVF.js → ReportsRoutes-3VuypKeW.js} +1 -1
- package/dist/assets/RewardsRoutes-B2QW-eU5.js +1 -0
- package/dist/assets/ScreenRoutes-0jsh5TOL.js +2 -0
- package/dist/assets/{SettingsRoutes-BATsExuY.js → SettingsRoutes-BihUnYT-.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BVkXSSWw.js → SetupPagesScreen-rBBoQAuI.js} +5 -5
- package/dist/assets/SignInScreen-DyfaUAWP.js +1 -0
- package/dist/assets/SignOutScreen-B4hTTXUy.js +9 -0
- package/dist/assets/{TaskListScreen-BadjlUfo.js → TaskListScreen-B7mkcqsp.js} +2 -2
- package/dist/assets/{TaskRoutes-sUZt1FTw.js → TaskRoutes-BIYOSzTN.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-BsU_4MLZ.js → TransactionDetailRoutes-BCR0Vehv.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BQ6sw9a7.js → TransactionDetailScreen-Hfy201z1.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Cy_qlp5W.js → TransactionListRoutes-Cbfw3Mig.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BRpP2lkX.js → TreasuryRoutes-Nis2HK0P.js} +6 -6
- package/dist/assets/{VendorsRoutes-CTRK7ynr.js → VendorsRoutes-D8Pby__-.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-CQq7U1h7.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BFhwnSRQ.js → ZeniAccountRoutes-DXX67VtM.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-B4C2kMj5.js +9 -0
- package/dist/assets/{accountMappingHelper-BOtLSvYe.js → accountMappingHelper-ClJz5V9X.js} +1 -1
- package/dist/assets/{analytics-CoOmPlNt.js → analytics-NZ6ROu06.js} +1 -1
- package/dist/assets/{analyticsHelper-BocYRaaP.js → analyticsHelper-DrdSzHTB.js} +1 -1
- package/dist/assets/{core-B_XHMrqe.js → core-D-NK-UK9.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-D2C9TGj8.js → decodeURIComponentSafe-C48GZJfu.js} +1 -1
- package/dist/assets/{dnd-CtoU_fHu.js → dnd-C49i2BE4.js} +1 -1
- package/dist/assets/{empty-B3mnnOau.js → empty-CtUkBjnR.js} +1 -1
- package/dist/assets/{empty-Cdv-ZWIg.js → empty-DH2H1-Nx.js} +1 -1
- package/dist/assets/{emptyVideoElement-roYGDErm.js → emptyVideoElement-BCGqnPYV.js} +1 -1
- package/dist/assets/{epic-CAXHXwTI.js → epic-D64Ymfe0.js} +1 -1
- package/dist/assets/getLocaleForTenant-DL4YoPxV.js +1 -0
- package/dist/assets/{index-BfaZdimW.js → index-AU1I47Je.js} +1 -1
- package/dist/assets/{index-DnWe9s1s.js → index-Bx6iIwrK.js} +1 -1
- package/dist/assets/{index-_X_wZ3pf.js → index-CTaHBGA6.js} +1 -1
- package/dist/assets/{index-BiyNQ4T-.js → index-Cii2mjSS.js} +1 -1
- package/dist/assets/{index-BHo5Qa5_.js → index-CppZNJwq.js} +1 -1
- package/dist/assets/{index-IhJ3VQPC.js → index-DCy8xCNa.js} +1 -1
- package/dist/assets/{index-hGk2kzA3.js → index-DUe_bU79.js} +2 -2
- package/dist/assets/{index-DcF25xRC.js → index-DrTnWXwv.js} +13303 -13262
- package/dist/assets/{lexical-Dx9Jj1SY.js → lexical-Bp-0qESw.js} +1 -1
- package/dist/assets/{liveblocks-DyzG7jl-.js → liveblocks-D6iO1SmY.js} +1 -1
- package/dist/assets/{lottie-CqwrfSWf.js → lottie-BWZi4J-8.js} +1 -1
- package/dist/assets/{mui-CfonSYhg.js → mui-DqRlPgPp.js} +1 -1
- package/dist/assets/{pathToGoBack-B-fIvw6x.js → pathToGoBack-DvdlIQjg.js} +1 -1
- package/dist/assets/{pdf-CsFFdLdL.js → pdf-BpZ3cLIj.js} +4 -4
- package/dist/assets/{pdf-lib-BT18iM_Z.js → pdf-lib-CNmHIzRc.js} +1 -1
- package/dist/assets/{plaid-B7Pmnnvt.js → plaid-BzyOi-ir.js} +1 -1
- package/dist/assets/{pusher-wr2FxlsB.js → pusher-BMtiLftw.js} +1 -1
- package/dist/assets/{react-Bvcd48RT.js → react-BJh7Ho8n.js} +1 -1
- package/dist/assets/{react-Ymya1N-w.js → react-CmUCRpgB.js} +1 -1
- package/dist/assets/{react-DDIv_AwX.js → react-D3MVFA0D.js} +1 -1
- package/dist/assets/{react-CH1Ok2Rn.js → react-Djxq7qii.js} +1 -1
- package/dist/assets/{react-B2o52OqD.js → react-DxEGkukB.js} +1 -1
- package/dist/assets/{react-BdDGVOeS.js → react-TFItAO3U.js} +1 -1
- package/dist/assets/{recharts-CaK7MRaR.js → recharts-Dt8dM4EI.js} +2 -2
- package/dist/assets/{routePaths-Dgf8Lpxl.js → routePaths-B-3pox1f.js} +1 -1
- package/dist/assets/{sentry-Cdif28fl.js → sentry-DJeJwz74.js} +1 -1
- package/dist/assets/{url-DOMbcgX5.js → url-Cab0ioG_.js} +1 -1
- package/dist/assets/{url-x3nND-T-.js → url-CawXuWkK.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-ChY2Lwaz.js → useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BxaFyJbc.js +1 -0
- package/dist/assets/{useDeviceId-B_i0E4gh.js → useDeviceId-CYAkkrZp.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-B1Dx2jH5.js → useInitialThreadRequest-D-JPWLWk.js} +1 -1
- package/dist/assets/{utils-DMgIZDY7.js → utils-CGva6Exy.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-9CO_VCKb.js → withTransactionSidePanel-CMaq9uFn.js} +3 -3
- package/dist/assets/{zeni-epic-state-D9HDY_8v.js → zeni-epic-state-22WFBgK9.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-tQsdf2VE.js +0 -1
- package/dist/assets/AddressScreen-sxiJIRy-.js +0 -9
- package/dist/assets/AiCfoScreen-CCHEYuBL.js +0 -22
- package/dist/assets/ChargeCardRoutes-DcKS_cxy.js +0 -71
- package/dist/assets/CustomerOnboardingAuthScreen-C5p6u6fC.js +0 -1
- package/dist/assets/DrawerScreen-DOrBrG-6.js +0 -1
- package/dist/assets/EntityDetailRoutes-pbHs2RhY.js +0 -1
- package/dist/assets/FeaturePreviewScreen-2-p5K2P0.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-C10R5m-o.js +0 -12
- package/dist/assets/NotFoundScreen-BUqotHFB.js +0 -1
- package/dist/assets/OAuthConsentScreen-DkF2l_Ng.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Cg8SffI2.js +0 -1
- package/dist/assets/PeopleRoutes-BnLCJA6K.js +0 -22
- package/dist/assets/PerformanceRoutes-Bqj2LPVg.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-RL8S1isL.js +0 -1
- package/dist/assets/RewardsRoutes-B8Zxnta2.js +0 -1
- package/dist/assets/ScreenRoutes-BYm6h7dp.js +0 -2
- package/dist/assets/SignInScreen-KM09ZzEo.js +0 -1
- package/dist/assets/SignOutScreen-yw_T1K5k.js +0 -9
- package/dist/assets/WiseConfirmationScreen-DdfNZb9c.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-aPQ0-Az6.js +0 -9
- package/dist/assets/getLocaleForTenant-EkX2Npfp.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BYtw9cd1.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-DrTnWXwv.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DJeJwz74.js"><link rel="modulepreload" crossorigin href="/assets/core-D-NK-UK9.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-22WFBgK9.js"><link rel="modulepreload" crossorigin href="/assets/mui-DqRlPgPp.js"><link rel="modulepreload" crossorigin href="/assets/analytics-NZ6ROu06.js"><link rel="modulepreload" crossorigin href="/assets/utils-CGva6Exy.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.94-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
30
|
"@zeniai/client-analytics": "2.0.14",
|
|
31
31
|
"@zeniai/client-epic-state": "5.0.51",
|
|
32
|
-
"@zeniai/web-components": "4.1.
|
|
32
|
+
"@zeniai/web-components": "4.1.1",
|
|
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-DyzG7jl-.js";import{A as d}from"./AddressScreen-sxiJIRy-.js";import i from"./NotFoundScreen-BUqotHFB.js";import"./sentry-Cdif28fl.js";import{o as s,p as r}from"./core-B_XHMrqe.js";import"./zeni-epic-state-D9HDY_8v.js";import"./recharts-CaK7MRaR.js";import"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.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]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}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 d}from"./liveblocks-DyzG7jl-.js";import{a as h}from"./sentry-Cdif28fl.js";import{l as T,h as _,u as j,i as E,g as B,n as K}from"./core-B_XHMrqe.js";import{K as M,m as $,z as D,d as L,B as R,v as z,f as C,h as S,_ as F,j as b,p as N}from"./index-DcF25xRC.js";import{K8 as k,g_ as U,eQ as G,K9 as O,c2 as V,Ka as q,kj as H}from"./zeni-epic-state-D9HDY_8v.js";import{n as Q}from"./mui-CfonSYhg.js";import J from"./NotFoundScreen-BUqotHFB.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]="977f0672-ce37-4e0c-885e-68dac1365f2a",e._sentryDebugIdIdentifier="sentry-dbid-977f0672-ce37-4e0c-885e-68dac1365f2a")}catch{}})();const W=Q.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
|
-
`,X=K(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&O(t.roleMap),r=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const r=i.state,n=N(r?.pathnameStackToGoBack);let s=n.poppedPathname??v();const u=r?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(s=`${s}?${f}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const r=Y(a);e(H({addressType:c,addressToCreate:r})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(F);function de({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),r=_(),n=j(),{addressId:s,addressType:u}=E(),f=M(),w=$(),I=D.getSignedInUser(),[g,x]=h.useState(s==null),p=B(m=>s!=null?k(m,s).fetchState:"Not-Started"),A=L();if(I==null)throw Error("Can't access address page without signing in...");const P=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect(()=>{g||s==null||(x(!0),r(U(s,!1)))},[g,s,r]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?d.jsx(R,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):s!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),d.jsx(d.Fragment,{})):d.jsxs(d.Fragment,{children:[d.jsx(z,{analytics:C,onLoad:P}),d.jsx(W,{windowSize:f,children:d.jsx(X,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):d.jsx(J,{})}const v=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{de as A,Y as t};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DyzG7jl-.js";import{a as i}from"./sentry-Cdif28fl.js";import{h as ge,l as Ce,u as Ie,g as q,i as be,n as ke}from"./core-B_XHMrqe.js";import{Q as we,cO as Pe,z as xe,K as Ee,cP as Qe,cQ as Te,cR as z,cS as ve,cT as Y,p as D,v as W,f as E,cU as H,cV as ye,a0 as _e,h as Oe,a6 as Ue,cW as Ae,a1 as Le,q as De,b0 as Fe,cX as Be}from"./index-DcF25xRC.js";import{fI as je,f7 as Z,eQ as Re,hE as Me,QL as Ge,eP as Ve,hO as $e,hK as Ne,fy as K,fs as qe,fl as ze,fp as X,ft as We,fu as He,fv as Ke,fw as Xe,fx as Je}from"./zeni-epic-state-D9HDY_8v.js";import{D as Ye,n as b,S as Ze,P as et}from"./mui-CfonSYhg.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-ChY2Lwaz.js";import{p as st}from"./pathToGoBack-B-fIvw6x.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="44e0a9f1-7773-4a11-8d43-36fbf55bea8e",o._sentryDebugIdIdentifier="sentry-dbid-44e0a9f1-7773-4a11-8d43-36fbf55bea8e")}catch{}})();const ee="chat-response-generated",ot=ke(function(o,n){const t=Z(o),m=n.isSubmitting;return{showSampleQuestions:n.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:n.sessionFromUrl==="new_chat"||n.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Le}/tableDownload`,emailLinkQuestion:n.emailLinkQuestion,autoSubmitEmailLinkQuestion:n.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:n.onEmailLinkQuestionProcessed,routedInitialQuestionSource:n.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:n.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:n.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:n.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:n.isFileUploadEnabled,isUploadPromoVisible:n.isUploadPromoVisible,onUploadPromoClose:n.onUploadPromoClose}},function(o,n){const{location:t,currentTenant:m,userId:r,navigate:g,currentChatSessionId:S,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:c}=n;return{onEventReceived:(e,l)=>{if(e===ee&&typeof l.text=="string"&&typeof l.metadata=="object"){const u=l,p=He(u.type),d=u.metadata.chat_session_id??null,{currentChatSession:s,currentQuestionAnswer:k,currentQuestionAnswerSummary:Q}=Y(C,d);p!=="answer"?E.trackAICFOChatResponseGenerated(p,k?.question.questionText??"",u.text,d,Be(Q,s),u.metadata.message_id??null):E.trackAICFOChatAnswerGenerated(u.text,k?.question.questionText??"",(u.follow_up_questions?.length??0)>0,!!u.assumptions,!!u.insights,u.visualization!=null,Ke(u.visualization?.type??"")??null,d,u.summarized_title,u.metadata.message_id??null),o(Xe({chatSessionId:u.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),o(Je({chatSessionId:u.metadata.chat_session_id,answerPayload:u,userId:r}))}},onSubmit:(e,l,u,p)=>{e&&Fe(o,e,l,S,C,r,p,u)},updateCurrentInput:e=>{o(X(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{o(We(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{g(-1)},onCloseClick:()=>{const e=D(t.state?.pathnameStackToGoBack),l=e.poppedPathname??st(1);g(l,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),o(X(""))},togglePageView:()=>{const e=D(t.state?.pathnameStackToGoBack),l=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;g(l,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),c(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{g(-1)},onNewChatClick:()=>{S!=null&&o(ze());const e=De(t.state?.pathnameStackToGoBack,t.pathname);g(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,l)=>{o(qe({questionAnswerId:e,isCollapsed:l}))},onMenuClick:n.onMenuClick}})(Ue(Ae)),Et=({isFileUploadEnabled:o})=>{const{setIsAiCfoOpen:n}=we(),t=ge(),m=Ce(),r=Ie(),[g,S]=i.useState(!1);i.useEffect(()=>{t(je())},[t]);const{customPageTitle:C}=Pe(),c=q(a=>Z(a)),e=xe.getSignedInUser(),{session_id:l}=be(),u=Ee(),p=_e(u),d=q(a=>Re(a)),s=c.uiState.currentChatSessionId,k=d.tenantEmailDomain,{handleUploadPromoClose:Q,isUploadPromoVisible:te}=Qe({isFileUploadEnabled:o,tenantEmailDomain:k}),T=Te({currentTenant:d,currentChatSessionId:s,aiCfoView:c}),{isSuggestedQuestionsLoading:se,suggestedPromptQuestions:oe}=tt(),w=r.state,P=w?.aiCfoInitialQuestion,F=!!w?.aiCfoShouldSubmit;i.useEffect(()=>{const a=r.state;if(a?.[z]!==!0)return;S(!0);const h={...a};delete h[z],m(r,{replace:!0,state:h})},[r.pathname,r.search,r.state,m]);const[ae,v]=i.useState(null),[ne,y]=i.useState(!1),[ie,_]=i.useState(void 0),[re,O]=i.useState(void 0),B=i.useRef(!1);i.useEffect(()=>{if(!B.current&&P!=null&&P!==""){const a=r.state;v(P),y(F),_(a?.aiCfoInitialSubmissionSource!=null?a.aiCfoInitialSubmissionSource:void 0);const h=a?.aiCfoSuggestionIndex;O(typeof h=="number"?h:void 0),B.current=!0}},[P,F,r.state]);const le=i.useCallback(()=>{v(null),y(!1),_(void 0),O(void 0)},[]),j=i.useMemo(()=>new URLSearchParams(r.search),[r.search]),R=j.get("ref")??w?.aiCfoRef,U=j.get("emailRefId")??w?.aiCfoEmailRefId,M=i.useRef(!1);i.useEffect(()=>{M.current||R!=="month-end-email"||U==null||s!=null||e==null||(t(Me("controller",e.userId,U,"MONTH_END_EMAIL")),M.current=!0)},[R,U,s,t,e]);const x=c.uiState.lastContextMessage;i.useEffect(()=>{x!=null&&x!==""&&s!=null&&(v(x),y(!0),_(void 0),O(void 0),t(Ge()))},[x,s,t]);const ue=d.masterTOSInfo,I=ue?.isMasterTOSAccepted??!1,{visitedSessions:G}=ve(s),A=c.fetchState,L=c.uiState.chatSessionsNextPageToken.hasMore||!c.uiState.chatSessionsFirstPageFetched,V=s!=null?c.fetchChatSessionHistoryByChatSessionId?.[s]?.fetchState??"Not-Started":"Not-Started",$=s==null||(c.uiState.chatHistoryNextPageToken[s]?.hasMore??!0),N=c.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ce}=Y(N,s),de=ce.length===0;i.useEffect(()=>{I||p||m("../dashboard",{state:{...r.state,message:"open_ai_cfo_drawer"}})},[I,p,m,r.state]);const me=i.useCallback(()=>{const a=D(r.state?.pathnameStackToGoBack),h=d.tenantEmailDomain;m(a.poppedPathname??(h!=null?`/${h}/dashboard`:".."),{state:{...r.state,pathnameStackToGoBack:a.newStack}})},[d.tenantEmailDomain,r.state,m]);i.useEffect(()=>{s!=null&&l!==s&&m(`../ai-cfo/${s}`,{state:{...r.state}})},[s,l]),i.useEffect(()=>{l!=null&&s==null&&l!=="new_chat"&&l!=="explore"&&t(Ve({sessionId:l,agentId:"controller"}))},[]);const pe=i.useMemo(()=>({events:G.map(a=>`private-encrypted-chat-${a}.${ee}`),eventCallback:(a,h,Se)=>Se.onEventReceived(a,h)}),[G]);i.useEffect(()=>{A!=="In-Progress"&&L&&t($e())},[A,L,t]),i.useEffect(()=>{s!=null&&V!=="In-Progress"&&$&&e!=null&&A==="Completed"&&!L&&t(Ne(s,e.userId))},[V,$,s,e,t]);const fe=a=>a.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||l==null)throw Error("Can't access AI Controller page without signing in...");const he=s!=null&&c.responseStateByChatSessionId?.[s]?.answer?.fetchState==="In-Progress";return!I&&p?f.jsxs(nt,{children:[f.jsx(W,{analytics:E,onLoad:fe}),T.drawerElement,f.jsx(it,{children:f.jsx(J,{children:f.jsx(H,{isTOSAccepted:!1,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:me,onCompleteClick:()=>{d.userRoleId!=null&&t(K(d.userRoleId))}})})})]}):f.jsxs(at,{children:[f.jsx(W,{analytics:E,onLoad:a=>a.trackPageLoaded(Oe.Event.aiCFOPage)}),p&&T.drawerElement,f.jsx(ot,{...pe,currentChatSessionId:s,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>S(!0),userId:e.userId,setIsAiCfoOpen:n,navigate:m,sessionFromUrl:l,location:r,isSubmitting:he,isEmptyChatWithSession:de,customPageTitle:C,currentTenant:d,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:le,routedInitialQuestionSource:ie,routedInitialQuestionSuggestionIndex:re,onMenuClick:p?T.open:void 0,isFileUploadEnabled:o,isUploadPromoVisible:te,onUploadPromoClose:Q,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),f.jsx(Ye,{anchor:"right",open:g,transitionDuration:250,PaperProps:{component:rt,style:{width:p?"100%":`${ye}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:f.jsx(J,{onClick:a=>a.stopPropagation(),children:f.jsx(H,{isTOSAccepted:I,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>S(!1),onCompleteClick:()=>{I||d.userRoleId==null||t(K(d.userRoleId)),S(!1)}})})})]})},J=b(Ze)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,at=b.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,nt=b.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,it=b.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,rt=b(et)`
|
|
20
|
-
box-shadow: ${({theme:o})=>o.colors.elevation2};
|
|
21
|
-
color: ${({theme:o})=>o.colors.grey4};
|
|
22
|
-
`;export{Et as default};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DyzG7jl-.js";import{l as le,i as ia,h as ue,g as y,u as ge,n as pe,N as ga,s as ut,o as Wt,p as te}from"./core-B_XHMrqe.js";import{eQ as ie,bs as Re,Pa as ka,eW as be,eX as ye,eY as Se,fT as Ge,cs as ze,Pb as Ze,Pc as Ma,tq as ba,jL as ya,Pd as Sa,gQ as oa,zW as Qe,zY as $a,zZ as Ga,jB as mt,Pe as Ye,zK as Ct,Pf as qt,Pg as Jt,zN as Da,Ph as Xt,Nz as _a,rC as pt,zT as za,g$ as Qt,Pi as ht,Pj as Ke,bq as en,Pk as an,fE as Pa,fD as wa,Ar as tn,fC as Ta,Nf as nn,Pl as ft,cl as gt,cN as rn,Ny as da,B1 as sn,Pm as tt,AD as Fa,Pn as bt,B2 as on,N_ as cn,B3 as dn,BZ as ln,sM as un,BT as mn,Ac as yt,A5 as Cn,Po as pn,fV as hn,Al as St,Ap as It,fU as fn,Pp as gn,AP as At,Pq as bn,Pr as yn,Ps as Sn,An as Et,A8 as kt,zQ as Dt,Ah as _t,Af as Pt,Aj as In,zX as nt,Pt as wt,Pu as va,AA as Ia,Ke as Tt,cO as Za,Pv as An,Pw as En,Px as kn,Py as Dn,Ax as Na,AW as _n,AS as Pn,At as wn,AU as Tn,AK as Fn,AM as vn,Pz as Ft,B0 as vt,HD as xn,PA as Bn,PB as Ln,PC as Un,PD as xt,PE as Rn,Bn as On,AC as Bt,Aw as ca,AB as jn,PF as Nn,PG as Vn,zH as Hn,PH as Lt,PI as Ut,PJ as Mn,zJ as $n,zI as rt,PK as Gn,PL as zn,PM as Zn,Ka as Yn,PN as Ya,PO as Kn,wi as Rt,kj as Wn,gR as qn,Bs as Jn,PP as Ot,PQ as Xn,Bt as Qn,PR as er,df as ar,tk as tr,Bi as nr,Bc as Ue,bv as rr,bF as sr,cx as or,bG as cr,Jn as ir}from"./zeni-epic-state-D9HDY_8v.js";import{z as Q,d as je,a as ce,I as Z,B as la,c1 as xa,cc as dr,p as ve,cd as lr,ce as ur,K as ua,aN as Fe,q as fe,bk as Ka,cf as mr,w as ma,j as Ba,m as Wa,f as J,O as qa,cg as Cr,Z as jt,aq as Ja,bw as Je,ch as Va,ci as pr,v as Xa,a6 as hr,cj as fr,at as Nt,a1 as Ha,V as Vt,h as Ht,ck as gr,cl as br,cm as yr,cn as Sr,co as Ir,cp as Ar,o as Aa,cq as Er,cr as kr,cs as Ra,R as Dr,ct as _r,cu as Pr,cv as wr,cw as Tr,cx as Fr,a9 as vr}from"./index-DcF25xRC.js";import{n as _e,D as Mt,S as xr}from"./mui-CfonSYhg.js";import{a as i}from"./sentry-Cdif28fl.js";import{g as Ce,a as Ca,b as $t,c as Ie,d as Ae,e as Oe,f as Ne,A as Br,h as Qa,P as Lr,i as et,s as Xe,j as Gt,k as Me,l as zt,m as Ur,n as Zt,p as Rr,S as st}from"./SetupPagesScreen-BVkXSSWw.js";import La from"./NotFoundScreen-BUqotHFB.js";import{M as $e}from"./MobileAppDrawer-CPI95lgy.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import{v as ot}from"./utils-DMgIZDY7.js";import{t as Or}from"./AddressScreen-sxiJIRy-.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./analyticsHelper-BocYRaaP.js";import"./routePaths-Dgf8Lpxl.js";import"./BusinessVerificationPageScreen-Bpubo3oO.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]="e189317d-f0e9-4ba5-a7fb-cf4c3b1f53af",e._sentryDebugIdIdentifier="sentry-dbid-e189317d-f0e9-4ba5-a7fb-cf4c3b1f53af")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=Q.getSignedInUser(),n=y(X=>ie(X)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Z.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Z.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(X=>Ge(X,n.companyId)),N=ze(v.controllers),{creditAccount:L,creditAccountRepayment:w}=y(X=>Ze(X)),V=y(X=>X.classListState.fetchState),m=!_&&d&&f,l=y(X=>Ma(X,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,U=H?.cardCreatedByUser?.userId,K=y(X=>U!=null?ba(X.userRoleState,U):void 0),I=K?.accountingClassIDs[0],B=y(X=>I!=null?ya(X.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,O=y(X=>j!=null?ba(X.userRoleState,j):void 0),W=O?.accountingClassIDs[0],E=y(X=>W!=null?ya(X.classState,{classId:W,reportId:"class_list"}):void 0),z=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&z&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,z,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Qe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(z===!1||z&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const X=Ce(n.tenantEmailDomain,t,r,H,c);e(X)}},[l.fetchState,c,z]),i.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a(Ga()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[L.fetchState,w.fetchState,a,d,f,p,V]);const G=()=>{if(r!=null&&t!=null){a(Sa());const X=Ce(n.tenantEmailDomain,t,r);e(X)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Oe(d,g,D,f),ae=Ca(d,f,p,L,w),ne=$t(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:G,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:L,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:B?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=Q.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(La,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},$r=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=Q.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=v(Z.isDebitCardFeatureEnabled),w=Se(L,k),V=Ie({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&U&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Qe(n,K,U)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:z}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Xt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:z}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const B=Q.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),O=()=>{d?.status?.code!=="active"&&a(za(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(O,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Zr,{children:[s.jsx($e,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Gr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:B,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(zr,{windowSize:t,children:e}):null]})},Gr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Qt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:Ba.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&Q.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),zr=_e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
5
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
6
|
-
`,Zr=_e.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
min-height: 100%;
|
|
9
|
-
width: 100%;
|
|
10
|
-
flex: 1 1 auto;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
14
|
-
`,Ea=qa.getLocalizedStrings().dateFormat,Yr={overlayWidth:new ma(100,100,58)},Kr=pe(function(e,t){const a=t.currentTenant?.companyId;return{plaidConnectionDetails:cn(e,a,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:dn(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:a,currentTenant:r,hasZeniAccountsAdminAccess:n,isZeniAccountsUser:C,isCashbackInfoFetchStateCompleted:p,isCreditCardInfoFetchStateCompleted:u,isDebitCardInfoFetchStateCompleted:S,controllerEmails:o,paymentDetails:c,productInformation:_,cashbackInformation:A,paymentSourceInformation:f,creditAccountInformation:R,debitAccountInformation:F,paymentInitiatedDate:k,sourcePage:h}=t,{tenantEmailDomain:b}=r;return{onBackNavigation:()=>{if(p&&u&&S&&A!=null&&J.trackCardsPayEarlyFormClick(o,_,A,"Back",c.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:c.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:c.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:c.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:c.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:k?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:k?.format(Ea.visual.MMMDCommaYYYYformat)},f,R,F),h==="cardPaymentHistory")t.closeDrawerHandler(!0),e(bt());else{const g=Ne(b);a(g)}},onUpdatePaymentAccountStatus:(g,d,D)=>{e(mn(g,d,"bill_pay","bill_pay_detail",D))},onEstablishConnectionSuccess:()=>{e(Fa(r.companyId,!0))},onFetchLinkTokenClick:g=>{e(un("external_account",g))},onEstablishConnectionClick:g=>{e(ln(g,r.companyId,"charge_card_payment","charge_cards"))},onSignUpAccountClick:()=>{n?window.open(`/${b}/checking/promo`,"_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onMoveMoneyClick:()=>{C?window.open(`/${b}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Cr),at=({isPaymentDrawerOpen:e,closeDrawerHandler:t,pageName:a,creditAccountSpentAmount:r,productInformation:n,sourcePage:C,creditAccountInformation:p,debitAccountInformation:u,cashbackInformation:S,isDebitCardInfoFetchStateCompleted:o,isCreditCardInfoFetchStateCompleted:c,isCashbackInfoFetchStateCompleted:_,paymentInitiatedDate:A,retryRepayment:f})=>{const R=le(),{useDynamicConfig:F}=ce(),{configValue:k}=F(Fe.zeniAccountsConfig),h=nn(k),b=y(G=>ft(G)),{creditAccount:g}=y(G=>Ze(G)),d=y(G=>ie(G)),D=Wa(),v=ua(),N=ue(),L=Q.getSignedInUser(),w=je(),[V,m]=i.useState(!1),[l,P]=i.useState(!1),{configValue:T}=F(Fe.zeniCardsConfig),H=T.credit_card_auto_pay_threshold_by_company_id?.[d.companyId]??T.default_credit_card_auto_pay_threshold??Br,U=gt(w?.loggedInUserRoleMap),K=rn(w?.loggedInUserRoleMap),I=!!d.companyZeniAccountInfo?.info?.isZeniAccountEnabled,B=y(G=>da(G,d.companyId)),j=B.companyChargeCardInfo?.primaryFundingAccount,O=B.allFundingAccounts.find(G=>G.id===j?.accountId),W=y(G=>Ge(G,d.companyId)),E=ze(W.controllers);i.useEffect(()=>{if(b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&N(sn()),b.fetchState==="Completed"&&!l){const G=d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,x=b.transferFromAccounts.find(ae=>ae.id===G);let se;if(C==="cardPaymentHistory"&&f){const ae=f.paymentAccountId!=null?b.transferFromAccounts.find(ne=>ne.id===f.paymentAccountId):void 0;se={amount:f.amount,isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:ae??x}}else se={amount:{amount:g.balance.amount+g.hold.amount,currencyCode:g.balance.currencyCode,currencySymbol:g.balance.currencySymbol},isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:x};N(tt(se)),P(!0)}},[b.fetchState,l,C,f,b.transferFromAccounts,d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,d.companyChargeCardInfo?.info?.isAutoPayEnabled,g.balance.amount,g.balance.currencyCode,g.balance.currencySymbol,g.hold.amount,N]);const z={isZeniCheckingEnabled:d.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:O?.accType==="depositAccount",creditCardPaymentSourceAccountName:O?.label,creditCardPaymentSourceAccountType:O?.accType,creditCardPaymentSourceLastFourDigits:O?.accountLast4,creditCardPaymentSourceBalance:O?.accountBalance?.available?.amount??0};if(i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&N(Fa(d.companyId,!0))},[B.fetchState]),i.useEffect(()=>{b.updateStatus==="Completed"&&S!=null&&_&&c&&o&&J.trackCardsPayEarlyPayNowClick(E,n,S,b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:A?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:A?.format(Ea.visual.MMMDCommaYYYYformat)},z,p,u)},[b.updateStatus,S,_,c,o,A]),i.useEffect(()=>{b.fetchState==="Completed"&&S!=null&&_&&c&&o&&!V&&e&&l&&S!=null&&(J.trackCardsPayEarlyFormView(E,n,S,a,d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,g.balance.amount,z,p,u),m(!0))},[b,_,c,o,V,e,l]),L==null)throw Error("Can't access invite people page without signing in...");const q=()=>{t(!0),N(bt())};return s.jsx(s.Fragment,{children:s.jsx(Mt,{onClose:()=>{q()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:Yr.overlayWidth.valuePercentage(v),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:D.colors.black,opacity:.75,cursor:"pointer"}}},children:s.jsx(Wr,{onClick:G=>G.stopPropagation(),children:s.jsx(Kr,{closeDrawerHandler:t,navigate:R,paymentDetails:b,creditAccountSpentAmount:r,onTransferClick:()=>{_&&c&&o&&S!=null&&J.trackCardsPayEarlyFormClick(E,n,S,"Pay Now",b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},z,p,u),N(on({companyId:d.companyId}))},onDismissClick:q,onSaveChangesToLocalStore:G=>{N(tt(G))},currentTenant:d,hasZeniAccountsAdminAccess:U,isZeniAccountsUser:K,isZeniAccountSetupEnabled:I,productInformation:n,sourcePage:C,controllerEmails:E,autoPayThreshold:H,paymentSourceInformation:z,creditAccountInformation:p,debitAccountInformation:u,cashbackInformation:S,isCashbackInfoFetchStateCompleted:_,isCreditCardInfoFetchStateCompleted:c,isDebitCardInfoFetchStateCompleted:o,paymentInitiatedDate:A,maxInsuredAmount:h.maxInsuredAmount})})})})},Wr=_e(xr)`
|
|
15
|
-
display: flex;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
`,Kt="charge-card-transaction-update",Oa=qa.getLocalizedStrings().dateFormat,qr=pe(function(e,t){const{includeCreditAccountInfo:a,cardId:r,signedInUserToken:n,isChargeCardFeatureEnabled:C}=t,p=Q.getSignedInUser(),u=e.tenantState.currentTenantId,S={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},o=Ma(e,r,a,C),c=pn(e,r),_=hn(e);return{chargeCardDetailView:o,chargeCardsRecurringExpensesState:c,vgsVaultId:Ba.cardVaultId,transactionAttachmentsEndpointToFetch:`${Ha}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${Ha}/card_transaction_attachment`,authParams:S,isSnackbarOpen:_.isSnackbarOpen,cardsEndPoint:`${Nt.cardMicroServiceBaseUrl}`,signedInUserToken:o.twoFAView.token??n}},function(e,t){const{cardId:a,currentTenant:r,navigate:n,location:C,cardProviderId:p,includeCreditAccountInfo:u,setIsPaymentOpen:S,controllerEmails:o,productInformation:c,cashbackInformation:_,primaryFundingAccountDetails:A,creditAccountInformation:f,debitAccountInformation:R,isChargeCardFeatureEnabled:F}=t,{tenantEmailDomain:k}=r;return{onEventReceived:h=>{h===Kt&&(e(za(a,!0)),e(nt(a,null,null,!0)))},onReloadTransactions:()=>{e(Qe(a,u,F))},onFetchChargeCardTransactionList:(h,b)=>{e(nt(a,h,b))},onUpdateScrollYOffset:h=>{},onGetOtp:h=>{p!=null&&e(Ta(h,"ChargeCardHolder",a))},onResendOtp:h=>{p!=null&&e(wa(h,"ChargeCardHolder",a))},onVerifyOtp:(h,b)=>{p!=null&&e(Pa(h,b,"ChargeCardHolder",a))},onVerifyOtpSuccess:h=>{h!=null&&Q.saveZeniOtpTokenForCardHolder(h,a)},onColorCodeChange:h=>{e(In(a,h))},onLockChargeCard:(h,b)=>{e(Pt(h,a,b))},onUnlockChargeCard:h=>{e(_t(h,a))},onCloseChargeCard:h=>{e(Dt(a,h))},onFetchChargeCardsRecurringExpenses:()=>{e(kt([a]))},updateChargeCardName:(h,b)=>{e(Et(h,a,b))},updateChargeCardTransactionAttachments:(h,b)=>{b!=null&&e(Sn({transactionId:h,data:b}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(h,b,g,d)=>{e(yn({chargeCardId:b,transactionId:h,fetchState:g,error:d}))},updateChargeCardTransactionReceiptsShowTick:(h,b,g)=>{e(bn({chargeCardId:b,transactionId:h,shouldShowTick:g}))},onChargeCardRevokeInviteClick:()=>{e(At(a))},updateChargeCardTransactionIsViewReceiptClicked:(h,b,g)=>{e(gn({chargeCardId:b,transactionId:h,isViewReceiptClicked:g}))},onChargeCardTransactionRowClick:(h,b)=>{const g=fe(C.state?.pathnameStackToGoBack,C.pathname);n(`../../transaction/${h}/${b}`,{state:{pathnameStackToGoBack:g}})},onBackClick:()=>{const h=ve(C.state?.pathnameStackToGoBack),b=Ne(k);n(b,{state:{pathnameStackToGoBack:h.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(fn())},onUpdateDebitCardPinAttempt:h=>{e(It(a,h)),h==="success"&&e(oa({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(h,b)=>{h?e(oa({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):b!=null&&e(oa({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:b.message}]}))},updateSpendLimit(h,b,g,d){e(St(h,b,g.code,d))},shouldOpenCreditCardPaymentDrawer(h){h&&_!=null&&J.trackCardsPayEarlyClick(o,c,_,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:r.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:A?.accType==="depositAccount",creditCardPaymentSourceAccountName:A?.label,creditCardPaymentSourceAccountType:A?.accType,creditCardPaymentSourceLastFourDigits:A?.accountLast4,creditCardPaymentSourceBalance:A?.accountBalance?.available?.amount??0},f,R),S(h)}}})(hr(fr));function Jr(){const e=le(),t=ue(),a=ge(),{cardId:r}=ia(),[n,C]=i.useState(!1),[p,u]=i.useState(!1),{useDynamicConfig:S}=ce(),o=Q.getSignedInUser(),c=y(M=>ie(M)),_=y(M=>ka(M).firstViewAfterActivation),A=y(M=>M.classListState.fetchState),{configValue:f}=S(Fe.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:R}=S(Fe.zeniCardsConfig),F=R.enable_card_controls_for_company_ids,k=R.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(F)&&F.includes(c.companyId),[h,b]=i.useState(!1),[g,d]=i.useState(!1),{useFeatureGate:D}=ce(),{isFeatureEnabled:v}=D(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=D(Z.isDebitCardFeatureEnabled),L=Se(N,c),w=Ie({isDebitCardFeatureEnabled:N,isBankingOnlyTenant:L}),{isFeatureEnabled:V}=D(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:m}=D(Z.isCardsCommentingEnabled),l=ye(c),P=be(c),T=c.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,H=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:v,isBookKeepingTenant:l,isDebitCardProductVisible:w,chargeCardsCreditAccountLimit:T}),U=!!c.companyDebitCardInfo?.info?.isDebitCardEnabled,K=!!c.companyChargeCardInfo?.info?.isChargeCardEnabled,I=!c.userRole.includes("charge_card_user")&&H&&K;if(r==null)throw Error("Empty card id is not valid...");const B=y(M=>da(M,c.companyId)),{creditAccount:j,creditAccountRepayment:O}=y(M=>Ze(M)),W=Q.getZeniOtpTokenForCardHolder(r),E=y(M=>Ma(M,r,I,H)),{isAiCfoAccessEnabled:z,onAskAiCfoClick:q}=Yt({mobileExploreReferrer:"Card Detail"});jt({isDataReady:E.fetchState==="Completed"});const G=y(M=>Ye(M)),x=E.chargeCard,se=je(),ae=Re(se?.loggedInUserRoleMap),ne=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_virtual_debit_card",X=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_physical_credit_card",re=x?.type.code==="business_virtual_debit_card"||x?.type.code==="business_virtual_credit_card",Ee=x?.type.code==="business_virtual_debit_card",xe=Ca(H,K,ae,j,O),Y=$t(ne,E),he=Qa(ae,G),ke=Oe(H,w,U,K),Be=E.depositAccountLimitFetchState.fetchState!=="Completed"&&E.depositAccountLimitFetchState.fetchState!=="In-Progress",Pe=y(M=>Ge(M,c.companyId)),we=ze(Pe.controllers),ee=y(M=>x?.cardCreatedByUser?.userId!=null?ba(M.userRoleState,x?.cardCreatedByUser?.userId):void 0),pa=y(M=>ee?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ee?.accountingClassIDs[0],reportId:"class_list"}):void 0),oe=y(M=>x?.cardHolderUser?.userId!=null?ba(M.userRoleState,x?.cardHolderUser?.userId):void 0),ea=y(M=>oe?.accountingClassIDs[0]!=null?ya(M.classState,{classId:oe?.accountingClassIDs[0],reportId:"class_list"}):void 0),de=c?.userRole,Le=y(M=>Ke(M,!1,w,v).revokeCardInvite),aa=Ja(Le.saveStatus.fetchState);if(i.useEffect(()=>{if(aa==="In-Progress"&&Le.saveStatus.fetchState==="Completed"){const M=Ne(c.tenantEmailDomain);e(M)}},[aa,Le.saveStatus.fetchState,e,c.tenantEmailDomain]),i.useEffect(()=>{_&&n===!1&&re&&(C(!0),setTimeout(()=>{t(Sa()),Ee&&t(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[_,n,re,Ee]),i.useEffect(()=>{h||E.fetchState==="Completed"||E.fetchState==="In-Progress"||r==null||(b(!0),t(Qe(r,I,H,!1)))},[h,E,r,t]),i.useEffect(()=>{!g&&E.fetchState==="Completed"&&E.chargeCard?.connectedAccountId!=null&&ne&&Be&&ae&&(d(!0),t(yt({depositAccountId:E.chargeCard?.connectedAccountId})))},[g,E,t,Be,ae]),i.useEffect(()=>{G.fetchState!=="Completed"&&G.fetchState!=="In-Progress"&&ae&&t(Ct()),A!=="Completed"&&A!=="In-Progress"&&t(mt()),E.transactionStatistics.fetchState!=="Completed"&&E.transactionStatistics.fetchState!=="In-Progress"&&t(Cn({chargeCardId:r})),B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&t(Fa(c.companyId,!0))},[G.fetchState,t,ae,A,E.transactionStatistics.fetchState,B.fetchState]),i.useEffect(()=>{if(!(E.fetchState!=="Completed"||H&&j.fetchState!=="Completed"||x==null||E.transactionStatistics.fetchState!=="Completed"||ne&&ae&&E.depositAccountLimitFetchState.fetchState!=="Completed")){const M=x.type.code.includes("physical"),me=M?x.cardActivationAttemptHistory[0]?.timestamp:x.createTime;J.trackCardsCardDetailView(we,ke,{cardId:r,cardName:x.cardName,cardType:x.type.code.includes("credit")?"credit":"debit",cardCategory:M?"physical":"virtual",cardLimit:Je(x.limit.amount),cardLastFourDigits:x.accountLast4,cardStatus:x.status.code,cardAssignedDate:x.createTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:x.providerCardCreateTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:me?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:x.creditLimitFrequency.name,cardSpentAmount:Je(x.balance.amount),cardAvailableLimit:Je(x.available.amount),cardUtilizationPercent:x.limit.amount>0?Math.round((x.limit.amount-x.available.amount)/x.limit.amount*100):0,cardUtilizationAmount:Je(x.limit.amount-x.available.amount),totalNumberOfDeclinedTransactions:E.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:E.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:E.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:E.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:E.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:E.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:Va(x.cardCreatedByUser,!1),cardIssuedByEmail:x.cardCreatedByUser?.email,cardIssuedByUserId:x.cardCreatedByUser?.userId,cardIssuedByRole:ee?.userRoles,cardIssuedByDepartment:pa?.className},{cardholderName:Va(x.cardHolderUser,!1),cardholderEmail:x.cardHolderUser?.email,cardholderRole:oe?.userRoles,cardholderUserId:x.cardHolderUser?.userId,cardholderDepartment:ea?.className},xe,Y)}},[E.fetchState,E.depositAccountLimitFetchState.fetchState,E.transactionStatistics.fetchState,j.fetchState,ae]),o==null)throw Error("Can't access card detail page without signing in...");const We=c.companyId??Q.getSignedInUserTenant(c.tenantEmailDomain)?.companyId,ta={events:We!=null?[`private-encrypted-${We}.${Kt}`]:[],eventCallback:(M,me,Te)=>{Te.onEventReceived(M)}},na=()=>{if(r!=null&&x!=null){const{ownerName:M,cardName:me,utilisation:Te,limit:Ve,frequency:qe,cardColor:$}=ja(x),De=x.cardHolderUserId===o.userId;J.trackCardsDetailPageViewed(r,M,me,Te,Ve,qe,$,De)}};i.useEffect(()=>{if(E.fetchState==="Completed"){const M=E.chargeCard;if(M?.status.code==="inactive"||ne&&M?.isPinSet===!1||X&&_){const me=Ce(c.tenantEmailDomain,r,o,x,_);e(me)}}},[E.fetchState]);const ra=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:$,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;J.trackCardsDetailPageClicked(r,Te,Ve,qe,$,De,M,He,me)}},sa=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:$,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;J.trackCardsVerifyPopUpClick(r,Te,Ve,qe,$,De,M,He,me)}},Ua=j.balance.amount+j.hold.amount,ha=c.companyChargeCardInfo?.info?.primaryFundingAccount,fa=B.allFundingAccounts.find(M=>M.id===ha?.accountId);return r==null||E.fetchState==="Error"?s.jsx(La,{}):E.fetchState==="In-Progress"||E.fetchState==="Not-Started"||Le.saveStatus.fetchState==="In-Progress"||ne&&ae&&E.depositAccountLimitFetchState.fetchState!=="Completed"?s.jsx(pr,{}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:_}),E.fetchState==="Completed"?s.jsx(Xa,{analytics:J,onLoad:na}):null,p===!0?s.jsx(at,{closeDrawerHandler:()=>u(!1),isPaymentDrawerOpen:p,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:ke,creditAccountInformation:xe,debitAccountInformation:Y,cashbackInformation:he,creditAccountSpentAmount:Ua,isDebitCardInfoFetchStateCompleted:!ne||!ae||E.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!H||j.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!ae||G.fetchState==="Completed",paymentInitiatedDate:O.initiatedRepaymentDate}):null,s.jsx(qr,{...ta,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:sa,onFireOnClickAnalytics:ra,isSandboxEnv:Ka(),signedInUser:o,location:a,navigate:e,setIsPaymentOpen:u,cardIssuedByRoles:ee?.userRoles,cardIssuedByDepartmentName:pa?.className,cardHolderRoles:oe?.userRoles,cardHolderDepartmentName:ea?.className,loggedInUserRole:de,isChargeCardFeatureEnabled:H,isDebitCardFeatureEnabled:w,isDebitCardSetupEnabled:U,isChargeCardSetupEnabled:K,isCardControlsEnabled:k,isEarlyPayEnabled:V,controllerEmails:we,chargeCardCashbackDetailState:G,productInformation:ke,creditAccountInformation:xe,debitAccountInformation:Y,cashbackInformation:he,classListFetchState:A,primaryFundingAccountDetails:fa,currentTenant:c,cardProviderId:E.chargeCard?.cardProviderID,cardId:r,creditAccount:j,creditAccountRepayment:O,includeCreditAccountInfo:I,signedInUserToken:W,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:f.documentAiReceiptMaxSizeLimitBytes!=null?f.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:z,onAskAiCfoClick:q,isCardsCommentingEnabled:m})]})}const ja=e=>{const t=`${e.cardHolderUser?.firstName.toLowerCase()} ${e.cardHolderUser?.lastName.toLowerCase()}`,a=e.cardName,r=(e.limit.amount??0)-(e.available.amount??0),n=e.limit.amount,C=e.creditLimitFrequency.name;return{ownerName:t,cardName:a,utilisation:r,cardColor:e.cardColorCode??"",frequency:C,limit:n}},Xr=_e.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Qr=pe(function(e,t){const a=Ke(e,t.includeCreditAccountDebitSummaryAndCashbackInfo,t.isDebitCardFeatureEnabled&&t.isDebitCardSetupEnabled,t.isChargeCardFeatureEnabled&&t.isChargeCardSetupEnabled);return{chargeCardListView:a,rowActionView:An(e),bulkActionView:En(e),companyLegalName:t.currentTenant.companyName,admins:t.admins,searchText:a.searchText,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigateAndClearBulkSelection:a,currentTenant:r,location:n,signedInUser:C,chargeCardListState:p,includeCreditAccountDebitSummaryAndCashbackInfo:u,isChargeCardFeatureEnabled:S,isCreditCardProductVisibleForExpressInterest:o,isChargeCardSetupEnabled:c,isDebitCardFeatureEnabled:_,isDebitCardSetupEnabled:A,isDebitCardTOSAccepted:f,isChargeCardTOSAccepted:R,controllerEmails:F,depositAccountListWithDebitCardIssued:k,primaryFundingAccountDetails:h,chargeCardSetUpViewFetchState:b,productInformation:g,cashbackInformation:d,creditAccountInformation:D,debitAccountInformation:v,updatePayNowInfoTooltip:N,isUserHasCardsAdminLevelAccess:L}=t,{tenantEmailDomain:w}=r,{cards:V}=p;return{onChargeCardRowClick:(m,l)=>{const P=zt(V,m);let T;P!=null&&((U=>{const K=U.limit.amount-U.available.amount,I=`${U.cardHolderUser?.firstName.toLowerCase()} ${U.cardHolderUser?.lastName.toLowerCase()}`,B=U.cardName,j=U.department?.className??"",O=U.limit.amount,W=U.creditLimitFrequency.name;J.trackCardsListRowClicked(I,B,j,K,O,W,C.userId===U.cardHolderUserId)})(P),Me(_,A,k)&&J.trackCardsCardListRowClick(F,g,"Card Row Item","row_clicked",l+1,{cardOwner:Va(P.cardHolderUser,!1),cardName:P.cardName,cardType:P.type.code.includes("credit")?"credit":"debit",cardStatus:P.status.code,cardUtilizationAmount:Je(P.limit.amount-P.available.amount),cardUtilizationPercent:P.limit.amount>0?Math.round((P.limit.amount-P.available.amount)/P.limit.amount*100):0,cardLimit:Je(P.limit.amount)},d,D,v)),T=P?.status.code==="request_on_hold"&&C.userId===P.cardHolderUserId?Zt(w):Ce(w,m,C,P);const H=fe(n.state?.pathnameStackToGoBack,n.pathname);a(T,{state:{pathnameStackToGoBack:H}})},onFetchChargeCardsRecurringExpenses:m=>{e(kt(m))},onFetchDepositAccountLimit:m=>{e(yt({depositAccountId:m}))},onChargeCardResendInviteClick:m=>{e(vn(m))},onChargeCardRevokeInviteClick:m=>{e(At(m))},onLockChargeCardList:(m,l)=>{e(Fn(m,l))},onUnlockChargeCardList:m=>{e(Tn(m))},onCloseChargeCardList:(m,l)=>{e(wn(m,l))},onRevokeChargeCardList:m=>{e(Pn(m))},updateChargeCardListSpendLimit(m,l,P){e(_n(m,l,P.code))},onLockChargeCard:(m,l)=>{e(Pt(L,m,l))},onUnlockChargeCard:m=>{e(_t(L,m))},onCloseChargeCard:(m,l)=>{e(Dt(m,l))},onUpdateSpendLimit(m,l,P,T){e(St(m,l,P.code,T))},updateChargeCardName:(m,l)=>{e(Et(L,m,l))},onClickSetupIcon:()=>{J.trackCardsListPageClicked("settings"),Me(_,A,k)&&d!=null&&J.trackCardsSettingsClick(F,g,d,D,v);const m=Ur(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(m,{state:{pathnameStackToGoBack:l}})},onIssueCardClick:()=>{J.trackCardsListPageClicked("new card"),Me(_,A,k)&&d!=null&&J.trackCardsNewCardClick(F,g,d,"New Button","card_creation_initiated","Card List",D,v);const m=es(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(m,{state:{pathnameStackToGoBack:l}})},onColumnSortConfigChanged:(m,l)=>{Me(_,A,k)&&d!=null&&J.trackCardsCardListSortClick(F,g,d,"Sort Icon","sort",m,l==="ascending"?"ASC":"DESC","Cards List",D,v),e(Na({uiState:{sortKey:m,sortOrder:l}}))},onSearchTextChanged:m=>{e(Dn(m))},onReloadCards:()=>{e(Ia(u,_&&A,S&&c,!0))},onLetsGoClick:()=>{a("./onboard")},onBackClick:()=>{a("../../")},onTotalCashbackClick:()=>{Me(_,A,k)&&d!=null&&J.trackCardsCashbackOverviewClick(F,g,d,"Cashback Overview","cashback_details_viewed",D,v),a("./cashback")},onClickStatementsIcon:()=>{Me(_,A,k)&&d!=null&&J.trackCardsStatementsClick(F,g,d,D,v),a("./statements")},onCreateNowClick:m=>{Me(_,A,k)&&d!=null&&J.trackCardsNewCardClick(F,g,d,"Promo Banner","card_creation_initiated","Card List",D,v),a(`./new?cardType=${m}`)},onPromoCardClick:m=>{a(m==="debit"&&_&&!f||m==="credit"&&o&&!R?`../promo?cardPromoType=${m}`:"./setup")},navigateToCreditCardPaymentPage:(m,l)=>{b==="Completed"&&r.company!=null&&d!=null&&J.trackCardsPayEarlyClick(F,g,d,"Card List",m,l,{isZeniCheckingEnabled:r.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:h?.accType==="depositAccount",creditCardPaymentSourceAccountName:h?.label,creditCardPaymentSourceAccountType:h?.accType,creditCardPaymentSourceLastFourDigits:h?.accountLast4,creditCardPaymentSourceBalance:h?.accountBalance?.available?.amount??0},D,v);const P=as(w);a(P)},navigateToCreditCardPaymentHistoryPage:()=>{const m=ts(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(m,{state:{pathnameStackToGoBack:l}})},shouldShowPayNowInfoTooltip:N,onSetRowActionCardId:m=>{e(kn(m))},onSetBulkActionCardIds:m=>{e(wt(m))}}})(gr);function ct({isPaymentDrawerOpen:e}){const t=le(),a=ue(),r=ge(),n=i.useCallback(($,De)=>{a(wt([])),t($,De)},[a,t]),[C,p]=i.useState(!1),[u,S]=i.useState(Q.getPayNowInfoTooltip()??!1),o=$=>{Q.savePayNowInfoTooltip($),S($)},[c,_]=i.useState(!1),A=Q.getSignedInUser(),f=y($=>ie($)),[R,F]=i.useState(!1),[k,h]=i.useState(!1),{isAiCfoAccessEnabled:b,onAskAiCfoClick:g}=Yt({mobileExploreReferrer:"Cards"}),d=f.userRole.includes("charge_card_user"),D=!d,v=!!f.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:N,useDynamicConfig:L}=ce(),{isFeatureEnabled:w}=N(Z.isCashbackFeatureEnabled),{isFeatureEnabled:V}=N(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=N(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=N(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:P}=N(Z.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:T}=N(Z.isCardsCommentingEnabled),H=Se(m,f),U=Ie({isDebitCardFeatureEnabled:m,isBankingOnlyTenant:H}),K=be(f),I=ye(f),B=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,j=Ae({isCardsOnlyTenant:K,isChargeCardFeatureEnabled:V,isBookKeepingTenant:I,isDebitCardProductVisible:U,chargeCardsCreditAccountLimit:B}),O=Gt({isCardsOnlyTenant:K,isChargeCardFeatureEnabled:V,isBookKeepingTenant:I}),{configValue:W}=L(Fe.zeniCardsConfig),E=je(),z=Re(E?.loggedInUserRoleMap),q=y($=>Ge($,f.companyId)),G=ze(q.controllers),x=W.charge_card_cashback_rate_per_transaction!=null?W.charge_card_cashback_rate_per_transaction:.0175,se=W.credit_card_pay_now_threshold_by_company_id?.[f.companyId]??W.default_credit_card_pay_now_threshold??Lr,ae=W.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(W.enable_card_controls_for_company_ids)&&W.enable_card_controls_for_company_ids.includes(f.companyId),ne=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,X=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,re=!!f.companyChargeCardInfo?.info?.isChargeCardEnabled,Ee=y($=>ft($)),xe=Ja(Ee.updateStatus),Y=y($=>Ke($,D,U&&v,j&&re)),he=Y.cards.filter($=>$.type.code.includes("debit")).map($=>$.connectedAccountId),ke=[...new Set(he)],Be=y($=>Ye($)),Pe=y($=>va($,ke)),we=y($=>da($,f.companyId)),ee=we.companyChargeCardInfo?.primaryFundingAccount,pa=we.allFundingAccounts.find($=>$.id===ee?.accountId),oe=Y.fetchState,ea=Y.creditAccount;jt({isDataReady:oe==="Completed"});const{creditAccountRepayment:de}=y($=>Ze($)),Le=y($=>ka($).firstViewAfterActivation),{areTenantIdsInSync:aa}=Vt(),We=Qa(z,Be),ta=Ca(j,re,z,ea,de),na=et(U,v,z,Pe,Y.debitCardSummary),ra=Oe(j,U,v,re),sa=Y.creditAccount.balance.amount+Y.creditAccount.hold.amount;if(i.useEffect(()=>{oe==="Completed"&&(Q.getPayNowInfoTooltip()==null||sa<se*Y.creditAccount.limit.amount/100)&&o(!0)},[oe,se,sa,Y.creditAccount.limit.amount]),i.useEffect(()=>{if(e!=null&&e===!0&&de.initiatedRepayments.amount===0&&de.fetchState==="Completed"||xe==="In-Progress"&&Ee.updateStatus==="Completed")o(!1),p(!0);else if(de.initiatedRepayments.amount>0&&de.fetchState==="Completed"){p(!1),document.body.style.overflow="auto";const $=Ne(f.tenantEmailDomain);n($)}},[e,de.initiatedRepayments.amount,de.fetchState,xe,Ee.updateStatus,n,f.tenantEmailDomain]),i.useEffect(()=>{!R&&(re||v)&&aa&&(F(!0),a(Ia(D,U&&v,j&&re,!1)))},[R,D,a,aa]),i.useEffect(()=>{Le&&c===!1&&(_(!0),setTimeout(()=>{a(Sa())},5e3))},[Le,c]),i.useEffect(()=>{oe==="Completed"&&d&&Y.cards.length===1&&(Y.cards[0].status.code==="inactive"&&Y.cards[0].type.code==="business_physical_credit_card"?n(`./${Y.cards[0].id}/activate`):Y.cards[0].status.code!=="request_on_hold"&&(r.state?.message==="comingFromCardDetail"?n("../../"):n(`./${Y.cards[0].id}`)))},[oe,d,r.state,n,Y.cards]),i.useEffect(()=>{if(oe==="Completed"&&d){const $=Y.cards.length,De=Y.cards.filter(He=>He.cardHolderUserId===A?.userId).filter(He=>He.status.code==="request_on_hold");De.length>0&&$===De.length&&n("./onboard")}},[oe,Y.cards,d,n,A?.userId]),i.useEffect(()=>{oe!=="Completed"||j&&de.fetchState!=="Completed"||U&&v&&z&&Pe.fetchState!=="Completed"||J.trackCardsCardListView(G,ra,We,ta,na)},[oe,ea,de.fetchState,Pe.fetchState,z]),A==null)throw Error("Can't access charge card list page without signing in...");const Ua=y($=>Tt($.userState,$.userRoleState,$.userListViewState,"cardAdmin")),ha=Za(E?.loggedInUserRoleMap),fa=$=>{h($)},M=Y.creditAccount.limit,me=()=>{p(!1),n("..")},Te=f.companyChargeCardInfo?.info!=null&&Xe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:j,isTOSAccepted:ne,isSetupEnabled:re,isUserHasCardsAdminLevelAccess:z,isUserHasCardsAccess:ha}),Ve=f.companyDebitCardInfo?.info!=null&&Xe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:U,isTOSAccepted:X,isSetupEnabled:v,isUserHasCardsAdminLevelAccess:z,isUserHasCardsAccess:ha});return re||v?s.jsxs(s.Fragment,{children:[oe==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Xa,{analytics:J,onLoad:()=>{J.trackPageLoaded(Ht.Event.cardsListPage),(j&&!re||U&&!v)&&J.trackCardsPromoView(G,{isCreditCardOffered:j,isDebitCardOffered:U,isDebitCardEnabled:v,isCreditCardEnabled:re},"Banner",U&&!v?"Debit Card":j&&!re?"Credit Card":"","Card List")}}),s.jsx(xa,{showConfetti:Le})]}):null,C===!0?s.jsx(at,{closeDrawerHandler:me,isPaymentDrawerOpen:C,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:sa,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isDebitCardInfoFetchStateCompleted:!(U&&v&&z)||Pe.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!j||de.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!z||Be.fetchState==="Completed",paymentInitiatedDate:de.initiatedRepaymentDate}):null,s.jsxs(Xr,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:fa}),s.jsx(Qr,{isCashbackFeatureEnabled:w,isChargeCardFeatureEnabled:j,isDebitCardFeatureEnabled:U,isCreditCardProductVisibleForExpressInterest:O,updatePayNowInfoTooltip:o,showPayNowInfoTooltip:u,creditCardPayNowThreshold:se,signedInUser:A,chargeCardListState:Y,location:r,admins:Ua.users,navigateAndClearBulkSelection:n,currentTenant:f,isCardControlsEnabled:ae,companyChargeCardInfoCreditAccountLimit:f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:f.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:z,includeCreditAccountDebitSummaryAndCashbackInfo:D,onClickMenuIcon:()=>{fa(!0)},creditLimit:M,isChargeCardSetupEnabled:re,isDebitCardSetupEnabled:v,isEarlyPayEnabled:l,isChargeCardPaymentHistoryFeatureEnabled:P,cashbackRate:x,controllerEmails:G,chargeCardCashbackDetailState:Be,depositAccountListWithDebitCardIssued:Pe,isChargeCardTOSAccepted:ne,isDebitCardTOSAccepted:X,primaryFundingAccountDetails:pa,chargeCardSetUpViewFetchState:we.fetchState,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isAiCfoAccessEnabled:b,onAskAiCfoClick:g,isCardsCommentingEnabled:T})]})]}):(ne||X)&&z===!0?s.jsx(ga,{to:"../setup"}):Te||Ve?s.jsx(ga,{to:"../promo"}):s.jsx(la,{fetchState:oe})}const es=e=>`/${e}/cards/new`,as=e=>`/${e}/cards/payment`,ts=e=>`/${e}/cards/payment-history`,ns=pe(function(e){const t=Q.getSignedInUser(),a=ie(e),r=e.tenantState.currentTenantId,n=Ft(e),C={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},p=a?.companyName??"",u=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:n.fetchState,filters:n.filters,isZeniTenant:xn(a),repaymentList:n.repaymentHistory,searchText:n.searchText,repaymentHistoryUsers:n.repaymentHistoryUsers,sortConfig:{sortKey:n.uiState.sortKey,sortOrder:n.uiState.sortOrder},downloadParams:{authParams:C,companyName:p,spendManagementEndPoint:`${Ha}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:u}},function(e,t){const{location:a,navigate:r}=t;return{onBackClick:()=>{const n=ve(a.state?.pathnameStackToGoBack),C=n.poppedPathname??"..";r(C,{state:{pathnameStackToGoBack:n.newStack}})},onColumnSortConfigChanged:(n,C)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:n,sortOrder:C}}})},onFiltersChange:n=>{e(Ln({filters:n}))},onReloadPayments:()=>{e(vt(!0))},onSearchTextChanged:n=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:n})},updateDownloadStateHandler:n=>{e(Bn({uiState:{downloadState:n}}))}}})(br);function rs(){const e=le(),t=ge(),a=ue(),{areTenantIdsInSync:r}=Vt(),{useFeatureGate:n}=ce();if(Q.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const C=y(q=>ie(q)),p=y(q=>Ft(q)),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(null),F=!C.userRole.includes("charge_card_user"),k=!!C.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:h}=n(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:b}=n(Z.isDebitCardFeatureEnabled),g=Se(b,C),d=Ie({isDebitCardFeatureEnabled:b,isBankingOnlyTenant:g}),D=be(C),v=ye(C),N=C.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:h,isBookKeepingTenant:v,isDebitCardProductVisible:d,chargeCardsCreditAccountLimit:N}),w=!!C.companyChargeCardInfo?.info?.isChargeCardEnabled,V=je(),m=Re(V?.loggedInUserRoleMap),l=y(q=>Ke(q,F,d&&k,L&&w)),P=i.useMemo(()=>{const q=l.cards.filter(G=>G.type.code.includes("debit"));return[...new Set(q.map(G=>G.connectedAccountId))]},[l.cards]),T=y(q=>Ye(q)),H=y(q=>va(q,P)),{creditAccountRepayment:U}=y(q=>Ze(q)),K=i.useMemo(()=>Qa(m,T),[m,T]),I=i.useMemo(()=>Ca(L,w,m,l.creditAccount,U),[L,w,m,l.creditAccount,U]),B=i.useMemo(()=>et(d,k,m,H,l.debitCardSummary),[d,k,m,H,l.debitCardSummary]),j=i.useMemo(()=>Oe(L,d,k,w),[L,d,k,w]),O=l.creditAccount.balance.amount+l.creditAccount.hold.amount,W=i.useMemo(()=>f!=null?p.repaymentHistory.find(q=>q.cardRepaymentId===f):void 0,[f,p.repaymentHistory]),E=i.useCallback(q=>{R(q),a(Ia(F,d&&k,L&&w,!1)),A(!0)},[a,F,d,k,L,w]),z=i.useCallback(()=>{A(!1),R(null),document.body.style.overflow="auto"},[]);return i.useEffect(()=>{u||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(S(!0),a(vt()))},[u,a,p.fetchState]),i.useEffect(()=>{!o&&(w||k)&&r&&(c(!0),a(Ia(F,!1,L&&w,!1)))},[o,w,k,r,a,F,L]),s.jsxs(s.Fragment,{children:[_?s.jsx(at,{closeDrawerHandler:z,isPaymentDrawerOpen:_,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:O,productInformation:j,creditAccountInformation:I,debitAccountInformation:B,cashbackInformation:K,isDebitCardInfoFetchStateCompleted:!(d&&k&&m)||H.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!L||U.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!m||T.fetchState==="Completed",paymentInitiatedDate:U.initiatedRepaymentDate,retryRepayment:W}):null,s.jsx(ns,{location:t,navigate:e,accountInfoByAccountId:p.accountInfoByAccountId,onRetryPaymentClick:E})]})}const it=_e.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100vh;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
align-items: center;
|
|
33
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
34
|
-
`,dt=qa.getLocalizedStrings().months;function ss(){const e=le(),t=ue(),a=ge(),{creditAccount:r,creditAccountRepayment:n}=y(I=>Ze(I)),C=`${Nt.cardMicroServiceBaseUrl}/1.0/credit-accounts/${r.id}`,[p,u]=i.useState(!1),[S,o]=i.useState(!1),c=y(I=>Un(I)),{useFeatureGate:_}=ce(),A=y(I=>ie(I)),{isFeatureEnabled:f}=_(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:R}=_(Z.isDebitCardFeatureEnabled),F=Se(R,A),k=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:F}),h=be(A),b=ye(A),g=A.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,d=Ae({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:f,isBookKeepingTenant:b,isDebitCardProductVisible:k,chargeCardsCreditAccountLimit:g}),D=!!A.companyDebitCardInfo?.info?.isDebitCardEnabled,v=!!A.companyChargeCardInfo?.info?.isChargeCardEnabled,N=y(I=>Ge(I,A.companyId)),L=ze(N.controllers),w=y(I=>xt(I)),V=w.cards.filter(I=>I.type.code.includes("debit")).map(I=>I.connectedAccountId),m=[...new Set(V)],l=y(I=>va(I,m)),P=y(I=>Rn(I));i.useEffect(()=>{S||r.fetchState==="Completed"||r.fetchState==="In-Progress"||(u(!0),t($a()))},[p,t,r.fetchState]),i.useEffect(()=>{S||r.fetchState!=="Completed"||r.id==null||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(o(!0),t(On(r.id)))},[S,t,r.fetchState,r.id,c.fetchState]),i.useEffect(()=>{l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&k&&D&&t(Bt()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&t(ca()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&k&&D&&t(jn()),n.fetchState!=="Completed"&&n.fetchState!=="In-Progress"&&d&&v&&t(Ga())},[l.fetchState,k,D,w.fetchState,P.fetchState,n.fetchState,d,v]),i.useEffect(()=>{if(c.fetchState==="Completed"&&r.fetchState==="Completed"&&n.fetchState==="Completed"&&w.fetchState==="Completed"&&(!k||!D||l.fetchState==="Completed"&&P.fetchState==="Completed")){let I="",B="";if(c.statements.length>0){const E=c.statements[c.statements.length-1].period,[z,q]=E.split("-"),G=c.statements[0].period,[x,se]=G.split("-");I=`${dt[parseInt(q)-1]} ${z}`,B=`${dt[parseInt(se)-1]} ${x}`}const j=Oe(d,k,D,v),O=Ca(d,v,!0,r,n),W=et(k,D,!0,l,P);J.trackCardsCreditCardStatementsView(L,j,{numberOfStatements:c.statements.length,oldestStatementMonthYear:I,latestStatementMonthYear:B},O,W)}},[c.fetchState,r.fetchState,n.fetchState,l.fetchState,w.fetchState,P.fetchState]);const T=()=>{const I=ve(a.state?.pathnameStackToGoBack),B=I.poppedPathname??"..";e(B,{state:{pathnameStackToGoBack:I.newStack}})},H=y(I=>Ye(I)),U=Q.getSignedInUser(),K={userId:U?.userId??"",sessionId:U?.zeniSessionId??"",tenantId:A.tenantId??""};if(U==null)throw Error("Can't access address page without signing in...");if(c.fetchState!=="Completed")return s.jsx(it,{children:s.jsx(yr,{onBackClick:T})});{const I=Oe(d,k,D,v);return s.jsx(it,{children:s.jsx(Sr,{currentTenantCompanyName:A.companyName,statementListView:c,productInformation:I,onBackClick:T,authParams:K,controllerEmails:L,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:k,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:v,chargeCardCashbackDetailState:H,creditAccount:r,creditAccountRepayment:n,depositAccountListWithDebitCardIssued:l,debitCardSummary:P,downloadEndPoint:C})})}}const os={containerWidth:new ma(100,58)},cs=({appContent:e})=>{const t=ua(),a=ue(),r=le(),n=ge(),{useDynamicConfig:C}=ce(),[p,u]=i.useState(!1),[S,o]=i.useState(!1),[c,_]=i.useState(!1),[A,f]=i.useState(!1),[R,F]=i.useState(!1),[k,h]=i.useState(!1),b=Q.getSignedInUser();if(b==null)throw Error("Can't access onboarding card page without signing in...");const g=y(O=>ie(O)),{configValue:d}=C(Fe.zeniCardsConfig),D=y(O=>Nn(O)),{tenantEmailDomain:v}=g,N=y(O=>O.settingsViewState.profile.fetchState),L=y(O=>O.chargeCardListState.fetchState),w=y(O=>O.settingsViewState.profile.userId),V=y(O=>O.chargeCardConfigState.fetchState);i.useEffect(()=>{p===!1&&N!=="In-Progress"&&N!=="Completed"&&(a(Vn()),u(!0)),S===!1&&V!=="In-Progress"&&V!=="Completed"&&(a(Da()),o(!0)),c===!1&&L==="Not-Started"&&(_(!0),a(ca()))},[p,c,L,S,V]),i.useEffect(()=>{N==="Completed"&&R===!1&&w!=null&&L==="Completed"&&D.cards.length>0&&(a(Hn({userId:w})),a(Lt({cardId:D.cards[D.cards.length-1].id})),F(!0))},[N,R,w,L]),i.useEffect(()=>{if(!A&&D.fetchState==="Completed"&&D.cards.length===0){const O=ve(n.state?.pathnameStackToGoBack),W=O.poppedPathname??Ne(v);r(W,{state:{pathnameStackToGoBack:O.newStack}})}},[D.fetchState,D.cards,A]);const m=y(O=>ka(O)),l=Ja(m.updateStatus.fetchState),P=m.currentDisplayedCardId,{useFeatureGate:T}=ce(),{isFeatureEnabled:H}=T(Z.isChargeCardFeatureEnabled),U=!!g.companyChargeCardInfo?.info?.isChargeCardEnabled,K=!g.userRole.includes("charge_card_user")&&H&&U,I=y(O=>P!=null?Ut(O.chargeCardState,P):null),B=()=>{P!=null&&(a(Qe(P,K,!0)),a(ca()),f(!0))};i.useEffect(()=>{if(A&&P!=null&&I!=null&&I.status.code!=="request_on_hold"){const O=Ce(g.tenantEmailDomain,P,b,I),W=fe(n.state?.pathnameStackToGoBack,n.pathname);a(Mn()),I?.type.code==="business_virtual_credit_card"&&a(_a()),r(O,{state:{pathnameStackToGoBack:W},replace:!0})}},[A,I?.status.code]),i.useEffect(()=>{l==="In-Progress"&&m.updateStatus.fetchState==="Completed"&&setTimeout(B,3e3)},[l,m.updateStatus.fetchState]);const j=O=>{h(O)};if(!A&&L!=="Completed"||N!=="Completed"||D.cards.length===0)return s.jsxs(lt,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:j}),s.jsx(Ir,{})]});if(w==null)throw Error("Can't access my userId.");return s.jsxs(lt,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:j}),s.jsx(is,{chargeCardListView:D,cardUserOnboardingView:m,navigate:r,currentTenant:g,myUserId:w,location:n,chargeCardCashbackRatePerTransaction:d.charge_card_cashback_rate_per_transaction!=null?d.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{j(!0)}}),e!=null?s.jsx(ds,{windowSize:t,children:e}):null]})},is=pe(function(e,{currentTenant:t,cardUserOnboardingView:a,chargeCardListView:r,myUserId:n}){const C=Ke(e,!1,!1,!1);let p=!1;return C.fetchState==="Completed"&&C.cards.length<=1&&(p=!0),{cards:r.cards,showMenuIcon:p,companyLegalName:t.companyName,twoFAView:a.twoFAView,cardUserOnboardingLocalData:a.cardUserOnboardingLocalData??{userId:n},isDOBDisabled:a.isDOBPresent,onboardingProgressStatus:a.onboardingProgressStatus}},function(e,t){const{navigate:a,cardUserOnboardingView:r,location:n,currentTenant:C}=t,{tenantEmailDomain:p}=C;return{updateCardUserOnboardingLocalData:u=>{e(rt({localData:u}))},onGetOtp:u=>{if(r.cardUserOnboardingLocalData!=null){const S={...r.cardUserOnboardingLocalData,phone:u};e(rt({localData:S}))}e(Ta(u,"CardUserOnboarding"))},onResendOtp:u=>{e(wa(u,"CardUserOnboarding"))},onVerifyOtp:(u,S)=>{e(Pa(u,S,"CardUserOnboarding"))},onVerifyOtpSuccess:u=>{e($n()),u!=null&&Q.saveZeniOtpToken(u)},setCurrentDisplayedCardId:u=>{e(Lt({cardId:u}))},onBackClick:()=>{const u=ve(n.state?.pathnameStackToGoBack),S=u.poppedPathname??Ne(p);a(S,{state:{pathnameStackToGoBack:u.newStack}})}}})(Ar),ds=_e.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: ${e=>`${os.containerWidth.value(e.windowSize)}%`};
|
|
38
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
39
|
-
`,lt=_e.div`
|
|
40
|
-
display: flex;
|
|
41
|
-
min-height: 100%;
|
|
42
|
-
width: 100%;
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
align-items: center;
|
|
46
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
47
|
-
`,ls={containerWidth:new ma(100,58)},us=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p,useFeatureGate:u}=ce(),[S,o]=i.useState(!1),[c,_]=i.useState(!1),[A,f]=i.useState(!1),[R,F]=i.useState(!1),k=Q.getSignedInUser();if(k==null)throw Error("Can't access onboarding card page without signing in...");const h=y(B=>ie(B));if(n==null)throw Error("Empty card id is not valid...");const{configValue:b}=p(Fe.zeniCardsConfig),g=y(B=>Gn(B,n)),{isFeatureEnabled:d}=u(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:D}=u(Z.isDebitCardFeatureEnabled),v=Se(D,h),N=Ie({isDebitCardFeatureEnabled:D,isBankingOnlyTenant:v}),L=be(h),w=ye(h),V=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,m=Ae({isCardsOnlyTenant:L,isChargeCardFeatureEnabled:d,isBookKeepingTenant:w,isDebitCardProductVisible:N,chargeCardsCreditAccountLimit:V}),l=g.chargeCard,P=y(B=>B.chargeCardConfigState.fetchState);i.useEffect(()=>{S===!1&&P!=="In-Progress"&&P!=="Completed"&&(a(Da()),o(!0)),c===!1&&g.fetchState==="Not-Started"&&(_(!0),a(Qe(n,!1,m)))},[c,g.fetchState,S,P]);const T=l?.type.code==="business_physical_debit_card"||l?.type.code==="business_virtual_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(A===!1&&(T===!1||T&&l.status?.code!=="active"||T&&l.status.code==="active"&&l.isPinSet||l.cardHolderUserId!==k.userId)){const B=Ce(h.tenantEmailDomain,n,k,l,!0),j=fe(C.state?.pathnameStackToGoBack,C.pathname);r(B,{state:{pathnameStackToGoBack:j}})}else if(A&&g.isRefreshingViewInBackground===!1&&l?.isPinSet===!0){a(zn({chargeCardId:n}));const B=Ce(h.tenantEmailDomain,n,k,l,!0),j=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(B,{state:{pathnameStackToGoBack:j}})}}},[g.fetchState,l?.type.code,A,g.isRefreshingViewInBackground]);const H=Q.getZeniOtpTokenForCardHolder(n),U=y(B=>pt(B.userState,k.userId)),K=()=>{l?.isPinSet!==!0&&a(za(n,!0))};i.useEffect(()=>{g.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout(K,3e3),f(!0))},[g.updateDebitCardPinAttemptFetchState.fetchState]);const I=B=>{F(B)};if(P!=="Completed"||l==null)return s.jsx(la,{fetchState:"In-Progress"});if(U?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(ps,{children:[s.jsx($e,{isAppContentDrawerOpen:R,handleDrawerToggle:I}),s.jsx(ms,{cardId:n,card:l,phone:U.phone,signedInUser:k,isSandboxEnv:Ka(),debitCardDetailState:g,signedInUserToken:H,navigate:r,currentTenant:h,location:C,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{I(!0)}}),e!=null?s.jsx(Cs,{windowSize:t,children:e}):null]})},ms=pe(function(e,{debitCardDetailState:t,cardId:a}){const r=ht(e,a),n=t.updateStatus,C=Ke(e,!1,!1,!1);let p=!1;return C.fetchState==="Completed"&&C.cards.length<=1&&(p=!0),{showMenuIcon:p,vgsVaultId:Ba.cardVaultId,twoFAView:r,setPinWaitStatus:n}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,debitCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdateDebitCardPinAttempt:o=>{e(It(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&Q.saveZeniOtpTokenForCardHolder(o,r)},onSetPinSuccess:()=>{e(Zn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("activate")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(Er),Cs=_e.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
width: ${e=>`${ls.containerWidth.value(e.windowSize)}%`};
|
|
51
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
52
|
-
box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
53
|
-
`,ps=_e.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
min-height: 100%;
|
|
56
|
-
width: 100%;
|
|
57
|
-
flex: 1 1 auto;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
align-items: center;
|
|
60
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
61
|
-
box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
62
|
-
`,hs={overlayWidth:new ma(Ra[12],Ra[12],Ra[9])},fs=pe(function(e,t){const a=Ya(e,!1,!1),r=t.lineId,n=a.customAddress[r],C=a.customAddressStatus[r]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:t.googleAPIKey,customAddress:n,customAddressStatus:C,lineId:r}},function(e,t){const{newCustomAddressId:a,lineId:r,chargeCardTypeOption:n}=t;return{onSubmitHandler:C=>{a!=null&&e(Rt(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`));const p=Or(C);e(Wn({addressType:`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`,addressToCreate:p})),e(qn(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`))},onDismissClick:()=>{t.onDismissClick(),a!=null&&e(Kn({addressId:a,cardLineId:r,cardType:n==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(kr),gs=({lineId:e,closeDrawerHandler:t,chargeCardTypeOption:a})=>{const r=Wa(),n=ua(),C=()=>{t()},p=y(u=>Yn(`${a==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,u))?.newAddressId;return s.jsx(Mt,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:hs.overlayWidth.valuePercentage(n),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:(u,S)=>(S==="backdropClick"||S==="escapeKeyDown")&&C(),children:s.jsx(fs,{googleAPIKey:Ba.googleMapsAPIKey,onDismissClick:C,lineId:e,chargeCardTypeOption:a,newCustomAddressId:p})})},bs=pe(function(e,t){const{isChargeCardFeatureEnabled:a,isDebitCardFeatureEnabled:r,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:C,isChargeCardSetupEnabled:p,isDebitCardSetupEnabled:u}=t,S=Ya(e,a&&p,r&&u);return{companyName:t.companyName,signedInUser:t.signedInUser,issueChargeCards:S,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:C,isDebitCardFeatureEnabled:r,isChargeCardFeatureEnabled:a,isChargeCardSetupEnabled:p,isDebitCardSetupEnabled:u,cardHolderCandidates:S.userList.map(o=>o.user).filter(Boolean),allRoles:S.userList.map(o=>o.userRole),allAccountingClasses:S.allAccountingClasses,userList:S.userList}},function(e,t){return{onIssueCardClick:()=>{e(Qn())},onSaveChangesToLocalStore:a=>{e(Xn(a))},onDismissClick:()=>{e(Ot()),t.navigate("../")},resetCustomAddressByLineID:(a,r)=>{e(Rt(`${r==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`))},openAddAddressDrawerHandler:t.openAddAddressDrawerHandler}})(Pr);function ys(){const e=Q.getSignedInUser(),t=le(),a=ue(),r=Dr(),[n]=ut(),C=n.get("cardType"),{useFeatureGate:p}=ce(),{isFeatureEnabled:u}=p(Z.isIssuePhysicalCardEnabled),{isFeatureEnabled:S}=p(Z.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:o}=p(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=p(Z.isChargeCardFeatureEnabled),_=y(I=>ie(I)),A=Se(o,_),f=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:A}),R=be(_),F=ye(_),k=_.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=Ae({isCardsOnlyTenant:R,isChargeCardFeatureEnabled:c,isBookKeepingTenant:F,isDebitCardProductVisible:f,chargeCardsCreditAccountLimit:k}),[b,g]=i.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");i.useEffect(()=>{b||(g(!0),a(Jn(f&&D,h&&d,!1)))},[b,g,a]);const d=!!_.companyChargeCardInfo?.info?.isChargeCardEnabled,D=!!_.companyDebitCardInfo?.info?.isDebitCardEnabled,v=_.companyName,N=y(I=>Ya(I,h&&d,f&&D)),L=N.fetchState,w=N.issueCardStatus.fetchState,V=N.lastSelfIssuedDebitCardId,m=y(I=>V!=null?Ut(I.chargeCardState,V):void 0),[l,P]=i.useState(null),[T,H]=i.useState(null),U=()=>{P(null)},K=(I,B)=>{P(I),H(B)};return i.useEffect(()=>{if(w==="Completed"){if(V!=null&&m?.type.code==="business_virtual_debit_card"){let I;I=m?.status.code==="request_on_hold"&&e.userId===m.cardHolderUserId?Zt(_.tenantEmailDomain):Ce(_.tenantEmailDomain,V,e,m),t(I)}else t("../");a(Ot())}},[w,V]),L==="Completed"?s.jsxs(s.Fragment,{children:[l!==null&&T!==null?s.jsx(gs,{closeDrawerHandler:U,lineId:l,chargeCardTypeOption:T}):null,s.jsx(bs,{companyName:v,signedInUser:e,themeState:r,isIssuePhysicalCardEnabled:u,isIssuePhysicalDebitCardEnabled:S,isDebitCardFeatureEnabled:f,isChargeCardFeatureEnabled:h,isChargeCardSetupEnabled:d,isDebitCardSetupEnabled:D,navigate:t,fetchState:N.fetchState,openAddAddressDrawerHandler:K,defaultCardType:C==="creditCard"||C==="debitCard"?C:void 0})]}):L==="Error"?s.jsx(La,{}):s.jsx(_r,{})}const Ss=_e.div`
|
|
63
|
-
display: flex;
|
|
64
|
-
height: 100vh;
|
|
65
|
-
width: 100%;
|
|
66
|
-
flex: 1 1 auto;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
overflow: auto;
|
|
69
|
-
align-items: center;
|
|
70
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
71
|
-
`,Is=pe(function(e,t){const{myPendingActivationChargeCardListState:a}=t;return{myPendingActivationChargeCardListView:a,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigate:a,currentTenant:r,location:n,signedInUser:C,myPendingActivationChargeCardListState:p}=t,{tenantEmailDomain:u}=r,{cards:S}=p;return{onChargeCardRowClick:o=>{const c=zt(S,o),_=Ce(u,o,C,c),A=fe(n.state?.pathnameStackToGoBack,n.pathname);a(_,{state:{pathnameStackToGoBack:A}})},onColumnSortConfigChanged:(o,c)=>{e(Na({uiState:{sortKey:o,sortOrder:c}}))},onReloadCards:()=>{e(ca())},onBackClick:()=>{const o=r.userRole.includes("charge_card_user");e(Na({uiState:{sortKey:o?"cardName":"owner",sortOrder:"ascending"}})),a("../")}}})(wr);function As(){const e=le(),t=ue(),a=ge(),r=Wa(),[n,C]=i.useState(!1),p=y(T=>er(T)),u=y(T=>ie(T)),S=y(T=>Ge(T,u.companyId)),o=ze(S.controllers),{useFeatureGate:c}=ce(),{isFeatureEnabled:_}=c(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:A}=c(Z.isDebitCardFeatureEnabled),f=Se(A,u),R=Ie({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:f}),F=!!u.companyDebitCardInfo?.info?.isDebitCardEnabled,k=!!u.companyChargeCardInfo?.info?.isChargeCardEnabled,h=je(),b=be(u),g=ye(u),d=u.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=Ae({isCardsOnlyTenant:b,isChargeCardFeatureEnabled:_,isBookKeepingTenant:g,isDebitCardProductVisible:R,chargeCardsCreditAccountLimit:d}),v=Re(h?.loggedInUserRoleMap),N=y(T=>Ye(T)),{creditAccount:L,creditAccountRepayment:w}=y(T=>Ze(T)),V=y(T=>xt(T)).cards.filter(T=>T.type.code.includes("debit")).map(T=>T.connectedAccountId),m=[...new Set(V)],l=y(T=>va(T,m));i.useEffect(()=>{n||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(ca()),t(Da()))},[n,t,p.fetchState]),i.useEffect(()=>{if(p.fetchState==="Completed"&&p.cards.length===1&&P!=null){const T=Ce(u.tenantEmailDomain,p.cards[0].id,P,p.cards[0]);e(T,{state:{message:a.state?.message}})}},[p.fetchState,p.cards]);const P=Q.getSignedInUser();if(i.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&D&&k&&v&&t($a()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&v&&t(Ga()),l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&R&&F&&v&&t(Bt())},[L.fetchState,w.fetchState,t,l.fetchState,R,F,v,D,k]),P==null)throw Error("Can't access address page without signing in...");if(p.fetchState!=="Completed")return s.jsx(la,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}});{const T=Oe(D,R,F,k);return s.jsx(Ss,{children:s.jsx(Is,{navigate:e,currentTenant:u,signedInUser:P,productInformation:T,myPendingActivationChargeCardListState:p,isChargeCardFeatureEnabled:D,isDebitCardFeatureEnabled:R,isDebitCardSetupEnabled:F,isChargeCardSetupEnabled:k,chargeCardCashbackDetailState:N,creditAccount:L,creditAccountRepayment:w,depositAccountListWithDebitCardIssued:l,controllerEmails:o,location:a})})}}const Es=pe(function(e,t){const{companyId:a,companyLegalName:r}=t;return{chargeCardSetupView:da(e,a),admins:t.adminList,companyLegalName:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-zeni-charge-cards?embed=true"}},function(e,t){const{navigate:a,companyId:r,isCompanyBusinessVerificationAndPaymentSetUpDone:n,isDebitCardSetupEnabled:C,isChargeCardSetupEnabled:p,signedInUser:u,location:S,productInformation:o,isEarlyPayEnabled:c,controllerEmails:_,chargeCardsCreditAccountLimit:A}=t;return{onSetupButtonClick:f=>{if(u!=null&&J.trackCardsPromoPageClicked("enable cards"),n)switch(J.trackCardsEnableCardsClick(_,o,"Cards Promo"),f){case"credit":e(Ue(r,!0,"charge_cards",c,!1));break;case"debit":e(Ue(r,!0,"debit_cards",c,!1));break;case"debit_and_credit":e(A===0?Ue(r,!0,"debit_cards",c,!0):Ue(r,!0,"charge_cards__debit_cards",c,!1))}else switch(J.trackCardsSetupCardsClick(_,o,"Cards Promo"),f){case"credit":e(Ue(r,!1,"charge_cards",c,!1));break;case"debit":e(Ue(r,!1,"debit_cards",c,!1));break;case"debit_and_credit":e(A===0?Ue(r,!1,"debit_cards",c,!0):Ue(r,!1,"charge_cards__debit_cards",c,!1))}},onBackClick:()=>{const f=ve(S.state?.pathnameStackToGoBack);let R=f.poppedPathname;R==null&&(R=C||p?"..":"../.."),a(R,{state:{pathnameStackToGoBack:f.newStack}})},onLetsGoClick:()=>{a("./onboard")},onSetupChargeCardSuccess:()=>{n?(e(_a()),a("../",{relative:"path"})):a("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(nr(r))}}})(Fr),ks=()=>{const e=le(),{tenantEmailDomain:t}=ia(),[a]=ut(),r=a.get("cardPromoType"),n=ue(),{useDynamicConfig:C,useFeatureGate:p}=ce(),[u,S]=i.useState(!1),{isFeatureEnabled:o}=p(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=p(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:_}=p(Z.isChargeCardFeatureEnabled),{configValue:A}=C(Fe.zeniCardsConfig),f=y(ee=>ie(ee)),R=y(ee=>Ge(ee,f.companyId)),F=ze(R.controllers),k=A.charge_card_cashback_rate_per_transaction!=null?A.charge_card_cashback_rate_per_transaction:.0175,h=ge(),b=Q.getSignedInUserTenant(t)?.companyId??f.companyId,g=y(ee=>da(ee,b)),d=g.primaryFundingAccount,D=f.companyBillPayInfo?.info,v=be(f),N=ye(f),L=Se(o,f),w=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,V=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:L}),m=Ae({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:_,isBookKeepingTenant:N,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:w}),l=Gt({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:_,isBookKeepingTenant:N}),P=V&&m===!1,T=D?.businessVerificationStatus?.code==="verified"&&(P||d?.accType==="depositAccount"||ar(d?.providerVerificationStatus?.code??"")),H=Q.getSignedInUser(),U=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,K=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,I=!!f.company?.companyChargeCardInfo.isChargeCardEnabled,B=!!f.company?.companyDebitCardInfo.isDebitCardEnabled,j=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,O=ee=>{S(ee)},W=y(ee=>ee.chargeCardSetupViewState.fetchState);if(H==null)throw Error("Can't access Charge Card promo page without signing in...");const E=je(),z=Re(E?.loggedInUserRoleMap),q=Za(E?.loggedInUserRoleMap),[G,x]=i.useState(!1),[se,ae]=i.useState(!1),[ne,X]=i.useState(!1);i.useEffect(()=>{G===!1&&h.state?.message==="activation"&&x(!0)},[h.state]),i.useEffect(()=>{se||W!=="Not-Started"||b==null||(ae(!0),n(Fa(b,!0)))},[se,W,b,n]);const re=f.companyChargeCardInfo?.info!=null&&Xe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:l,isTOSAccepted:K,isSetupEnabled:I,isUserHasCardsAdminLevelAccess:z,isUserHasCardsAccess:q}),Ee=f.companyDebitCardInfo?.info!=null&&Xe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:V,isTOSAccepted:j,isSetupEnabled:B,isUserHasCardsAdminLevelAccess:z,isUserHasCardsAccess:q}),xe=V&&Ee&&l&&w>=0&&re?"debit_and_credit":V&&Ee?"debit":"credit",Y=Rr(r,xe),he=g?.chargeCardTermsDetails?.fetchStatus?.fetchState,ke=i.useRef(null);i.useEffect(()=>{he==="In-Progress"?ke.current=Y:he!=="Error"&&he!=="Not-Started"||(ke.current=null)},[he,Y]);const Be=he!=="In-Progress"&&he!=="Completed"||ke.current==null?Y:ke.current;i.useEffect(()=>{Y==="credit"&&(I||l===!1&&B)||Y==="debit"&&B||Y==="debit_and_credit"&&B&&I?e("../"):(Y==="debit_and_credit"&&K===!0&&j===!0||Y==="credit"&&(K===!0||l===!1&&j===!0)||Y==="debit"&&j===!0)&&z===!0&&e("../setup")},[T,I,B,Y,K,j]),i.useEffect(()=>{ne||(n(tr("cardAdmin")),X(!0))},[ne]);const Pe=y(ee=>Tt(ee.userState,ee.userRoleState,ee.userListViewState,"cardAdmin")),we=Oe(l,V,B,I);return(re||Ee)&&W==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Xa,{analytics:J,onLoad:()=>{if(J.trackPageLoaded(Ht.Event.cardsPromoPage),!!l&&!I||!!V&&!B||!!l&&!!V&&!B&&!I){const ee=Ds({isDebitCardSetupEnabled:B,isChargeCardSetupEnabled:I,isCreditCardProductVisibleForExpressInterest:l,isDebitCardProductVisible:V});J.trackCardsPromoView(F,we,"Page",ee,"Promo Page")}}}),s.jsx(xa,{showConfetti:G}),s.jsx($e,{isAppContentDrawerOpen:u,handleDrawerToggle:O}),s.jsx(Es,{signedInUser:H,location:h,showEnableCardButton:T,isCompanyBusinessVerificationAndPaymentSetUpDone:T,isChargeCardSetupEnabled:I,isDebitCardSetupEnabled:B,companyLegalName:f.companyName,adminList:Pe.users,isCheckingEnabled:U,navigate:e,companyId:b,cardPromoType:Be,controllerEmails:F,productInformation:we,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:o,isEarlyPayEnabled:c,cashbackRate:k,chargeCardsCreditAccountLimit:w,onClickMenuIcon:()=>{O(!0)}})]}):s.jsxs(s.Fragment,{children:[s.jsx($e,{isAppContentDrawerOpen:u,handleDrawerToggle:O}),s.jsx(Tr,{})]})},Ds=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:t,isCreditCardProductVisibleForExpressInterest:a,isDebitCardProductVisible:r})=>a&&r&&!e&&!t?"Credit & Debit Card":a&&!t?"Credit Card":r&&!e?"Debit Card":"";function Ws(){const e=ge(),t=y(W=>ie(W)),{useFeatureGate:a}=ce(),{isFeatureEnabled:r}=a(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:n}=a(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=a(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:p}=a(Z.isChargeCardPaymentHistoryFeatureEnabled),u=Se(n,t),S=Ie({isDebitCardFeatureEnabled:n,isBankingOnlyTenant:u}),o=vr(t,r,n),c=!!t.company?.companyChargeCardInfo.isChargeCardTOSAccepted,_=!!t.company?.companyDebitCardInfo.isDebitCardTOSAccepted,A=!!t.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!t.company?.companyDebitCardInfo.isDebitCardEnabled,R=je(),F=Re(R?.loggedInUserRoleMap),k=Za(R?.loggedInUserRoleMap),{isFeatureEnabled:h}=a(Z.isCashbackFeatureEnabled),b=t.userRole.includes("charge_card_user"),g=!b,d=!b&&A,D=t?.userRole!=null&&rr(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!D)&&sr(R?.loggedInUserRoleMap),N=or(R?.loggedInUserRoleMap),L=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!D)&&cr(R?.loggedInUserRoleMap),{isFeatureEnabled:w}=a(Z.isDepositAccountsFeatureEnabled),V=w&&!D&>(R?.loggedInUserRoleMap),m=A&&!D,l=f&&!D,P=o&&!D&&Re(R?.loggedInUserRoleMap),T=ir(R?.loggedInUserRoleMap),H=be(t),U=ye(t),K=t.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,I=Ae({isCardsOnlyTenant:H,isChargeCardFeatureEnabled:r,isBookKeepingTenant:U,isDebitCardProductVisible:S,chargeCardsCreditAccountLimit:K}),B=t.companyChargeCardInfo?.info!=null&&Xe({cardInfo:t.companyChargeCardInfo.info,isProductVisible:I,isTOSAccepted:c,isSetupEnabled:A,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:k}),j=t.companyDebitCardInfo?.info!=null&&Xe({cardInfo:t.companyDebitCardInfo.info,isProductVisible:S,isTOSAccepted:_,isSetupEnabled:f,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:k}),O=B||j;return s.jsxs(Wt,{children:[F?s.jsx(te,{path:"setup",element:s.jsx(st,{isBillPayAdminLevelAccess:v,isReimbursementAdminLevelAccess:L,isZeniAccountAdminLevelAccess:V,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:N,productType:"charge_cards",type:"setup"})}):null,F?s.jsx(te,{path:"verification",element:s.jsx(st,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:N,isReimbursementAdminLevelAccess:L,isZeniAccountAdminLevelAccess:V,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:T,productType:"charge_cards",type:"verification"})}):null,s.jsx(te,{path:"promo",element:s.jsx(ks,{})}),m||l?s.jsxs(s.Fragment,{children:[s.jsx(te,{path:"/",element:s.jsx(ct,{isPaymentDrawerOpen:!1})}),P&&C?s.jsx(te,{path:"payment",element:s.jsx(ct,{isPaymentDrawerOpen:!0})}):null,s.jsx(te,{path:"activate",element:s.jsx(As,{})}),s.jsx(te,{path:"onboard",element:s.jsx(cs,{})}),F?s.jsx(te,{path:"new",element:s.jsx(ys,{})}):null,h&&g?s.jsx(te,{path:"cashback",element:s.jsx(Vr,{})}):null,d?s.jsx(te,{path:"statements",element:s.jsx(ss,{})}):null,P&&p&&A?s.jsx(te,{path:"payment-history",element:s.jsx(rs,{})}):null,s.jsx(te,{path:":cardId/activate",element:s.jsx($r,{})}),s.jsx(te,{path:":cardId/setPin",element:s.jsx(us,{})}),s.jsx(te,{path:":cardId/addToWallet",element:s.jsx(jr,{})}),s.jsx(te,{path:":cardId/*",element:s.jsx(Jr,{})}),s.jsx(te,{path:"*",element:s.jsx(La,{})})]}):(c||_)&&F?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../setup"})}):O?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../promo",state:e.state})}):s.jsx(te,{path:"*",element:null})]})}export{Ws as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DyzG7jl-.js";import{z as a}from"./index-DcF25xRC.js";import{g as n}from"./QBOConnectionScreen-iMpRDnN4.js";import"./sentry-Cdif28fl.js";import{u as p,N as s}from"./core-B_XHMrqe.js";import"./zeni-epic-state-D9HDY_8v.js";import"./recharts-CaK7MRaR.js";import"./mui-CfonSYhg.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";import"./empty-Cdv-ZWIg.js";import"./pdf-lib-BT18iM_Z.js";import"./index-IhJ3VQPC.js";import"./url-x3nND-T-.js";import"./index-BfaZdimW.js";import"./decodeURIComponentSafe-D2C9TGj8.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DyzG7jl-.js";import{K as l,w as f,m as c}from"./index-DcF25xRC.js";import{D as p}from"./mui-CfonSYhg.js";import"./sentry-Cdif28fl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f52e2d2c-9a6b-4671-9467-14f9341190b0",e._sentryDebugIdIdentifier="sentry-dbid-f52e2d2c-9a6b-4671-9467-14f9341190b0")}catch{}})();const b={drawerLeftMargin:new f(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),a=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DyzG7jl-.js";import{a as d}from"./sentry-Cdif28fl.js";import{l as B,h as G,u as F,i as q,g as c,N as K,n as L,o as N,p as _}from"./core-B_XHMrqe.js";import{LA as z,eQ as O,KZ as R,kD as H,Hz as k,LF as M,Ks as W,jD as Y,HA as b,L2 as $,L3 as Q,Ku as V,Kt as Z}from"./zeni-epic-state-D9HDY_8v.js";import{aR as J,f as U,p as X,q as tt}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import{d as S}from"./decodeURIComponentSafe-D2C9TGj8.js";import{w as et}from"./withTransactionSidePanel-9CO_VCKb.js";import{f as at,c as nt}from"./routePaths-Dgf8Lpxl.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";import"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import"./TransactionDetailScreen-BQ6sw9a7.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]="41f9cd29-47fa-4bdf-bbaf-72c1c357fbb6",a._sentryDebugIdIdentifier="sentry-dbid-41f9cd29-47fa-4bdf-bbaf-72c1c357fbb6")}catch{}})();const ot=L(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:Y(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Z("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(Q()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(b(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(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(J),it=et(function({entityType:a,...t}){const e=B(),o=G(),l=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=S(x??""),f=S(j??""),p=rt(r,f),v=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=c(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=c(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=c(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(H(i)))},[m,p,i]);const E=c(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(K,{to:I(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DyzG7jl-.js";import{a as r}from"./sentry-Cdif28fl.js";import{a2 as i,a3 as l,a4 as p,p as b}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import m from"./NotFoundScreen-BUqotHFB.js";import{l as c,u}from"./core-B_XHMrqe.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]="962e43b2-96f5-4d4d-bf4b-69fb382a754a",e._sentryDebugIdIdentifier="sentry-dbid-962e43b2-96f5-4d4d-bf4b-69fb382a754a")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{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,12 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DyzG7jl-.js";import{a as u}from"./sentry-Cdif28fl.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-B_XHMrqe.js";import{z as r,m as M,O as P,g as V,f as A,h as N,X as Q,T as R,i as W}from"./index-DcF25xRC.js";import{eQ as X,Jl as $,Jv as q,Jm as B,eU as G,fm as H,Jr as K,fL as Y,cU as Z,Jw as ee,Jx as te}from"./zeni-epic-state-D9HDY_8v.js";import{n as ne}from"./mui-CfonSYhg.js";import{u as se}from"./useDeviceId-B_i0E4gh.js";import{f as ae}from"./analyticsHelper-BocYRaaP.js";import{t as ie}from"./getLocaleForTenant-EkX2Npfp.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="4ae2f1f4-7f48-47f3-b88a-30591d5c64cc",t._sentryDebugIdIdentifier="sentry-dbid-4ae2f1f4-7f48-47f3-b88a-30591d5c64cc")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=w(),m=_(),[y]=J(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>X(e)),k=l(e=>$(e)),E=r.getSignedInUser(),v=M().mode;u.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),u.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(k.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const U=u.useCallback(()=>{m("/signin/auth")},[m]),O=u.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=u.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return f.jsx(Q,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:O,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return f.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||g==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DyzG7jl-.js";import{l as r,n}from"./core-B_XHMrqe.js";import{E as i}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import"./sentry-Cdif28fl.js";import"./zeni-epic-state-D9HDY_8v.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.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]="e4d34e1e-5354-4717-bd0a-1420a4a7a4f5",o._sentryDebugIdIdentifier="sentry-dbid-e4d34e1e-5354-4717-bd0a-1420a4a7a4f5")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DyzG7jl-.js";import{a as r}from"./sentry-Cdif28fl.js";import{h as A,u as C,g as o,N as J}from"./core-B_XHMrqe.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-D9HDY_8v.js";import{z as h,A as I}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="b9df0c40-a6ca-4e75-90d4-aae6344c1104",n._sentryDebugIdIdentifier="sentry-dbid-b9df0c40-a6ca-4e75-90d4-aae6344c1104")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo(()=>M(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),y=o(x),v=o(z),c=o(D),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(s.userId,s.zeniSessionId??void 0))))},[p,s,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(T=>T.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:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(R(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-DyzG7jl-.js";import{l as V,h as Z,u as z,i as Q,g as d,n as H,o as J,p as I}from"./core-B_XHMrqe.js";import{eQ as v,qO as P,qm as X,Kg as U,qh as T,bv as ee,bn as ae,bT as te,qi as se,Kh as oe,K2 as C,dE as re,ui as ne,Ki as ie,uF as ce,eY as le,eW as de}from"./zeni-epic-state-D9HDY_8v.js";import{z as me,V as fe,Z as pe,d as ue,a as q,I as M,v as he,f as w,ao as ge,q as Fe}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import be from"./NotFoundScreen-BUqotHFB.js";import{F as Ie}from"./FeaturePreviewScreen-2-p5K2P0.js";import{a as g}from"./sentry-Cdif28fl.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import{u as Te}from"./useInitialThreadRequest-B1Dx2jH5.js";import{t as Se}from"./routePaths-Dgf8Lpxl.js";import{M as ye}from"./MobileAppDrawer-CPI95lgy.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.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]="e56dfbea-90fb-451c-a57a-502ec46124b2",s._sentryDebugIdIdentifier="sentry-dbid-e56dfbea-90fb-451c-a57a-502ec46124b2")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(U(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),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 R(){const s=V(),e=Z(),a=z(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),$=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,j,O)=>j!=null?f.forecasts.findIndex(b=>b.id===j):O!=null?f.forecasts.findIndex(b=>b.id===O):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(U(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,T,F]);const D=ue(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:Y}=q(),{isFeatureEnabled:E}=Y(M.isReportsCommentingEnabled),_=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=g.useState(!1),L=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:_,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d(i=>v(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DyzG7jl-.js";import{Kb as te,eQ as Q,jD as G,eY as q,eW as ne,HD as J,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as $,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-D9HDY_8v.js";import{K as pe,a as X,I as E,z as H,a9 as ue,y as me,ak as ge,al as Re,w as he,o as R,Y as fe,O as be,am as Oe,V as Ve,Z as Ue,v as Be,f as Ce,h as Ze,q as Ke,an as $e,d as _e}from"./index-DcF25xRC.js";import{D as ye,n as W,S as we}from"./mui-CfonSYhg.js";import ae from"./NotFoundScreen-BUqotHFB.js";import{a as r}from"./sentry-Cdif28fl.js";import{h as ee,i as ze,g as m,l as Ge,u as He,n as We,o as se,p as K}from"./core-B_XHMrqe.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import{M as Me}from"./MobileAppDrawer-CPI95lgy.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.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]="8b73fc4f-1eab-42d4-abac-34bd114dcb5f",a._sentryDebugIdIdentifier="sentry-dbid-8b73fc4f-1eab-42d4-abac-34bd114dcb5f")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=be.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>G(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),T=J(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{p(N()),y()},F=()=>{O===!0?w(!0):b()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),C={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&b()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...C})]})})},qe=W(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=W(fe.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=W(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Je={overlayWidth:new he(100,100,48)},z=be.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Q(i)),u=m(i=>G(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),L=J(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),C={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...C})]})})},ea=W(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:Ce}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})($e);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,h)&&V,w=J(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),b=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ye({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(ce(C,I))},[C,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:Ce,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:C,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:A,classListView:j,companyId:C,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:b}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:C,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Y)=>{n($({sortKey:e,sortOrder:Y}))},onRowClick:e=>{const Y=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ke(g.state?.pathnameStackToGoBack,g.pathname);l(Y,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(K,{path:"/",element:s.jsx(M,{})}),s.jsx(K,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx(K,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx(K,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(K,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DyzG7jl-.js";import E from"./NotFoundScreen-BUqotHFB.js";import{a as r}from"./sentry-Cdif28fl.js";import{l as _,u as v,g as p,i as M,h as P,N as U,n as z,o as O,p as h}from"./core-B_XHMrqe.js";import{eQ as B,PW as b,bo as F,bn as N,hk as Q,gQ as V}from"./zeni-epic-state-D9HDY_8v.js";import{R as W,z as I,Z,cA as $}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import{M as G}from"./MobileAppDrawer-CPI95lgy.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.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]="3fd9517e-a697-4d04-8c5c-20723c0136c3",e._sentryDebugIdIdentifier="sentry-dbid-3fd9517e-a697-4d04-8c5c-20723c0136c3")}catch{}})();const H=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),J=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,T)=>{f(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-DyzG7jl-.js";import x from"./NotFoundScreen-BUqotHFB.js";import{a as p}from"./sentry-Cdif28fl.js";import{l as C,u as I,h as A,g as u,N as D,n as E,o as k,p as f}from"./core-B_XHMrqe.js";import{eQ as T,NA as g,NQ as S,D5 as V,Ce as N,D4 as m,CX as O,O4 as U}from"./zeni-epic-state-D9HDY_8v.js";import{m as _,z as $,B,a6 as Q,bO as W,af as z}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-CBzX3JSO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="451f71af-9224-4da1-b9af-4870d78eb9bf",e._sentryDebugIdIdentifier="sentry-dbid-451f71af-9224-4da1-b9af-4870d78eb9bf")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(Q(W)),X=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[c,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=_(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(N(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(c||(y(!0),a(m())),e("./new"))},[c,i,a]);const R={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,q,j)=>{n.endsWith(d)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...R})};function Z(){return t.jsxs(k,{children:[t.jsx(f,{path:"/",element:t.jsx(X,{})}),t.jsx(f,{path:"/new",element:t.jsx(v,{})}),t.jsx(f,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(f,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DyzG7jl-.js";import{a as j,z as w,aN as y,v as E,f as p,h as F,cK as L,I as P}from"./index-DcF25xRC.js";import"./mui-CfonSYhg.js";import m from"./NotFoundScreen-BUqotHFB.js";import{a as u}from"./sentry-Cdif28fl.js";import{h as T,g as x,l as V,u as A,n as Q,o as R,p as d}from"./core-B_XHMrqe.js";import{eQ as U,Qt as C,Nf as z,Qu as v,u8 as Y,f2 as G,Qv as K,u6 as O}from"./zeni-epic-state-D9HDY_8v.js";import{R as b}from"./ReferralListScreen-yxuUKjxd.js";import"./recharts-CaK7MRaR.js";import"./analytics-CoOmPlNt.js";import"./plaid-B7Pmnnvt.js";import"./dnd-CtoU_fHu.js";import"./stripe-DMRn4zHo.js";import"./lottie-CqwrfSWf.js";import"./lexical-Dx9Jj1SY.js";import"./pdf-CsFFdLdL.js";import"./utils-DMgIZDY7.js";import"./useAskAiCfoHostNavButtonProps-BYtw9cd1.js";import"./MobileAppDrawer-CPI95lgy.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]="4a159937-4a32-4c18-864d-7de10417367c",a._sentryDebugIdIdentifier="sentry-dbid-4a159937-4a32-4c18-864d-7de10417367c")}catch{}})();const q=Q(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const a=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=x(o=>U(o)),c=V(),_=A(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=x(o=>C(o)),N=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=z(k);u.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(Y()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(q,{navigate:c,location:_,currentTenant:r,companyName:I,userName:N,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function da(){const{useFeatureGate:a}=j(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(d,{path:"/",element:t?e.jsx(b,{}):e.jsx(m,{})}),e.jsx(d,{path:"how-it-works",element:t?e.jsx(b,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(d,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(m,{})}),e.jsx(d,{path:"*",element:e.jsx(m,{})})]})}export{da as default};
|