@zeniai/web-app-ui 5.1.22-dev → 5.1.23-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-iiutr8Jz.js +1 -0
- package/dist/assets/{AddressScreen-CAEk8mk_.js → AddressScreen-tFmdakWA.js} +2 -2
- package/dist/assets/{AiCfoScreen-BKo76Cv4.js → AiCfoScreen-DDKQqune.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CHqAEZsW.js → BillPayApprovalRoutes-DHZpT3No.js} +1 -1
- package/dist/assets/{BillPayRoutes-C35OH9Bu.js → BillPayRoutes-C3kWZhA-.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-Gu3xfWkO.js +9 -0
- package/dist/assets/ChargeCardRoutes-CDBK5Rsn.js +71 -0
- package/dist/assets/CompanyPassportScreen-WdmqXh3-.js +1 -0
- package/dist/assets/ConnectionAuthScreen-CYdP4C61.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-B6G9r_f7.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CV3lMFDm.js → CustomerOnboardingRoutes-Do7A7jXR.js} +6 -6
- package/dist/assets/{DashboardRoutes-CyRdXBry.js → DashboardRoutes-Cr_qaBQm.js} +3 -3
- package/dist/assets/{DefaultTenantHome-2SpQFMEh.js → DefaultTenantHome-CVoVD99-.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-D-kY5B9y.js +18 -0
- package/dist/assets/DrawerScreen-Dy-FhaRy.js +1 -0
- package/dist/assets/EntityDetailRoutes-CXuD_yIT.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BqOROAyt.js +25 -0
- package/dist/assets/FeaturePreviewScreen-CFCMNKBU.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BZL3fMbo.js +1 -0
- package/dist/assets/MagicLinkRoutes-B1WpGs_j.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BmHDtX_Y.js +12 -0
- package/dist/assets/{MobileAppDrawer-NgQTATqT.js → MobileAppDrawer-BSk7YHeH.js} +1 -1
- package/dist/assets/NotFoundScreen-BEFHW4G3.js +1 -0
- package/dist/assets/{NotificationRoutes-5ZrD3JXy.js → NotificationRoutes-BY3IG0y5.js} +1 -1
- package/dist/assets/OAuthConsentScreen-C2xZczK4.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-cWGNCcqf.js +1 -0
- package/dist/assets/PeopleRoutes-vbCcQ3ee.js +22 -0
- package/dist/assets/PerformanceRoutes-CBUJyIHv.js +1 -0
- package/dist/assets/{Preview-DMFknWZO.js → Preview-DJmqkFOo.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CAQUllDp.js → QBOConnectionScreen-Dain4XtO.js} +1 -1
- package/dist/assets/ReferralListScreen-sgTEbSbs.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-D4DIZDe_.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BvSQCWpJ.js → ReimbursementApprovalRuleDetailScreen-BKQV6Gey.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-gjTC-Wvb.js → ReimbursementRoutes-Cv7-Cyp4.js} +9 -9
- package/dist/assets/{ReportsRoutes-BNBlzfhF.js → ReportsRoutes-DEUxYcXP.js} +1 -1
- package/dist/assets/RewardsRoutes-BTu3LH6D.js +1 -0
- package/dist/assets/ScreenRoutes-Cd2ZKjlA.js +2 -0
- package/dist/assets/{SettingsRoutes-DQuZAuVf.js → SettingsRoutes-NK-zqL44.js} +8 -8
- package/dist/assets/{SetupPagesScreen-ALhX_tKy.js → SetupPagesScreen-NvSqWgzr.js} +5 -5
- package/dist/assets/SignInScreen-BB4yXngc.js +1 -0
- package/dist/assets/SignOutScreen-C24Lu_iD.js +9 -0
- package/dist/assets/TaskListScreen-DYz0lfQ9.js +9 -0
- package/dist/assets/{TaskRoutes-WPpNWz-g.js → TaskRoutes-D53-F9Tz.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-DhINrWYz.js → TransactionDetailRoutes-NB5jTxua.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Ciduelax.js → TransactionDetailScreen-C-nbZGJm.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DmwWnTvd.js → TransactionListRoutes-aQZ7jhPa.js} +1 -1
- package/dist/assets/TreasuryRoutes-DDQ8gehh.js +37 -0
- package/dist/assets/{VendorsRoutes-ONRRLMlr.js → VendorsRoutes-Dw3rLW5P.js} +23 -23
- package/dist/assets/WiseConfirmationScreen-CNibKVby.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BZd2UMK8.js → ZeniAccountRoutes-BrBJNwAv.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-DpqB7dh6.js +9 -0
- package/dist/assets/{accountMappingHelper-DjOpJLte.js → accountMappingHelper-BprfT0GK.js} +1 -1
- package/dist/assets/{analytics-CnRKHa3G.js → analytics-i3QajGlB.js} +1 -1
- package/dist/assets/analyticsHelper-PpRvwE56.js +1 -0
- package/dist/assets/{core-rmRh_ZE8.js → core-mrC-JzGi.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-C5DyNl7Z.js → decodeURIComponentSafe-D7hgbcm6.js} +1 -1
- package/dist/assets/{dnd-DhJJZ165.js → dnd-DZwpImxe.js} +1 -1
- package/dist/assets/{empty-BR41JKH4.js → empty-DncJ1CJr.js} +1 -1
- package/dist/assets/{empty-Bl8iXXbt.js → empty-p7zsbAY4.js} +1 -1
- package/dist/assets/{emptyVideoElement-JvcOcTif.js → emptyVideoElement-nmkuasXW.js} +1 -1
- package/dist/assets/epic-BkgBKn6e.js +2 -0
- package/dist/assets/{getLocaleForTenant-BikYpzid.js → getLocaleForTenant-DlHE4SFU.js} +1 -1
- package/dist/assets/{index-BcKPNqyh.js → index-B75Ozwz_.js} +1 -1
- package/dist/assets/{index-DvQmfPWS.js → index-BqRCJPTQ.js} +1 -1
- package/dist/assets/{index-BhTe6Ye9.js → index-C9iPRurj.js} +1 -1
- package/dist/assets/{index-ek_-6Hro.js → index-CsClpzPd.js} +1 -1
- package/dist/assets/{index-CP6u_qYB.js → index-D9amQzUe.js} +2 -2
- package/dist/assets/{index-CYj5jhrI.js → index-HYe9zsmh.js} +10755 -10759
- package/dist/assets/{index-CTpsdld-.js → index-T0lbkIBD.js} +1 -1
- package/dist/assets/{index-Da7svMe4.js → index-W27fWxOr.js} +1 -1
- package/dist/assets/{lexical-Bbb_9RJE.js → lexical-9U8kXGr5.js} +1 -1
- package/dist/assets/{liveblocks-oKBQUmhq.js → liveblocks-D8betOTZ.js} +1 -1
- package/dist/assets/{lottie-BEwdV52_.js → lottie-CT5flDGi.js} +1 -1
- package/dist/assets/{mui-DRkb5v8u.js → mui-CtKcfboe.js} +1 -1
- package/dist/assets/{pathToGoBack-BjLk76KL.js → pathToGoBack-CynAiod2.js} +1 -1
- package/dist/assets/{pdf-DTUmIE_Y.js → pdf-CUvE2RE-.js} +3 -3
- package/dist/assets/{pdf-lib-B5Yv6f0X.js → pdf-lib-CClLSROc.js} +1 -1
- package/dist/assets/{plaid-DkZRc6lf.js → plaid-DVya51Ew.js} +1 -1
- package/dist/assets/{pusher-C7GLtvZ1.js → pusher-DSqgf_ao.js} +1 -1
- package/dist/assets/{react-C0jbaFfs.js → react-B9ErTbNF.js} +1 -1
- package/dist/assets/{react-BGSDLiM6.js → react-BBWa0hDB.js} +1 -1
- package/dist/assets/{react-CzE32USB.js → react-BaFQVmTf.js} +1 -1
- package/dist/assets/{react-PcSYu_R0.js → react-CozBWqvn.js} +1 -1
- package/dist/assets/{react-BlZq22yG.js → react-Klu4yn0H.js} +1 -1
- package/dist/assets/{react-CyxukSSB.js → react-Siz_fpzj.js} +1 -1
- package/dist/assets/{recharts-BG7SNYPF.js → recharts-Q6vC6hsk.js} +1 -1
- package/dist/assets/{routePaths-CJs7QSKh.js → routePaths-REpeZ6R0.js} +1 -1
- package/dist/assets/{sentry-p9ArnUH9.js → sentry-BHRgRpRB.js} +1 -1
- package/dist/assets/{url-Cy9bK65P.js → url-Cx4mpMZX.js} +1 -1
- package/dist/assets/{url-B-b7cLPz.js → url-sKaroM18.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DliEl8yr.js → useAiCfoDashboardSuggestedQuestionsChips-D-YoPaLt.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-O_OQACkG.js +1 -0
- package/dist/assets/{useDeviceId-DDLhcPdX.js → useDeviceId-Csejqjvv.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Chgglzdd.js → useInitialThreadRequest-BO39So_q.js} +1 -1
- package/dist/assets/{utils-B4k-7_rU.js → utils-B2v0z9lS.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DYzLuoli.js → withTransactionSidePanel-BDlHvnIn.js} +2 -2
- package/dist/assets/{zeni-epic-state-DH4sFgeZ.js → zeni-epic-state-Beqj4-lt.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -11
- package/dist/assets/AddressRoutes-DFAo71dm.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-CgVN0Nsi.js +0 -9
- package/dist/assets/ChargeCardRoutes-D1ynSFue.js +0 -71
- package/dist/assets/CompanyPassportScreen-CZyzwqAN.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BxOtTv2G.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-dnPP_THl.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BwV8uHFK.js +0 -18
- package/dist/assets/DrawerScreen-C8Y4hZ9A.js +0 -1
- package/dist/assets/EntityDetailRoutes-Cf-UIj8k.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-DlB2tX8j.js +0 -25
- package/dist/assets/FeaturePreviewScreen-CzGmkIs5.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-J9VXEJ_b.js +0 -1
- package/dist/assets/MagicLinkRoutes-Dzny_0z8.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-B7WrkbOS.js +0 -12
- package/dist/assets/NotFoundScreen-Dnnx5_jI.js +0 -1
- package/dist/assets/OAuthConsentScreen-DMk4QIE9.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DXkA6slP.js +0 -1
- package/dist/assets/PeopleRoutes-DT-OdVos.js +0 -22
- package/dist/assets/PerformanceRoutes-GPH8MNJm.js +0 -1
- package/dist/assets/ReferralListScreen-DAm5IsxS.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DEpRS8Cq.js +0 -1
- package/dist/assets/RewardsRoutes-CIjKku01.js +0 -1
- package/dist/assets/ScreenRoutes-CrJaHpxC.js +0 -2
- package/dist/assets/SignInScreen-Cg3_Sp1a.js +0 -1
- package/dist/assets/SignOutScreen-Dca3TL76.js +0 -9
- package/dist/assets/TaskListScreen-C_Tqt5Br.js +0 -9
- package/dist/assets/TreasuryRoutes-BaAE21GJ.js +0 -37
- package/dist/assets/WiseConfirmationScreen-DtERxgVf.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DkPXPFSa.js +0 -9
- package/dist/assets/analyticsHelper-uVQynfBH.js +0 -1
- package/dist/assets/epic-NcHkg6Zz.js +0 -2
- package/dist/assets/useAskAiCfoHostNavButtonProps-CyyAGXJ-.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-HYe9zsmh.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BHRgRpRB.js"><link rel="modulepreload" crossorigin href="/assets/core-mrC-JzGi.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Beqj4-lt.js"><link rel="modulepreload" crossorigin href="/assets/mui-CtKcfboe.js"><link rel="modulepreload" crossorigin href="/assets/analytics-i3QajGlB.js"><link rel="modulepreload" crossorigin href="/assets/utils-B2v0z9lS.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.1.
|
|
3
|
+
"version": "5.1.23-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@sentry/core": "^9.42.1",
|
|
28
28
|
"@sentry/react": "^9.42.1",
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
|
-
"@zeniai/client-analytics": "2.0.
|
|
31
|
-
"@zeniai/client-epic-state": "5.0.
|
|
32
|
-
"@zeniai/web-components": "4.1.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.20",
|
|
31
|
+
"@zeniai/client-epic-state": "5.0.72",
|
|
32
|
+
"@zeniai/web-components": "4.1.34",
|
|
33
33
|
"color": "3.1.3",
|
|
34
34
|
"cross-fetch": "^4.0.0",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"license": "UNLICENSED",
|
|
119
119
|
"scripts": {
|
|
120
120
|
"start": "vite --mode development",
|
|
121
|
-
"build": "
|
|
121
|
+
"build": "tsc && NODE_OPTIONS=--max-old-space-size=16384 vite build --mode development",
|
|
122
122
|
"preview": "vite preview --mode development --host",
|
|
123
123
|
"start_dev": "vite --mode development",
|
|
124
124
|
"build_dev": "tsc && NODE_OPTIONS=--max-old-space-size=16384 vite build --mode development",
|
|
@@ -148,10 +148,6 @@
|
|
|
148
148
|
"format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx|js)$' | xargs prettier --write || true",
|
|
149
149
|
"format-staged": "git diff --cached --name-only --diff-filter=ACM | grep -E '\\.(ts|tsx|js)$' | xargs prettier --write || true",
|
|
150
150
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
|
151
|
-
"lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
|
|
152
|
-
"lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
|
|
153
|
-
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
154
|
-
"typecheck": "tsc --noEmit",
|
|
155
151
|
"build-scripts": "pnpm run check-version && tsc --outDir scripts --target ES6 --module commonjs --esModuleInterop --skipLibCheck",
|
|
156
152
|
"check-version": "node ./scripts/check_version.js",
|
|
157
153
|
"//": "When publishing to NPM, use the version suffix -dev for DEV, -qa for QA, -next for NEXT and -prod version suffix for PROD.",
|
|
@@ -163,8 +159,7 @@
|
|
|
163
159
|
"publish_delhi": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm lint && pnpm build_delhi && pnpm publish --tag delhi",
|
|
164
160
|
"publish_mohali": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm lint && pnpm build_mohali && pnpm publish --tag mohali",
|
|
165
161
|
"publish_next": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm lint && pnpm build_next && pnpm publish --tag next",
|
|
166
|
-
"test": "pnpm
|
|
167
|
-
"test:pusher": "pnpm vitest run src/screens/pusher/tests src/screens/chargeCard/tests src/screens/chargeCard/constants/tests",
|
|
162
|
+
"test": "pnpm vitest run",
|
|
168
163
|
"version": "pnpm format && git add -A src",
|
|
169
164
|
"postversion": "git push && git push --tags",
|
|
170
165
|
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-oKBQUmhq.js";import{A as d}from"./AddressScreen-CAEk8mk_.js";import i from"./NotFoundScreen-Dnnx5_jI.js";import"./sentry-p9ArnUH9.js";import{o as s,p as r}from"./core-rmRh_ZE8.js";import"./zeni-epic-state-DH4sFgeZ.js";import"./recharts-BG7SNYPF.js";import"./index-CYj5jhrI.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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 T}from"./liveblocks-oKBQUmhq.js";import{a as N}from"./sentry-p9ArnUH9.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-rmRh_ZE8.js";import{k as ce,v as ue,aN as de,z as B,K as pe,c as z,af as x,e as E,bB as le,at as me,q as P,au as M}from"./index-CYj5jhrI.js";import{Nk as fe,eP as q,sg as ye,HM as Se,x$ as ge,AI as Ie,Df as be,DU as he,EN as De,NH as ke,NI as Oe,NJ as Te,NK as Ce,NL as Ne,Ke as Ve,MJ as we,Kq as Ae,km as _e,fE as ve,fD as Fe,fC as xe,qo as Ee,qf as Be,qc as ze,ke as Pe,sp as Me,sn as R,bE as L,sB as U,cv as Re}from"./zeni-epic-state-DH4sFgeZ.js";import{n as Le}from"./mui-DRkb5v8u.js";import{d as j}from"./routePaths-CJs7QSKh.js";import{M as Ue}from"./MobileAppDrawer-NgQTATqT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="c8cef151-51d9-49c8-b555-a345bbfee24a",e._sentryDebugIdIdentifier="sentry-dbid-c8cef151-51d9-49c8-b555-a345bbfee24a")}catch{}})();const je=Le.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,qe=re(function(e,d){const{businessVerificationDetails:i}=d,r=q(e),y=B.getSignedInUser(),S=r.tenantId,l={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},h=Ve(d.roleMap)&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=we(e.companyConfigState),s=Ae(e.userRoleConfigState);return{businessVerificationDetails:i,verficationDetailsFetchState:i.fetchState,isRefreshingViewInBackground:i.isRefreshingViewInBackground,allNationalityCountries:i.allNationalityCountries,filesEndPoint:`${me.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:h,allIndustries:t.companyIndustries??[],companyTitles:s.companyTitles}},function(e,d){const{companyId:i,productType:r,currentTenant:y,navigate:S,location:l}=d,{tenantEmailDomain:h}=y;return{onCompanyDetailsChanged:t=>{const{companyDescription:s,companyIndustry:p,companyIndustryType:k,companyLegalName:O,companyTaxId:g,companyWebsite:m,companyPhone:I,primaryContactEmail:c,primaryContactName:n,primaryContactUserId:u,primaryContactSyncToken:D,syncToken:f,fileIds:a,incDate:o,typeOfIncorporation:V,stateOfIncorporation:w,sourceOfFunds:A,companySubIndustry:_,countriesOfOperations:b,companySourceOfFunds:G,companySourceOfFundsDescription:K,transactionVolume:$,transactionVolumeDescription:H,purposeOfAccount:J,purposeOfAccountDescription:Z,regulatedStatus:W,regulatedStatusDescription:Q,usNexus:X,usNexusTypes:Y}=t,v=k?.selectedOption,ee={companyId:i,companyDescription:s,companyIndustry:p.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:O,taxIdOrEIN:g,website:m!=""&&m!=null?Re(m):void 0,phone:I,syncToken:f,fileIds:a,incDate:o!=null?L(o?.toString()):o,typeOfIncorporation:V?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:A?.selectedOption??"",companySubIndustry:_?.selectedOption??"",countriesOfOperations:b?.selectedOptions.map(F=>F.length===2?F:M(F))??[],companySourceOfFunds:G?.selectedOption??"",companySourceOfFundsDescription:K,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:J?.selectedOption??"",purposeOfAccountDescription:Z,regulatedStatus:W??"",regulatedStatusDescription:Q,usNexus:X,usNexusTypes:Y?.selectedOptions??[]},te={userId:u,firstName:n.firstName,lastName:n.lastName,email:c,syncToken:D};e(U({companyDetails:ee,primaryContactDetails:te}))},onCompanyOfficerUpdated:t=>{const s=t.map(p=>{const{officerType:k,userId:O,name:g,email:m,nationalityCountryCode:I,ssn:c,dob:n,phone:u,syncToken:D,selectDocument:f,role:a,ownership:o,isSelectedForVerification:V,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:_}=p;let b;return f.selectDocumentType==="driverLicense"?b="driving_license":f.selectDocumentType==="passport"?b="passport":f.selectDocumentType==="stateId"?b="id_document":f.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:k,userId:O,firstName:g.firstName,lastName:g.lastName,email:m,ssn:c,nationalityCountryCode:I?.selectedOption!=null?M(I.selectedOption):void 0,phone:u,birthday:n!=null?L(n?.toString()):n,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:o,documentTypeSelectedForVerification:b,isSelectedForVerification:V,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:_,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(U({officers:s}))},onSaveDetailsClick:t=>{e(R(i,t,r))},onSendForVerificationClick:t=>{e(R(i,t,r,!0))},onAddressClick:t=>{const s=j(h,t),p=P(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onRegisteredAddressClick:t=>{const s=j(h,t),p=P(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onBackClick:()=>{e(Me({companyId:i})),S("../setup")},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(ze(t))},onDeleteFileList:t=>{e(Be(t))},onEditFileName:(t,s)=>{e(Ee(t,s.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(Fe(t,"SpendManagementSetup"))},onVerifyOtp:(t,s)=>{e(ve(t,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,s)=>{e(_e({addressType:t,addressToCreate:s}))}}})(le),Xe=({productType:e})=>{const d=ae(),i=ne(),r=se(),[y,S]=N.useState(!1),[l,h]=N.useState(!1),{tenantEmailDomain:t}=ie(),s=ce(),{useDynamicConfig:p}=ue(),{configValue:k}=p(de.zeniAccountsConfig),O=fe(k),g=C(a=>{switch(e){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}}),m=C(a=>a.companyConfigState.fetchState),I=C(a=>a.userRoleConfigState.fetchState),c=C(a=>q(a)),n=c.companyId??B.getSignedInUserTenant(t)?.companyId;if(N.useEffect(()=>{m==="Not-Started"&&r(ye()),I==="Not-Started"&&r(Se(!0))},[m,I,r]),N.useEffect(()=>{if(!y&&g==="Not-Started"&&n!=null)switch(S(!0),e){case"zeni_accounts":r(De(n,!0));break;case"zeni_treasury":r(he(n,!0));break;case"reimbursement":r(be(n,!0));break;case"charge_cards":r(Ie(n,!0));break;default:r(ge(n,!0))}},[y,g,n,r]),B.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let u;switch(e){case"zeni_accounts":u=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":u=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":u=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":u=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:u=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{h(a)},f=C(a=>{let o;switch(e){case"zeni_accounts":o=Ne(a,n);break;case"zeni_treasury":o=Ce(a,n);break;case"charge_cards":o=Te(a,n);break;case"reimbursement":o=Oe(a,n);break;default:o=ke(a,n)}return o});return u===!1?T.jsx(oe,{to:"../promo"}):T.jsxs(je,{children:[T.jsx(pe,{analytics:z,onLoad:a=>(o=>{switch(e){case"zeni_accounts":return o.trackPageLoaded(E.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return o.trackPageLoaded(E.Event.reimbursementBusinessVerification);default:return o.trackPageLoaded(E.Event.billPayBusinessVerification,x(i)?"Settings":void 0)}})(a)}),x(i)?T.jsx(Ue,{isAppContentDrawerOpen:l,handleDrawerToggle:D}):null,T.jsx(qe,{businessVerificationDetails:f,navigate:d,location:i,companyId:n,analytics:z,currentTenant:c,productType:e,isSettings:x(i),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:O.maxInsuredAmount})]})};export{Xe as B};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oKBQUmhq.js";import{h as me,i as ba,u as Ce,j as S,g as Se,n as he,N as Fa,s as jt,o as Rn,p as se}from"./core-rmRh_ZE8.js";import{eP as de,bs as He,Pe as ja,eY as Ie,eZ as Ae,e_ as Ee,fT as qe,cs as Je,Pf as Xe,Pg as lt,tv as xa,jO as Ba,Ph as La,gT as pa,z$ as ca,A1 as Ne,A2 as ut,jE as Vt,Pi as Qe,zP as ha,Pj as Un,Pk as On,zS as Va,Pl as jn,NE as Na,rH as Nt,zY as na,h2 as Vn,Pm as Ht,Pn as ea,bq as Nn,Po as Hn,fE as Ha,fD as Ma,Aw as Mn,fC as $a,Nk as $n,Pp as Mt,cl as $t,cM as Gn,ND as ya,B6 as Gt,Pq as Tt,AI as fa,Pr as zt,B7 as zn,O3 as Yn,B8 as Zn,C2 as Kn,sR as Wn,BY as qn,Ps as Jn,A0 as Ze,Pt as Xn,Pu as Qn,Pv as er,Pw as ar,Px as tr,Py as mt,Pz as nr,Ah as Yt,Aa as rr,PA as sr,fV as cr,Aq as Zt,Au as Kt,fU as or,PB as ir,AU as Wt,PC as dr,PD as lr,PE as ur,As as qt,Ad as Jt,zV as Xt,Am as Qt,Ak as en,Ao as mr,PF as an,PG as Ga,AF as ga,Kj as tn,cN as Ct,PH as Cr,PI as pr,PJ as hr,PK as fr,AC as st,A$ as gr,AX as br,Ay as yr,AZ as Sr,AP as Ir,AR as Ar,PL as nn,B5 as Ta,HI as Er,PM as kr,PN as _r,PO as Dr,PP as rn,PQ as Pr,Bs as wr,AH as sn,AB as ve,AG as vr,PR as Tr,PS as Fr,zM as xr,PT as cn,PU as on,PV as Br,zO as Lr,zN as Ft,PW as Rr,PX as Ur,PY as Or,Kf as jr,PZ as pt,P_ as Vr,wn as dn,km as Nr,gU as Hr,Bx as Mr,P$ as ln,Q0 as $r,By as Gr,Q1 as zr,de as Yr,tp as Zr,Bn as Kr,Bh as Ve,bt as Wr,bF as qr,cx as Jr,bG as Xr,Js as Qr}from"./zeni-epic-state-DH4sFgeZ.js";import{z as ee,k as $e,v as oe,T as Y,s as Sa,c2 as za,cd as es,ce as as,cf as ts,n as Re,cg as ns,ch as rs,J as Ia,aN as Le,q as ye,bm as ht,ci as ss,x as Aa,i as Ya,h as ft,c as q,D as gt,a7 as Za,cj as cs,_ as un,aq as bt,by as ra,ck as ct,cl as os,K as yt,cm as is,at as mn,a2 as ot,V as Cn,e as pn,cn as ds,co as ls,cp as us,cq as ms,cr as Cs,cs as ps,o as Ra,ct as hs,cu as fs,cv as at,N as gs,cw as bs,cx as ys,cy as Ss,cz as Is,cA as As,a9 as Es}from"./index-CYj5jhrI.js";import{n as Te,D as hn,S as ks}from"./mui-DRkb5v8u.js";import{a as d}from"./sentry-p9ArnUH9.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as Ge,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ke,m as bn,n as Ps,o as yn,p as ws,S as xt}from"./SetupPagesScreen-ALhX_tKy.js";import{u as Sn}from"./useInitialThreadRequest-Chgglzdd.js";import Ka from"./NotFoundScreen-Dnnx5_jI.js";import{M as We}from"./MobileAppDrawer-NgQTATqT.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-CyyAGXJ-.js";import{v as Bt}from"./utils-B4k-7_rU.js";import{d as vs}from"./recharts-BG7SNYPF.js";import{t as Ts}from"./AddressScreen-CAEk8mk_.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./analyticsHelper-uVQynfBH.js";import"./routePaths-CJs7QSKh.js";import"./BusinessVerificationPageScreen-CgVN0Nsi.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]="620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41",e._sentryDebugIdIdentifier="sentry-dbid-620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41")}catch{}})();function Fs(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(K=>de(K)),f=$e(),p=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[_,c]=d.useState(!1),l=S(K=>ja(K).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Y.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=g(Y.isDebitCardFeatureEnabled),F=Ie(n),L=Ae(n),C=Ee(B,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(K=>qe(K,n.companyId)),j=Je(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(K=>Xe(K)),x=S(K=>K.classListState.fetchState),i=!v&&o&&h,m=S(K=>lt(K,a,i,o)),[U,M]=d.useState(!1),R=m.chargeCard,T=R?.cardCreatedByUser?.userId,$=S(K=>T!=null?xa(K.userRoleState,T):void 0),G=$?.accountingClassIDs[0],V=S(K=>G!=null?Ba(K.classState,{classId:G,reportId:"class_list"}):void 0),P=R?.cardHolderUser?.userId,Z=S(K=>P!=null?xa(K.userRoleState,P):void 0),J=Z?.accountingClassIDs[0],w=S(K=>J!=null?Ba(K.classState,{classId:J,reportId:"class_list"}):void 0),O=R?.type.code==="business_physical_credit_card"||R?.type.code==="business_physical_debit_card",te=R?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&_===!1&&O&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,O,te]),d.useEffect(()=>{U||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[U,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(O===!1||O&&R?.status?.code!=="active"||R?.cardHolderUserId!==r.userId||l===!1&&_===!1||R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card")){const K=pe(n.tenantEmailDomain,a,r,R,l);e(K)}},[m.fetchState,l,O]),d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&o&&h&&p&&t(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&h&&p&&t(ut()),x!=="Completed"&&x!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,x]);const ae=()=>{if(r!=null&&a!=null){t(La());const K=pe(n.tenantEmailDomain,a,r);e(K)}},k=R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card",z=Me(o,D,I,h),X=Ea(o,h,p,E,b),Q=fn(k,m);return m.fetchState!=="Completed"?s.jsx(Sa,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:l}),s.jsx(es,{onGotItClick:ae,isDebitCard:R?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:D,isDebitCardSetupEnabled:I,isChargeCardSetupEnabled:h,productInformation:z,creditAccountInformation:X,debitAccountInformation:Q,chargeCardDetailView:m,creditAccount:E,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Z?.userRoles,cardHolderDepartmentName:w?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=as(),f=d.useRef(t),p=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{p.current=r},[r]);const _=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(p.current==null)return;const y=Date.now();y-g.current<5e3||(g.current=y,p.current())};return a.forEach(y=>{const[h,B]=ts(y);if(B==="")return;const F=n.channel(h),L=u=>{f.current(B,u)};let C;if(F?.subscribed===!0)C=F,C.bind(B,L),l.has(h)||(l.add(h),v()),c.push(()=>{F.unbind(B,L)});else{if(C=F??n.subscribe(h),C.bind(B,L),!l.has(h)){l.add(h);const u=()=>{v()};C.bind("pusher:subscription_succeeded",u),c.push(()=>{C.unbind("pusher:subscription_succeeded",u)})}c.push(()=>{C.unbind(B,L)})}}),()=>{c.forEach(y=>y())}},[n,_])},An="charge-card-transaction-update",En="charge-card-transaction-created",kn="charge-card-transaction-declined",_n="charge-card-transaction-updated",Dn="charge-card-transaction-receipt-uploaded",aa="charge-card-status-update",Et="charge-card-spending-updated",Wa="credit-account-balance-updated",qa="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",wn="charge-card-payment-date-updated",ka="charge-card-cashback-redeemed",_a="charge-card-cashback-earned",ta=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Bs=[_a,ka],Ls=he(function(e){const a=Qe(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(Un({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(B=>de(B)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Y.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(B=>Qe(B)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const B=Re(t.state?.pathnameStackToGoBack),F=B.poppedPathname??Us(n.tenantEmailDomain);e(F,{state:{pathnameStackToGoBack:B.newStack}})},[e,t,n.tenantEmailDomain]),y=Ge(n);if(At({events:ta(y,Bs),onEvent:B=>{switch(B){case _a:case ka:return void a(ha(!0))}},onSubscribed:()=>{a(ha(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(_(!0),a(ha()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const h=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||h?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(Ka,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Us=e=>`/${e}/cards`,Os={containerWidth:new Aa(100,58)},js=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p}=oe(),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(!1),F=ee.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const L=S(w=>de(w));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=p(Le.zeniCardsConfig),u=C.max_charge_card_activation_attempts_by_card_id,D=S(w=>On(w,n)),o=D.chargeCard,I=S(w=>w.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Y.isDebitCardFeatureEnabled),b=Ee(E,L),x=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),U=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:R}),$=!m&&T&&i;d.useEffect(()=>{g===!1&&I!=="In-Progress"&&I!=="Completed"&&(t(Va()),_(!0)),c===!1&&D.fetchState==="Not-Started"&&(l(!0),t(ca(n,$,T)))},[c,D.fetchState,g,I]);const G=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&(G===!1||G&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==F.userId)){const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);r(w,{state:{pathnameStackToGoBack:O}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(w,{state:{pathnameStackToGoBack:O}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),P=S(w=>Nt(w.userState,F.userId)),Z=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(w=>w.statusCode==="success")===!0&&v===!1&&(setTimeout(Z,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const J=w=>{B(w)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(P?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:J}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:P.phone,signedInUser:F,isSandboxEnv:ht(),chargeCardDetailState:D,signedInUserToken:V,navigate:r,currentTenant:L,location:f,maxChargeCardActivationAttempts:u[n]!=null?u[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{J(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Vs=he(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Vn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const p=Ht(e,n),g=a.updateStatus,_=ea(e,!1,!1,!1);let c=!1;_.fetchState==="Completed"&&_.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Ya.cardVaultId,twoFAView:p,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e(Mn(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Hn({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(ss),Ns=Te.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: ${e=>`${Os.containerWidth.value(e.windowSize)}%`};
|
|
5
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
6
|
-
`,Hs=Te.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
|
-
`,Ua=gt.getLocalizedStrings().dateFormat,Ms={overlayWidth:new Aa(100,100,58)},vn=[Pn,Wa],$s=new Set(vn),Gs=he(function(e,a){const t=a.currentTenant?.companyId;return{plaidConnectionDetails:Yn(e,t,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Zn(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:t,currentTenant:r,hasZeniAccountsAdminAccess:n,isZeniAccountsUser:f,isCashbackInfoFetchStateCompleted:p,isCreditCardInfoFetchStateCompleted:g,isDebitCardInfoFetchStateCompleted:_,controllerEmails:c,paymentDetails:l,productInformation:v,cashbackInformation:y,paymentSourceInformation:h,creditAccountInformation:B,debitAccountInformation:F,paymentInitiatedDate:L,sourcePage:C}=a,{tenantEmailDomain:u}=r,D=()=>{e(Gt(!0));const o=Ge(r);o!=null&&o!==""&&e(fa(o,!0,!0)),e(Ne(!0))};return{onBackNavigation:()=>{if(p&&g&&_&&y!=null&&q.trackCardsPayEarlyFormClick(c,v,y,"Back",l.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:l.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:l.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:l.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:l.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:L?.add(3,"day").format(Ua.visual.MMMDCommaYYYYformat),paymentInitiatedDate:L?.format(Ua.visual.MMMDCommaYYYYformat)},h,B,F),C==="cardPaymentHistory")a.closeDrawerHandler(!0),e(zt());else{const o=ze(u);t(o)}},onUpdatePaymentAccountStatus:(o,I,A)=>{e(qn(o,I,"bill_pay","bill_pay_detail",A))},onEstablishConnectionSuccess:()=>{e(fa(r.companyId,!0))},onFetchLinkTokenClick:o=>{e(Wn("external_account",o))},onEstablishConnectionClick:o=>{e(Kn(o,r.companyId,"charge_card_payment","charge_cards"))},onSignUpAccountClick:()=>{n?window.open(`/${u}/checking/promo`,"_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onMoveMoneyClick:()=>{f?window.open(`/${u}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onEventReceived:o=>{$s.has(o)&&D()},onPusherSubscribed:D}})(Za(cs)),Pt=({isPaymentDrawerOpen:e,closeDrawerHandler:a,pageName:t,creditAccountSpentAmount:r,productInformation:n,sourcePage:f,creditAccountInformation:p,debitAccountInformation:g,cashbackInformation:_,isDebitCardInfoFetchStateCompleted:c,isCreditCardInfoFetchStateCompleted:l,isCashbackInfoFetchStateCompleted:v,paymentInitiatedDate:y,retryRepayment:h})=>{const B=me(),{useDynamicConfig:F}=oe(),{configValue:L}=F(Le.zeniAccountsConfig),C=$n(L),u=S(z=>Mt(z)),{creditAccount:D}=S(z=>Xe(z)),o=S(z=>de(z)),I=ft(),A=Ia(),j=Ce(),E=ee.getSignedInUser(),b=$e(),[x,i]=d.useState(!1),[m,U]=d.useState(!1),{configValue:M}=F(Le.zeniCardsConfig),R=M.credit_card_auto_pay_threshold_by_company_id?.[o.companyId]??M.default_credit_card_auto_pay_threshold??_s,T=$t(b?.loggedInUserRoleMap),$=Gn(b?.loggedInUserRoleMap),G=!!o.companyZeniAccountInfo?.info?.isZeniAccountEnabled,V=S(z=>ya(z,o.companyId)),P=V.companyChargeCardInfo?.primaryFundingAccount,Z=V.allFundingAccounts.find(z=>z.id===P?.accountId),J=S(z=>qe(z,o.companyId)),w=Je(J.controllers);d.useEffect(()=>{if(u.fetchState!=="Completed"&&u.fetchState!=="In-Progress"&&j(Gt()),u.fetchState==="Completed"&&!m){const z=o.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,X=u.transferFromAccounts.find(K=>K.id===z);let Q;if(f==="cardPaymentHistory"&&h){const K=h.paymentAccountId!=null?u.transferFromAccounts.find(re=>re.id===h.paymentAccountId):void 0;Q={amount:h.amount,isAutoRepayment:o.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:Bt(),transferFrom:K??X}}else Q={amount:{amount:D.balance.amount+D.hold.amount,currencyCode:D.balance.currencyCode,currencySymbol:D.balance.currencySymbol},isAutoRepayment:o.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:Bt(),transferFrom:X};j(Tt(Q)),U(!0)}},[u.fetchState,m,f,h,u.transferFromAccounts,o.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,o.companyChargeCardInfo?.info?.isAutoPayEnabled,D.balance.amount,D.balance.currencyCode,D.balance.currencySymbol,D.hold.amount,j]);const O={isZeniCheckingEnabled:o.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:Z?.accType==="depositAccount",creditCardPaymentSourceAccountName:Z?.label,creditCardPaymentSourceAccountType:Z?.accType,creditCardPaymentSourceLastFourDigits:Z?.accountLast4,creditCardPaymentSourceBalance:Z?.accountBalance?.available?.amount??0};if(d.useEffect(()=>{V.fetchState!=="Completed"&&V.fetchState!=="In-Progress"&&j(fa(o.companyId,!0))},[V.fetchState]),d.useEffect(()=>{u.updateStatus==="Completed"&&_!=null&&v&&l&&c&&q.trackCardsPayEarlyPayNowClick(w,n,_,u.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:u.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:u.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:u.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:u.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:y?.add(3,"day").format(Ua.visual.MMMDCommaYYYYformat),paymentInitiatedDate:y?.format(Ua.visual.MMMDCommaYYYYformat)},O,p,g)},[u.updateStatus,_,v,l,c,y]),d.useEffect(()=>{u.fetchState==="Completed"&&_!=null&&v&&l&&c&&!x&&e&&m&&_!=null&&(q.trackCardsPayEarlyFormView(w,n,_,t,o.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,D.balance.amount,O,p,g),i(!0))},[u,v,l,c,x,e,m]),E==null)throw Error("Can't access invite people page without signing in...");const te=()=>{a(!0),j(zt())},ae=Ge(o),k={events:e?ta(ae,vn):[],eventCallback:(z,X,Q)=>{Q.onEventReceived(z)},onSubscribed:z=>{z.onPusherSubscribed()}};return s.jsx(s.Fragment,{children:s.jsx(hn,{onClose:()=>{te()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:Ms.overlayWidth.valuePercentage(A),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:I.colors.black,opacity:.75,cursor:"pointer"}}},children:s.jsx(zs,{onClick:z=>z.stopPropagation(),children:s.jsx(Gs,{...k,closeDrawerHandler:a,navigate:B,paymentDetails:u,creditAccountSpentAmount:r,onTransferClick:()=>{v&&l&&c&&_!=null&&q.trackCardsPayEarlyFormClick(w,n,_,"Pay Now",u.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:u.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:u.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:u.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:u.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},O,p,g),j(zn({companyId:o.companyId}))},onDismissClick:te,onSaveChangesToLocalStore:z=>{j(Tt(z))},currentTenant:o,hasZeniAccountsAdminAccess:T,isZeniAccountsUser:$,isZeniAccountSetupEnabled:G,productInformation:n,sourcePage:f,controllerEmails:w,autoPayThreshold:R,paymentSourceInformation:O,creditAccountInformation:p,debitAccountInformation:g,cashbackInformation:_,isCashbackInfoFetchStateCompleted:v,isCreditCardInfoFetchStateCompleted:l,isDebitCardInfoFetchStateCompleted:c,paymentInitiatedDate:y,maxInsuredAmount:C.maxInsuredAmount})})})})},zs=Te(ks)`
|
|
15
|
-
display: flex;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
`,wt=e=>e!=null&&typeof e=="object"?e:null,ce=e=>typeof e=="string"?e:void 0,we=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Oa=e=>e!=null&&typeof e=="object"&&typeof e.code=="string"&&typeof e.name=="string",tt=e=>{if(e==null||typeof e!="object")return!1;const a=e;return typeof a.transaction_id=="string"&&typeof a.amount=="number"&&typeof a.currency_code=="string"&&typeof a.currency_symbol=="string"&&typeof a.direction=="string"&&!!Oa(a.transaction_status)&&!!Oa(a.transaction_type)},vt=(e,a)=>{const t=e?.card_status;if(!Oa(t))return null;const r=e?.is_locked_by_admin;return{cardId:a,cardStatus:t,isLockedByAdmin:typeof r=="boolean"?r:void 0}},it=[An,En,kn,_n,Dn,aa,Et,Wa,kt,_t,Dt],Tn=[_a,ka],Ys=new Set([...it,...Tn]),nt=gt.getLocalizedStrings().dateFormat,Zs=he(function(e,a){const{includeCreditAccountInfo:t,cardId:r,signedInUserToken:n,isChargeCardFeatureEnabled:f}=a,p=ee.getSignedInUser(),g=e.tenantState.currentTenantId,_={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:g??""},c=lt(e,r,t,f),l=sr(e,r),v=cr(e);return{chargeCardDetailView:c,chargeCardsRecurringExpensesState:l,vgsVaultId:Ya.cardVaultId,transactionAttachmentsEndpointToFetch:`${ot}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${ot}/card_transaction_attachment`,authParams:_,isSnackbarOpen:v.isSnackbarOpen,cardsEndPoint:`${mn.cardMicroServiceBaseUrl}`,signedInUserToken:c.twoFAView.token??n}},function(e,a){const{cardId:t,currentTenant:r,navigate:n,location:f,cardProviderId:p,includeCreditAccountInfo:g,setIsPaymentOpen:_,controllerEmails:c,productInformation:l,cashbackInformation:v,primaryFundingAccountDetails:y,creditAccountInformation:h,debitAccountInformation:B,isChargeCardFeatureEnabled:F}=a,{tenantEmailDomain:L}=r;return{onEventReceived:(C,u)=>{(({event:D,data:o,cardId:I,dispatch:A,subscribedEvents:j})=>{const E=wt(o);switch(D){case _a:case ka:return void A(ha(!0));case An:{const b=ce(E?.card_id);if(b==null||b!==I)return;const x=ce(E?.transaction_id),i=E?.transaction_status;return x!=null&&Oa(i)?void A(nr({transactionId:x,transactionStatus:i})):void A(Ze(I,null,null,!0))}case aa:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=vt(E,b);return x!=null?void A(mt(x)):void A(na(I,!0))}case Et:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=ce(E?.currency_code),i=ce(E?.currency_symbol),m=we(E?.balance);return x!=null&&i!=null&&m!=null?(A(tr({cardId:b,currencyCode:x,currencySymbol:i,balance:m,hold:we(E?.hold),dailyPurchaseSpends:we(E?.daily_purchase_spends),monthlyPurchaseSpends:we(E?.monthly_purchase_spends),dailyWithdrawals:we(E?.daily_withdrawals),monthlyWithdrawals:we(E?.monthly_withdrawals)})),void A(Ne(!0))):(A(na(I,!0)),void A(Ne(!0)))}case Wa:{const b=ce(E?.currency_code),x=ce(E?.currency_symbol),i=we(E?.available_amount),m=we(E?.balance_amount);return b!=null&&x!=null&&i!=null&&m!=null?void A(ar({currencyCode:b,currencySymbol:x,available:i,balance:m,hold:we(E?.hold_amount),cashback:we(E?.cashback_amount)})):void A(Ne(!0))}case En:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=E?.transaction;return tt(x)?void A(er({cardId:b,transaction:x})):void A(Ze(I,null,null,!0))}case kn:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=E?.transaction;return tt(x)?void A(Qn({cardId:b,declineReason:ce(E?.decline_reason),transaction:x})):void A(Ze(I,null,null,!0))}case _n:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=E?.transaction;return tt(x)?void A(Xn({cardId:b,transaction:x})):void A(Ze(I,null,null,!0))}case Dn:{const b=ce(E?.card_id)??I;if(b!==I)return;const x=ce(E?.transaction_id),i=E?.attachment_file_paths;return x!=null&&Array.isArray(i)&&i.every(m=>typeof m=="string")?void A(Jn({cardId:b,transactionId:x,attachmentFilePaths:i})):void A(Ze(I,null,null,!0))}case kt:case _t:case Dt:{const b=ce(E?.card_id);if(b==null||b!==I)return;A(na(I,!0))}}})({event:C,data:u,cardId:t,dispatch:e,subscribedEvents:Ys})},onPusherSubscribed:()=>{e(na(t,!0)),e(Ze(t,null,null,!0)),e(Ne(!0))},onReloadTransactions:()=>{e(ca(t,g,F))},onFetchChargeCardTransactionList:(C,u)=>{e(Ze(t,C,u))},onUpdateScrollYOffset:C=>{},onGetOtp:C=>{p!=null&&e($a(C,"ChargeCardHolder",t))},onResendOtp:C=>{p!=null&&e(Ma(C,"ChargeCardHolder",t))},onVerifyOtp:(C,u)=>{p!=null&&e(Ha(C,u,"ChargeCardHolder",t))},onVerifyOtpSuccess:C=>{C!=null&&ee.saveZeniOtpTokenForCardHolder(C,t)},onColorCodeChange:C=>{e(mr(t,C))},onLockChargeCard:(C,u)=>{e(en(C,t,u))},onUnlockChargeCard:C=>{e(Qt(C,t))},onCloseChargeCard:C=>{e(Xt(t,C))},onFetchChargeCardsRecurringExpenses:()=>{e(Jt([t]))},updateChargeCardName:(C,u)=>{e(qt(C,t,u))},updateChargeCardTransactionAttachments:(C,u)=>{u!=null&&e(ur({transactionId:C,data:u}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(C,u,D,o)=>{e(lr({chargeCardId:u,transactionId:C,fetchState:D,error:o}))},updateChargeCardTransactionReceiptsShowTick:(C,u,D)=>{e(dr({chargeCardId:u,transactionId:C,shouldShowTick:D}))},onChargeCardRevokeInviteClick:()=>{e(Wt(t))},updateChargeCardTransactionIsViewReceiptClicked:(C,u,D)=>{e(ir({chargeCardId:u,transactionId:C,isViewReceiptClicked:D}))},onChargeCardTransactionRowClick:(C,u)=>{const D=ye(f.state?.pathnameStackToGoBack,f.pathname);n(`../../transaction/${C}/${u}`,{state:{pathnameStackToGoBack:D}})},onBackClick:()=>{const C=Re(f.state?.pathnameStackToGoBack),u=ze(L);n(u,{state:{pathnameStackToGoBack:C.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(or())},onUpdateDebitCardPinAttempt:C=>{e(Kt(t,C)),C==="success"&&e(pa({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(C,u)=>{C?e(pa({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):u!=null&&e(pa({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:u.message}]}))},updateSpendLimit(C,u,D,o){e(Zt(C,u,D.code,o))},shouldOpenCreditCardPaymentDrawer(C){C&&v!=null&&q.trackCardsPayEarlyClick(c,l,v,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:r.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:y?.accType==="depositAccount",creditCardPaymentSourceAccountName:y?.label,creditCardPaymentSourceAccountType:y?.accType,creditCardPaymentSourceLastFourDigits:y?.accountLast4,creditCardPaymentSourceBalance:y?.accountBalance?.available?.amount??0},h,B),_(C)}}})(Za(is));function Ks(){const e=me(),a=Ce(),t=Se(),{cardId:r}=ba(),[n,f]=d.useState(!1),[p,g]=d.useState(!1),{useDynamicConfig:_}=oe(),c=ee.getSignedInUser(),l=S(H=>de(H)),v=S(H=>ja(H).firstViewAfterActivation),y=S(H=>H.classListState.fetchState),{configValue:h}=_(Le.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:B}=_(Le.zeniCardsConfig),F=B.enable_card_controls_for_company_ids,L=B.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(F)&&F.includes(l.companyId),[C,u]=d.useState(!1),[D,o]=d.useState(!1),{useFeatureGate:I}=oe(),{isFeatureEnabled:A}=I(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:j}=I(Y.isDebitCardFeatureEnabled),E=Ee(j,l),b=ke({isDebitCardFeatureEnabled:j,isBankingOnlyTenant:E}),{isFeatureEnabled:x}=I(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:i}=I(Y.isCardsCommentingEnabled),m=Ae(l),U=Ie(l),M=l.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,R=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:A,isBookKeepingTenant:m,isDebitCardProductVisible:b,chargeCardsCreditAccountLimit:M}),T=!!l.companyDebitCardInfo?.info?.isDebitCardEnabled,$=!!l.companyChargeCardInfo?.info?.isChargeCardEnabled,G=!l.userRole.includes("charge_card_user")&&R&&$;if(r==null)throw Error("Empty card id is not valid...");const V=S(H=>ya(H,l.companyId)),{creditAccount:P,creditAccountRepayment:Z}=S(H=>Xe(H)),J=ee.getZeniOtpTokenForCardHolder(r),w=S(H=>lt(H,r,G,R)),{isAiCfoAccessEnabled:O,onAskAiCfoClick:te}=In({mobileExploreReferrer:"Card Detail"});un({isDataReady:w.fetchState==="Completed"});const ae=S(H=>Qe(H)),k=w.chargeCard,z=$e(),X=He(z?.loggedInUserRoleMap),Q=k?.type.code==="business_physical_debit_card"||k?.type.code==="business_virtual_debit_card",K=k?.type.code==="business_physical_debit_card"||k?.type.code==="business_physical_credit_card",re=k?.type.code==="business_virtual_debit_card"||k?.type.code==="business_virtual_credit_card",De=k?.type.code==="business_virtual_debit_card",Ue=Ea(R,$,X,P,Z),W=fn(Q,w),fe=St(X,ae),Pe=Me(R,b,T,$),Oe=w.depositAccountLimitFetchState.fetchState!=="Completed"&&w.depositAccountLimitFetchState.fetchState!=="In-Progress",Fe=S(H=>qe(H,l.companyId)),xe=Je(Fe.controllers),ne=S(H=>k?.cardCreatedByUser?.userId!=null?xa(H.userRoleState,k?.cardCreatedByUser?.userId):void 0),Da=S(H=>ne?.accountingClassIDs[0]!=null?Ba(H.classState,{classId:ne?.accountingClassIDs[0],reportId:"class_list"}):void 0),ie=S(H=>k?.cardHolderUser?.userId!=null?xa(H.userRoleState,k?.cardHolderUser?.userId):void 0),oa=S(H=>ie?.accountingClassIDs[0]!=null?Ba(H.classState,{classId:ie?.accountingClassIDs[0],reportId:"class_list"}):void 0),le=l?.userRole,je=S(H=>ea(H,!1,b,A).revokeCardInvite),ia=bt(je.saveStatus.fetchState);if(d.useEffect(()=>{if(ia==="In-Progress"&&je.saveStatus.fetchState==="Completed"){const H=ze(l.tenantEmailDomain);e(H)}},[ia,je.saveStatus.fetchState,e,l.tenantEmailDomain]),d.useEffect(()=>{v&&n===!1&&re&&(f(!0),setTimeout(()=>{a(La()),De&&a(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[v,n,re,De]),d.useEffect(()=>{C||w.fetchState==="Completed"||w.fetchState==="In-Progress"||r==null||(u(!0),a(ca(r,G,R,!1)))},[C,w,r,a]),d.useEffect(()=>{!D&&w.fetchState==="Completed"&&w.chargeCard?.connectedAccountId!=null&&Q&&Oe&&X&&(o(!0),a(Yt({depositAccountId:w.chargeCard?.connectedAccountId})))},[D,w,a,Oe,X]),d.useEffect(()=>{ae.fetchState!=="Completed"&&ae.fetchState!=="In-Progress"&&X&&a(ha()),y!=="Completed"&&y!=="In-Progress"&&a(Vt()),w.transactionStatistics.fetchState!=="Completed"&&w.transactionStatistics.fetchState!=="In-Progress"&&a(rr({chargeCardId:r})),V.fetchState!=="Completed"&&V.fetchState!=="In-Progress"&&a(fa(l.companyId,!0))},[ae.fetchState,a,X,y,w.transactionStatistics.fetchState,V.fetchState]),d.useEffect(()=>{if(!(w.fetchState!=="Completed"||R&&P.fetchState!=="Completed"||k==null||w.transactionStatistics.fetchState!=="Completed"||Q&&X&&w.depositAccountLimitFetchState.fetchState!=="Completed")){const H=k.type.code.includes("physical"),ue=H?k.cardActivationAttemptHistory[0]?.timestamp:k.createTime;q.trackCardsCardDetailView(xe,Pe,{cardId:r,cardName:k.cardName,cardType:k.type.code.includes("credit")?"credit":"debit",cardCategory:H?"physical":"virtual",cardLimit:ra(k.limit.amount),cardLastFourDigits:k.accountLast4,cardStatus:k.status.code,cardAssignedDate:k.createTime?.format(nt.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:k.providerCardCreateTime?.format(nt.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:ue?.format(nt.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:k.creditLimitFrequency.name,cardSpentAmount:ra(k.balance.amount),cardAvailableLimit:ra(k.available.amount),cardUtilizationPercent:k.limit.amount>0?Math.round((k.limit.amount-k.available.amount)/k.limit.amount*100):0,cardUtilizationAmount:ra(k.limit.amount-k.available.amount),totalNumberOfDeclinedTransactions:w.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:w.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:w.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:w.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:w.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:w.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:w.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:w.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:w.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:w.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:ct(k.cardCreatedByUser,!1),cardIssuedByEmail:k.cardCreatedByUser?.email,cardIssuedByUserId:k.cardCreatedByUser?.userId,cardIssuedByRole:ne?.userRoles,cardIssuedByDepartment:Da?.className},{cardholderName:ct(k.cardHolderUser,!1),cardholderEmail:k.cardHolderUser?.email,cardholderRole:ie?.userRoles,cardholderUserId:k.cardHolderUser?.userId,cardholderDepartment:oa?.className},Ue,W)}},[w.fetchState,w.depositAccountLimitFetchState.fetchState,w.transactionStatistics.fetchState,P.fetchState,X]),c==null)throw Error("Can't access card detail page without signing in...");const da=Ge(l),la=X?[...it,...Tn]:it,ua={events:ta(da,la),eventCallback:(H,ue,Be)=>{Be.onEventReceived(H,ue)},onSubscribed:H=>{H.onPusherSubscribed()}},ma=()=>{if(r!=null&&k!=null){const{ownerName:H,cardName:ue,utilisation:Be,limit:Ye,frequency:N,cardColor:ge}=rt(k),be=k.cardHolderUserId===c.userId;q.trackCardsDetailPageViewed(r,H,ue,Be,Ye,N,ge,be)}};d.useEffect(()=>{if(w.fetchState==="Completed"){const H=w.chargeCard;if(H?.status.code==="inactive"||Q&&H?.isPinSet===!1||K&&v){const ue=pe(l.tenantEmailDomain,r,c,k,v);e(ue)}}},[w.fetchState]);const Ca=(H,ue)=>{if(r!=null&&k!=null){const{ownerName:Be,cardName:Ye,utilisation:N,limit:ge,frequency:be}=rt(k),et=k.cardHolderUserId===c.userId;q.trackCardsDetailPageClicked(r,Be,Ye,N,ge,be,H,et,ue)}},Ja=(H,ue)=>{if(r!=null&&k!=null){const{ownerName:Be,cardName:Ye,utilisation:N,limit:ge,frequency:be}=rt(k),et=k.cardHolderUserId===c.userId;q.trackCardsVerifyPopUpClick(r,Be,Ye,N,ge,be,H,et,ue)}},Pa=P.balance.amount+P.hold.amount,wa=l.companyChargeCardInfo?.info?.primaryFundingAccount,Xa=V.allFundingAccounts.find(H=>H.id===wa?.accountId),va=w.chargeCard!=null,Qa=w.depositAccountLimit!=null;return w.fetchState!=="Error"||va?!va&&(w.fetchState==="In-Progress"||w.fetchState==="Not-Started")||je.saveStatus.fetchState==="In-Progress"||!Qa&&Q&&X&&w.depositAccountLimitFetchState.fetchState!=="Completed"?s.jsx(os,{}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:v}),w.fetchState==="Completed"?s.jsx(yt,{analytics:q,onLoad:ma}):null,p===!0?s.jsx(Pt,{closeDrawerHandler:()=>g(!1),isPaymentDrawerOpen:p,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:Pe,creditAccountInformation:Ue,debitAccountInformation:W,cashbackInformation:fe,creditAccountSpentAmount:Pa,isDebitCardInfoFetchStateCompleted:!Q||!X||w.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!R||P.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!X||ae.fetchState==="Completed",paymentInitiatedDate:Z.initiatedRepaymentDate}):null,s.jsx(Zs,{...ua,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:Ja,onFireOnClickAnalytics:Ca,isSandboxEnv:ht(),signedInUser:c,location:t,navigate:e,setIsPaymentOpen:g,cardIssuedByRoles:ne?.userRoles,cardIssuedByDepartmentName:Da?.className,cardHolderRoles:ie?.userRoles,cardHolderDepartmentName:oa?.className,loggedInUserRole:le,isChargeCardFeatureEnabled:R,isDebitCardFeatureEnabled:b,isDebitCardSetupEnabled:T,isChargeCardSetupEnabled:$,isCardControlsEnabled:L,isEarlyPayEnabled:x,controllerEmails:xe,chargeCardCashbackDetailState:ae,productInformation:Pe,creditAccountInformation:Ue,debitAccountInformation:W,cashbackInformation:fe,classListFetchState:y,primaryFundingAccountDetails:Xa,currentTenant:l,cardProviderId:w.chargeCard?.cardProviderID,cardId:r,creditAccount:P,creditAccountRepayment:Z,includeCreditAccountInfo:G,signedInUserToken:J,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:h.documentAiReceiptMaxSizeLimitBytes!=null?h.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:O,onAskAiCfoClick:te,isCardsCommentingEnabled:i})]}):s.jsx(Ka,{})}const rt=e=>{const a=`${e.cardHolderUser?.firstName.toLowerCase()} ${e.cardHolderUser?.lastName.toLowerCase()}`,t=e.cardName,r=(e.limit.amount??0)-(e.available.amount??0),n=e.limit.amount,f=e.creditLimitFrequency.name;return{ownerName:a,cardName:t,utilisation:r,cardColor:e.cardColorCode??"",frequency:f,limit:n}},Fn=[aa,Wa,wn,ka,_a,qa,Dt,xs,kt,_t,Et],Ws=new Set(Fn),dt=vs((e,a,t,r)=>{e(ga(a,t,r,!0))},400),qs=Te.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
|
-
`,Js=he(function(e,a){const t=ea(e,a.includeCreditAccountDebitSummaryAndCashbackInfo,a.isDebitCardFeatureEnabled&&a.isDebitCardSetupEnabled,a.isChargeCardFeatureEnabled&&a.isChargeCardSetupEnabled);return{chargeCardListView:t,rowActionView:Cr(e),bulkActionView:pr(e),companyLegalName:a.currentTenant.companyName,admins:a.admins,searchText:t.searchText,uiState:t.uiState,signedInUser:a.signedInUser}},function(e,a){const{navigateAndClearBulkSelection:t,currentTenant:r,location:n,signedInUser:f,chargeCardListState:p,includeCreditAccountDebitSummaryAndCashbackInfo:g,isChargeCardFeatureEnabled:_,isCreditCardProductVisibleForExpressInterest:c,isChargeCardSetupEnabled:l,isDebitCardFeatureEnabled:v,isDebitCardSetupEnabled:y,isDebitCardTOSAccepted:h,isChargeCardTOSAccepted:B,controllerEmails:F,depositAccountListWithDebitCardIssued:L,primaryFundingAccountDetails:C,chargeCardSetUpViewFetchState:u,productInformation:D,cashbackInformation:o,creditAccountInformation:I,debitAccountInformation:A,updatePayNowInfoTooltip:j,isUserHasCardsAdminLevelAccess:E}=a,{tenantEmailDomain:b}=r,{cards:x}=p;return{onChargeCardRowClick:(i,m)=>{const U=bn(x,i);let M;U!=null&&((T=>{const $=T.limit.amount-T.available.amount,G=`${T.cardHolderUser?.firstName.toLowerCase()} ${T.cardHolderUser?.lastName.toLowerCase()}`,V=T.cardName,P=T.department?.className??"",Z=T.limit.amount,J=T.creditLimitFrequency.name;q.trackCardsListRowClicked(G,V,P,$,Z,J,f.userId===T.cardHolderUserId)})(U),Ke(v,y,L)&&q.trackCardsCardListRowClick(F,D,"Card Row Item","row_clicked",m+1,{cardOwner:ct(U.cardHolderUser,!1),cardName:U.cardName,cardType:U.type.code.includes("credit")?"credit":"debit",cardStatus:U.status.code,cardUtilizationAmount:ra(U.limit.amount-U.available.amount),cardUtilizationPercent:U.limit.amount>0?Math.round((U.limit.amount-U.available.amount)/U.limit.amount*100):0,cardLimit:ra(U.limit.amount)},o,I,A)),M=U?.status.code==="request_on_hold"&&f.userId===U.cardHolderUserId?yn(b):pe(b,i,f,U);const R=ye(n.state?.pathnameStackToGoBack,n.pathname);t(M,{state:{pathnameStackToGoBack:R}})},onFetchChargeCardsRecurringExpenses:i=>{e(Jt(i))},onFetchDepositAccountLimit:i=>{e(Yt({depositAccountId:i}))},onChargeCardResendInviteClick:i=>{e(Ar(i))},onChargeCardRevokeInviteClick:i=>{e(Wt(i))},onLockChargeCardList:(i,m)=>{e(Ir(i,m))},onUnlockChargeCardList:i=>{e(Sr(i))},onCloseChargeCardList:(i,m)=>{e(yr(i,m))},onRevokeChargeCardList:i=>{e(br(i))},updateChargeCardListSpendLimit(i,m,U){e(gr(i,m,U.code))},onLockChargeCard:(i,m)=>{e(en(E,i,m))},onUnlockChargeCard:i=>{e(Qt(E,i))},onCloseChargeCard:(i,m)=>{e(Xt(i,m))},onUpdateSpendLimit(i,m,U,M){e(Zt(i,m,U.code,M))},updateChargeCardName:(i,m)=>{e(qt(E,i,m))},onClickSetupIcon:()=>{q.trackCardsListPageClicked("settings"),Ke(v,y,L)&&o!=null&&q.trackCardsSettingsClick(F,D,o,I,A);const i=Ps(b),m=ye(n.state?.pathnameStackToGoBack,n.pathname);t(i,{state:{pathnameStackToGoBack:m}})},onIssueCardClick:()=>{q.trackCardsListPageClicked("new card"),Ke(v,y,L)&&o!=null&&q.trackCardsNewCardClick(F,D,o,"New Button","card_creation_initiated","Card List",I,A);const i=Xs(b),m=ye(n.state?.pathnameStackToGoBack,n.pathname);t(i,{state:{pathnameStackToGoBack:m}})},onColumnSortConfigChanged:(i,m)=>{Ke(v,y,L)&&o!=null&&q.trackCardsCardListSortClick(F,D,o,"Sort Icon","sort",i,m==="ascending"?"ASC":"DESC","Cards List",I,A),e(st({uiState:{sortKey:i,sortOrder:m}}))},onSearchTextChanged:i=>{e(fr(i))},onReloadCards:()=>{e(ga(g,v&&y,_&&l,!0))},onLetsGoClick:()=>{t("./onboard")},onBackClick:()=>{t("../../")},onTotalCashbackClick:()=>{Ke(v,y,L)&&o!=null&&q.trackCardsCashbackOverviewClick(F,D,o,"Cashback Overview","cashback_details_viewed",I,A),t("./cashback")},onClickStatementsIcon:()=>{Ke(v,y,L)&&o!=null&&q.trackCardsStatementsClick(F,D,o,I,A),t("./statements")},onCreateNowClick:i=>{Ke(v,y,L)&&o!=null&&q.trackCardsNewCardClick(F,D,o,"Promo Banner","card_creation_initiated","Card List",I,A),t(`./new?cardType=${i}`)},onPromoCardClick:i=>{t(i==="debit"&&v&&!h||i==="credit"&&c&&!B?`../promo?cardPromoType=${i}`:"./setup")},navigateToCreditCardPaymentPage:(i,m)=>{u==="Completed"&&r.company!=null&&o!=null&&q.trackCardsPayEarlyClick(F,D,o,"Card List",i,m,{isZeniCheckingEnabled:r.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:C?.accType==="depositAccount",creditCardPaymentSourceAccountName:C?.label,creditCardPaymentSourceAccountType:C?.accType,creditCardPaymentSourceLastFourDigits:C?.accountLast4,creditCardPaymentSourceBalance:C?.accountBalance?.available?.amount??0},I,A);const U=Qs(b);t(U)},navigateToCreditCardPaymentHistoryPage:()=>{const i=ec(b),m=ye(n.state?.pathnameStackToGoBack,n.pathname);t(i,{state:{pathnameStackToGoBack:m}})},shouldShowPayNowInfoTooltip:j,onSetRowActionCardId:i=>{e(hr(i))},onSetBulkActionCardIds:i=>{e(an(i))},onEventReceived:i=>{Ws.has(i)&&dt(e,g,v&&y,_&&l)},onPusherSubscribed:()=>{dt(e,g,v&&y,_&&l)}}})(Za(ds));function Lt({isPaymentDrawerOpen:e}){const a=me(),t=Ce(),r=Se(),n=d.useCallback((N,ge)=>{t(an([])),a(N,ge)},[t,a]),[f,p]=d.useState(!1),[g,_]=d.useState(ee.getPayNowInfoTooltip()??!1),c=N=>{ee.savePayNowInfoTooltip(N),_(N)},[l,v]=d.useState(!1),y=ee.getSignedInUser(),h=S(N=>de(N)),[B,F]=d.useState(!1),[L,C]=d.useState(!1),{isAiCfoAccessEnabled:u,onAskAiCfoClick:D}=In({mobileExploreReferrer:"Cards"}),o=h.userRole.includes("charge_card_user"),I=!o,A=!!h.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:j,useDynamicConfig:E}=oe(),{isFeatureEnabled:b}=j(Y.isCashbackFeatureEnabled),{isFeatureEnabled:x}=j(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=j(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=j(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:U}=j(Y.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:M}=j(Y.isCardsCommentingEnabled),R=Ee(i,h),T=ke({isDebitCardFeatureEnabled:i,isBankingOnlyTenant:R}),$=Ie(h),G=Ae(h),V=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,P=_e({isCardsOnlyTenant:$,isChargeCardFeatureEnabled:x,isBookKeepingTenant:G,isDebitCardProductVisible:T,chargeCardsCreditAccountLimit:V}),Z=gn({isCardsOnlyTenant:$,isChargeCardFeatureEnabled:x,isBookKeepingTenant:G}),{configValue:J}=E(Le.zeniCardsConfig),w=$e(),O=He(w?.loggedInUserRoleMap),te=S(N=>qe(N,h.companyId)),ae=Je(te.controllers),k=J.charge_card_cashback_rate_per_transaction!=null?J.charge_card_cashback_rate_per_transaction:.0175,z=J.credit_card_pay_now_threshold_by_company_id?.[h.companyId]??J.default_credit_card_pay_now_threshold??Ds,X=J.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(J.enable_card_controls_for_company_ids)&&J.enable_card_controls_for_company_ids.includes(h.companyId),Q=!!h.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,K=!!h.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,re=!!h.companyChargeCardInfo?.info?.isChargeCardEnabled,De=S(N=>Mt(N)),Ue=bt(De.updateStatus),W=S(N=>ea(N,I,T&&A,P&&re)),fe=W.cards.filter(N=>N.type.code.includes("debit")).map(N=>N.connectedAccountId),Pe=[...new Set(fe)],Oe=S(N=>Qe(N)),Fe=S(N=>Ga(N,Pe)),xe=S(N=>ya(N,h.companyId)),ne=xe.companyChargeCardInfo?.primaryFundingAccount,Da=xe.allFundingAccounts.find(N=>N.id===ne?.accountId),ie=W.fetchState,oa=W.creditAccount;un({isDataReady:ie==="Completed"});const{creditAccountRepayment:le}=S(N=>Xe(N)),je=S(N=>ja(N).firstViewAfterActivation),{areTenantIdsInSync:ia}=Cn(),da=St(O,Oe),la=Ea(P,re,O,oa,le),ua=It(T,A,O,Fe,W.debitCardSummary),ma=Me(P,T,A,re),Ca=W.creditAccount.balance.amount+W.creditAccount.hold.amount;if(d.useEffect(()=>{ie==="Completed"&&(ee.getPayNowInfoTooltip()==null||Ca<z*W.creditAccount.limit.amount/100)&&c(!0)},[ie,z,Ca,W.creditAccount.limit.amount]),d.useEffect(()=>{if(e!=null&&e===!0&&le.initiatedRepayments.amount===0&&le.fetchState==="Completed"||Ue==="In-Progress"&&De.updateStatus==="Completed")c(!1),p(!0);else if(le.initiatedRepayments.amount>0&&le.fetchState==="Completed"){p(!1),document.body.style.overflow="auto";const N=ze(h.tenantEmailDomain);n(N)}},[e,le.initiatedRepayments.amount,le.fetchState,Ue,De.updateStatus,n,h.tenantEmailDomain]),d.useEffect(()=>{!B&&(re||A)&&ia&&(F(!0),t(ga(I,T&&A,P&&re,!1)))},[B,I,t,ia]),d.useEffect(()=>{je&&l===!1&&(v(!0),setTimeout(()=>{t(La())},5e3))},[je,l]),d.useEffect(()=>()=>{dt.flush()},[]),d.useEffect(()=>{ie==="Completed"&&o&&W.cards.length===1&&(W.cards[0].status.code==="inactive"&&W.cards[0].type.code==="business_physical_credit_card"?n(`./${W.cards[0].id}/activate`):W.cards[0].status.code!=="request_on_hold"&&(r.state?.message==="comingFromCardDetail"?n("../../"):n(`./${W.cards[0].id}`)))},[ie,o,r.state,n,W.cards]),d.useEffect(()=>{if(ie==="Completed"&&o){const N=W.cards.length,ge=W.cards.filter(be=>be.cardHolderUserId===y?.userId).filter(be=>be.status.code==="request_on_hold");ge.length>0&&N===ge.length&&n("./onboard")}},[ie,W.cards,o,n,y?.userId]),d.useEffect(()=>{ie!=="Completed"||P&&le.fetchState!=="Completed"||T&&A&&O&&Fe.fetchState!=="Completed"||q.trackCardsCardListView(ae,ma,da,la,ua)},[ie,oa,le.fetchState,Fe.fetchState,O]),y==null)throw Error("Can't access charge card list page without signing in...");const Ja=S(N=>tn(N.userState,N.userRoleState,N.userListViewState,"cardAdmin")),Pa=Ct(w?.loggedInUserRoleMap),wa=N=>{C(N)},Xa=W.creditAccount.limit,va=()=>{p(!1),n("..")},Qa=h.companyChargeCardInfo?.info!=null&&sa({cardInfo:h.companyChargeCardInfo.info,isProductVisible:P,isTOSAccepted:Q,isSetupEnabled:re,isUserHasCardsAdminLevelAccess:O,isUserHasCardsAccess:Pa}),H=h.companyDebitCardInfo?.info!=null&&sa({cardInfo:h.companyDebitCardInfo.info,isProductVisible:T,isTOSAccepted:K,isSetupEnabled:A,isUserHasCardsAdminLevelAccess:O,isUserHasCardsAccess:Pa}),ue=Qa||H,Be=Ge(h),Ye={events:ta(Be,Fn),eventCallback:(N,ge,be)=>{be.onEventReceived(N)},onSubscribed:N=>{N.onPusherSubscribed()}};return re||A?s.jsxs(s.Fragment,{children:[ie==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(yt,{analytics:q,onLoad:()=>{q.trackPageLoaded(pn.Event.cardsListPage),(P&&!re||T&&!A)&&q.trackCardsPromoView(ae,{isCreditCardOffered:P,isDebitCardOffered:T,isDebitCardEnabled:A,isCreditCardEnabled:re},"Banner",T&&!A?"Debit Card":P&&!re?"Credit Card":"","Card List")}}),s.jsx(za,{showConfetti:je})]}):null,f===!0?s.jsx(Pt,{closeDrawerHandler:va,isPaymentDrawerOpen:f,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:Ca,productInformation:ma,creditAccountInformation:la,debitAccountInformation:ua,cashbackInformation:da,isDebitCardInfoFetchStateCompleted:!(T&&A&&O)||Fe.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!P||le.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!O||Oe.fetchState==="Completed",paymentInitiatedDate:le.initiatedRepaymentDate}):null,s.jsxs(qs,{children:[s.jsx(We,{isAppContentDrawerOpen:L,handleDrawerToggle:wa}),s.jsx(Js,{...Ye,isCashbackFeatureEnabled:b,isChargeCardFeatureEnabled:P,isDebitCardFeatureEnabled:T,isCreditCardProductVisibleForExpressInterest:Z,updatePayNowInfoTooltip:c,showPayNowInfoTooltip:g,creditCardPayNowThreshold:z,signedInUser:y,chargeCardListState:W,location:r,admins:Ja.users,navigateAndClearBulkSelection:n,currentTenant:h,isCardControlsEnabled:X,companyChargeCardInfoCreditAccountLimit:h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:h.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:O,includeCreditAccountDebitSummaryAndCashbackInfo:I,onClickMenuIcon:()=>{wa(!0)},creditLimit:Xa,isChargeCardSetupEnabled:re,isDebitCardSetupEnabled:A,isEarlyPayEnabled:m,isChargeCardPaymentHistoryFeatureEnabled:U,cashbackRate:k,controllerEmails:ae,chargeCardCashbackDetailState:Oe,depositAccountListWithDebitCardIssued:Fe,isChargeCardTOSAccepted:Q,isDebitCardTOSAccepted:K,primaryFundingAccountDetails:Da,chargeCardSetUpViewFetchState:xe.fetchState,productInformation:ma,creditAccountInformation:la,debitAccountInformation:ua,cashbackInformation:da,isAiCfoAccessEnabled:u,onAskAiCfoClick:D,isCardsCommentingEnabled:M})]})]}):(Q||K)&&O===!0?s.jsx(Fa,{to:"../setup"}):ue?s.jsx(Fa,{to:"../promo"}):s.jsx(Sa,{fetchState:ie})}const Xs=e=>`/${e}/cards/new`,Qs=e=>`/${e}/cards/payment`,ec=e=>`/${e}/cards/payment-history`,xn=[Pn,wn],ac=new Set(xn),tc=he(function(e){const a=ee.getSignedInUser(),t=de(e),r=e.tenantState.currentTenantId,n=nn(e),f={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},p=t?.companyName??"",g=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:n.fetchState,filters:n.filters,isZeniTenant:Er(t),repaymentList:n.repaymentHistory,searchText:n.searchText,repaymentHistoryUsers:n.repaymentHistoryUsers,sortConfig:{sortKey:n.uiState.sortKey,sortOrder:n.uiState.sortOrder},downloadParams:{authParams:f,companyName:p,spendManagementEndPoint:`${ot}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:g}},function(e,a){const{location:t,navigate:r}=a;return{onBackClick:()=>{const n=Re(t.state?.pathnameStackToGoBack),f=n.poppedPathname??"..";r(f,{state:{pathnameStackToGoBack:n.newStack}})},onColumnSortConfigChanged:(n,f)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:n,sortOrder:f}}})},onFiltersChange:n=>{e(_r({filters:n}))},onReloadPayments:()=>{e(Ta(!0))},onEventReceived:n=>{ac.has(n)&&e(Ta(!0))},onPusherSubscribed:()=>{e(Ta(!0))},onSearchTextChanged:n=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:n})},updateDownloadStateHandler:n=>{e(kr({uiState:{downloadState:n}}))}}})(Za(ls));function nc(){const e=me(),a=Se(),t=Ce(),{areTenantIdsInSync:r}=Cn(),{useFeatureGate:n}=oe();if(ee.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const f=S(k=>de(k)),p=S(k=>nn(k)),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(null),F=!f.userRole.includes("charge_card_user"),L=!!f.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:C}=n(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:u}=n(Y.isDebitCardFeatureEnabled),D=Ee(u,f),o=ke({isDebitCardFeatureEnabled:u,isBankingOnlyTenant:D}),I=Ie(f),A=Ae(f),j=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,E=_e({isCardsOnlyTenant:I,isChargeCardFeatureEnabled:C,isBookKeepingTenant:A,isDebitCardProductVisible:o,chargeCardsCreditAccountLimit:j}),b=!!f.companyChargeCardInfo?.info?.isChargeCardEnabled,x=$e(),i=He(x?.loggedInUserRoleMap),m=S(k=>ea(k,F,o&&L,E&&b)),U=d.useMemo(()=>{const k=m.cards.filter(z=>z.type.code.includes("debit"));return[...new Set(k.map(z=>z.connectedAccountId))]},[m.cards]),M=S(k=>Qe(k)),R=S(k=>Ga(k,U)),{creditAccountRepayment:T}=S(k=>Xe(k)),$=d.useMemo(()=>St(i,M),[i,M]),G=d.useMemo(()=>Ea(E,b,i,m.creditAccount,T),[E,b,i,m.creditAccount,T]),V=d.useMemo(()=>It(o,L,i,R,m.debitCardSummary),[o,L,i,R,m.debitCardSummary]),P=d.useMemo(()=>Me(E,o,L,b),[E,o,L,b]),Z=m.creditAccount.balance.amount+m.creditAccount.hold.amount,J=d.useMemo(()=>h!=null?p.repaymentHistory.find(k=>k.cardRepaymentId===h):void 0,[h,p.repaymentHistory]),w=d.useCallback(k=>{B(k),t(ga(F,o&&L,E&&b,!1)),y(!0)},[t,F,o,L,E,b]),O=d.useCallback(()=>{y(!1),B(null),document.body.style.overflow="auto"},[]);d.useEffect(()=>{g||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(_(!0),t(Ta()))},[g,t,p.fetchState]),d.useEffect(()=>{!c&&(b||L)&&r&&(l(!0),t(ga(F,!1,E&&b,!1)))},[c,b,L,r,t,F,E]);const te=Ge(f),ae={events:ta(te,xn),eventCallback:(k,z,X)=>{X.onEventReceived(k)},onSubscribed:k=>{k.onPusherSubscribed()}};return s.jsxs(s.Fragment,{children:[v?s.jsx(Pt,{closeDrawerHandler:O,isPaymentDrawerOpen:v,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:Z,productInformation:P,creditAccountInformation:G,debitAccountInformation:V,cashbackInformation:$,isDebitCardInfoFetchStateCompleted:!(o&&L&&i)||R.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!E||T.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!i||M.fetchState==="Completed",paymentInitiatedDate:T.initiatedRepaymentDate,retryRepayment:J}):null,s.jsx(tc,{...ae,location:a,navigate:e,accountInfoByAccountId:p.accountInfoByAccountId,onRetryPaymentClick:w})]})}const Rt=Te.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
|
-
`,Ut=gt.getLocalizedStrings().months;function rc(){const e=me(),a=Ce(),t=Se(),{creditAccount:r,creditAccountRepayment:n}=S(P=>Xe(P)),f=`${mn.cardMicroServiceBaseUrl}/1.0/credit-accounts/${r.id}`,[p,g]=d.useState(!1),[_,c]=d.useState(!1),l=S(P=>Dr(P)),{useFeatureGate:v}=oe(),y=S(P=>de(P)),{isFeatureEnabled:h}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:F}=v(Y.isCardsCommentingEnabled),L=Sn(F?y.companyId:void 0,{clearParams:F&&l.fetchState==="Completed"}),C=Ee(B,y),u=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),D=Ie(y),o=Ae(y),I=y.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,A=_e({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:h,isBookKeepingTenant:o,isDebitCardProductVisible:u,chargeCardsCreditAccountLimit:I}),j=!!y.companyDebitCardInfo?.info?.isDebitCardEnabled,E=!!y.companyChargeCardInfo?.info?.isChargeCardEnabled,b=S(P=>qe(P,y.companyId)),x=Je(b.controllers),i=S(P=>rn(P)),m=i.cards.filter(P=>P.type.code.includes("debit")).map(P=>P.connectedAccountId),U=[...new Set(m)],M=S(P=>Ga(P,U)),R=S(P=>Pr(P));d.useEffect(()=>{_||r.fetchState==="Completed"||r.fetchState==="In-Progress"||(g(!0),a(Ne()))},[p,a,r.fetchState]),d.useEffect(()=>{_||r.fetchState!=="Completed"||r.id==null||l.fetchState==="Completed"||l.fetchState==="In-Progress"||(c(!0),a(wr(r.id)))},[_,a,r.fetchState,r.id,l.fetchState]),d.useEffect(()=>{M.fetchState!=="Completed"&&M.fetchState!=="In-Progress"&&u&&j&&a(sn()),i.fetchState!=="Completed"&&i.fetchState!=="In-Progress"&&a(ve()),R.fetchState!=="Completed"&&R.fetchState!=="In-Progress"&&u&&j&&a(vr()),n.fetchState!=="Completed"&&n.fetchState!=="In-Progress"&&A&&E&&a(ut())},[M.fetchState,u,j,i.fetchState,R.fetchState,n.fetchState,A,E]),d.useEffect(()=>{if(l.fetchState==="Completed"&&r.fetchState==="Completed"&&n.fetchState==="Completed"&&i.fetchState==="Completed"&&(!u||!j||M.fetchState==="Completed"&&R.fetchState==="Completed")){let P="",Z="";if(l.statements.length>0){const te=l.statements[l.statements.length-1].period,[ae,k]=te.split("-"),z=l.statements[0].period,[X,Q]=z.split("-");P=`${Ut[parseInt(k)-1]} ${ae}`,Z=`${Ut[parseInt(Q)-1]} ${X}`}const J=Me(A,u,j,E),w=Ea(A,E,!0,r,n),O=It(u,j,!0,M,R);q.trackCardsCreditCardStatementsView(x,J,{numberOfStatements:l.statements.length,oldestStatementMonthYear:P,latestStatementMonthYear:Z},w,O)}},[l.fetchState,r.fetchState,n.fetchState,M.fetchState,i.fetchState,R.fetchState]);const T=()=>{const P=Re(t.state?.pathnameStackToGoBack),Z=P.poppedPathname??"..";e(Z,{state:{pathnameStackToGoBack:P.newStack}})},$=S(P=>Qe(P)),G=ee.getSignedInUser(),V={userId:G?.userId??"",sessionId:G?.zeniSessionId??"",tenantId:y.tenantId??""};if(G==null)throw Error("Can't access address page without signing in...");if(l.fetchState!=="Completed")return s.jsx(Rt,{children:s.jsx(us,{onBackClick:T})});{const P=Me(A,u,j,E);return s.jsx(Rt,{children:s.jsx(ms,{currentTenantCompanyName:y.companyName,statementListView:l,productInformation:P,onBackClick:T,authParams:V,controllerEmails:x,isChargeCardFeatureEnabled:A,isDebitCardFeatureEnabled:u,isDebitCardSetupEnabled:j,isChargeCardSetupEnabled:E,isCardsCommentingEnabled:F,initialOpenThreadRequest:L,chargeCardCashbackDetailState:$,creditAccount:r,creditAccountRepayment:n,depositAccountListWithDebitCardIssued:M,debitCardSummary:R,downloadEndPoint:f})})}}const Bn=[aa,qa],sc=new Set(Bn),cc={containerWidth:new Aa(100,58)},oc=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),n=Se(),{useDynamicConfig:f}=oe(),[p,g]=d.useState(!1),[_,c]=d.useState(!1),[l,v]=d.useState(!1),[y,h]=d.useState(!1),B=d.useRef(!1),F=d.useRef(null);d.useEffect(()=>()=>{F.current!=null&&(clearTimeout(F.current),F.current=null)},[]);const[L,C]=d.useState(!1),[u,D]=d.useState(!1),o=ee.getSignedInUser();if(o==null)throw Error("Can't access onboarding card page without signing in...");const I=S(O=>de(O)),{configValue:A}=f(Le.zeniCardsConfig),j=S(O=>Tr(O)),{tenantEmailDomain:E}=I,b=S(O=>O.settingsViewState.profile.fetchState),x=S(O=>O.chargeCardListState.fetchState),i=S(O=>O.settingsViewState.profile.userId),m=S(O=>O.chargeCardConfigState.fetchState);d.useEffect(()=>{p===!1&&b!=="In-Progress"&&b!=="Completed"&&(t(Fr()),g(!0)),_===!1&&m!=="In-Progress"&&m!=="Completed"&&(t(Va()),c(!0)),l===!1&&x==="Not-Started"&&(v(!0),t(ve()))},[p,l,x,_,m]),d.useEffect(()=>{b==="Completed"&&L===!1&&i!=null&&x==="Completed"&&j.cards.length>0&&(t(xr({userId:i})),t(cn({cardId:j.cards[j.cards.length-1].id})),C(!0))},[b,L,i,x]),d.useEffect(()=>{if(!y&&j.fetchState==="Completed"&&j.cards.length===0){const O=Re(n.state?.pathnameStackToGoBack),te=O.poppedPathname??ze(E);r(te,{state:{pathnameStackToGoBack:O.newStack}})}},[j.fetchState,j.cards,y]);const U=S(O=>ja(O)),M=bt(U.updateStatus.fetchState),R=U.currentDisplayedCardId,{useFeatureGate:T}=oe(),{isFeatureEnabled:$}=T(Y.isChargeCardFeatureEnabled),G=!!I.companyChargeCardInfo?.info?.isChargeCardEnabled,V=!I.userRole.includes("charge_card_user")&&$&&G,P=S(O=>R!=null?on(O.chargeCardState,R):null),Z=()=>{R!=null&&(B.current=!0,F.current!=null&&clearTimeout(F.current),F.current=setTimeout(()=>{B.current=!1,F.current=null},5e3),t(ca(R,V,!0)),t(ve(!0)),h(!0))},J=Ge(I);At({events:ta(J,Bn),onSubscribed:()=>{t(ve(!0))},onEvent:(O,te)=>{if(!sc.has(O))return;const ae=wt(te),k=B.current;if(O===aa){const X=ce(ae?.card_id)??R;if(X!=null){const Q=vt(ae,X);if(Q!=null)return t(mt(Q)),void(X!==R||k||Z())}}if(O===qa)return void t(ve(!0));const z=ce(ae?.card_id)??R;(R==null||z===R)&&R!=null?k||Z():t(ve(!0))}}),d.useEffect(()=>{if(y&&R!=null&&P!=null&&P.status.code!=="request_on_hold"){const O=pe(I.tenantEmailDomain,R,o,P),te=ye(n.state?.pathnameStackToGoBack,n.pathname);t(Br()),P?.type.code==="business_virtual_credit_card"&&t(Na()),r(O,{state:{pathnameStackToGoBack:te},replace:!0}),B.current=!1,F.current!=null&&(clearTimeout(F.current),F.current=null)}},[y,P?.status.code]),d.useEffect(()=>{M==="In-Progress"&&U.updateStatus.fetchState==="Completed"&&setTimeout(Z,3e3)},[M,U.updateStatus.fetchState]);const w=O=>{D(O)};if(b!=="Completed"||j.cards.length===0)return s.jsxs(Ot,{children:[s.jsx(We,{isAppContentDrawerOpen:u,handleDrawerToggle:w}),s.jsx(Cs,{})]});if(i==null)throw Error("Can't access my userId.");return s.jsxs(Ot,{children:[s.jsx(We,{isAppContentDrawerOpen:u,handleDrawerToggle:w}),s.jsx(ic,{chargeCardListView:j,cardUserOnboardingView:U,navigate:r,currentTenant:I,myUserId:i,location:n,chargeCardCashbackRatePerTransaction:A.charge_card_cashback_rate_per_transaction!=null?A.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{w(!0)}}),e!=null?s.jsx(dc,{windowSize:a,children:e}):null]})},ic=he(function(e,{currentTenant:a,cardUserOnboardingView:t,chargeCardListView:r,myUserId:n}){const f=ea(e,!1,!1,!1);let p=!1;return f.fetchState==="Completed"&&f.cards.length<=1&&(p=!0),{cards:r.cards,showMenuIcon:p,companyLegalName:a.companyName,twoFAView:t.twoFAView,cardUserOnboardingLocalData:t.cardUserOnboardingLocalData??{userId:n},isDOBDisabled:t.isDOBPresent,onboardingProgressStatus:t.onboardingProgressStatus}},function(e,a){const{navigate:t,cardUserOnboardingView:r,location:n,currentTenant:f}=a,{tenantEmailDomain:p}=f;return{updateCardUserOnboardingLocalData:g=>{e(Ft({localData:g}))},onGetOtp:g=>{if(r.cardUserOnboardingLocalData!=null){const _={...r.cardUserOnboardingLocalData,phone:g};e(Ft({localData:_}))}e($a(g,"CardUserOnboarding"))},onResendOtp:g=>{e(Ma(g,"CardUserOnboarding"))},onVerifyOtp:(g,_)=>{e(Ha(g,_,"CardUserOnboarding"))},onVerifyOtpSuccess:g=>{e(Lr()),g!=null&&ee.saveZeniOtpToken(g)},setCurrentDisplayedCardId:g=>{e(cn({cardId:g}))},onBackClick:()=>{const g=Re(n.state?.pathnameStackToGoBack),_=g.poppedPathname??ze(p);t(_,{state:{pathnameStackToGoBack:g.newStack}})}}})(ps),dc=Te.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: ${e=>`${cc.containerWidth.value(e.windowSize)}%`};
|
|
38
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
39
|
-
`,Ot=Te.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
|
-
`,lc={containerWidth:new Aa(100,58)},uc=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p,useFeatureGate:g}=oe(),[_,c]=d.useState(!1),[l,v]=d.useState(!1),[y,h]=d.useState(!1),[B,F]=d.useState(!1),L=ee.getSignedInUser();if(L==null)throw Error("Can't access onboarding card page without signing in...");const C=S(V=>de(V));if(n==null)throw Error("Empty card id is not valid...");const{configValue:u}=p(Le.zeniCardsConfig),D=S(V=>Rr(V,n)),{isFeatureEnabled:o}=g(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=g(Y.isDebitCardFeatureEnabled),A=Ee(I,C),j=ke({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:A}),E=Ie(C),b=Ae(C),x=C.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,i=_e({isCardsOnlyTenant:E,isChargeCardFeatureEnabled:o,isBookKeepingTenant:b,isDebitCardProductVisible:j,chargeCardsCreditAccountLimit:x}),m=D.chargeCard,U=S(V=>V.chargeCardConfigState.fetchState);d.useEffect(()=>{_===!1&&U!=="In-Progress"&&U!=="Completed"&&(t(Va()),c(!0)),l===!1&&D.fetchState==="Not-Started"&&(v(!0),t(ca(n,!1,i)))},[l,D.fetchState,_,U]);const M=m?.type.code==="business_physical_debit_card"||m?.type.code==="business_virtual_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(y===!1&&(M===!1||M&&m.status?.code!=="active"||M&&m.status.code==="active"&&m.isPinSet||m.cardHolderUserId!==L.userId)){const V=pe(C.tenantEmailDomain,n,L,m,!0),P=ye(f.state?.pathnameStackToGoBack,f.pathname);r(V,{state:{pathnameStackToGoBack:P}})}else if(y&&D.isRefreshingViewInBackground===!1&&m?.isPinSet===!0){t(Ur({chargeCardId:n}));const V=pe(C.tenantEmailDomain,n,L,m,!0),P=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(V,{state:{pathnameStackToGoBack:P}})}}},[D.fetchState,m?.type.code,y,D.isRefreshingViewInBackground]);const R=ee.getZeniOtpTokenForCardHolder(n),T=S(V=>Nt(V.userState,L.userId)),$=()=>{m?.isPinSet!==!0&&t(na(n,!0))};d.useEffect(()=>{D.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout($,3e3),h(!0))},[D.updateDebitCardPinAttemptFetchState.fetchState]);const G=V=>{F(V)};if(U!=="Completed"||m==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(T?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(pc,{children:[s.jsx(We,{isAppContentDrawerOpen:B,handleDrawerToggle:G}),s.jsx(mc,{cardId:n,card:m,phone:T.phone,signedInUser:L,isSandboxEnv:ht(),debitCardDetailState:D,signedInUserToken:R,navigate:r,currentTenant:C,location:f,chargeCardCashbackRatePerTransaction:u.charge_card_cashback_rate_per_transaction!=null?u.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{G(!0)}}),e!=null?s.jsx(Cc,{windowSize:a,children:e}):null]})},mc=he(function(e,{debitCardDetailState:a,cardId:t}){const r=Ht(e,t),n=a.updateStatus,f=ea(e,!1,!1,!1);let p=!1;return f.fetchState==="Completed"&&f.cards.length<=1&&(p=!0),{showMenuIcon:p,vgsVaultId:Ya.cardVaultId,twoFAView:r,setPinWaitStatus:n}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,debitCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdateDebitCardPinAttempt:c=>{e(Kt(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onSetPinSuccess:()=>{e(Or({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("activate")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(hs),Cc=Te.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
width: ${e=>`${lc.containerWidth.value(e.windowSize)}%`};
|
|
51
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
52
|
-
box-shadow: ${e=>`${Ra.sp0} 2px ${Ra.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
53
|
-
`,pc=Te.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=>`${Ra.sp0} 2px ${Ra.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
62
|
-
`,hc={overlayWidth:new Aa(at[12],at[12],at[9])},fc=he(function(e,a){const t=pt(e,!1,!1),r=a.lineId,n=t.customAddress[r],f=t.customAddressStatus[r]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:a.googleAPIKey,customAddress:n,customAddressStatus:f,lineId:r}},function(e,a){const{newCustomAddressId:t,lineId:r,chargeCardTypeOption:n}=a;return{onSubmitHandler:f=>{t!=null&&e(dn(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`));const p=Ts(f);e(Nr({addressType:`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`,addressToCreate:p})),e(Hr(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`))},onDismissClick:()=>{a.onDismissClick(),t!=null&&e(Vr({addressId:t,cardLineId:r,cardType:n==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(fs),gc=({lineId:e,closeDrawerHandler:a,chargeCardTypeOption:t})=>{const r=ft(),n=Ia(),f=()=>{a()},p=S(g=>jr(`${t==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,g))?.newAddressId;return s.jsx(hn,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:hc.overlayWidth.valuePercentage(n),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:(g,_)=>(_==="backdropClick"||_==="escapeKeyDown")&&f(),children:s.jsx(fc,{googleAPIKey:Ya.googleMapsAPIKey,onDismissClick:f,lineId:e,chargeCardTypeOption:t,newCustomAddressId:p})})},bc=he(function(e,a){const{isChargeCardFeatureEnabled:t,isDebitCardFeatureEnabled:r,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:f,isChargeCardSetupEnabled:p,isDebitCardSetupEnabled:g}=a,_=pt(e,t&&p,r&&g);return{issueChargeCards:_,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:f,isDebitCardFeatureEnabled:r,isChargeCardFeatureEnabled:t,isChargeCardSetupEnabled:p,isDebitCardSetupEnabled:g,cardHolderCandidates:_.userList.map(c=>c.user).filter(Boolean),allRoles:_.userList.map(c=>c.userRole),allAccountingClasses:_.allAccountingClasses,userList:_.userList}},function(e,a){return{onIssueCardClick:()=>{e(Gr())},onSaveChangesToLocalStore:t=>{e($r(t))},onDismissClick:()=>{e(ln()),a.navigate("../")},resetCustomAddressByLineID:(t,r)=>{e(dn(`${r==="creditCard"?"credit":"debit"}_custom_shipping_${t}_address`))},openAddAddressDrawerHandler:a.openAddAddressDrawerHandler}})(ys);function yc(){const e=ee.getSignedInUser(),a=me(),t=Ce(),r=gs(),[n]=jt(),f=n.get("cardType"),{useFeatureGate:p}=oe(),{isFeatureEnabled:g}=p(Y.isIssuePhysicalCardEnabled),{isFeatureEnabled:_}=p(Y.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:c}=p(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(Y.isChargeCardFeatureEnabled),v=S($=>de($)),y=Ee(c,v),h=ke({isDebitCardFeatureEnabled:c,isBankingOnlyTenant:y}),B=Ie(v),F=Ae(v),L=v.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,C=_e({isCardsOnlyTenant:B,isChargeCardFeatureEnabled:l,isBookKeepingTenant:F,isDebitCardProductVisible:h,chargeCardsCreditAccountLimit:L}),[u,D]=d.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");d.useEffect(()=>{u||(D(!0),t(Mr(h&&I,C&&o,!1)))},[u,D,t]);const o=!!v.companyChargeCardInfo?.info?.isChargeCardEnabled,I=!!v.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S($=>pt($,C&&o,h&&I)),j=A.fetchState,E=A.issueCardStatus.fetchState,b=A.lastSelfIssuedDebitCardId,x=S($=>b!=null?on($.chargeCardState,b):void 0),[i,m]=d.useState(null),[U,M]=d.useState(null),R=()=>{m(null)},T=($,G)=>{m($),M(G)};return d.useEffect(()=>{if(E==="Completed"){if(b!=null&&x?.type.code==="business_virtual_debit_card"){let $;$=x?.status.code==="request_on_hold"&&e.userId===x.cardHolderUserId?yn(v.tenantEmailDomain):pe(v.tenantEmailDomain,b,e,x),a($)}else a("../");t(ln())}},[E,b]),j==="Completed"?s.jsxs(s.Fragment,{children:[i!==null&&U!==null?s.jsx(gc,{closeDrawerHandler:R,lineId:i,chargeCardTypeOption:U}):null,s.jsx(bc,{themeState:r,isIssuePhysicalCardEnabled:g,isIssuePhysicalDebitCardEnabled:_,isDebitCardFeatureEnabled:h,isChargeCardFeatureEnabled:C,isChargeCardSetupEnabled:o,isDebitCardSetupEnabled:I,navigate:a,fetchState:A.fetchState,openAddAddressDrawerHandler:T,defaultCardType:f==="creditCard"||f==="debitCard"?f:void 0})]}):j==="Error"?s.jsx(Ka,{}):s.jsx(bs,{})}const Ln=[aa,qa],Sc=new Set(Ln),Ic=Te.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
|
-
`,Ac=he(function(e,a){const{myPendingActivationChargeCardListState:t}=a;return{myPendingActivationChargeCardListView:t,uiState:t.uiState,signedInUser:a.signedInUser}},function(e,a){const{navigate:t,currentTenant:r,location:n,signedInUser:f,myPendingActivationChargeCardListState:p}=a,{tenantEmailDomain:g}=r,{cards:_}=p;return{onChargeCardRowClick:c=>{const l=bn(_,c),v=pe(g,c,f,l),y=ye(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,l)=>{e(st({uiState:{sortKey:c,sortOrder:l}}))},onReloadCards:()=>{e(ve())},onBackClick:()=>{const c=r.userRole.includes("charge_card_user");e(st({uiState:{sortKey:c?"cardName":"owner",sortOrder:"ascending"}})),t("../")}}})(Ss);function Ec(){const e=me(),a=Ce(),t=Se(),r=ft(),[n,f]=d.useState(!1),p=S(T=>zr(T)),g=S(T=>de(T)),_=S(T=>qe(T,g.companyId)),c=Je(_.controllers),{useFeatureGate:l}=oe(),{isFeatureEnabled:v}=l(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=l(Y.isDebitCardFeatureEnabled),h=Ee(y,g),B=ke({isDebitCardFeatureEnabled:y,isBankingOnlyTenant:h}),F=!!g.companyDebitCardInfo?.info?.isDebitCardEnabled,L=!!g.companyChargeCardInfo?.info?.isChargeCardEnabled,C=$e(),u=Ie(g),D=Ae(g),o=g.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,I=_e({isCardsOnlyTenant:u,isChargeCardFeatureEnabled:v,isBookKeepingTenant:D,isDebitCardProductVisible:B,chargeCardsCreditAccountLimit:o}),A=He(C?.loggedInUserRoleMap),j=S(T=>Qe(T)),{creditAccount:E,creditAccountRepayment:b}=S(T=>Xe(T)),x=S(T=>rn(T)).cards.filter(T=>T.type.code.includes("debit")).map(T=>T.connectedAccountId),i=[...new Set(x)],m=S(T=>Ga(T,i));d.useEffect(()=>{n||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(f(!0),a(ve()),a(Va()))},[n,a,p.fetchState]),d.useEffect(()=>{if(p.fetchState==="Completed"&&p.cards.length===1&&U!=null){const T=pe(g.tenantEmailDomain,p.cards[0].id,U,p.cards[0]);e(T,{state:{message:t.state?.message}})}},[p.fetchState,p.cards]);const U=ee.getSignedInUser();d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&I&&L&&A&&a(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&A&&a(ut()),m.fetchState!=="Completed"&&m.fetchState!=="In-Progress"&&B&&F&&A&&a(sn())},[E.fetchState,b.fetchState,a,m.fetchState,B,F,A,I,L]);const M=Ge(g);if(At({events:ta(M,Ln),onEvent:(T,$)=>{if(!Sc.has(T))return;const G=wt($);if(T===aa){const V=ce(G?.card_id);if(V!=null){const P=vt(G,V);if(P!=null)return void a(mt(P))}}a(ve(!0))},onSubscribed:()=>{a(ve(!0))}}),U==null)throw Error("Can't access address page without signing in...");const R=p.cards!=null&&p.cards.length>0;if(p.fetchState==="Completed"||R){const T=Me(I,B,F,L);return s.jsx(Ic,{children:s.jsx(Ac,{navigate:e,currentTenant:g,signedInUser:U,productInformation:T,myPendingActivationChargeCardListState:p,isChargeCardFeatureEnabled:I,isDebitCardFeatureEnabled:B,isDebitCardSetupEnabled:F,isChargeCardSetupEnabled:L,chargeCardCashbackDetailState:j,creditAccount:E,creditAccountRepayment:b,depositAccountListWithDebitCardIssued:m,controllerEmails:c,location:t})})}return s.jsx(Sa,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})}const kc=he(function(e,a){const{companyId:t,companyLegalName:r}=a;return{chargeCardSetupView:ya(e,t),admins:a.adminList,companyLegalName:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-zeni-charge-cards?embed=true"}},function(e,a){const{navigate:t,companyId:r,isCompanyBusinessVerificationAndPaymentSetUpDone:n,isDebitCardSetupEnabled:f,isChargeCardSetupEnabled:p,signedInUser:g,location:_,productInformation:c,isEarlyPayEnabled:l,controllerEmails:v,chargeCardsCreditAccountLimit:y}=a;return{onSetupButtonClick:h=>{if(g!=null&&q.trackCardsPromoPageClicked("enable cards"),n)switch(q.trackCardsEnableCardsClick(v,c,"Cards Promo"),h){case"credit":e(Ve(r,!0,"charge_cards",l,!1));break;case"debit":e(Ve(r,!0,"debit_cards",l,!1));break;case"debit_and_credit":e(y===0?Ve(r,!0,"debit_cards",l,!0):Ve(r,!0,"charge_cards__debit_cards",l,!1))}else switch(q.trackCardsSetupCardsClick(v,c,"Cards Promo"),h){case"credit":e(Ve(r,!1,"charge_cards",l,!1));break;case"debit":e(Ve(r,!1,"debit_cards",l,!1));break;case"debit_and_credit":e(y===0?Ve(r,!1,"debit_cards",l,!0):Ve(r,!1,"charge_cards__debit_cards",l,!1))}},onBackClick:()=>{const h=Re(_.state?.pathnameStackToGoBack);let B=h.poppedPathname;B==null&&(B=f||p?"..":"../.."),t(B,{state:{pathnameStackToGoBack:h.newStack}})},onLetsGoClick:()=>{t("./onboard")},onSetupChargeCardSuccess:()=>{n?(e(Na()),t("../",{relative:"path"})):t("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(Kr(r))}}})(As),_c=()=>{const e=me(),{tenantEmailDomain:a}=ba(),[t]=jt(),r=t.get("cardPromoType"),n=Ce(),{useDynamicConfig:f,useFeatureGate:p}=oe(),[g,_]=d.useState(!1),{isFeatureEnabled:c}=p(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:v}=p(Y.isChargeCardFeatureEnabled),{configValue:y}=f(Le.zeniCardsConfig),h=S(ne=>de(ne)),B=S(ne=>qe(ne,h.companyId)),F=Je(B.controllers),L=y.charge_card_cashback_rate_per_transaction!=null?y.charge_card_cashback_rate_per_transaction:.0175,C=Se(),u=ee.getSignedInUserTenant(a)?.companyId??h.companyId,D=S(ne=>ya(ne,u)),o=D.primaryFundingAccount,I=h.companyBillPayInfo?.info,A=Ie(h),j=Ae(h),E=Ee(c,h),b=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,x=ke({isDebitCardFeatureEnabled:c,isBankingOnlyTenant:E}),i=_e({isCardsOnlyTenant:A,isChargeCardFeatureEnabled:v,isBookKeepingTenant:j,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:b}),m=gn({isCardsOnlyTenant:A,isChargeCardFeatureEnabled:v,isBookKeepingTenant:j}),U=x&&i===!1,M=I?.businessVerificationStatus?.code==="verified"&&(U||o?.accType==="depositAccount"||Yr(o?.providerVerificationStatus?.code??"")),R=ee.getSignedInUser(),T=!!h.companyZeniAccountInfo?.info?.isZeniAccountEnabled,$=!!h.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,G=!!h.company?.companyChargeCardInfo.isChargeCardEnabled,V=!!h.company?.companyDebitCardInfo.isDebitCardEnabled,P=!!h.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,Z=ne=>{_(ne)},J=S(ne=>ne.chargeCardSetupViewState.fetchState);if(R==null)throw Error("Can't access Charge Card promo page without signing in...");const w=$e(),O=He(w?.loggedInUserRoleMap),te=Ct(w?.loggedInUserRoleMap),[ae,k]=d.useState(!1),[z,X]=d.useState(!1),[Q,K]=d.useState(!1);d.useEffect(()=>{ae===!1&&C.state?.message==="activation"&&k(!0)},[C.state]),d.useEffect(()=>{z||J!=="Not-Started"||u==null||(X(!0),n(fa(u,!0)))},[z,J,u,n]);const re=h.companyChargeCardInfo?.info!=null&&sa({cardInfo:h.companyChargeCardInfo.info,isProductVisible:m,isTOSAccepted:$,isSetupEnabled:G,isUserHasCardsAdminLevelAccess:O,isUserHasCardsAccess:te}),De=h.companyDebitCardInfo?.info!=null&&sa({cardInfo:h.companyDebitCardInfo.info,isProductVisible:x,isTOSAccepted:P,isSetupEnabled:V,isUserHasCardsAdminLevelAccess:O,isUserHasCardsAccess:te}),Ue=x&&De&&m&&b>=0&&re?"debit_and_credit":x&&De?"debit":"credit",W=ws(r,Ue),fe=D?.chargeCardTermsDetails?.fetchStatus?.fetchState,Pe=d.useRef(null);d.useEffect(()=>{fe==="In-Progress"?Pe.current=W:fe!=="Error"&&fe!=="Not-Started"||(Pe.current=null)},[fe,W]);const Oe=fe!=="In-Progress"&&fe!=="Completed"||Pe.current==null?W:Pe.current;d.useEffect(()=>{W==="credit"&&(G||m===!1&&V)||W==="debit"&&V||W==="debit_and_credit"&&V&&G?e("../"):(W==="debit_and_credit"&&$===!0&&P===!0||W==="credit"&&($===!0||m===!1&&P===!0)||W==="debit"&&P===!0)&&O===!0&&e("../setup")},[M,G,V,W,$,P]),d.useEffect(()=>{Q||(n(Zr("cardAdmin")),K(!0))},[Q]);const Fe=S(ne=>tn(ne.userState,ne.userRoleState,ne.userListViewState,"cardAdmin")),xe=Me(m,x,V,G);return(re||De)&&J==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(yt,{analytics:q,onLoad:()=>{if(q.trackPageLoaded(pn.Event.cardsPromoPage),!!m&&!G||!!x&&!V||!!m&&!!x&&!V&&!G){const ne=Dc({isDebitCardSetupEnabled:V,isChargeCardSetupEnabled:G,isCreditCardProductVisibleForExpressInterest:m,isDebitCardProductVisible:x});q.trackCardsPromoView(F,xe,"Page",ne,"Promo Page")}}}),s.jsx(za,{showConfetti:ae}),s.jsx(We,{isAppContentDrawerOpen:g,handleDrawerToggle:Z}),s.jsx(kc,{signedInUser:R,location:C,showEnableCardButton:M,isCompanyBusinessVerificationAndPaymentSetUpDone:M,isChargeCardSetupEnabled:G,isDebitCardSetupEnabled:V,companyLegalName:h.companyName,adminList:Fe.users,isCheckingEnabled:T,navigate:e,companyId:u,cardPromoType:Oe,controllerEmails:F,productInformation:xe,isCreditCardProductVisible:i,isDebitCardFeatureEnabled:c,isEarlyPayEnabled:l,cashbackRate:L,chargeCardsCreditAccountLimit:b,onClickMenuIcon:()=>{Z(!0)}})]}):s.jsxs(s.Fragment,{children:[s.jsx(We,{isAppContentDrawerOpen:g,handleDrawerToggle:Z}),s.jsx(Is,{})]})},Dc=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:a,isCreditCardProductVisibleForExpressInterest:t,isDebitCardProductVisible:r})=>t&&r&&!e&&!a?"Credit & Debit Card":t&&!a?"Credit Card":r&&!e?"Debit Card":"";function Jc(){const e=Se(),a=S(J=>de(J)),{useFeatureGate:t}=oe(),{isFeatureEnabled:r}=t(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:n}=t(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:f}=t(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:p}=t(Y.isChargeCardPaymentHistoryFeatureEnabled),g=Ee(n,a),_=ke({isDebitCardFeatureEnabled:n,isBankingOnlyTenant:g}),c=Es(a,r,n),l=!!a.company?.companyChargeCardInfo.isChargeCardTOSAccepted,v=!!a.company?.companyDebitCardInfo.isDebitCardTOSAccepted,y=!!a.company?.companyChargeCardInfo.isChargeCardEnabled,h=!!a.company?.companyDebitCardInfo.isDebitCardEnabled,B=$e(),F=He(B?.loggedInUserRoleMap),L=Ct(B?.loggedInUserRoleMap),{isFeatureEnabled:C}=t(Y.isCashbackFeatureEnabled),u=a.userRole.includes("charge_card_user"),D=!u,o=!u&&y,I=a?.userRole!=null&&Wr(a?.userRole),A=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!I)&&qr(B?.loggedInUserRoleMap),j=Jr(B?.loggedInUserRoleMap),E=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!I)&&Xr(B?.loggedInUserRoleMap),{isFeatureEnabled:b}=t(Y.isDepositAccountsFeatureEnabled),x=b&&!I&&$t(B?.loggedInUserRoleMap),i=y&&!I,m=h&&!I,U=c&&!I&&He(B?.loggedInUserRoleMap),M=Qr(B?.loggedInUserRoleMap),R=Ie(a),T=Ae(a),$=a.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,G=_e({isCardsOnlyTenant:R,isChargeCardFeatureEnabled:r,isBookKeepingTenant:T,isDebitCardProductVisible:_,chargeCardsCreditAccountLimit:$}),V=a.companyChargeCardInfo?.info!=null&&sa({cardInfo:a.companyChargeCardInfo.info,isProductVisible:G,isTOSAccepted:l,isSetupEnabled:y,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:L}),P=a.companyDebitCardInfo?.info!=null&&sa({cardInfo:a.companyDebitCardInfo.info,isProductVisible:_,isTOSAccepted:v,isSetupEnabled:h,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:L}),Z=V||P;return s.jsxs(Rn,{children:[F?s.jsx(se,{path:"setup",element:s.jsx(xt,{isBillPayAdminLevelAccess:A,isReimbursementAdminLevelAccess:E,isZeniAccountAdminLevelAccess:x,isChargeCardAdminLevelAccess:U,isUserHasOnlyCardAccess:M,isUserHasOnlyBillPayAccess:j,productType:"charge_cards",type:"setup"})}):null,F?s.jsx(se,{path:"verification",element:s.jsx(xt,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:j,isReimbursementAdminLevelAccess:E,isZeniAccountAdminLevelAccess:x,isChargeCardAdminLevelAccess:U,isUserHasOnlyCardAccess:M,productType:"charge_cards",type:"verification"})}):null,s.jsx(se,{path:"promo",element:s.jsx(_c,{})}),i||m?s.jsxs(s.Fragment,{children:[s.jsx(se,{path:"/",element:s.jsx(Lt,{isPaymentDrawerOpen:!1})}),U&&f?s.jsx(se,{path:"payment",element:s.jsx(Lt,{isPaymentDrawerOpen:!0})}):null,s.jsx(se,{path:"activate",element:s.jsx(Ec,{})}),s.jsx(se,{path:"onboard",element:s.jsx(oc,{})}),F?s.jsx(se,{path:"new",element:s.jsx(yc,{})}):null,C&&D?s.jsx(se,{path:"cashback",element:s.jsx(Rs,{})}):null,o?s.jsx(se,{path:"statements",element:s.jsx(rc,{})}):null,U&&p&&y?s.jsx(se,{path:"payment-history",element:s.jsx(nc,{})}):null,s.jsx(se,{path:":cardId/activate",element:s.jsx(js,{})}),s.jsx(se,{path:":cardId/setPin",element:s.jsx(uc,{})}),s.jsx(se,{path:":cardId/addToWallet",element:s.jsx(Fs,{})}),s.jsx(se,{path:":cardId/*",element:s.jsx(Ks,{})}),s.jsx(se,{path:"*",element:s.jsx(Ka,{})})]}):(l||v)&&F?s.jsx(se,{path:"*",element:s.jsx(Fa,{to:"../setup"})}):Z?s.jsx(se,{path:"*",element:s.jsx(Fa,{to:"../promo",state:e.state})}):s.jsx(se,{path:"*",element:null})]})}export{Jc as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-oKBQUmhq.js";import{a as g}from"./sentry-p9ArnUH9.js";import{h as w,u as k,g as x,i as T,j as O,n as E}from"./core-rmRh_ZE8.js";import{z as N,b7 as P,K as F,c as V,e as j,af as C,b8 as A,at as L,au as M,q as U}from"./index-CYj5jhrI.js";import{eP as D,fG as B,sg as _,fB as G,c2 as R,MJ as q,bn as z,qo as K,qc as Y,ke as H,lK as S,MK as J,bE as Z,cv as b,lS as $,lV as Q}from"./zeni-epic-state-DH4sFgeZ.js";import"./mui-DRkb5v8u.js";import{d as W}from"./routePaths-CJs7QSKh.js";import{M as X}from"./MobileAppDrawer-NgQTATqT.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="933efc88-c8ad-44aa-a7fe-9c5e4baa40e6",n._sentryDebugIdIdentifier="sentry-dbid-933efc88-c8ad-44aa-a7fe-9c5e4baa40e6")}catch{}})();const ee=E(function(n){const t=G(n),i=N.getSignedInUser(),l=D(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=q(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n($({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(J(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(Y(e))},onEditFileName:(e,a)=>{n(K(e,a.split(".")[0]))}}})(A);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(B(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(P,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-oKBQUmhq.js";import{a}from"./sentry-p9ArnUH9.js";import{u as D,g as v,j as m,N as w}from"./core-rmRh_ZE8.js";import{Jo as A,eP as O,fo as j,mW as U,fP as h,fn as _,eW as L,Jv as F}from"./zeni-epic-state-DH4sFgeZ.js";import{u as P,z as u,L as g,D as $,o as k}from"./index-CYj5jhrI.js";import{n as H}from"./mui-DRkb5v8u.js";import{t as z}from"./getLocaleForTenant-BikYpzid.js";import{g as R,Q as J}from"./QBOConnectionScreen-CAQUllDp.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./empty-BR41JKH4.js";import"./pdf-lib-B5Yv6f0X.js";import"./index-BcKPNqyh.js";import"./url-B-b7cLPz.js";import"./index-CTpsdld-.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="e44c546e-ff9e-499b-beb5-5fa29599332f",t._sentryDebugIdIdentifier="sentry-dbid-e44c546e-ff9e-499b-beb5-5fa29599332f")}catch{}})();const W=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${k.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function pe(){const t=D(),d=v(),{setLoading:i,clearAllLoading:b}=P(),p=a.useRef(!1),c=a.useRef(!1),{code:x,realmId:T,state:y}=R(d.search),N=x!==""&&T!==""&&y!=="",I=m(l=>A(l)),e=m(l=>O(l)),n=m(l=>l.tenantState.fetchState),r=m(l=>l.tenantState.activeTenantFetchState.fetchState),o=u.getSignedInUser(),f=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{i(g.CONNECTION_AUTH)},[i]),a.useEffect(()=>{p.current||o==null||f==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(i(g.TENANT_FETCHING),t(j(o.userId,f))))},[p,n,i]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(f==null||f!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(U(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(i(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(_(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(z(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&u.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S===!1?C.jsx(W,{children:C.jsx(J,{})}):C.jsx(w,{to:"/",replace:!0})}export{pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-oKBQUmhq.js";import{z as n}from"./index-CYj5jhrI.js";import{g as d}from"./QBOConnectionScreen-CAQUllDp.js";import"./sentry-p9ArnUH9.js";import{g as p,N as a}from"./core-rmRh_ZE8.js";import"./zeni-epic-state-DH4sFgeZ.js";import"./recharts-BG7SNYPF.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./empty-BR41JKH4.js";import"./pdf-lib-B5Yv6f0X.js";import"./index-BcKPNqyh.js";import"./url-B-b7cLPz.js";import"./index-CTpsdld-.js";import"./decodeURIComponentSafe-C5DyNl7Z.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]="e53e9b9f-4e1e-4d41-afae-a46e42efc4b3",e._sentryDebugIdIdentifier="sentry-dbid-e53e9b9f-4e1e-4d41-afae-a46e42efc4b3")}catch{}})();const U=()=>{const e=p(),{code:t,realmId:o,state:r}=d(e.search),s=n.getSignedInUser()?.userId??"";if(f(t,o,r,s)===!0){const m=`../../${r}/onboarding?code=${t}&realmId=${o}&state=auth_flow`;return i.jsx(a,{to:m})}return i.jsx(a,{to:"../../"})},f=(e,t,o,r)=>e!=""&&t!=""&&o!=""&&r!=null&&r!="";export{U as default,f as hasValidParams};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-oKBQUmhq.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-rmRh_ZE8.js";import{Nq as k,Nx as _,fE as W,fD as J,fC as K,iD as M,Ky as Y,qf as L,eP as D,MY as V,iB as T,Nr as v,NA as F,iz as G,iW as N}from"./zeni-epic-state-DH4sFgeZ.js";import{bu as Q,J as j,v as R,z as U,h as z,n as p,T as S,s as O,bv as X,o as Z,bw as ee,q as te}from"./index-CYj5jhrI.js";import{n as q}from"./mui-DRkb5v8u.js";import"./sentry-p9ArnUH9.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]="62408aa8-09ae-4f22-9036-82e0f1468fe2",e._sentryDebugIdIdentifier="sentry-dbid-62408aa8-09ae-4f22-9036-82e0f1468fe2")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(K(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(Q);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=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
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(N(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),i=s.poppedPathname??P();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(F({data:i}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??P(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(X);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=j(),{vendorId:s,billId:i}=B(),d=e??s,{useFeatureGate:r}=R(),c=U.getSignedInUser(),b=h(u=>D(u)),g=z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return E(e,"ach",t,n)}function Se(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=q.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ie=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:i}=t,{tenantEmailDomain:d}=i;return{onFetchBankName:r=>{e(N(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:c}=r;e(F({data:c}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),c=r.poppedPathname??$();a(c,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),c=r.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=j(),{vendorId:s,billId:i}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:c}=R(),b=z(),g=h(u=>D(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-oKBQUmhq.js";import{J as f,x as l,h as c}from"./index-CYj5jhrI.js";import{D as p}from"./mui-DRkb5v8u.js";import"./sentry-p9ArnUH9.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]="6914df4e-18ee-4d16-860e-ba01e5fdbcff",e._sentryDebugIdIdentifier="sentry-dbid-6914df4e-18ee-4d16-860e-ba01e5fdbcff")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as c}from"./sentry-p9ArnUH9.js";import{h as A,u as B,g as q,i as F,j as d,N as L,n as K,o as N,p as _}from"./core-rmRh_ZE8.js";import{LF as z,eP as O,L2 as R,kG as H,HE as k,LK as M,Kx as W,jG as Y,HF as S,L7 as $,L8 as V,Kz as J,Ky as Q}from"./zeni-epic-state-DH4sFgeZ.js";import{aR as U,c as X,n as Z,q as tt}from"./index-CYj5jhrI.js";import"./mui-DRkb5v8u.js";import{d as b}from"./decodeURIComponentSafe-C5DyNl7Z.js";import{w as et}from"./withTransactionSidePanel-DYzLuoli.js";import{f as at,c as nt}from"./routePaths-CJs7QSKh.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./useAskAiCfoHostNavButtonProps-CyyAGXJ-.js";import"./TransactionDetailScreen-Ciduelax.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]="f0b10702-7fc9-48af-9bf8-5ce8bc477a57",a._sentryDebugIdIdentifier="sentry-dbid-f0b10702-7fc9-48af-9bf8-5ce8bc477a57")}catch{}})();const ot=K(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:X,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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=q(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=F(),r=b(x??""),f=b(j??""),p=rt(r,f),w=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=d(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=d(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=d(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));c.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(H(i)))},[m,p,i]);const E=d(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return c.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:G,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(L,{to:I(w.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};
|