@zeniai/web-app-ui 5.1.13-dev → 5.1.14-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-D6k3D3bi.js +1 -0
- package/dist/assets/{AddressScreen-DV_3Y5Dd.js → AddressScreen-CQwbqZZO.js} +1 -1
- package/dist/assets/{AiCfoScreen-DCIpTDLP.js → AiCfoScreen-YbbtKYq2.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes--jcW2FLc.js → BillPayApprovalRoutes-DnqxL1Pm.js} +1 -1
- package/dist/assets/{BillPayRoutes-BTkfIcjr.js → BillPayRoutes-BoVmu9dV.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BIP8wMM3.js → BusinessVerificationPageScreen-fuG3Lcvn.js} +1 -1
- package/dist/assets/ChargeCardRoutes-CYl6BatQ.js +71 -0
- package/dist/assets/{CompanyPassportScreen-B0NKP79f.js → CompanyPassportScreen-UQxOttfx.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-PbL1UVqW.js → ConnectionAuthScreen-BfEcNkFe.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-9zjDrwVC.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BL0b6UDv.js → CustomerOnboardingRoutes-j2nqZ4nN.js} +1 -1
- package/dist/assets/{DashboardRoutes-Bk3-k8aA.js → DashboardRoutes-CET83H5d.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DFkDTU6K.js → DefaultTenantHome-CUAONDmN.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DcF3JBva.js → DomesticWireDetailScreen-Ca6Qf-59.js} +1 -1
- package/dist/assets/{DrawerScreen-CAppKc33.js → DrawerScreen-Ow_jLMvM.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-8to1KFrP.js → EntityDetailRoutes-V54UMsCV.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DeHhHdWL.js → ExpenseAutomationRoutes-7e4pUHwB.js} +3 -3
- package/dist/assets/{FeaturePreviewScreen-CVjTHQhr.js → FeaturePreviewScreen-BDxXA6T-.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-c7cP9QeX.js → HubSpotOAuthCallbackScreen-CNkgDnl2.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DwiC1JFw.js → MagicLinkRoutes-DvyUmAhH.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Dh_yynFR.js → MagicLinkSignInScreen-D20XYpha.js} +1 -1
- package/dist/assets/{MobileAppDrawer-JTau2gld.js → MobileAppDrawer-Bc7CKudX.js} +1 -1
- package/dist/assets/NotFoundScreen-GI1oL7ia.js +1 -0
- package/dist/assets/{NotificationRoutes-_k0Aq1Fs.js → NotificationRoutes-sIw0FPmg.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CY4uNiVL.js → OAuthConsentScreen-DBBt9RS0.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CpEu_HR9.js → PandLWithForecastRoutes-CBMfBvBb.js} +1 -1
- package/dist/assets/{PeopleRoutes-D7HYauVQ.js → PeopleRoutes-CKn8w_T_.js} +1 -1
- package/dist/assets/PerformanceRoutes-CsVax378.js +1 -0
- package/dist/assets/{Preview-ClpnAHT1.js → Preview-DV7jcNJq.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DkwRHnzC.js → QBOConnectionScreen-BYQW6Fbt.js} +1 -1
- package/dist/assets/{ReferralListScreen-BH-Gp8hT.js → ReferralListScreen-CJTl6Lt1.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BWXI6Sq3.js → ReimbursementApprovalRoutes-Bg156JK7.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Bo4KnnNL.js → ReimbursementApprovalRuleDetailScreen-grJQ1C7C.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Bh1fIujo.js → ReimbursementRoutes-DogJUJY0.js} +1 -1
- package/dist/assets/{ReportsRoutes-Dn3ZLb7S.js → ReportsRoutes-D3gOMB1L.js} +1 -1
- package/dist/assets/RewardsRoutes-DAl2OPwN.js +1 -0
- package/dist/assets/{ScreenRoutes-DI_Y6zjP.js → ScreenRoutes-0OjA87-e.js} +2 -2
- package/dist/assets/{SettingsRoutes-cLe5LZ2H.js → SettingsRoutes-BLqlsIUo.js} +1 -1
- package/dist/assets/{SetupPagesScreen-wxhfN3Z8.js → SetupPagesScreen-BEkDGab7.js} +5 -5
- package/dist/assets/{SignInScreen-Dizp0xaJ.js → SignInScreen-C81XlrtI.js} +1 -1
- package/dist/assets/{SignOutScreen-B7TyW1JW.js → SignOutScreen-TMYVNPPz.js} +1 -1
- package/dist/assets/TaskListScreen-Cp8dPOtz.js +9 -0
- package/dist/assets/{TaskRoutes-C-m0qJMN.js → TaskRoutes-CLpKpONO.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-C0jV8U26.js → TransactionDetailRoutes-CGf6s8zp.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-edCe6TAq.js → TransactionDetailScreen-CdLgHJKN.js} +1 -1
- package/dist/assets/{TransactionListRoutes-C9KgxSvA.js → TransactionListRoutes-n3uV_ll8.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CtrqvH2f.js → TreasuryRoutes-BEgovLNA.js} +1 -1
- package/dist/assets/{VendorsRoutes-Bmiim9sy.js → VendorsRoutes-DsKNaaC6.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-wMbV2aWQ.js → WiseConfirmationScreen-Hy3U9Jqn.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-45Uq5BHn.js → ZeniAccountRoutes-COD09Wd8.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-dmAnBRff.js → ZeniAccountStatementScreen-CQyapLZT.js} +1 -1
- package/dist/assets/{accountMappingHelper-BHoN3wIo.js → accountMappingHelper-olmW29yz.js} +1 -1
- package/dist/assets/{analytics-CcPtShGs.js → analytics-CaY7rw-O.js} +1 -1
- package/dist/assets/{analyticsHelper-BP1tYnOZ.js → analyticsHelper-Bcz25dEb.js} +1 -1
- package/dist/assets/{core-C75ogUO0.js → core-CZ9_x3uq.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DQFLVwZI.js → decodeURIComponentSafe-COFNvK3Q.js} +1 -1
- package/dist/assets/{dnd-DG0pRIc_.js → dnd-Zw_s-D7Q.js} +1 -1
- package/dist/assets/{empty-D7ifHjqQ.js → empty-7cyPspc8.js} +1 -1
- package/dist/assets/{empty-D2ItSKax.js → empty-9FZm-BqI.js} +1 -1
- package/dist/assets/{emptyVideoElement-B5gglY5n.js → emptyVideoElement-Btt4krqI.js} +1 -1
- package/dist/assets/{epic-DObSEDwz.js → epic-DPPpA4p6.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BmcbxAro.js → getLocaleForTenant-CrEWUw4L.js} +1 -1
- package/dist/assets/{index-CKhAKU0q.js → index-BlTI1Mt8.js} +1 -1
- package/dist/assets/{index-BMDwKfYX.js → index-CL3xKt_a.js} +1 -1
- package/dist/assets/{index-Bym7ptuo.js → index-CgsbeRts.js} +168 -168
- package/dist/assets/{index-C44DvqIE.js → index-CuxNhIGG.js} +1 -1
- package/dist/assets/{index-CR1BQVe9.js → index-DGuD8Ns6.js} +1 -1
- package/dist/assets/{index-BvOiqfCI.js → index-DK4X4Vk8.js} +2 -2
- package/dist/assets/{index-DXbmjv79.js → index-Dddel4wm.js} +1 -1
- package/dist/assets/{index-DVeiidBt.js → index-G8xNq7rD.js} +1 -1
- package/dist/assets/{lexical-CTPa-QlE.js → lexical-DW7Zgdoo.js} +1 -1
- package/dist/assets/{liveblocks-DuKyMpLV.js → liveblocks-CA2qpkTt.js} +1 -1
- package/dist/assets/{lottie-Bo62fehS.js → lottie-DW7v-RpQ.js} +1 -1
- package/dist/assets/{mui-B2yeqyWI.js → mui-_CQ1MGrl.js} +1 -1
- package/dist/assets/{pathToGoBack-DYpgrcVb.js → pathToGoBack-DbVxA-Rx.js} +1 -1
- package/dist/assets/{pdf-Dtw1D9Kk.js → pdf-BRE_7-P-.js} +4 -4
- package/dist/assets/{pdf-lib-D0jHZCU0.js → pdf-lib-8meLjW9k.js} +1 -1
- package/dist/assets/{plaid-CcJBdEKU.js → plaid-bOhNZMPB.js} +1 -1
- package/dist/assets/{pusher-Z7AHhnA8.js → pusher-D5RDWDl8.js} +1 -1
- package/dist/assets/{react-BA8wVqyP.js → react-BH9weH58.js} +1 -1
- package/dist/assets/{react-CztHJcoC.js → react-BkZq36aw.js} +1 -1
- package/dist/assets/{react-CFD0b_tj.js → react-CFWgn4__.js} +1 -1
- package/dist/assets/{react-B4Ecs7tk.js → react-DnPEHWM7.js} +1 -1
- package/dist/assets/{react-CHlpM8wD.js → react-E4pIjTga.js} +1 -1
- package/dist/assets/{react-Cs5E-_WR.js → react-lbjp65Wj.js} +1 -1
- package/dist/assets/{recharts-Dl2dfnxR.js → recharts-DG48H-3-.js} +1 -1
- package/dist/assets/{routePaths-JaK4Z9pA.js → routePaths-Mn-6vq-t.js} +1 -1
- package/dist/assets/{sentry-BQi4rXy4.js → sentry-C8Zmy8eq.js} +1 -1
- package/dist/assets/{url-DjEXgApI.js → url-ByuQXOc6.js} +1 -1
- package/dist/assets/{url-DjAMINLQ.js → url-DZj7kXcI.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DsGQtVKH.js → useAiCfoDashboardSuggestedQuestionsChips-Gq0LNWKr.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BAHB5Jbs.js → useAskAiCfoHostNavButtonProps-DdIVmTUh.js} +1 -1
- package/dist/assets/{useDeviceId-CYUqfkz1.js → useDeviceId-DA16gBd2.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-dWot1qf-.js → useInitialThreadRequest-BYo-vTVR.js} +1 -1
- package/dist/assets/{utils-f-RGxaD7.js → utils-CmjIXJxz.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CdFMp5ya.js → withTransactionSidePanel-CeImFm_a.js} +1 -1
- package/dist/assets/{zeni-epic-state-zpzwT5a-.js → zeni-epic-state-CeRetUx9.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +2 -1
- package/dist/assets/AddressRoutes-Cwp-lkfX.js +0 -1
- package/dist/assets/ChargeCardRoutes-Bdv6G4pt.js +0 -71
- package/dist/assets/CustomerOnboardingAuthScreen-Dgl_tiqQ.js +0 -1
- package/dist/assets/NotFoundScreen-wLs1xbOk.js +0 -1
- package/dist/assets/PerformanceRoutes-m-6V-xwr.js +0 -1
- package/dist/assets/RewardsRoutes-CVa89vUN.js +0 -1
- package/dist/assets/TaskListScreen-BZEaHlUV.js +0 -9
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-CgsbeRts.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-C8Zmy8eq.js"><link rel="modulepreload" crossorigin href="/assets/core-CZ9_x3uq.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CeRetUx9.js"><link rel="modulepreload" crossorigin href="/assets/mui-_CQ1MGrl.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CaY7rw-O.js"><link rel="modulepreload" crossorigin href="/assets/utils-CmjIXJxz.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.14-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -160,6 +160,7 @@
|
|
|
160
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",
|
|
161
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",
|
|
162
162
|
"test": "pnpm vitest run",
|
|
163
|
+
"test:pusher": "pnpm vitest run src/screens/pusher/tests src/screens/chargeCard/tests src/screens/chargeCard/constants/tests",
|
|
163
164
|
"version": "pnpm format && git add -A src",
|
|
164
165
|
"postversion": "git push && git push --tags",
|
|
165
166
|
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DuKyMpLV.js";import{A as d}from"./AddressScreen-DV_3Y5Dd.js";import i from"./NotFoundScreen-wLs1xbOk.js";import"./sentry-BQi4rXy4.js";import{o as s,p as r}from"./core-C75ogUO0.js";import"./zeni-epic-state-zpzwT5a-.js";import"./recharts-Dl2dfnxR.js";import"./index-Bym7ptuo.js";import"./mui-B2yeqyWI.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.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,71 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DuKyMpLV.js";import{h as le,i as ca,u as ue,j as y,g as ge,n as pe,N as ga,s as ut,o as qt,p as ne}from"./core-C75ogUO0.js";import{eP as ce,bs as Ue,Pe as ka,eY as be,eZ as ye,e_ as Se,fT as $e,cs as ze,Pf as Ye,Pg as Ma,tv as ba,jO as ya,Ph as Sa,gT as oa,z$ as Je,A1 as Ga,A2 as $a,jE as mt,Pi as Ze,zP as Ct,Pj as Qt,Pk as Xt,zS as Da,Pl as Jt,NE as _a,rH as pt,zY as za,h2 as en,Pm as ht,Pn as Ke,bq as an,Po as tn,fE as Pa,fD as wa,Aw as nn,fC as Ta,Nk as rn,Pp as ft,cl as gt,cM as sn,ND as da,B6 as on,Pq as tt,AI as Fa,Pr as bt,B7 as cn,O3 as dn,B8 as ln,C2 as un,sR as mn,BY as Cn,Ah as yt,Aa as pn,Ps as hn,fV as fn,Aq as St,Au as It,fU as gn,Pt as bn,AU as At,Pu as yn,Pv as Sn,Pw as In,As as Et,Ad as kt,zV as Dt,Am as _t,Ak as Pt,Ao as An,A0 as nt,Px as wt,Py as va,AF as Ia,Kj as Tt,cN as Ya,Pz as En,PA as kn,PB as Dn,PC as _n,AC as Va,A$ as Pn,AX as wn,Ay as Tn,AZ as Fn,AP as vn,AR as xn,PD as Ft,B5 as vt,HI as Bn,PE as Ln,PF as Rn,PG as Un,PH as xt,PI as On,Bs as jn,AH as Bt,AB as ia,AG as Vn,PJ as Hn,PK as Nn,zM as Mn,PL as Lt,PM as Rt,PN as Gn,zO as $n,zN as rt,PO as zn,PP as Yn,PQ as Zn,Kf as Kn,PR as Za,PS as Wn,wn as Ut,km as qn,gU as Qn,Bx as Xn,PT as Ot,PU as Jn,By as er,PV as ar,de as tr,tp as nr,Bn as rr,Bh as Re,bt as sr,bF as or,cx as ir,bG as cr,Js as dr}from"./zeni-epic-state-zpzwT5a-.js";import{z as J,k as je,v as se,I as Y,B as la,c2 as xa,cd as lr,p as ve,ce as ur,cf as mr,J as ua,aN as Fe,n as fe,bm as Ka,cg as Cr,s as ma,i as Ba,h as Wa,c as Q,D as qa,ch as pr,_ as jt,aq as Qa,by as Qe,ci as Ha,cj as hr,K as Xa,a7 as fr,ck as gr,at as Vt,a2 as Na,Y as Ht,e as Nt,cl as br,cm as yr,cn as Sr,co as Ir,cp as Ar,cq as Er,o as Aa,cr as kr,cs as Dr,ct as Ua,O as _r,cu as Pr,cv as wr,cw as Tr,cx as Fr,cy as vr,a9 as xr}from"./index-Bym7ptuo.js";import{n as _e,D as Mt,S as Br}from"./mui-B2yeqyWI.js";import{a as c}from"./sentry-BQi4rXy4.js";import{g as Ce,a as Ca,b as Gt,c as Ie,d as Ae,e as Oe,f as Ve,A as Lr,h as Ja,P as Rr,i as et,s as Xe,j as $t,k as Me,l as zt,m as Ur,n as Yt,p as Or,S as st}from"./SetupPagesScreen-wxhfN3Z8.js";import{u as Zt}from"./useInitialThreadRequest-dWot1qf-.js";import La from"./NotFoundScreen-wLs1xbOk.js";import{M as Ge}from"./MobileAppDrawer-JTau2gld.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-BAHB5Jbs.js";import{v as ot}from"./utils-f-RGxaD7.js";import{t as jr}from"./AddressScreen-DV_3Y5Dd.js";import"./recharts-Dl2dfnxR.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./analyticsHelper-BP1tYnOZ.js";import"./routePaths-JaK4Z9pA.js";import"./BusinessVerificationPageScreen-BIP8wMM3.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]="0f93e873-3357-4bc5-b843-7f1efa95473f",e._sentryDebugIdIdentifier="sentry-dbid-0f93e873-3357-4bc5-b843-7f1efa95473f")}catch{}})();function Vr(){const e=le(),{cardId:t}=ca(),a=ue(),r=J.getSignedInUser(),n=y(X=>ce(X)),C=je(),m=Ue(C?.loggedInUserRoleMap),{useFeatureGate:g}=se();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=y(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const E=n.userRole.includes("charge_card_user"),{isFeatureEnabled:S}=g(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:O}=g(Y.isDebitCardFeatureEnabled),v=be(n),D=ye(n),p=Se(O,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,b=Ie({isDebitCardFeatureEnabled:O,isBankingOnlyTenant:p}),l=Ae({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:S,isBookKeepingTenant:D,isDebitCardProductVisible:b,chargeCardsCreditAccountLimit:u}),_=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,F=y(X=>$e(X,n.companyId)),R=ze(F.controllers),{creditAccount:B,creditAccountRepayment:T}=y(X=>Ye(X)),H=y(X=>X.classListState.fetchState),d=!E&&l&&f,h=y(X=>Ma(X,t,d,l)),[P,w]=c.useState(!1),U=h.chargeCard,j=U?.cardCreatedByUser?.userId,$=y(X=>j!=null?ba(X.userRoleState,j):void 0),N=$?.accountingClassIDs[0],V=y(X=>N!=null?ya(X.classState,{classId:N,reportId:"class_list"}):void 0),A=U?.cardHolderUser?.userId,L=y(X=>A!=null?ba(X.userRoleState,A):void 0),W=L?.accountingClassIDs[0],k=y(X=>W!=null?ya(X.classState,{classId:W,reportId:"class_list"}):void 0),Z=U?.type.code==="business_physical_credit_card"||U?.type.code==="business_physical_debit_card",q=U?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&Z&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,Z,q]),c.useEffect(()=>{P||h.fetchState==="Completed"||h.fetchState==="In-Progress"||t==null||(w(!0),a(Je(t,d,!1)))},[P,h,t,a]),c.useEffect(()=>{if(h.fetchState==="Completed"&&(Z===!1||Z&&U?.status?.code!=="active"||U?.cardHolderUserId!==r.userId||i===!1&&I===!1||U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card")){const X=Ce(n.tenantEmailDomain,t,r,U,i);e(X)}},[h.fetchState,i,Z]),c.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&l&&f&&m&&a(Ga()),T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&l&&f&&m&&a($a()),H!=="Completed"&&H!=="In-Progress"&&a(mt())},[B.fetchState,T.fetchState,a,l,f,m,H]);const z=()=>{if(r!=null&&t!=null){a(Sa());const X=Ce(n.tenantEmailDomain,t,r);e(X)}},x=U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card",oe=Oe(l,b,_,f),ee=Ca(l,f,m,B,T),te=Gt(x,h);return h.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:i}),s.jsx(lr,{onGotItClick:z,isDebitCard:U?.type.code==="business_physical_debit_card",controllerEmails:R,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:b,isDebitCardSetupEnabled:_,isChargeCardSetupEnabled:f,productInformation:oe,creditAccountInformation:ee,debitAccountInformation:te,chargeCardDetailView:h,creditAccount:B,classListFetchState:H,creditAccountRepayment:T,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:L?.userRoles,cardHolderDepartmentName:k?.className})]})}const Hr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Qt({uiState:{sortKey:t,sortOrder:a}}))}}})(mr);function Nr(){const e=le(),t=ue(),a=ge(),r=J.getSignedInUser(),n=y(S=>ce(S)),{useFeatureGate:C}=se(),{isFeatureEnabled:m}=C(Y.isCardsCommentingEnabled),[g,I]=c.useState(!1),o=y(S=>Ze(S)),i=Zt(n.companyId,{clearParams:o.fetchState==="Completed"}),E=c.useCallback(()=>{const S=ve(a.state?.pathnameStackToGoBack),f=S.poppedPathname??Mr(n.tenantEmailDomain);e(f,{state:{pathnameStackToGoBack:S.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{g||o.fetchState==="Completed"||o.fetchState==="In-Progress"||(I(!0),t(Ct()))},[g,o,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return o.fetchState==="In-Progress"?s.jsx(ur,{onBackClick:E}):o.cashbackSummary.cashbackEarned.amount===0&&o.fetchState==="Completed"?s.jsx(La,{}):s.jsx(Hr,{onBackClick:E,isCardsCommentingEnabled:m,initialOpenThreadRequest:i})}const Mr=e=>`/${e}/cards`,Gr={containerWidth:new ma(100,58)},$r=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ca(),C=ge(),{useDynamicConfig:m}=se(),[g,I]=c.useState(!1),[o,i]=c.useState(!1),[E,S]=c.useState(!1),[f,O]=c.useState(!1),v=J.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const D=y(k=>ce(k));if(n==null)throw Error("Empty card id is not valid...");const{configValue:p}=m(Fe.zeniCardsConfig),u=p.max_charge_card_activation_attempts_by_card_id,b=y(k=>Xt(k,n)),l=b.chargeCard,_=y(k=>k.chargeCardConfigState.fetchState),{useFeatureGate:F}=se(),{isFeatureEnabled:R}=F(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=F(Y.isDebitCardFeatureEnabled),T=Se(B,D),H=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:T}),d=!!D.companyChargeCardInfo?.info?.isChargeCardEnabled,h=D.userRole.includes("charge_card_user"),P=be(D),w=ye(D),U=D.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,j=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:R,isBookKeepingTenant:w,isDebitCardProductVisible:H,chargeCardsCreditAccountLimit:U}),$=!h&&j&&d;c.useEffect(()=>{g===!1&&_!=="In-Progress"&&_!=="Completed"&&(a(Da()),I(!0)),o===!1&&b.fetchState==="Not-Started"&&(i(!0),a(Je(n,$,j)))},[o,b.fetchState,g,_]);const N=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(b.fetchState==="Completed"){if(E===!1&&(N===!1||N&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==v.userId)){const k=Ce(D.tenantEmailDomain,n,v,l,!0),Z=fe(C.state?.pathnameStackToGoBack,C.pathname);r(k,{state:{pathnameStackToGoBack:Z}})}else if(E&&b.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){a(Jt({chargeCardId:n}));const k=Ce(D.tenantEmailDomain,n,v,l,!0),Z=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(k,{state:{pathnameStackToGoBack:Z}})}}},[b.fetchState,l?.type.code,E,b.isRefreshingViewInBackground]);const V=J.getZeniOtpTokenForCardHolder(n),A=y(k=>pt(k.userState,v.userId)),L=()=>{l?.status?.code!=="active"&&a(za(n,!0))};c.useEffect(()=>{b.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(k=>k.statusCode==="success")===!0&&E===!1&&(setTimeout(L,3e3),S(!0))},[b.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const W=k=>{O(k)};if(_!=="Completed"||l==null)return s.jsx(la,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(A?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Zr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(zr,{cardId:n,card:l,shippingAddressId:l.shippingAddressId,phone:A.phone,signedInUser:v,isSandboxEnv:Ka(),chargeCardDetailState:b,signedInUserToken:V,navigate:r,currentTenant:D,location:C,maxChargeCardActivationAttempts:u[n]!=null?u[n]:p.default_max_charge_card_activation_attempts!=null?p.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:p.charge_card_cashback_rate_per_transaction!=null?p.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Yr,{windowSize:t,children:e}):null]})},zr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=en(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const m=ht(e,n),g=t.updateStatus,I=Ke(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(an())||i,showMenuIcon:o,shippingAddress:C,vgsVaultId:Ba.cardVaultId,twoFAView:m,activationWaitStatus:g,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:m}=t,g=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=C;return{onGetOtp:o=>{g!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(nn(r,o))},onResendOtp:o=>{g!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{g!=null&&e(Pa(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(tn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ve(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(Cr),Yr=_e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: ${e=>`${Gr.containerWidth.value(e.windowSize)}%`};
|
|
5
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
6
|
-
`,Zr=_e.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
min-height: 100%;
|
|
9
|
-
width: 100%;
|
|
10
|
-
flex: 1 1 auto;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
14
|
-
`,Ea=qa.getLocalizedStrings().dateFormat,Kr={overlayWidth:new ma(100,100,58)},Wr=pe(function(e,t){const a=t.currentTenant?.companyId;return{plaidConnectionDetails:dn(e,a,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:ln(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:a,currentTenant:r,hasZeniAccountsAdminAccess:n,isZeniAccountsUser:C,isCashbackInfoFetchStateCompleted:m,isCreditCardInfoFetchStateCompleted:g,isDebitCardInfoFetchStateCompleted:I,controllerEmails:o,paymentDetails:i,productInformation:E,cashbackInformation:S,paymentSourceInformation:f,creditAccountInformation:O,debitAccountInformation:v,paymentInitiatedDate:D,sourcePage:p}=t,{tenantEmailDomain:u}=r;return{onBackNavigation:()=>{if(m&&g&&I&&S!=null&&Q.trackCardsPayEarlyFormClick(o,E,S,"Back",i.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:i.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:i.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:i.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:i.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:D?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:D?.format(Ea.visual.MMMDCommaYYYYformat)},f,O,v),p==="cardPaymentHistory")t.closeDrawerHandler(!0),e(bt());else{const b=Ve(u);a(b)}},onUpdatePaymentAccountStatus:(b,l,_)=>{e(Cn(b,l,"bill_pay","bill_pay_detail",_))},onEstablishConnectionSuccess:()=>{e(Fa(r.companyId,!0))},onFetchLinkTokenClick:b=>{e(mn("external_account",b))},onEstablishConnectionClick:b=>{e(un(b,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:()=>{C?window.open(`/${u}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(pr),at=({isPaymentDrawerOpen:e,closeDrawerHandler:t,pageName:a,creditAccountSpentAmount:r,productInformation:n,sourcePage:C,creditAccountInformation:m,debitAccountInformation:g,cashbackInformation:I,isDebitCardInfoFetchStateCompleted:o,isCreditCardInfoFetchStateCompleted:i,isCashbackInfoFetchStateCompleted:E,paymentInitiatedDate:S,retryRepayment:f})=>{const O=le(),{useDynamicConfig:v}=se(),{configValue:D}=v(Fe.zeniAccountsConfig),p=rn(D),u=y(z=>ft(z)),{creditAccount:b}=y(z=>Ye(z)),l=y(z=>ce(z)),_=Wa(),F=ua(),R=ue(),B=J.getSignedInUser(),T=je(),[H,d]=c.useState(!1),[h,P]=c.useState(!1),{configValue:w}=v(Fe.zeniCardsConfig),U=w.credit_card_auto_pay_threshold_by_company_id?.[l.companyId]??w.default_credit_card_auto_pay_threshold??Lr,j=gt(T?.loggedInUserRoleMap),$=sn(T?.loggedInUserRoleMap),N=!!l.companyZeniAccountInfo?.info?.isZeniAccountEnabled,V=y(z=>da(z,l.companyId)),A=V.companyChargeCardInfo?.primaryFundingAccount,L=V.allFundingAccounts.find(z=>z.id===A?.accountId),W=y(z=>$e(z,l.companyId)),k=ze(W.controllers);c.useEffect(()=>{if(u.fetchState!=="Completed"&&u.fetchState!=="In-Progress"&&R(on()),u.fetchState==="Completed"&&!h){const z=l.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,x=u.transferFromAccounts.find(ee=>ee.id===z);let oe;if(C==="cardPaymentHistory"&&f){const ee=f.paymentAccountId!=null?u.transferFromAccounts.find(te=>te.id===f.paymentAccountId):void 0;oe={amount:f.amount,isAutoRepayment:l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:ee??x}}else oe={amount:{amount:b.balance.amount+b.hold.amount,currencyCode:b.balance.currencyCode,currencySymbol:b.balance.currencySymbol},isAutoRepayment:l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:x};R(tt(oe)),P(!0)}},[u.fetchState,h,C,f,u.transferFromAccounts,l.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,l.companyChargeCardInfo?.info?.isAutoPayEnabled,b.balance.amount,b.balance.currencyCode,b.balance.currencySymbol,b.hold.amount,R]);const Z={isZeniCheckingEnabled:l.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:L?.accType==="depositAccount",creditCardPaymentSourceAccountName:L?.label,creditCardPaymentSourceAccountType:L?.accType,creditCardPaymentSourceLastFourDigits:L?.accountLast4,creditCardPaymentSourceBalance:L?.accountBalance?.available?.amount??0};if(c.useEffect(()=>{V.fetchState!=="Completed"&&V.fetchState!=="In-Progress"&&R(Fa(l.companyId,!0))},[V.fetchState]),c.useEffect(()=>{u.updateStatus==="Completed"&&I!=null&&E&&i&&o&&Q.trackCardsPayEarlyPayNowClick(k,n,I,u.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:u.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:u.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:u.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:u.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:S?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:S?.format(Ea.visual.MMMDCommaYYYYformat)},Z,m,g)},[u.updateStatus,I,E,i,o,S]),c.useEffect(()=>{u.fetchState==="Completed"&&I!=null&&E&&i&&o&&!H&&e&&h&&I!=null&&(Q.trackCardsPayEarlyFormView(k,n,I,a,l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,b.balance.amount,Z,m,g),d(!0))},[u,E,i,o,H,e,h]),B==null)throw Error("Can't access invite people page without signing in...");const q=()=>{t(!0),R(bt())};return s.jsx(s.Fragment,{children:s.jsx(Mt,{onClose:()=>{q()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:Kr.overlayWidth.valuePercentage(F),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:_.colors.black,opacity:.75,cursor:"pointer"}}},children:s.jsx(qr,{onClick:z=>z.stopPropagation(),children:s.jsx(Wr,{closeDrawerHandler:t,navigate:O,paymentDetails:u,creditAccountSpentAmount:r,onTransferClick:()=>{E&&i&&o&&I!=null&&Q.trackCardsPayEarlyFormClick(k,n,I,"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},Z,m,g),R(cn({companyId:l.companyId}))},onDismissClick:q,onSaveChangesToLocalStore:z=>{R(tt(z))},currentTenant:l,hasZeniAccountsAdminAccess:j,isZeniAccountsUser:$,isZeniAccountSetupEnabled:N,productInformation:n,sourcePage:C,controllerEmails:k,autoPayThreshold:U,paymentSourceInformation:Z,creditAccountInformation:m,debitAccountInformation:g,cashbackInformation:I,isCashbackInfoFetchStateCompleted:E,isCreditCardInfoFetchStateCompleted:i,isDebitCardInfoFetchStateCompleted:o,paymentInitiatedDate:S,maxInsuredAmount:p.maxInsuredAmount})})})})},qr=_e(Br)`
|
|
15
|
-
display: flex;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
`,Wt="charge-card-transaction-update",Oa=qa.getLocalizedStrings().dateFormat,Qr=pe(function(e,t){const{includeCreditAccountInfo:a,cardId:r,signedInUserToken:n,isChargeCardFeatureEnabled:C}=t,m=J.getSignedInUser(),g=e.tenantState.currentTenantId,I={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},o=Ma(e,r,a,C),i=hn(e,r),E=fn(e);return{chargeCardDetailView:o,chargeCardsRecurringExpensesState:i,vgsVaultId:Ba.cardVaultId,transactionAttachmentsEndpointToFetch:`${Na}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${Na}/card_transaction_attachment`,authParams:I,isSnackbarOpen:E.isSnackbarOpen,cardsEndPoint:`${Vt.cardMicroServiceBaseUrl}`,signedInUserToken:o.twoFAView.token??n}},function(e,t){const{cardId:a,currentTenant:r,navigate:n,location:C,cardProviderId:m,includeCreditAccountInfo:g,setIsPaymentOpen:I,controllerEmails:o,productInformation:i,cashbackInformation:E,primaryFundingAccountDetails:S,creditAccountInformation:f,debitAccountInformation:O,isChargeCardFeatureEnabled:v}=t,{tenantEmailDomain:D}=r;return{onEventReceived:p=>{p===Wt&&(e(za(a,!0)),e(nt(a,null,null,!0)))},onReloadTransactions:()=>{e(Je(a,g,v))},onFetchChargeCardTransactionList:(p,u)=>{e(nt(a,p,u))},onUpdateScrollYOffset:p=>{},onGetOtp:p=>{m!=null&&e(Ta(p,"ChargeCardHolder",a))},onResendOtp:p=>{m!=null&&e(wa(p,"ChargeCardHolder",a))},onVerifyOtp:(p,u)=>{m!=null&&e(Pa(p,u,"ChargeCardHolder",a))},onVerifyOtpSuccess:p=>{p!=null&&J.saveZeniOtpTokenForCardHolder(p,a)},onColorCodeChange:p=>{e(An(a,p))},onLockChargeCard:(p,u)=>{e(Pt(p,a,u))},onUnlockChargeCard:p=>{e(_t(p,a))},onCloseChargeCard:p=>{e(Dt(a,p))},onFetchChargeCardsRecurringExpenses:()=>{e(kt([a]))},updateChargeCardName:(p,u)=>{e(Et(p,a,u))},updateChargeCardTransactionAttachments:(p,u)=>{u!=null&&e(In({transactionId:p,data:u}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(p,u,b,l)=>{e(Sn({chargeCardId:u,transactionId:p,fetchState:b,error:l}))},updateChargeCardTransactionReceiptsShowTick:(p,u,b)=>{e(yn({chargeCardId:u,transactionId:p,shouldShowTick:b}))},onChargeCardRevokeInviteClick:()=>{e(At(a))},updateChargeCardTransactionIsViewReceiptClicked:(p,u,b)=>{e(bn({chargeCardId:u,transactionId:p,isViewReceiptClicked:b}))},onChargeCardTransactionRowClick:(p,u)=>{const b=fe(C.state?.pathnameStackToGoBack,C.pathname);n(`../../transaction/${p}/${u}`,{state:{pathnameStackToGoBack:b}})},onBackClick:()=>{const p=ve(C.state?.pathnameStackToGoBack),u=Ve(D);n(u,{state:{pathnameStackToGoBack:p.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(gn())},onUpdateDebitCardPinAttempt:p=>{e(It(a,p)),p==="success"&&e(oa({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(p,u)=>{p?e(oa({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):u!=null&&e(oa({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:u.message}]}))},updateSpendLimit(p,u,b,l){e(St(p,u,b.code,l))},shouldOpenCreditCardPaymentDrawer(p){p&&E!=null&&Q.trackCardsPayEarlyClick(o,i,E,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:r.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:S?.accType==="depositAccount",creditCardPaymentSourceAccountName:S?.label,creditCardPaymentSourceAccountType:S?.accType,creditCardPaymentSourceLastFourDigits:S?.accountLast4,creditCardPaymentSourceBalance:S?.accountBalance?.available?.amount??0},f,O),I(p)}}})(fr(gr));function Xr(){const e=le(),t=ue(),a=ge(),{cardId:r}=ca(),[n,C]=c.useState(!1),[m,g]=c.useState(!1),{useDynamicConfig:I}=se(),o=J.getSignedInUser(),i=y(M=>ce(M)),E=y(M=>ka(M).firstViewAfterActivation),S=y(M=>M.classListState.fetchState),{configValue:f}=I(Fe.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:O}=I(Fe.zeniCardsConfig),v=O.enable_card_controls_for_company_ids,D=O.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(v)&&v.includes(i.companyId),[p,u]=c.useState(!1),[b,l]=c.useState(!1),{useFeatureGate:_}=se(),{isFeatureEnabled:F}=_(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:R}=_(Y.isDebitCardFeatureEnabled),B=Se(R,i),T=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:B}),{isFeatureEnabled:H}=_(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=_(Y.isCardsCommentingEnabled),h=ye(i),P=be(i),w=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:F,isBookKeepingTenant:h,isDebitCardProductVisible:T,chargeCardsCreditAccountLimit:w}),j=!!i.companyDebitCardInfo?.info?.isDebitCardEnabled,$=!!i.companyChargeCardInfo?.info?.isChargeCardEnabled,N=!i.userRole.includes("charge_card_user")&&U&&$;if(r==null)throw Error("Empty card id is not valid...");const V=y(M=>da(M,i.companyId)),{creditAccount:A,creditAccountRepayment:L}=y(M=>Ye(M)),W=J.getZeniOtpTokenForCardHolder(r),k=y(M=>Ma(M,r,N,U)),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:q}=Kt({mobileExploreReferrer:"Card Detail"});jt({isDataReady:k.fetchState==="Completed"});const z=y(M=>Ze(M)),x=k.chargeCard,oe=je(),ee=Ue(oe?.loggedInUserRoleMap),te=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_virtual_debit_card",X=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_physical_credit_card",re=x?.type.code==="business_virtual_debit_card"||x?.type.code==="business_virtual_credit_card",Ee=x?.type.code==="business_virtual_debit_card",xe=Ca(U,$,ee,A,L),K=Gt(te,k),he=Ja(ee,z),ke=Oe(U,T,j,$),Be=k.depositAccountLimitFetchState.fetchState!=="Completed"&&k.depositAccountLimitFetchState.fetchState!=="In-Progress",Pe=y(M=>$e(M,i.companyId)),we=ze(Pe.controllers),ae=y(M=>x?.cardCreatedByUser?.userId!=null?ba(M.userRoleState,x?.cardCreatedByUser?.userId):void 0),pa=y(M=>ae?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ae?.accountingClassIDs[0],reportId:"class_list"}):void 0),ie=y(M=>x?.cardHolderUser?.userId!=null?ba(M.userRoleState,x?.cardHolderUser?.userId):void 0),ea=y(M=>ie?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ie?.accountingClassIDs[0],reportId:"class_list"}):void 0),de=i?.userRole,Le=y(M=>Ke(M,!1,T,F).revokeCardInvite),aa=Qa(Le.saveStatus.fetchState);if(c.useEffect(()=>{if(aa==="In-Progress"&&Le.saveStatus.fetchState==="Completed"){const M=Ve(i.tenantEmailDomain);e(M)}},[aa,Le.saveStatus.fetchState,e,i.tenantEmailDomain]),c.useEffect(()=>{E&&n===!1&&re&&(C(!0),setTimeout(()=>{t(Sa()),Ee&&t(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[E,n,re,Ee]),c.useEffect(()=>{p||k.fetchState==="Completed"||k.fetchState==="In-Progress"||r==null||(u(!0),t(Je(r,N,U,!1)))},[p,k,r,t]),c.useEffect(()=>{!b&&k.fetchState==="Completed"&&k.chargeCard?.connectedAccountId!=null&&te&&Be&&ee&&(l(!0),t(yt({depositAccountId:k.chargeCard?.connectedAccountId})))},[b,k,t,Be,ee]),c.useEffect(()=>{z.fetchState!=="Completed"&&z.fetchState!=="In-Progress"&&ee&&t(Ct()),S!=="Completed"&&S!=="In-Progress"&&t(mt()),k.transactionStatistics.fetchState!=="Completed"&&k.transactionStatistics.fetchState!=="In-Progress"&&t(pn({chargeCardId:r})),V.fetchState!=="Completed"&&V.fetchState!=="In-Progress"&&t(Fa(i.companyId,!0))},[z.fetchState,t,ee,S,k.transactionStatistics.fetchState,V.fetchState]),c.useEffect(()=>{if(!(k.fetchState!=="Completed"||U&&A.fetchState!=="Completed"||x==null||k.transactionStatistics.fetchState!=="Completed"||te&&ee&&k.depositAccountLimitFetchState.fetchState!=="Completed")){const M=x.type.code.includes("physical"),me=M?x.cardActivationAttemptHistory[0]?.timestamp:x.createTime;Q.trackCardsCardDetailView(we,ke,{cardId:r,cardName:x.cardName,cardType:x.type.code.includes("credit")?"credit":"debit",cardCategory:M?"physical":"virtual",cardLimit:Qe(x.limit.amount),cardLastFourDigits:x.accountLast4,cardStatus:x.status.code,cardAssignedDate:x.createTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:x.providerCardCreateTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:me?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:x.creditLimitFrequency.name,cardSpentAmount:Qe(x.balance.amount),cardAvailableLimit:Qe(x.available.amount),cardUtilizationPercent:x.limit.amount>0?Math.round((x.limit.amount-x.available.amount)/x.limit.amount*100):0,cardUtilizationAmount:Qe(x.limit.amount-x.available.amount),totalNumberOfDeclinedTransactions:k.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:k.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:k.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:k.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:k.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:k.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:k.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:k.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:k.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:k.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:Ha(x.cardCreatedByUser,!1),cardIssuedByEmail:x.cardCreatedByUser?.email,cardIssuedByUserId:x.cardCreatedByUser?.userId,cardIssuedByRole:ae?.userRoles,cardIssuedByDepartment:pa?.className},{cardholderName:Ha(x.cardHolderUser,!1),cardholderEmail:x.cardHolderUser?.email,cardholderRole:ie?.userRoles,cardholderUserId:x.cardHolderUser?.userId,cardholderDepartment:ea?.className},xe,K)}},[k.fetchState,k.depositAccountLimitFetchState.fetchState,k.transactionStatistics.fetchState,A.fetchState,ee]),o==null)throw Error("Can't access card detail page without signing in...");const We=i.companyId??J.getSignedInUserTenant(i.tenantEmailDomain)?.companyId,ta={events:We!=null?[`private-encrypted-${We}.${Wt}`]:[],eventCallback:(M,me,Te)=>{Te.onEventReceived(M)}},na=()=>{if(r!=null&&x!=null){const{ownerName:M,cardName:me,utilisation:Te,limit:He,frequency:qe,cardColor:G}=ja(x),De=x.cardHolderUserId===o.userId;Q.trackCardsDetailPageViewed(r,M,me,Te,He,qe,G,De)}};c.useEffect(()=>{if(k.fetchState==="Completed"){const M=k.chargeCard;if(M?.status.code==="inactive"||te&&M?.isPinSet===!1||X&&E){const me=Ce(i.tenantEmailDomain,r,o,x,E);e(me)}}},[k.fetchState]);const ra=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:He,utilisation:qe,limit:G,frequency:De}=ja(x),Ne=x.cardHolderUserId===o.userId;Q.trackCardsDetailPageClicked(r,Te,He,qe,G,De,M,Ne,me)}},sa=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:He,utilisation:qe,limit:G,frequency:De}=ja(x),Ne=x.cardHolderUserId===o.userId;Q.trackCardsVerifyPopUpClick(r,Te,He,qe,G,De,M,Ne,me)}},Ra=A.balance.amount+A.hold.amount,ha=i.companyChargeCardInfo?.info?.primaryFundingAccount,fa=V.allFundingAccounts.find(M=>M.id===ha?.accountId);return r==null||k.fetchState==="Error"?s.jsx(La,{}):k.fetchState==="In-Progress"||k.fetchState==="Not-Started"||Le.saveStatus.fetchState==="In-Progress"||te&&ee&&k.depositAccountLimitFetchState.fetchState!=="Completed"?s.jsx(hr,{}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:E}),k.fetchState==="Completed"?s.jsx(Xa,{analytics:Q,onLoad:na}):null,m===!0?s.jsx(at,{closeDrawerHandler:()=>g(!1),isPaymentDrawerOpen:m,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:ke,creditAccountInformation:xe,debitAccountInformation:K,cashbackInformation:he,creditAccountSpentAmount:Ra,isDebitCardInfoFetchStateCompleted:!te||!ee||k.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!U||A.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!ee||z.fetchState==="Completed",paymentInitiatedDate:L.initiatedRepaymentDate}):null,s.jsx(Qr,{...ta,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:sa,onFireOnClickAnalytics:ra,isSandboxEnv:Ka(),signedInUser:o,location:a,navigate:e,setIsPaymentOpen:g,cardIssuedByRoles:ae?.userRoles,cardIssuedByDepartmentName:pa?.className,cardHolderRoles:ie?.userRoles,cardHolderDepartmentName:ea?.className,loggedInUserRole:de,isChargeCardFeatureEnabled:U,isDebitCardFeatureEnabled:T,isDebitCardSetupEnabled:j,isChargeCardSetupEnabled:$,isCardControlsEnabled:D,isEarlyPayEnabled:H,controllerEmails:we,chargeCardCashbackDetailState:z,productInformation:ke,creditAccountInformation:xe,debitAccountInformation:K,cashbackInformation:he,classListFetchState:S,primaryFundingAccountDetails:fa,currentTenant:i,cardProviderId:k.chargeCard?.cardProviderID,cardId:r,creditAccount:A,creditAccountRepayment:L,includeCreditAccountInfo:N,signedInUserToken:W,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:f.documentAiReceiptMaxSizeLimitBytes!=null?f.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:Z,onAskAiCfoClick:q,isCardsCommentingEnabled:d})]})}const ja=e=>{const t=`${e.cardHolderUser?.firstName.toLowerCase()} ${e.cardHolderUser?.lastName.toLowerCase()}`,a=e.cardName,r=(e.limit.amount??0)-(e.available.amount??0),n=e.limit.amount,C=e.creditLimitFrequency.name;return{ownerName:t,cardName:a,utilisation:r,cardColor:e.cardColorCode??"",frequency:C,limit:n}},Jr=_e.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,es=pe(function(e,t){const a=Ke(e,t.includeCreditAccountDebitSummaryAndCashbackInfo,t.isDebitCardFeatureEnabled&&t.isDebitCardSetupEnabled,t.isChargeCardFeatureEnabled&&t.isChargeCardSetupEnabled);return{chargeCardListView:a,rowActionView:En(e),bulkActionView:kn(e),companyLegalName:t.currentTenant.companyName,admins:t.admins,searchText:a.searchText,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigateAndClearBulkSelection:a,currentTenant:r,location:n,signedInUser:C,chargeCardListState:m,includeCreditAccountDebitSummaryAndCashbackInfo:g,isChargeCardFeatureEnabled:I,isCreditCardProductVisibleForExpressInterest:o,isChargeCardSetupEnabled:i,isDebitCardFeatureEnabled:E,isDebitCardSetupEnabled:S,isDebitCardTOSAccepted:f,isChargeCardTOSAccepted:O,controllerEmails:v,depositAccountListWithDebitCardIssued:D,primaryFundingAccountDetails:p,chargeCardSetUpViewFetchState:u,productInformation:b,cashbackInformation:l,creditAccountInformation:_,debitAccountInformation:F,updatePayNowInfoTooltip:R,isUserHasCardsAdminLevelAccess:B}=t,{tenantEmailDomain:T}=r,{cards:H}=m;return{onChargeCardRowClick:(d,h)=>{const P=zt(H,d);let w;P!=null&&((j=>{const $=j.limit.amount-j.available.amount,N=`${j.cardHolderUser?.firstName.toLowerCase()} ${j.cardHolderUser?.lastName.toLowerCase()}`,V=j.cardName,A=j.department?.className??"",L=j.limit.amount,W=j.creditLimitFrequency.name;Q.trackCardsListRowClicked(N,V,A,$,L,W,C.userId===j.cardHolderUserId)})(P),Me(E,S,D)&&Q.trackCardsCardListRowClick(v,b,"Card Row Item","row_clicked",h+1,{cardOwner:Ha(P.cardHolderUser,!1),cardName:P.cardName,cardType:P.type.code.includes("credit")?"credit":"debit",cardStatus:P.status.code,cardUtilizationAmount:Qe(P.limit.amount-P.available.amount),cardUtilizationPercent:P.limit.amount>0?Math.round((P.limit.amount-P.available.amount)/P.limit.amount*100):0,cardLimit:Qe(P.limit.amount)},l,_,F)),w=P?.status.code==="request_on_hold"&&C.userId===P.cardHolderUserId?Yt(T):Ce(T,d,C,P);const U=fe(n.state?.pathnameStackToGoBack,n.pathname);a(w,{state:{pathnameStackToGoBack:U}})},onFetchChargeCardsRecurringExpenses:d=>{e(kt(d))},onFetchDepositAccountLimit:d=>{e(yt({depositAccountId:d}))},onChargeCardResendInviteClick:d=>{e(xn(d))},onChargeCardRevokeInviteClick:d=>{e(At(d))},onLockChargeCardList:(d,h)=>{e(vn(d,h))},onUnlockChargeCardList:d=>{e(Fn(d))},onCloseChargeCardList:(d,h)=>{e(Tn(d,h))},onRevokeChargeCardList:d=>{e(wn(d))},updateChargeCardListSpendLimit(d,h,P){e(Pn(d,h,P.code))},onLockChargeCard:(d,h)=>{e(Pt(B,d,h))},onUnlockChargeCard:d=>{e(_t(B,d))},onCloseChargeCard:(d,h)=>{e(Dt(d,h))},onUpdateSpendLimit(d,h,P,w){e(St(d,h,P.code,w))},updateChargeCardName:(d,h)=>{e(Et(B,d,h))},onClickSetupIcon:()=>{Q.trackCardsListPageClicked("settings"),Me(E,S,D)&&l!=null&&Q.trackCardsSettingsClick(v,b,l,_,F);const d=Ur(T),h=fe(n.state?.pathnameStackToGoBack,n.pathname);a(d,{state:{pathnameStackToGoBack:h}})},onIssueCardClick:()=>{Q.trackCardsListPageClicked("new card"),Me(E,S,D)&&l!=null&&Q.trackCardsNewCardClick(v,b,l,"New Button","card_creation_initiated","Card List",_,F);const d=as(T),h=fe(n.state?.pathnameStackToGoBack,n.pathname);a(d,{state:{pathnameStackToGoBack:h}})},onColumnSortConfigChanged:(d,h)=>{Me(E,S,D)&&l!=null&&Q.trackCardsCardListSortClick(v,b,l,"Sort Icon","sort",d,h==="ascending"?"ASC":"DESC","Cards List",_,F),e(Va({uiState:{sortKey:d,sortOrder:h}}))},onSearchTextChanged:d=>{e(_n(d))},onReloadCards:()=>{e(Ia(g,E&&S,I&&i,!0))},onLetsGoClick:()=>{a("./onboard")},onBackClick:()=>{a("../../")},onTotalCashbackClick:()=>{Me(E,S,D)&&l!=null&&Q.trackCardsCashbackOverviewClick(v,b,l,"Cashback Overview","cashback_details_viewed",_,F),a("./cashback")},onClickStatementsIcon:()=>{Me(E,S,D)&&l!=null&&Q.trackCardsStatementsClick(v,b,l,_,F),a("./statements")},onCreateNowClick:d=>{Me(E,S,D)&&l!=null&&Q.trackCardsNewCardClick(v,b,l,"Promo Banner","card_creation_initiated","Card List",_,F),a(`./new?cardType=${d}`)},onPromoCardClick:d=>{a(d==="debit"&&E&&!f||d==="credit"&&o&&!O?`../promo?cardPromoType=${d}`:"./setup")},navigateToCreditCardPaymentPage:(d,h)=>{u==="Completed"&&r.company!=null&&l!=null&&Q.trackCardsPayEarlyClick(v,b,l,"Card List",d,h,{isZeniCheckingEnabled:r.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:p?.accType==="depositAccount",creditCardPaymentSourceAccountName:p?.label,creditCardPaymentSourceAccountType:p?.accType,creditCardPaymentSourceLastFourDigits:p?.accountLast4,creditCardPaymentSourceBalance:p?.accountBalance?.available?.amount??0},_,F);const P=ts(T);a(P)},navigateToCreditCardPaymentHistoryPage:()=>{const d=ns(T),h=fe(n.state?.pathnameStackToGoBack,n.pathname);a(d,{state:{pathnameStackToGoBack:h}})},shouldShowPayNowInfoTooltip:R,onSetRowActionCardId:d=>{e(Dn(d))},onSetBulkActionCardIds:d=>{e(wt(d))}}})(br);function it({isPaymentDrawerOpen:e}){const t=le(),a=ue(),r=ge(),n=c.useCallback((G,De)=>{a(wt([])),t(G,De)},[a,t]),[C,m]=c.useState(!1),[g,I]=c.useState(J.getPayNowInfoTooltip()??!1),o=G=>{J.savePayNowInfoTooltip(G),I(G)},[i,E]=c.useState(!1),S=J.getSignedInUser(),f=y(G=>ce(G)),[O,v]=c.useState(!1),[D,p]=c.useState(!1),{isAiCfoAccessEnabled:u,onAskAiCfoClick:b}=Kt({mobileExploreReferrer:"Cards"}),l=f.userRole.includes("charge_card_user"),_=!l,F=!!f.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:R,useDynamicConfig:B}=se(),{isFeatureEnabled:T}=R(Y.isCashbackFeatureEnabled),{isFeatureEnabled:H}=R(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:d}=R(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=R(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:P}=R(Y.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:w}=R(Y.isCardsCommentingEnabled),U=Se(d,f),j=Ie({isDebitCardFeatureEnabled:d,isBankingOnlyTenant:U}),$=be(f),N=ye(f),V=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,A=Ae({isCardsOnlyTenant:$,isChargeCardFeatureEnabled:H,isBookKeepingTenant:N,isDebitCardProductVisible:j,chargeCardsCreditAccountLimit:V}),L=$t({isCardsOnlyTenant:$,isChargeCardFeatureEnabled:H,isBookKeepingTenant:N}),{configValue:W}=B(Fe.zeniCardsConfig),k=je(),Z=Ue(k?.loggedInUserRoleMap),q=y(G=>$e(G,f.companyId)),z=ze(q.controllers),x=W.charge_card_cashback_rate_per_transaction!=null?W.charge_card_cashback_rate_per_transaction:.0175,oe=W.credit_card_pay_now_threshold_by_company_id?.[f.companyId]??W.default_credit_card_pay_now_threshold??Rr,ee=W.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(W.enable_card_controls_for_company_ids)&&W.enable_card_controls_for_company_ids.includes(f.companyId),te=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,X=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,re=!!f.companyChargeCardInfo?.info?.isChargeCardEnabled,Ee=y(G=>ft(G)),xe=Qa(Ee.updateStatus),K=y(G=>Ke(G,_,j&&F,A&&re)),he=K.cards.filter(G=>G.type.code.includes("debit")).map(G=>G.connectedAccountId),ke=[...new Set(he)],Be=y(G=>Ze(G)),Pe=y(G=>va(G,ke)),we=y(G=>da(G,f.companyId)),ae=we.companyChargeCardInfo?.primaryFundingAccount,pa=we.allFundingAccounts.find(G=>G.id===ae?.accountId),ie=K.fetchState,ea=K.creditAccount;jt({isDataReady:ie==="Completed"});const{creditAccountRepayment:de}=y(G=>Ye(G)),Le=y(G=>ka(G).firstViewAfterActivation),{areTenantIdsInSync:aa}=Ht(),We=Ja(Z,Be),ta=Ca(A,re,Z,ea,de),na=et(j,F,Z,Pe,K.debitCardSummary),ra=Oe(A,j,F,re),sa=K.creditAccount.balance.amount+K.creditAccount.hold.amount;if(c.useEffect(()=>{ie==="Completed"&&(J.getPayNowInfoTooltip()==null||sa<oe*K.creditAccount.limit.amount/100)&&o(!0)},[ie,oe,sa,K.creditAccount.limit.amount]),c.useEffect(()=>{if(e!=null&&e===!0&&de.initiatedRepayments.amount===0&&de.fetchState==="Completed"||xe==="In-Progress"&&Ee.updateStatus==="Completed")o(!1),m(!0);else if(de.initiatedRepayments.amount>0&&de.fetchState==="Completed"){m(!1),document.body.style.overflow="auto";const G=Ve(f.tenantEmailDomain);n(G)}},[e,de.initiatedRepayments.amount,de.fetchState,xe,Ee.updateStatus,n,f.tenantEmailDomain]),c.useEffect(()=>{!O&&(re||F)&&aa&&(v(!0),a(Ia(_,j&&F,A&&re,!1)))},[O,_,a,aa]),c.useEffect(()=>{Le&&i===!1&&(E(!0),setTimeout(()=>{a(Sa())},5e3))},[Le,i]),c.useEffect(()=>{ie==="Completed"&&l&&K.cards.length===1&&(K.cards[0].status.code==="inactive"&&K.cards[0].type.code==="business_physical_credit_card"?n(`./${K.cards[0].id}/activate`):K.cards[0].status.code!=="request_on_hold"&&(r.state?.message==="comingFromCardDetail"?n("../../"):n(`./${K.cards[0].id}`)))},[ie,l,r.state,n,K.cards]),c.useEffect(()=>{if(ie==="Completed"&&l){const G=K.cards.length,De=K.cards.filter(Ne=>Ne.cardHolderUserId===S?.userId).filter(Ne=>Ne.status.code==="request_on_hold");De.length>0&&G===De.length&&n("./onboard")}},[ie,K.cards,l,n,S?.userId]),c.useEffect(()=>{ie!=="Completed"||A&&de.fetchState!=="Completed"||j&&F&&Z&&Pe.fetchState!=="Completed"||Q.trackCardsCardListView(z,ra,We,ta,na)},[ie,ea,de.fetchState,Pe.fetchState,Z]),S==null)throw Error("Can't access charge card list page without signing in...");const Ra=y(G=>Tt(G.userState,G.userRoleState,G.userListViewState,"cardAdmin")),ha=Ya(k?.loggedInUserRoleMap),fa=G=>{p(G)},M=K.creditAccount.limit,me=()=>{m(!1),n("..")},Te=f.companyChargeCardInfo?.info!=null&&Xe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:A,isTOSAccepted:te,isSetupEnabled:re,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:ha}),He=f.companyDebitCardInfo?.info!=null&&Xe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:j,isTOSAccepted:X,isSetupEnabled:F,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:ha});return re||F?s.jsxs(s.Fragment,{children:[ie==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Xa,{analytics:Q,onLoad:()=>{Q.trackPageLoaded(Nt.Event.cardsListPage),(A&&!re||j&&!F)&&Q.trackCardsPromoView(z,{isCreditCardOffered:A,isDebitCardOffered:j,isDebitCardEnabled:F,isCreditCardEnabled:re},"Banner",j&&!F?"Debit Card":A&&!re?"Credit Card":"","Card List")}}),s.jsx(xa,{showConfetti:Le})]}):null,C===!0?s.jsx(at,{closeDrawerHandler:me,isPaymentDrawerOpen:C,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:sa,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isDebitCardInfoFetchStateCompleted:!(j&&F&&Z)||Pe.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!A||de.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!Z||Be.fetchState==="Completed",paymentInitiatedDate:de.initiatedRepaymentDate}):null,s.jsxs(Jr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:D,handleDrawerToggle:fa}),s.jsx(es,{isCashbackFeatureEnabled:T,isChargeCardFeatureEnabled:A,isDebitCardFeatureEnabled:j,isCreditCardProductVisibleForExpressInterest:L,updatePayNowInfoTooltip:o,showPayNowInfoTooltip:g,creditCardPayNowThreshold:oe,signedInUser:S,chargeCardListState:K,location:r,admins:Ra.users,navigateAndClearBulkSelection:n,currentTenant:f,isCardControlsEnabled:ee,companyChargeCardInfoCreditAccountLimit:f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:f.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:Z,includeCreditAccountDebitSummaryAndCashbackInfo:_,onClickMenuIcon:()=>{fa(!0)},creditLimit:M,isChargeCardSetupEnabled:re,isDebitCardSetupEnabled:F,isEarlyPayEnabled:h,isChargeCardPaymentHistoryFeatureEnabled:P,cashbackRate:x,controllerEmails:z,chargeCardCashbackDetailState:Be,depositAccountListWithDebitCardIssued:Pe,isChargeCardTOSAccepted:te,isDebitCardTOSAccepted:X,primaryFundingAccountDetails:pa,chargeCardSetUpViewFetchState:we.fetchState,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isAiCfoAccessEnabled:u,onAskAiCfoClick:b,isCardsCommentingEnabled:w})]})]}):(te||X)&&Z===!0?s.jsx(ga,{to:"../setup"}):Te||He?s.jsx(ga,{to:"../promo"}):s.jsx(la,{fetchState:ie})}const as=e=>`/${e}/cards/new`,ts=e=>`/${e}/cards/payment`,ns=e=>`/${e}/cards/payment-history`,rs=pe(function(e){const t=J.getSignedInUser(),a=ce(e),r=e.tenantState.currentTenantId,n=Ft(e),C={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},m=a?.companyName??"",g=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:n.fetchState,filters:n.filters,isZeniTenant:Bn(a),repaymentList:n.repaymentHistory,searchText:n.searchText,repaymentHistoryUsers:n.repaymentHistoryUsers,sortConfig:{sortKey:n.uiState.sortKey,sortOrder:n.uiState.sortOrder},downloadParams:{authParams:C,companyName:m,spendManagementEndPoint:`${Na}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:g}},function(e,t){const{location:a,navigate:r}=t;return{onBackClick:()=>{const n=ve(a.state?.pathnameStackToGoBack),C=n.poppedPathname??"..";r(C,{state:{pathnameStackToGoBack:n.newStack}})},onColumnSortConfigChanged:(n,C)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:n,sortOrder:C}}})},onFiltersChange:n=>{e(Rn({filters:n}))},onReloadPayments:()=>{e(vt(!0))},onSearchTextChanged:n=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:n})},updateDownloadStateHandler:n=>{e(Ln({uiState:{downloadState:n}}))}}})(yr);function ss(){const e=le(),t=ge(),a=ue(),{areTenantIdsInSync:r}=Ht(),{useFeatureGate:n}=se();if(J.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const C=y(q=>ce(q)),m=y(q=>Ft(q)),[g,I]=c.useState(!1),[o,i]=c.useState(!1),[E,S]=c.useState(!1),[f,O]=c.useState(null),v=!C.userRole.includes("charge_card_user"),D=!!C.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:p}=n(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:u}=n(Y.isDebitCardFeatureEnabled),b=Se(u,C),l=Ie({isDebitCardFeatureEnabled:u,isBankingOnlyTenant:b}),_=be(C),F=ye(C),R=C.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,B=Ae({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:p,isBookKeepingTenant:F,isDebitCardProductVisible:l,chargeCardsCreditAccountLimit:R}),T=!!C.companyChargeCardInfo?.info?.isChargeCardEnabled,H=je(),d=Ue(H?.loggedInUserRoleMap),h=y(q=>Ke(q,v,l&&D,B&&T)),P=c.useMemo(()=>{const q=h.cards.filter(z=>z.type.code.includes("debit"));return[...new Set(q.map(z=>z.connectedAccountId))]},[h.cards]),w=y(q=>Ze(q)),U=y(q=>va(q,P)),{creditAccountRepayment:j}=y(q=>Ye(q)),$=c.useMemo(()=>Ja(d,w),[d,w]),N=c.useMemo(()=>Ca(B,T,d,h.creditAccount,j),[B,T,d,h.creditAccount,j]),V=c.useMemo(()=>et(l,D,d,U,h.debitCardSummary),[l,D,d,U,h.debitCardSummary]),A=c.useMemo(()=>Oe(B,l,D,T),[B,l,D,T]),L=h.creditAccount.balance.amount+h.creditAccount.hold.amount,W=c.useMemo(()=>f!=null?m.repaymentHistory.find(q=>q.cardRepaymentId===f):void 0,[f,m.repaymentHistory]),k=c.useCallback(q=>{O(q),a(Ia(v,l&&D,B&&T,!1)),S(!0)},[a,v,l,D,B,T]),Z=c.useCallback(()=>{S(!1),O(null),document.body.style.overflow="auto"},[]);return c.useEffect(()=>{g||m.fetchState==="Completed"||m.fetchState==="In-Progress"||(I(!0),a(vt()))},[g,a,m.fetchState]),c.useEffect(()=>{!o&&(T||D)&&r&&(i(!0),a(Ia(v,!1,B&&T,!1)))},[o,T,D,r,a,v,B]),s.jsxs(s.Fragment,{children:[E?s.jsx(at,{closeDrawerHandler:Z,isPaymentDrawerOpen:E,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:L,productInformation:A,creditAccountInformation:N,debitAccountInformation:V,cashbackInformation:$,isDebitCardInfoFetchStateCompleted:!(l&&D&&d)||U.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!B||j.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!d||w.fetchState==="Completed",paymentInitiatedDate:j.initiatedRepaymentDate,retryRepayment:W}):null,s.jsx(rs,{location:t,navigate:e,accountInfoByAccountId:m.accountInfoByAccountId,onRetryPaymentClick:k})]})}const ct=_e.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100vh;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
align-items: center;
|
|
33
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
34
|
-
`,dt=qa.getLocalizedStrings().months;function os(){const e=le(),t=ue(),a=ge(),{creditAccount:r,creditAccountRepayment:n}=y(A=>Ye(A)),C=`${Vt.cardMicroServiceBaseUrl}/1.0/credit-accounts/${r.id}`,[m,g]=c.useState(!1),[I,o]=c.useState(!1),i=y(A=>Un(A)),{useFeatureGate:E}=se(),S=y(A=>ce(A)),{isFeatureEnabled:f}=E(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:O}=E(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:v}=E(Y.isCardsCommentingEnabled),D=Zt(v?S.companyId:void 0,{clearParams:v&&i.fetchState==="Completed"}),p=Se(O,S),u=Ie({isDebitCardFeatureEnabled:O,isBankingOnlyTenant:p}),b=be(S),l=ye(S),_=S.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,F=Ae({isCardsOnlyTenant:b,isChargeCardFeatureEnabled:f,isBookKeepingTenant:l,isDebitCardProductVisible:u,chargeCardsCreditAccountLimit:_}),R=!!S.companyDebitCardInfo?.info?.isDebitCardEnabled,B=!!S.companyChargeCardInfo?.info?.isChargeCardEnabled,T=y(A=>$e(A,S.companyId)),H=ze(T.controllers),d=y(A=>xt(A)),h=d.cards.filter(A=>A.type.code.includes("debit")).map(A=>A.connectedAccountId),P=[...new Set(h)],w=y(A=>va(A,P)),U=y(A=>On(A));c.useEffect(()=>{I||r.fetchState==="Completed"||r.fetchState==="In-Progress"||(g(!0),t(Ga()))},[m,t,r.fetchState]),c.useEffect(()=>{I||r.fetchState!=="Completed"||r.id==null||i.fetchState==="Completed"||i.fetchState==="In-Progress"||(o(!0),t(jn(r.id)))},[I,t,r.fetchState,r.id,i.fetchState]),c.useEffect(()=>{w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&u&&R&&t(Bt()),d.fetchState!=="Completed"&&d.fetchState!=="In-Progress"&&t(ia()),U.fetchState!=="Completed"&&U.fetchState!=="In-Progress"&&u&&R&&t(Vn()),n.fetchState!=="Completed"&&n.fetchState!=="In-Progress"&&F&&B&&t($a())},[w.fetchState,u,R,d.fetchState,U.fetchState,n.fetchState,F,B]),c.useEffect(()=>{if(i.fetchState==="Completed"&&r.fetchState==="Completed"&&n.fetchState==="Completed"&&d.fetchState==="Completed"&&(!u||!R||w.fetchState==="Completed"&&U.fetchState==="Completed")){let A="",L="";if(i.statements.length>0){const q=i.statements[i.statements.length-1].period,[z,x]=q.split("-"),oe=i.statements[0].period,[ee,te]=oe.split("-");A=`${dt[parseInt(x)-1]} ${z}`,L=`${dt[parseInt(te)-1]} ${ee}`}const W=Oe(F,u,R,B),k=Ca(F,B,!0,r,n),Z=et(u,R,!0,w,U);Q.trackCardsCreditCardStatementsView(H,W,{numberOfStatements:i.statements.length,oldestStatementMonthYear:A,latestStatementMonthYear:L},k,Z)}},[i.fetchState,r.fetchState,n.fetchState,w.fetchState,d.fetchState,U.fetchState]);const j=()=>{const A=ve(a.state?.pathnameStackToGoBack),L=A.poppedPathname??"..";e(L,{state:{pathnameStackToGoBack:A.newStack}})},$=y(A=>Ze(A)),N=J.getSignedInUser(),V={userId:N?.userId??"",sessionId:N?.zeniSessionId??"",tenantId:S.tenantId??""};if(N==null)throw Error("Can't access address page without signing in...");if(i.fetchState!=="Completed")return s.jsx(ct,{children:s.jsx(Sr,{onBackClick:j})});{const A=Oe(F,u,R,B);return s.jsx(ct,{children:s.jsx(Ir,{currentTenantCompanyName:S.companyName,statementListView:i,productInformation:A,onBackClick:j,authParams:V,controllerEmails:H,isChargeCardFeatureEnabled:F,isDebitCardFeatureEnabled:u,isDebitCardSetupEnabled:R,isChargeCardSetupEnabled:B,isCardsCommentingEnabled:v,initialOpenThreadRequest:D,chargeCardCashbackDetailState:$,creditAccount:r,creditAccountRepayment:n,depositAccountListWithDebitCardIssued:w,debitCardSummary:U,downloadEndPoint:C})})}}const is={containerWidth:new ma(100,58)},cs=({appContent:e})=>{const t=ua(),a=ue(),r=le(),n=ge(),{useDynamicConfig:C}=se(),[m,g]=c.useState(!1),[I,o]=c.useState(!1),[i,E]=c.useState(!1),[S,f]=c.useState(!1),[O,v]=c.useState(!1),[D,p]=c.useState(!1),u=J.getSignedInUser();if(u==null)throw Error("Can't access onboarding card page without signing in...");const b=y(L=>ce(L)),{configValue:l}=C(Fe.zeniCardsConfig),_=y(L=>Hn(L)),{tenantEmailDomain:F}=b,R=y(L=>L.settingsViewState.profile.fetchState),B=y(L=>L.chargeCardListState.fetchState),T=y(L=>L.settingsViewState.profile.userId),H=y(L=>L.chargeCardConfigState.fetchState);c.useEffect(()=>{m===!1&&R!=="In-Progress"&&R!=="Completed"&&(a(Nn()),g(!0)),I===!1&&H!=="In-Progress"&&H!=="Completed"&&(a(Da()),o(!0)),i===!1&&B==="Not-Started"&&(E(!0),a(ia()))},[m,i,B,I,H]),c.useEffect(()=>{R==="Completed"&&O===!1&&T!=null&&B==="Completed"&&_.cards.length>0&&(a(Mn({userId:T})),a(Lt({cardId:_.cards[_.cards.length-1].id})),v(!0))},[R,O,T,B]),c.useEffect(()=>{if(!S&&_.fetchState==="Completed"&&_.cards.length===0){const L=ve(n.state?.pathnameStackToGoBack),W=L.poppedPathname??Ve(F);r(W,{state:{pathnameStackToGoBack:L.newStack}})}},[_.fetchState,_.cards,S]);const d=y(L=>ka(L)),h=Qa(d.updateStatus.fetchState),P=d.currentDisplayedCardId,{useFeatureGate:w}=se(),{isFeatureEnabled:U}=w(Y.isChargeCardFeatureEnabled),j=!!b.companyChargeCardInfo?.info?.isChargeCardEnabled,$=!b.userRole.includes("charge_card_user")&&U&&j,N=y(L=>P!=null?Rt(L.chargeCardState,P):null),V=()=>{P!=null&&(a(Je(P,$,!0)),a(ia()),f(!0))};c.useEffect(()=>{if(S&&P!=null&&N!=null&&N.status.code!=="request_on_hold"){const L=Ce(b.tenantEmailDomain,P,u,N),W=fe(n.state?.pathnameStackToGoBack,n.pathname);a(Gn()),N?.type.code==="business_virtual_credit_card"&&a(_a()),r(L,{state:{pathnameStackToGoBack:W},replace:!0})}},[S,N?.status.code]),c.useEffect(()=>{h==="In-Progress"&&d.updateStatus.fetchState==="Completed"&&setTimeout(V,3e3)},[h,d.updateStatus.fetchState]);const A=L=>{p(L)};if(!S&&B!=="Completed"||R!=="Completed"||_.cards.length===0)return s.jsxs(lt,{children:[s.jsx(Ge,{isAppContentDrawerOpen:D,handleDrawerToggle:A}),s.jsx(Ar,{})]});if(T==null)throw Error("Can't access my userId.");return s.jsxs(lt,{children:[s.jsx(Ge,{isAppContentDrawerOpen:D,handleDrawerToggle:A}),s.jsx(ds,{chargeCardListView:_,cardUserOnboardingView:d,navigate:r,currentTenant:b,myUserId:T,location:n,chargeCardCashbackRatePerTransaction:l.charge_card_cashback_rate_per_transaction!=null?l.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{A(!0)}}),e!=null?s.jsx(ls,{windowSize:t,children:e}):null]})},ds=pe(function(e,{currentTenant:t,cardUserOnboardingView:a,chargeCardListView:r,myUserId:n}){const C=Ke(e,!1,!1,!1);let m=!1;return C.fetchState==="Completed"&&C.cards.length<=1&&(m=!0),{cards:r.cards,showMenuIcon:m,companyLegalName:t.companyName,twoFAView:a.twoFAView,cardUserOnboardingLocalData:a.cardUserOnboardingLocalData??{userId:n},isDOBDisabled:a.isDOBPresent,onboardingProgressStatus:a.onboardingProgressStatus}},function(e,t){const{navigate:a,cardUserOnboardingView:r,location:n,currentTenant:C}=t,{tenantEmailDomain:m}=C;return{updateCardUserOnboardingLocalData:g=>{e(rt({localData:g}))},onGetOtp:g=>{if(r.cardUserOnboardingLocalData!=null){const I={...r.cardUserOnboardingLocalData,phone:g};e(rt({localData:I}))}e(Ta(g,"CardUserOnboarding"))},onResendOtp:g=>{e(wa(g,"CardUserOnboarding"))},onVerifyOtp:(g,I)=>{e(Pa(g,I,"CardUserOnboarding"))},onVerifyOtpSuccess:g=>{e($n()),g!=null&&J.saveZeniOtpToken(g)},setCurrentDisplayedCardId:g=>{e(Lt({cardId:g}))},onBackClick:()=>{const g=ve(n.state?.pathnameStackToGoBack),I=g.poppedPathname??Ve(m);a(I,{state:{pathnameStackToGoBack:g.newStack}})}}})(Er),ls=_e.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: ${e=>`${is.containerWidth.value(e.windowSize)}%`};
|
|
38
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
39
|
-
`,lt=_e.div`
|
|
40
|
-
display: flex;
|
|
41
|
-
min-height: 100%;
|
|
42
|
-
width: 100%;
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
align-items: center;
|
|
46
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
47
|
-
`,us={containerWidth:new ma(100,58)},ms=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ca(),C=ge(),{useDynamicConfig:m,useFeatureGate:g}=se(),[I,o]=c.useState(!1),[i,E]=c.useState(!1),[S,f]=c.useState(!1),[O,v]=c.useState(!1),D=J.getSignedInUser();if(D==null)throw Error("Can't access onboarding card page without signing in...");const p=y(V=>ce(V));if(n==null)throw Error("Empty card id is not valid...");const{configValue:u}=m(Fe.zeniCardsConfig),b=y(V=>zn(V,n)),{isFeatureEnabled:l}=g(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:_}=g(Y.isDebitCardFeatureEnabled),F=Se(_,p),R=Ie({isDebitCardFeatureEnabled:_,isBankingOnlyTenant:F}),B=be(p),T=ye(p),H=p.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,d=Ae({isCardsOnlyTenant:B,isChargeCardFeatureEnabled:l,isBookKeepingTenant:T,isDebitCardProductVisible:R,chargeCardsCreditAccountLimit:H}),h=b.chargeCard,P=y(V=>V.chargeCardConfigState.fetchState);c.useEffect(()=>{I===!1&&P!=="In-Progress"&&P!=="Completed"&&(a(Da()),o(!0)),i===!1&&b.fetchState==="Not-Started"&&(E(!0),a(Je(n,!1,d)))},[i,b.fetchState,I,P]);const w=h?.type.code==="business_physical_debit_card"||h?.type.code==="business_virtual_debit_card";c.useEffect(()=>{if(b.fetchState==="Completed"){if(S===!1&&(w===!1||w&&h.status?.code!=="active"||w&&h.status.code==="active"&&h.isPinSet||h.cardHolderUserId!==D.userId)){const V=Ce(p.tenantEmailDomain,n,D,h,!0),A=fe(C.state?.pathnameStackToGoBack,C.pathname);r(V,{state:{pathnameStackToGoBack:A}})}else if(S&&b.isRefreshingViewInBackground===!1&&h?.isPinSet===!0){a(Yn({chargeCardId:n}));const V=Ce(p.tenantEmailDomain,n,D,h,!0),A=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(V,{state:{pathnameStackToGoBack:A}})}}},[b.fetchState,h?.type.code,S,b.isRefreshingViewInBackground]);const U=J.getZeniOtpTokenForCardHolder(n),j=y(V=>pt(V.userState,D.userId)),$=()=>{h?.isPinSet!==!0&&a(za(n,!0))};c.useEffect(()=>{b.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout($,3e3),f(!0))},[b.updateDebitCardPinAttemptFetchState.fetchState]);const N=V=>{v(V)};if(P!=="Completed"||h==null)return s.jsx(la,{fetchState:"In-Progress"});if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(hs,{children:[s.jsx(Ge,{isAppContentDrawerOpen:O,handleDrawerToggle:N}),s.jsx(Cs,{cardId:n,card:h,phone:j.phone,signedInUser:D,isSandboxEnv:Ka(),debitCardDetailState:b,signedInUserToken:U,navigate:r,currentTenant:p,location:C,chargeCardCashbackRatePerTransaction:u.charge_card_cashback_rate_per_transaction!=null?u.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{N(!0)}}),e!=null?s.jsx(ps,{windowSize:t,children:e}):null]})},Cs=pe(function(e,{debitCardDetailState:t,cardId:a}){const r=ht(e,a),n=t.updateStatus,C=Ke(e,!1,!1,!1);let m=!1;return C.fetchState==="Completed"&&C.cards.length<=1&&(m=!0),{showMenuIcon:m,vgsVaultId:Ba.cardVaultId,twoFAView:r,setPinWaitStatus:n}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,debitCardDetailState:m}=t,g=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=C;return{onGetOtp:o=>{g!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdateDebitCardPinAttempt:o=>{e(It(r,o))},onResendOtp:o=>{g!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{g!=null&&e(Pa(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onSetPinSuccess:()=>{e(Zn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("activate")===!0?Ve(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(kr),ps=_e.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
width: ${e=>`${us.containerWidth.value(e.windowSize)}%`};
|
|
51
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
52
|
-
box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
53
|
-
`,hs=_e.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
min-height: 100%;
|
|
56
|
-
width: 100%;
|
|
57
|
-
flex: 1 1 auto;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
align-items: center;
|
|
60
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
61
|
-
box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
62
|
-
`,fs={overlayWidth:new ma(Ua[12],Ua[12],Ua[9])},gs=pe(function(e,t){const a=Za(e,!1,!1),r=t.lineId,n=a.customAddress[r],C=a.customAddressStatus[r]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:t.googleAPIKey,customAddress:n,customAddressStatus:C,lineId:r}},function(e,t){const{newCustomAddressId:a,lineId:r,chargeCardTypeOption:n}=t;return{onSubmitHandler:C=>{a!=null&&e(Ut(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`));const m=jr(C);e(qn({addressType:`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`,addressToCreate:m})),e(Qn(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`))},onDismissClick:()=>{t.onDismissClick(),a!=null&&e(Wn({addressId:a,cardLineId:r,cardType:n==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(Dr),bs=({lineId:e,closeDrawerHandler:t,chargeCardTypeOption:a})=>{const r=Wa(),n=ua(),C=()=>{t()},m=y(g=>Kn(`${a==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,g))?.newAddressId;return s.jsx(Mt,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:fs.overlayWidth.valuePercentage(n),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:(g,I)=>(I==="backdropClick"||I==="escapeKeyDown")&&C(),children:s.jsx(gs,{googleAPIKey:Ba.googleMapsAPIKey,onDismissClick:C,lineId:e,chargeCardTypeOption:a,newCustomAddressId:m})})},ys=pe(function(e,t){const{isChargeCardFeatureEnabled:a,isDebitCardFeatureEnabled:r,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:C,isChargeCardSetupEnabled:m,isDebitCardSetupEnabled:g}=t,I=Za(e,a&&m,r&&g);return{issueChargeCards:I,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:C,isDebitCardFeatureEnabled:r,isChargeCardFeatureEnabled:a,isChargeCardSetupEnabled:m,isDebitCardSetupEnabled:g,cardHolderCandidates:I.userList.map(o=>o.user).filter(Boolean),allRoles:I.userList.map(o=>o.userRole),allAccountingClasses:I.allAccountingClasses,userList:I.userList}},function(e,t){return{onIssueCardClick:()=>{e(er())},onSaveChangesToLocalStore:a=>{e(Jn(a))},onDismissClick:()=>{e(Ot()),t.navigate("../")},resetCustomAddressByLineID:(a,r)=>{e(Ut(`${r==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`))},openAddAddressDrawerHandler:t.openAddAddressDrawerHandler}})(wr);function Ss(){const e=J.getSignedInUser(),t=le(),a=ue(),r=_r(),[n]=ut(),C=n.get("cardType"),{useFeatureGate:m}=se(),{isFeatureEnabled:g}=m(Y.isIssuePhysicalCardEnabled),{isFeatureEnabled:I}=m(Y.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:o}=m(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:i}=m(Y.isChargeCardFeatureEnabled),E=y($=>ce($)),S=Se(o,E),f=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:S}),O=be(E),v=ye(E),D=E.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,p=Ae({isCardsOnlyTenant:O,isChargeCardFeatureEnabled:i,isBookKeepingTenant:v,isDebitCardProductVisible:f,chargeCardsCreditAccountLimit:D}),[u,b]=c.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");c.useEffect(()=>{u||(b(!0),a(Xn(f&&_,p&&l,!1)))},[u,b,a]);const l=!!E.companyChargeCardInfo?.info?.isChargeCardEnabled,_=!!E.companyDebitCardInfo?.info?.isDebitCardEnabled,F=y($=>Za($,p&&l,f&&_)),R=F.fetchState,B=F.issueCardStatus.fetchState,T=F.lastSelfIssuedDebitCardId,H=y($=>T!=null?Rt($.chargeCardState,T):void 0),[d,h]=c.useState(null),[P,w]=c.useState(null),U=()=>{h(null)},j=($,N)=>{h($),w(N)};return c.useEffect(()=>{if(B==="Completed"){if(T!=null&&H?.type.code==="business_virtual_debit_card"){let $;$=H?.status.code==="request_on_hold"&&e.userId===H.cardHolderUserId?Yt(E.tenantEmailDomain):Ce(E.tenantEmailDomain,T,e,H),t($)}else t("../");a(Ot())}},[B,T]),R==="Completed"?s.jsxs(s.Fragment,{children:[d!==null&&P!==null?s.jsx(bs,{closeDrawerHandler:U,lineId:d,chargeCardTypeOption:P}):null,s.jsx(ys,{themeState:r,isIssuePhysicalCardEnabled:g,isIssuePhysicalDebitCardEnabled:I,isDebitCardFeatureEnabled:f,isChargeCardFeatureEnabled:p,isChargeCardSetupEnabled:l,isDebitCardSetupEnabled:_,navigate:t,fetchState:F.fetchState,openAddAddressDrawerHandler:j,defaultCardType:C==="creditCard"||C==="debitCard"?C:void 0})]}):R==="Error"?s.jsx(La,{}):s.jsx(Pr,{})}const Is=_e.div`
|
|
63
|
-
display: flex;
|
|
64
|
-
height: 100vh;
|
|
65
|
-
width: 100%;
|
|
66
|
-
flex: 1 1 auto;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
overflow: auto;
|
|
69
|
-
align-items: center;
|
|
70
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
71
|
-
`,As=pe(function(e,t){const{myPendingActivationChargeCardListState:a}=t;return{myPendingActivationChargeCardListView:a,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigate:a,currentTenant:r,location:n,signedInUser:C,myPendingActivationChargeCardListState:m}=t,{tenantEmailDomain:g}=r,{cards:I}=m;return{onChargeCardRowClick:o=>{const i=zt(I,o),E=Ce(g,o,C,i),S=fe(n.state?.pathnameStackToGoBack,n.pathname);a(E,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(o,i)=>{e(Va({uiState:{sortKey:o,sortOrder:i}}))},onReloadCards:()=>{e(ia())},onBackClick:()=>{const o=r.userRole.includes("charge_card_user");e(Va({uiState:{sortKey:o?"cardName":"owner",sortOrder:"ascending"}})),a("../")}}})(Tr);function Es(){const e=le(),t=ue(),a=ge(),r=Wa(),[n,C]=c.useState(!1),m=y(w=>ar(w)),g=y(w=>ce(w)),I=y(w=>$e(w,g.companyId)),o=ze(I.controllers),{useFeatureGate:i}=se(),{isFeatureEnabled:E}=i(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=i(Y.isDebitCardFeatureEnabled),f=Se(S,g),O=Ie({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:f}),v=!!g.companyDebitCardInfo?.info?.isDebitCardEnabled,D=!!g.companyChargeCardInfo?.info?.isChargeCardEnabled,p=je(),u=be(g),b=ye(g),l=g.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,_=Ae({isCardsOnlyTenant:u,isChargeCardFeatureEnabled:E,isBookKeepingTenant:b,isDebitCardProductVisible:O,chargeCardsCreditAccountLimit:l}),F=Ue(p?.loggedInUserRoleMap),R=y(w=>Ze(w)),{creditAccount:B,creditAccountRepayment:T}=y(w=>Ye(w)),H=y(w=>xt(w)).cards.filter(w=>w.type.code.includes("debit")).map(w=>w.connectedAccountId),d=[...new Set(H)],h=y(w=>va(w,d));c.useEffect(()=>{n||m.fetchState==="Completed"||m.fetchState==="In-Progress"||(C(!0),t(ia()),t(Da()))},[n,t,m.fetchState]),c.useEffect(()=>{if(m.fetchState==="Completed"&&m.cards.length===1&&P!=null){const w=Ce(g.tenantEmailDomain,m.cards[0].id,P,m.cards[0]);e(w,{state:{message:a.state?.message}})}},[m.fetchState,m.cards]);const P=J.getSignedInUser();if(c.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&_&&D&&F&&t(Ga()),T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&F&&t($a()),h.fetchState!=="Completed"&&h.fetchState!=="In-Progress"&&O&&v&&F&&t(Bt())},[B.fetchState,T.fetchState,t,h.fetchState,O,v,F,_,D]),P==null)throw Error("Can't access address page without signing in...");if(m.fetchState!=="Completed")return s.jsx(la,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}});{const w=Oe(_,O,v,D);return s.jsx(Is,{children:s.jsx(As,{navigate:e,currentTenant:g,signedInUser:P,productInformation:w,myPendingActivationChargeCardListState:m,isChargeCardFeatureEnabled:_,isDebitCardFeatureEnabled:O,isDebitCardSetupEnabled:v,isChargeCardSetupEnabled:D,chargeCardCashbackDetailState:R,creditAccount:B,creditAccountRepayment:T,depositAccountListWithDebitCardIssued:h,controllerEmails:o,location:a})})}}const ks=pe(function(e,t){const{companyId:a,companyLegalName:r}=t;return{chargeCardSetupView:da(e,a),admins:t.adminList,companyLegalName:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-zeni-charge-cards?embed=true"}},function(e,t){const{navigate:a,companyId:r,isCompanyBusinessVerificationAndPaymentSetUpDone:n,isDebitCardSetupEnabled:C,isChargeCardSetupEnabled:m,signedInUser:g,location:I,productInformation:o,isEarlyPayEnabled:i,controllerEmails:E,chargeCardsCreditAccountLimit:S}=t;return{onSetupButtonClick:f=>{if(g!=null&&Q.trackCardsPromoPageClicked("enable cards"),n)switch(Q.trackCardsEnableCardsClick(E,o,"Cards Promo"),f){case"credit":e(Re(r,!0,"charge_cards",i,!1));break;case"debit":e(Re(r,!0,"debit_cards",i,!1));break;case"debit_and_credit":e(S===0?Re(r,!0,"debit_cards",i,!0):Re(r,!0,"charge_cards__debit_cards",i,!1))}else switch(Q.trackCardsSetupCardsClick(E,o,"Cards Promo"),f){case"credit":e(Re(r,!1,"charge_cards",i,!1));break;case"debit":e(Re(r,!1,"debit_cards",i,!1));break;case"debit_and_credit":e(S===0?Re(r,!1,"debit_cards",i,!0):Re(r,!1,"charge_cards__debit_cards",i,!1))}},onBackClick:()=>{const f=ve(I.state?.pathnameStackToGoBack);let O=f.poppedPathname;O==null&&(O=C||m?"..":"../.."),a(O,{state:{pathnameStackToGoBack:f.newStack}})},onLetsGoClick:()=>{a("./onboard")},onSetupChargeCardSuccess:()=>{n?(e(_a()),a("../",{relative:"path"})):a("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(rr(r))}}})(vr),Ds=()=>{const e=le(),{tenantEmailDomain:t}=ca(),[a]=ut(),r=a.get("cardPromoType"),n=ue(),{useDynamicConfig:C,useFeatureGate:m}=se(),[g,I]=c.useState(!1),{isFeatureEnabled:o}=m(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:i}=m(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:E}=m(Y.isChargeCardFeatureEnabled),{configValue:S}=C(Fe.zeniCardsConfig),f=y(ae=>ce(ae)),O=y(ae=>$e(ae,f.companyId)),v=ze(O.controllers),D=S.charge_card_cashback_rate_per_transaction!=null?S.charge_card_cashback_rate_per_transaction:.0175,p=ge(),u=J.getSignedInUserTenant(t)?.companyId??f.companyId,b=y(ae=>da(ae,u)),l=b.primaryFundingAccount,_=f.companyBillPayInfo?.info,F=be(f),R=ye(f),B=Se(o,f),T=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,H=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:B}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:E,isBookKeepingTenant:R,isDebitCardProductVisible:H,chargeCardsCreditAccountLimit:T}),h=$t({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:E,isBookKeepingTenant:R}),P=H&&d===!1,w=_?.businessVerificationStatus?.code==="verified"&&(P||l?.accType==="depositAccount"||tr(l?.providerVerificationStatus?.code??"")),U=J.getSignedInUser(),j=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,$=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,N=!!f.company?.companyChargeCardInfo.isChargeCardEnabled,V=!!f.company?.companyDebitCardInfo.isDebitCardEnabled,A=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,L=ae=>{I(ae)},W=y(ae=>ae.chargeCardSetupViewState.fetchState);if(U==null)throw Error("Can't access Charge Card promo page without signing in...");const k=je(),Z=Ue(k?.loggedInUserRoleMap),q=Ya(k?.loggedInUserRoleMap),[z,x]=c.useState(!1),[oe,ee]=c.useState(!1),[te,X]=c.useState(!1);c.useEffect(()=>{z===!1&&p.state?.message==="activation"&&x(!0)},[p.state]),c.useEffect(()=>{oe||W!=="Not-Started"||u==null||(ee(!0),n(Fa(u,!0)))},[oe,W,u,n]);const re=f.companyChargeCardInfo?.info!=null&&Xe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:h,isTOSAccepted:$,isSetupEnabled:N,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:q}),Ee=f.companyDebitCardInfo?.info!=null&&Xe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:H,isTOSAccepted:A,isSetupEnabled:V,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:q}),xe=H&&Ee&&h&&T>=0&&re?"debit_and_credit":H&&Ee?"debit":"credit",K=Or(r,xe),he=b?.chargeCardTermsDetails?.fetchStatus?.fetchState,ke=c.useRef(null);c.useEffect(()=>{he==="In-Progress"?ke.current=K:he!=="Error"&&he!=="Not-Started"||(ke.current=null)},[he,K]);const Be=he!=="In-Progress"&&he!=="Completed"||ke.current==null?K:ke.current;c.useEffect(()=>{K==="credit"&&(N||h===!1&&V)||K==="debit"&&V||K==="debit_and_credit"&&V&&N?e("../"):(K==="debit_and_credit"&&$===!0&&A===!0||K==="credit"&&($===!0||h===!1&&A===!0)||K==="debit"&&A===!0)&&Z===!0&&e("../setup")},[w,N,V,K,$,A]),c.useEffect(()=>{te||(n(nr("cardAdmin")),X(!0))},[te]);const Pe=y(ae=>Tt(ae.userState,ae.userRoleState,ae.userListViewState,"cardAdmin")),we=Oe(h,H,V,N);return(re||Ee)&&W==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Xa,{analytics:Q,onLoad:()=>{if(Q.trackPageLoaded(Nt.Event.cardsPromoPage),!!h&&!N||!!H&&!V||!!h&&!!H&&!V&&!N){const ae=_s({isDebitCardSetupEnabled:V,isChargeCardSetupEnabled:N,isCreditCardProductVisibleForExpressInterest:h,isDebitCardProductVisible:H});Q.trackCardsPromoView(v,we,"Page",ae,"Promo Page")}}}),s.jsx(xa,{showConfetti:z}),s.jsx(Ge,{isAppContentDrawerOpen:g,handleDrawerToggle:L}),s.jsx(ks,{signedInUser:U,location:p,showEnableCardButton:w,isCompanyBusinessVerificationAndPaymentSetUpDone:w,isChargeCardSetupEnabled:N,isDebitCardSetupEnabled:V,companyLegalName:f.companyName,adminList:Pe.users,isCheckingEnabled:j,navigate:e,companyId:u,cardPromoType:Be,controllerEmails:v,productInformation:we,isCreditCardProductVisible:d,isDebitCardFeatureEnabled:o,isEarlyPayEnabled:i,cashbackRate:D,chargeCardsCreditAccountLimit:T,onClickMenuIcon:()=>{L(!0)}})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ge,{isAppContentDrawerOpen:g,handleDrawerToggle:L}),s.jsx(Fr,{})]})},_s=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:t,isCreditCardProductVisibleForExpressInterest:a,isDebitCardProductVisible:r})=>a&&r&&!e&&!t?"Credit & Debit Card":a&&!t?"Credit Card":r&&!e?"Debit Card":"";function Qs(){const e=ge(),t=y(W=>ce(W)),{useFeatureGate:a}=se(),{isFeatureEnabled:r}=a(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:n}=a(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=a(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:m}=a(Y.isChargeCardPaymentHistoryFeatureEnabled),g=Se(n,t),I=Ie({isDebitCardFeatureEnabled:n,isBankingOnlyTenant:g}),o=xr(t,r,n),i=!!t.company?.companyChargeCardInfo.isChargeCardTOSAccepted,E=!!t.company?.companyDebitCardInfo.isDebitCardTOSAccepted,S=!!t.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!t.company?.companyDebitCardInfo.isDebitCardEnabled,O=je(),v=Ue(O?.loggedInUserRoleMap),D=Ya(O?.loggedInUserRoleMap),{isFeatureEnabled:p}=a(Y.isCashbackFeatureEnabled),u=t.userRole.includes("charge_card_user"),b=!u,l=!u&&S,_=t?.userRole!=null&&sr(t?.userRole),F=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!_)&&or(O?.loggedInUserRoleMap),R=ir(O?.loggedInUserRoleMap),B=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!_)&&cr(O?.loggedInUserRoleMap),{isFeatureEnabled:T}=a(Y.isDepositAccountsFeatureEnabled),H=T&&!_&>(O?.loggedInUserRoleMap),d=S&&!_,h=f&&!_,P=o&&!_&&Ue(O?.loggedInUserRoleMap),w=dr(O?.loggedInUserRoleMap),U=be(t),j=ye(t),$=t.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,N=Ae({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:r,isBookKeepingTenant:j,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:$}),V=t.companyChargeCardInfo?.info!=null&&Xe({cardInfo:t.companyChargeCardInfo.info,isProductVisible:N,isTOSAccepted:i,isSetupEnabled:S,isUserHasCardsAdminLevelAccess:v,isUserHasCardsAccess:D}),A=t.companyDebitCardInfo?.info!=null&&Xe({cardInfo:t.companyDebitCardInfo.info,isProductVisible:I,isTOSAccepted:E,isSetupEnabled:f,isUserHasCardsAdminLevelAccess:v,isUserHasCardsAccess:D}),L=V||A;return s.jsxs(qt,{children:[v?s.jsx(ne,{path:"setup",element:s.jsx(st,{isBillPayAdminLevelAccess:F,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:H,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:R,productType:"charge_cards",type:"setup"})}):null,v?s.jsx(ne,{path:"verification",element:s.jsx(st,{isBillPayAdminLevelAccess:F,isUserHasOnlyBillPayAccess:R,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:H,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:w,productType:"charge_cards",type:"verification"})}):null,s.jsx(ne,{path:"promo",element:s.jsx(Ds,{})}),d||h?s.jsxs(s.Fragment,{children:[s.jsx(ne,{path:"/",element:s.jsx(it,{isPaymentDrawerOpen:!1})}),P&&C?s.jsx(ne,{path:"payment",element:s.jsx(it,{isPaymentDrawerOpen:!0})}):null,s.jsx(ne,{path:"activate",element:s.jsx(Es,{})}),s.jsx(ne,{path:"onboard",element:s.jsx(cs,{})}),v?s.jsx(ne,{path:"new",element:s.jsx(Ss,{})}):null,p&&b?s.jsx(ne,{path:"cashback",element:s.jsx(Nr,{})}):null,l?s.jsx(ne,{path:"statements",element:s.jsx(os,{})}):null,P&&m&&S?s.jsx(ne,{path:"payment-history",element:s.jsx(ss,{})}):null,s.jsx(ne,{path:":cardId/activate",element:s.jsx($r,{})}),s.jsx(ne,{path:":cardId/setPin",element:s.jsx(ms,{})}),s.jsx(ne,{path:":cardId/addToWallet",element:s.jsx(Vr,{})}),s.jsx(ne,{path:":cardId/*",element:s.jsx(Xr,{})}),s.jsx(ne,{path:"*",element:s.jsx(La,{})})]}):(i||E)&&v?s.jsx(ne,{path:"*",element:s.jsx(ga,{to:"../setup"})}):L?s.jsx(ne,{path:"*",element:s.jsx(ga,{to:"../promo",state:e.state})}):s.jsx(ne,{path:"*",element:null})]})}export{Qs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DuKyMpLV.js";import{z as n}from"./index-Bym7ptuo.js";import{g as d}from"./QBOConnectionScreen-DkwRHnzC.js";import"./sentry-BQi4rXy4.js";import{g as p,N as a}from"./core-C75ogUO0.js";import"./zeni-epic-state-zpzwT5a-.js";import"./recharts-Dl2dfnxR.js";import"./mui-B2yeqyWI.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.js";import"./empty-D2ItSKax.js";import"./pdf-lib-D0jHZCU0.js";import"./index-DVeiidBt.js";import"./url-DjEXgApI.js";import"./index-C44DvqIE.js";import"./decodeURIComponentSafe-DQFLVwZI.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 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DuKyMpLV.js";import{h as r,n}from"./core-C75ogUO0.js";import{T as i}from"./index-Bym7ptuo.js";import"./mui-B2yeqyWI.js";import"./sentry-BQi4rXy4.js";import"./zeni-epic-state-zpzwT5a-.js";import"./recharts-Dl2dfnxR.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="df9e7e33-2ed0-48bd-9985-e24b323e3cf3",o._sentryDebugIdIdentifier="sentry-dbid-df9e7e33-2ed0-48bd-9985-e24b323e3cf3")}catch{}})();const d=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(d,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DuKyMpLV.js";import _ from"./NotFoundScreen-wLs1xbOk.js";import{a as r}from"./sentry-BQi4rXy4.js";import{h as E,g as P,j as p,i as v,u as M,N as U,n as O,o as z,p as h}from"./core-C75ogUO0.js";import{eP as B,P_ as b,bo as F,bn as N,hn as V,gT as $}from"./zeni-epic-state-zpzwT5a-.js";import{O as q,z as I,_ as G,cB as H}from"./index-Bym7ptuo.js";import"./mui-B2yeqyWI.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-BAHB5Jbs.js";import{M as K}from"./MobileAppDrawer-JTau2gld.js";import"./recharts-Dl2dfnxR.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.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]="fca52ba1-c5c4-4700-844f-2c044c3cbba1",e._sentryDebugIdIdentifier="sentry-dbid-fca52ba1-c5c4-4700-844f-2c044c3cbba1")}catch{}})();const L=O(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(H),Q=()=>{const e=E(),t=P(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=v(),u=M(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{ge as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DuKyMpLV.js";import{v as x,z as w,aN as y,K as E,c as p,e as F,cL as L,I as P}from"./index-Bym7ptuo.js";import"./mui-B2yeqyWI.js";import l from"./NotFoundScreen-wLs1xbOk.js";import{a as d}from"./sentry-BQi4rXy4.js";import{u as A,j as b,h as T,g as V,n as z,o as R,p as u}from"./core-C75ogUO0.js";import{eP as U,Qy as C,Nk as Q,Qz as _,ud as Y,f4 as G,QA as K,ub as O}from"./zeni-epic-state-zpzwT5a-.js";import{R as j}from"./ReferralListScreen-BH-Gp8hT.js";import"./recharts-Dl2dfnxR.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.js";import"./useAskAiCfoHostNavButtonProps-BAHB5Jbs.js";import"./MobileAppDrawer-JTau2gld.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]="42b320dd-2ce5-4913-9c49-42d914efc7e1",e._sentryDebugIdIdentifier="sentry-dbid-42b320dd-2ce5-4913-9c49-42d914efc7e1")}catch{}})();const q=z(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=A(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>U(o)),c=T(),k=V(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),v=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:N}=g(y.zeniAccountsConfig),S=Q(N);d.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(I=>I.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(q,{navigate:c,location:k,currentTenant:r,companyName:D,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:S.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(R,{children:[a.jsx(u,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DuKyMpLV.js";import{a as g}from"./sentry-BQi4rXy4.js";import{h as U,u as _,g as z,j as b,i as O,n as M}from"./core-C75ogUO0.js";import{z as R,v as Z,I as d,_ as V,K as W,c as q,e as H,cO as J,n as f,p as X}from"./index-Bym7ptuo.js";import{eP as Y,QF as Q,Gj as y,QG as x,QB as aa,FL as S,QH as ea,FP as I,Fi as ta,Gk as B,QI as L,gT as sa,Ga as oa,Gf as na,G2 as ia,G0 as w,Gg as la,FZ as ra,QJ as ca,QK as ka,QL as ua,QM as pa,QN as m,ec as da,QO as ma,QP as Ta}from"./zeni-epic-state-zpzwT5a-.js";import{n as ga}from"./mui-B2yeqyWI.js";import{u as fa}from"./useAskAiCfoHostNavButtonProps-BAHB5Jbs.js";import{M as Ga}from"./MobileAppDrawer-JTau2gld.js";import"./recharts-Dl2dfnxR.js";import"./analytics-CcPtShGs.js";import"./plaid-CcJBdEKU.js";import"./dnd-DG0pRIc_.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bo62fehS.js";import"./lexical-CTPa-QlE.js";import"./pdf-Dtw1D9Kk.js";import"./utils-f-RGxaD7.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]="5777a98b-6001-426f-9c7b-ecca469008ea",e._sentryDebugIdIdentifier="sentry-dbid-5777a98b-6001-426f-9c7b-ecca469008ea")}catch{}})();const ha=ga.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
|
-
`,Da=M(function(e,t){const o=Q(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=aa(e),n=R.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=F(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(pa(a))},onParentTaskClick:a=>{const s=F(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(L({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ua({filters:a}))},onSearchTextChanged:a=>{e(ka({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=X(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ca({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ra(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,la(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(ia(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),G=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:G,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(na(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(oa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(sa(a))},onGroupByFilterChange:a=>{e(L({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ta(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...ea,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(J);function va(){const e=U(),t=_(),o=z(),c=R.getSignedInUser(),i=b(r=>Y(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=Z(),{isFeatureEnabled:l}=n(d.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(d.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(d.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(d.isTaskBulkResolutionEnabled),{isFeatureEnabled:G}=n(d.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=n(d.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[j,N]=g.useState(!1),h=b(r=>Q(r,l)),D=b(r=>r.taskGroupState),T=h.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:v}=fa({mobileExploreReferrer:"Task Checklist"});if(V({isDataReady:T==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{T==="Completed"&&t(x({taskGroupById:D.taskGroupById}))},[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[T==="Completed"?p.jsx(W,{analytics:q,onLoad:r=>(K=>K.trackPageLoaded(H.Event.taskListPage))(r)}):null,p.jsxs(ha,{children:[p.jsx(Ga,{isAppContentDrawerOpen:j,handleDrawerToggle:r=>{N(r)}}),p.jsx(Da,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:G,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:v})]})]})}const F=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ma(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=Ta(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{va as default};
|