@zeniai/web-app-ui 5.0.65-qa → 5.0.66-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-Z_0xwUva.js +1 -0
- package/dist/assets/AddressScreen-CA-Gsfg_.js +9 -0
- package/dist/assets/AiCfoScreen-B8tKz6im.js +11 -0
- package/dist/assets/BillPayApprovalRoutes-cZrxmRVi.js +1 -0
- package/dist/assets/{BillPayRoutes-BrOZ07Ei.js → BillPayRoutes-BSv85mj1.js} +17 -17
- package/dist/assets/{BusinessVerificationPageScreen-CQpVjRjR.js → BusinessVerificationPageScreen-b1DUtUq7.js} +2 -2
- package/dist/assets/ChargeCardRoutes-CSo3zEv0.js +71 -0
- package/dist/assets/CompanyPassportScreen-CMvD2Pw-.js +1 -0
- package/dist/assets/ConnectionAuthScreen-DHWnLfNi.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DFMRKVPC.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BVZy4r84.js → CustomerOnboardingRoutes-xYLCb5gp.js} +4 -4
- package/dist/assets/{DashboardRoutes-BvkAL8st.js → DashboardRoutes-DLxXDELv.js} +3 -3
- package/dist/assets/DefaultTenantHome-5g8KZ_Nm.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-eVqaxWwu.js +18 -0
- package/dist/assets/DrawerScreen-CZb8Zr0k.js +1 -0
- package/dist/assets/EntityDetailRoutes-Cp-nQ4Gv.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-BoCxhH8a.js → ExpenseAutomationRoutes-CK25nqkn.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-D-HbB8OC.js +1 -0
- package/dist/assets/MagicLinkRoutes-CUlFd0Ed.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Bk5PiU9H.js +12 -0
- package/dist/assets/MobileAppDrawer-DMlFiXXu.js +1 -0
- package/dist/assets/NotFoundScreen-CQ9leNp5.js +1 -0
- package/dist/assets/{NotificationRoutes-CHXW3ip6.js → NotificationRoutes-B90jTW-r.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BtQW7Crl.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-WGkhgInY.js +1 -0
- package/dist/assets/PeopleRoutes-D-KAkFFb.js +22 -0
- package/dist/assets/PerformanceRoutes-Cx0t3myq.js +1 -0
- package/dist/assets/{Preview-EpKFa1SZ.js → Preview-BHNHm504.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CmOBvomD.js → QBOConnectionScreen-p-5BgC1y.js} +1 -1
- package/dist/assets/ReferralListScreen-Bo4wGu3u.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CdN2A2XN.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-bJbzuz6k.js → ReimbursementApprovalRuleDetailScreen-wD16rnKd.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DHAEN3ZY.js → ReimbursementRoutes-0obNps4e.js} +8 -8
- package/dist/assets/ReportsRoutes-D2BVmCDE.js +1 -0
- package/dist/assets/RewardsRoutes-Bx3Xfjaz.js +1 -0
- package/dist/assets/ScreenRoutes-CKzlkFrS.js +2 -0
- package/dist/assets/{SettingsRoutes-75OP1ywb.js → SettingsRoutes-Bz-bKZSZ.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BvABA4oV.js → SetupPagesScreen-DyblnAl0.js} +5 -5
- package/dist/assets/SignInScreen-B-scNyIK.js +1 -0
- package/dist/assets/SignOutScreen-DRQi0OiJ.js +9 -0
- package/dist/assets/TaskListScreen-AF6TN3N3.js +9 -0
- package/dist/assets/TaskRoutes-DNn1AHcK.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C73ERZEQ.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DTxQe0TM.js → TransactionDetailScreen-CxhtGb5H.js} +2 -2
- package/dist/assets/TransactionListRoutes-RJF1A64K.js +1 -0
- package/dist/assets/{TreasuryRoutes-DVDGcuUq.js → TreasuryRoutes-CSVwgxJf.js} +6 -6
- package/dist/assets/{VendorsRoutes-fs1ql-9B.js → VendorsRoutes-DshL1tkX.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-12t_C7S5.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BgtpOsMK.js → ZeniAccountRoutes-CXtuIR5k.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-Dby_CD6R.js +9 -0
- package/dist/assets/{accountMappingHelper-C61p9k0R.js → accountMappingHelper-BHhQdza1.js} +1 -1
- package/dist/assets/{analytics-87aUO2A0.js → analytics-DQCQhWLc.js} +1 -1
- package/dist/assets/{analyticsHelper-CwroxLVU.js → analyticsHelper-CFqteM8q.js} +1 -1
- package/dist/assets/{core-C1D_J1Tm.js → core-j0LqCeu3.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DU65qRFr.js → decodeURIComponentSafe-DFYfbcv3.js} +1 -1
- package/dist/assets/{dnd-D2GUyFnB.js → dnd-DAo38rm8.js} +1 -1
- package/dist/assets/{empty-sYgfsPuY.js → empty-CK9odIeO.js} +1 -1
- package/dist/assets/empty-Ca3lmO0X.js +1 -0
- package/dist/assets/{emptyVideoElement-DEPvT3eg.js → emptyVideoElement-C-uPKIxs.js} +1 -1
- package/dist/assets/epic-DSNvXFJG.js +2 -0
- package/dist/assets/getLocaleForTenant-z7__8okF.js +1 -0
- package/dist/assets/{index-CIYliqOt.js → index-4NAZbGj1.js} +1 -1
- package/dist/assets/{index-CQro8vC7.js → index-71d39Q7D.js} +2 -2
- package/dist/assets/index-B2tWZgTJ.js +1 -0
- package/dist/assets/{index-DMaAvz9E.js → index-BX6ANtNh.js} +1 -1
- package/dist/assets/{index-DivBM1Ub.js → index-CW5fjsxv.js} +17310 -15834
- package/dist/assets/{index-D_etFzmU.js → index-CZgerGBH.js} +1 -1
- package/dist/assets/index-cC6roLBs.js +1 -0
- package/dist/assets/{lexical-D0EV8wLh.js → lexical-D-QBA09y.js} +1 -1
- package/dist/assets/{liveblocks-uNyEitSP.js → liveblocks-C3aHR2ug.js} +1 -1
- package/dist/assets/{lottie-D71IK4aH.js → lottie-CAFVLjo0.js} +1 -1
- package/dist/assets/{mui-Bl9HwrRv.js → mui-D78cc8iD.js} +1 -1
- package/dist/assets/{pathToGoBack-BS6hc56i.js → pathToGoBack-Dzva26FJ.js} +1 -1
- package/dist/assets/{pdf-Bp6Iehm8.js → pdf-C20YOa73.js} +3 -3
- package/dist/assets/{pdf-lib-Bs8DTePl.js → pdf-lib-bl9YSMz9.js} +1 -1
- package/dist/assets/{plaid-qfPCSwi4.js → plaid-DsDYZOgp.js} +1 -1
- package/dist/assets/{pusher-BdK3-yK7.js → pusher-l3ERSdYl.js} +1 -1
- package/dist/assets/{react-DkuuBLqG.js → react-9NHYx8CN.js} +1 -1
- package/dist/assets/{react-43KZmiL8.js → react-Cf73dofS.js} +1 -1
- package/dist/assets/{react-ChNrFDUd.js → react-CslKeU46.js} +1 -1
- package/dist/assets/{react-DSsk8Q4w.js → react-DJWA5bIH.js} +1 -1
- package/dist/assets/{react-Q_rYRpC6.js → react-YfQWR1Yb.js} +1 -1
- package/dist/assets/{react-BkOMTSid.js → react-oAtqdYpb.js} +1 -1
- package/dist/assets/{recharts-B3ReBiRu.js → recharts-B0MOj05b.js} +1 -1
- package/dist/assets/{routePaths-BLYSnXgw.js → routePaths-rtKSzfbn.js} +1 -1
- package/dist/assets/{sentry-DkoJdbiW.js → sentry-cQZrhfVh.js} +1 -1
- package/dist/assets/url-BbfnqyeH.js +1 -0
- package/dist/assets/{url-BsgtzK-J.js → url-Oh4YprMm.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-_kNwa3Tv.js +1 -0
- package/dist/assets/{useDeviceId-BDI3hZsc.js → useDeviceId-CE3ipTvl.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-qhAGi-cw.js +1 -0
- package/dist/assets/useInitialThreadRequest-CDFp11ui.js +1 -0
- package/dist/assets/{utils-Dw--aDPP.js → utils-BBuNXoTI.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CaH_VfNh.js → withTransactionSidePanel-BWfGFazD.js} +2 -2
- package/dist/assets/zeni-epic-state-DiQZjsue.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Dr1v_Sud.js +0 -1
- package/dist/assets/AddressScreen-CKtYRww-.js +0 -9
- package/dist/assets/AiCfoScreen-Cebz6UA6.js +0 -11
- package/dist/assets/BillPayApprovalRoutes-C5AoMYfc.js +0 -1
- package/dist/assets/ChargeCardRoutes-Pd2uN0ew.js +0 -71
- package/dist/assets/CompanyPassportScreen-DgkCpaOl.js +0 -1
- package/dist/assets/ConnectionAuthScreen-ik8aK8sR.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Bj2KB9KI.js +0 -1
- package/dist/assets/DefaultTenantHome-BgYjFEW-.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-B1OUbADT.js +0 -18
- package/dist/assets/DrawerScreen-Bfr6DJZF.js +0 -1
- package/dist/assets/EntityDetailRoutes-XANY_96Q.js +0 -1
- package/dist/assets/FeaturePreviewScreen-CVAJ3dJp.js +0 -1
- package/dist/assets/MagicLinkRoutes-CC0hFgvb.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BIAYZ7Gn.js +0 -12
- package/dist/assets/MobileAppDrawer-D4h5JdAm.js +0 -1
- package/dist/assets/NotFoundScreen-DtzClrNV.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-v9qf6MIV.js +0 -1
- package/dist/assets/PeopleRoutes-CA00gwvb.js +0 -22
- package/dist/assets/PerformanceRoutes-Dxl37sCI.js +0 -1
- package/dist/assets/ReferralListScreen-Cbl9-QoF.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-8QNxXWIW.js +0 -1
- package/dist/assets/ReportsRoutes-Bc3ZiSZw.js +0 -1
- package/dist/assets/RewardsRoutes-0nvz_85Q.js +0 -1
- package/dist/assets/ScreenRoutes-BsyQBGdD.js +0 -2
- package/dist/assets/SignInScreen-DZdqwtK-.js +0 -1
- package/dist/assets/SignOutScreen-3VvJNA3b.js +0 -9
- package/dist/assets/TaskListScreen-749ZfOYL.js +0 -9
- package/dist/assets/TaskRoutes-77nF0njj.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CFGf3-Do.js +0 -1
- package/dist/assets/TransactionListRoutes-BO9rH2Kv.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Dc08Ngp8.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CiOqII9w.js +0 -9
- package/dist/assets/empty-B6sVHl7p.js +0 -1
- package/dist/assets/epic-99vwOB_L.js +0 -2
- package/dist/assets/getLocaleForTenant-M6IdYirk.js +0 -1
- package/dist/assets/index-Co5VS1MD.js +0 -1
- package/dist/assets/index-D2qnbHpC.js +0 -1
- package/dist/assets/url-B8Y4m-q-.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BiomgfPI.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js +0 -1
- package/dist/assets/useInitialThreadRequest-CUi5RNDv.js +0 -1
- package/dist/assets/zeni-epic-state-B_OPwxNR.js +0 -14
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-CW5fjsxv.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-cQZrhfVh.js"><link rel="modulepreload" crossorigin href="/assets/core-j0LqCeu3.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DiQZjsue.js"><link rel="modulepreload" crossorigin href="/assets/mui-D78cc8iD.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DQCQhWLc.js"><link rel="modulepreload" crossorigin href="/assets/utils-BBuNXoTI.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.66-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@sentry/core": "^9.42.1",
|
|
28
28
|
"@sentry/react": "^9.42.1",
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
|
-
"@zeniai/client-analytics": "2.0.
|
|
31
|
-
"@zeniai/client-epic-state": "5.0.
|
|
32
|
-
"@zeniai/web-components": "4.0.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.7",
|
|
31
|
+
"@zeniai/client-epic-state": "5.0.33",
|
|
32
|
+
"@zeniai/web-components": "4.0.75",
|
|
33
33
|
"color": "3.1.3",
|
|
34
34
|
"cross-fetch": "^4.0.0",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-uNyEitSP.js";import{A as d}from"./AddressScreen-CKtYRww-.js";import i from"./NotFoundScreen-DtzClrNV.js";import"./sentry-DkoJdbiW.js";import{n as s,o as r}from"./core-C1D_J1Tm.js";import"./zeni-epic-state-B_OPwxNR.js";import"./recharts-B3ReBiRu.js";import"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-uNyEitSP.js";import{a as h}from"./sentry-DkoJdbiW.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-C1D_J1Tm.js";import{r as $,h as D,z as L,j as K,B as N,C as R,c as C,e as m,v as z,i as b,w as F}from"./index-DivBM1Ub.js";import{I$ as k,gM as U,eN as G,J0 as J,c0 as O,J1 as V,k6 as q}from"./zeni-epic-state-B_OPwxNR.js";import{n as H}from"./mui-Bl9HwrRv.js";import Q from"./NotFoundScreen-DtzClrNV.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]="4d953604-22ad-4c73-b593-fc9d2fe80b03",e._sentryDebugIdIdentifier="sentry-dbid-4d953604-22ad-4c73-b593-fc9d2fe80b03")}catch{}})();const W=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,X=M(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&J(t.roleMap),d=i||c==="user_address"||O(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=V(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=F(d?.pathnameStackToGoBack);let s=n.poppedPathname??w();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(q({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(m.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(z);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=_(),n=j(),{addressId:s,addressType:u}=E(),g=$(),I=D(),v=L.getSignedInUser(),[f,x]=h.useState(s==null),p=B(S=>s!=null?k(S,s).fetchState:"Not-Started"),A=K();if(v==null)throw Error("Can't access address page without signing in...");const P=S=>S.trackPageLoaded(s!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return h.useEffect(()=>{f||s==null||(x(!0),d(U(s,!1)))},[f,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?r.jsx(N,{fetchState:p,style:{backgroundColor:I.colors.grey5}}):s!=null&&p==="Error"?(a(`${w(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(R,{analytics:C,onLoad:P}),r.jsx(W,{windowSize:g,children:r.jsx(X,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(Q,{})}const w=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,Y as t};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-uNyEitSP.js";import{a as r}from"./sentry-DkoJdbiW.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-C1D_J1Tm.js";import{M as ce,cG as ue,z as de,r as me,cH as pe,cI as fe,cJ as he,cK as q,C as Se,c as U,R as G,cL as ge,cM as Ce,e as be,a1 as ke,cN as we,U as Ie,y as Pe,w as V,aY as Ee,cO as Te}from"./index-DivBM1Ub.js";import{fD as ye,f2 as H,eN as _e,hq as xe,Px as Ue,eM as ve,hA as Ae,hw as Oe,ft as Qe,fn as De,fg as Fe,fk as $,fo as Le,fp as Me,fq as Be,fr as Re,fs as Ne}from"./zeni-epic-state-B_OPwxNR.js";import{D as je,n as v,P as Ge,S as Ve}from"./mui-Bl9HwrRv.js";import{p as $e}from"./pathToGoBack-BS6hc56i.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="ba438b7c-a92b-4c49-999c-5f04afc3a898",s._sentryDebugIdIdentifier="sentry-dbid-ba438b7c-a92b-4c49-999c-5f04afc3a898")}catch{}})();const W="chat-response-generated",qe=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Me(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:P}=q(S,t);c!=="answer"?U.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(P,I),n.metadata.message_id??null):U.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Be(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(Ne({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Ee(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s($(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Le(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??$e(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s($(""))},togglePageView:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{f!=null&&s(Fe());const e=Pe(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(De({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,f]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=j(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=j(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:P}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),A=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,O=!!C?.aiCfoShouldSubmit,[z,E]=r.useState(null),[Y,T]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{Q.current||b==null||b===""||(E(b),T(O),Q.current=!0)},[b,O]);const J=r.useCallback(()=>{E(null),T(!1)},[]),D=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=D.get("ref")??C?.aiCfoRef,y=D.get("emailRefId")??C?.aiCfoEmailRefId,L=r.useRef(!1);r.useEffect(()=>{L.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),L.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(E(k),T(!0),a(Ue()))},[k,t,a]);const K=c.masterTOSInfo,w=K?.isMasterTOSAccepted??!1,{visitedSessions:M}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,B=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Z}=q(N,t),X=Z.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(ve({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:M.map(u=>`private-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[M]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&B!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Oe(t,e.userId))},[B,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return h.jsxs(We,{children:[h.jsx(Se,{analytics:U,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),G(n)&&A.drawerElement,h.jsx(qe,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:X,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:Y,onEmailLinkQuestionProcessed:J,onMenuClick:G(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:P,onUploadPromoClose:g}),h.jsx(je,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(He,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Qe(c.userRoleId)),f(!1)}})})})]})},He=v(Ve)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,We=v.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,ze=v(Ge)`
|
|
9
|
-
box-shadow: ${({theme:s})=>s.colors.elevation2};
|
|
10
|
-
color: ${({theme:s})=>s.colors.grey4};
|
|
11
|
-
`;export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-uNyEitSP.js";import{a as y}from"./sentry-DkoJdbiW.js";import{j as B,u as U,h as j,g as f,N as $,k as T,l as N,n as O,o as b}from"./core-C1D_J1Tm.js";import{eN as L,Mi as A,L_ as h,x8 as w,x2 as F,x6 as x,wX as z,M0 as M,w_ as W,xa as q,x9 as C}from"./zeni-epic-state-B_OPwxNR.js";import{h as P,z as k,B as _,a1 as X,by as G,ab as V,bz as H}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-bJbzuz6k.js";import K from"./NotFoundScreen-DtzClrNV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="1652140b-cd3b-4b71-94a3-d1be6dd93611",e._sentryDebugIdIdentifier="sentry-dbid-1652140b-cd3b-4b71-94a3-d1be6dd93611")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:h(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(M(!1))},onBackClick:()=>{V(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(z(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(X(G)),Y=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=f(i=>i.billPaySetupApproverViewState.fetchState),c=f(i=>L(i)),r=f(i=>A(i)),g=f(i=>h(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(x())),e("./new"))},[u,r,t]);const v={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,R,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(_,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(Q,{currentTenant:c,location:o,navigate:e,...v})},Z=T(function(e,o){const t=h(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=V(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(v=>{const i=v.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),R=v.actors.selectedNonUsers.map(S=>{const E=!!J(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(R);g.push({action:v.stepType.selectedOption,actors:m,operator:m.length>1?v.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=N(),a=k.getSignedInUser(),u=P(),s=f(r=>h(r)),d=f(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(_,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(b,{path:"/",element:l.jsx(Y,{})}),l.jsx(b,{path:"/new",element:l.jsx(D,{})}),l.jsx(b,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(b,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as lt,n as Kt,o as te}from"./core-C1D_J1Tm.js";import{eN as ie,bs as Ue,NZ as ka,eR as be,eS as ye,eT as Se,fO as ze,cq as $e,N_ as Ge,N$ as Ma,sL as ba,jy as ya,O0 as Sa,gC as oa,zd as Xe,zf as za,zg as $a,jo as ut,O1 as Ye,z1 as mt,O2 as Wt,O3 as qt,z4 as Da,O4 as Jt,Mq as _a,qX as Ct,za as Ga,gN as Qt,O5 as pt,O6 as Ze,bq as Xt,O7 as en,fz as wa,fy as Pa,zK as an,fx as Ta,M6 as tn,O8 as ht,cj as ft,cL as nn,Mp as da,Ak as rn,O9 as tt,zW as Fa,Oa as gt,Al as sn,MQ as on,Am as cn,Bg as dn,s5 as ln,Ba as un,zv as bt,zo as mn,Ob as Cn,fQ as pn,zE as yt,zI as St,fP as hn,Oc as fn,A6 as It,Od as gn,Oe as bn,Of as yn,zG as At,zr as Et,z7 as kt,zA as Dt,zy as _t,zC as Sn,ze as nt,Og as wt,Oh as va,zT as Ia,J5 as Pt,cM as Ya,Oi as In,Oj as An,Ok as En,Ol as kn,zQ as Na,Ad as Dn,A9 as _n,zM as wn,Ab as Pn,A1 as Tn,A3 as Fn,Om as Tt,Aj as Ft,GD as vn,On as xn,Oo as Ln,Op as On,Oq as vt,Or as Bn,AG as Un,zV as xt,zP as ca,zU as Rn,Os as jn,Ot as Nn,y_ as Vn,Ou as Lt,Ov as Ot,Ow as Hn,z0 as Mn,y$ as rt,Ox as zn,Oy as $n,Oz as Gn,J1 as Yn,OA as Za,OB as Zn,vB as Bt,k6 as Kn,gD as Wn,AL as qn,OC as Ut,OD as Jn,AM as Qn,OE as Xn,dc as er,sF as ar,AB as tr,Av as Be,bv as nr,bD as rr,cv as sr,bE as or,Ik as cr}from"./zeni-epic-state-B_OPwxNR.js";import{z as X,j as je,p as ce,m as Y,B as Ke,bY as xa,c7 as ir,w as ve,c8 as dr,c9 as lr,r as la,aJ as Fe,y as fe,bf as Ka,ca as ur,F as ua,i as La,h as Wa,c as J,D as qa,cb as mr,am as Ja,br as Je,cc as Va,cd as Cr,C as Qa,a1 as pr,ce as hr,ap as Rt,U as Ha,N as jt,e as Nt,cf as fr,cg as gr,ch as br,ci as yr,cj as Sr,o as Aa,ck as Ir,cl as Ar,cm as Ua,A as Er,cn as kr,co as Dr,cp as _r,cq as wr,a5 as Pr}from"./index-DivBM1Ub.js";import{n as _e,D as Vt,S as Tr}from"./mui-Bl9HwrRv.js";import{a as i}from"./sentry-DkoJdbiW.js";import{g as Ce,a as ma,b as Ht,c as Ie,d as Ae,e as Re,f as Ne,A as Fr,h as Xa,P as vr,i as et,s as Qe,j as Mt,k as Me,l as zt,m as xr,n as $t,p as Lr,S as st}from"./SetupPagesScreen-BvABA4oV.js";import Oa from"./NotFoundScreen-DtzClrNV.js";import{M as Ca}from"./MobileAppDrawer-D4h5JdAm.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{v as ot}from"./utils-Dw--aDPP.js";import{t as Or}from"./AddressScreen-CKtYRww-.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./analyticsHelper-CwroxLVU.js";import"./routePaths-BLYSnXgw.js";import"./BusinessVerificationPageScreen-CQpVjRjR.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]="84ce2159-abfe-418f-9ddb-088c9866aa12",e._sentryDebugIdIdentifier="sentry-dbid-84ce2159-abfe-418f-9ddb-088c9866aa12")}catch{}})();function Br(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),m=je(),C=Ue(m?.loggedInUserRoleMap),{useFeatureGate:p}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=p(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:U}=p(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(U,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>ze(Q,n.companyId)),j=$e(v.controllers),{creditAccount:O,creditAccountRepayment:P}=y(Q=>Ge(Q)),V=y(Q=>Q.classListState.fetchState),u=!_&&d&&f,l=y(Q=>Ma(Q,t,u,d)),[w,T]=i.useState(!1),H=l.chargeCard,B=H?.cardCreatedByUser?.userId,K=y(Q=>B!=null?ba(Q.userRoleState,B):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),N=H?.cardHolderUser?.userId,R=y(Q=>N!=null?ba(Q.userRoleState,N):void 0),W=R?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{w||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,u,!1)))},[w,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{O.fetchState!=="Completed"&&O.fetchState!=="In-Progress"&&d&&f&&C&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&C&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(ut())},[O.fetchState,P.fetchState,a,d,f,C,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Re(d,g,D,f),ae=ma(d,f,C,O,P),ne=Ht(x,l);return l.fetchState!=="Completed"?s.jsx(Ke,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(ir,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:O,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Ur=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Wt({uiState:{sortKey:t,sortOrder:a}}))}}})(lr);function Rr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[m,C]=i.useState(!1),p=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??jr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{m||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(mt()))},[m,p,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return p.fetchState==="In-Progress"?s.jsx(dr,{onBackClick:S}):p.cashbackSummary.cashbackEarned.amount===0&&p.fetchState==="Completed"?s.jsx(Oa,{}):s.jsx(Ur,{onBackClick:S})}const jr=e=>`/${e}/cards`,Nr={containerWidth:new ua(100,58)},Vr=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C}=ce(),[p,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,U]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=C(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>qt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:j}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:O}=v(Y.isDebitCardFeatureEnabled),P=Se(O,k),V=Ie({isDebitCardFeatureEnabled:O,isBankingOnlyTenant:P}),u=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,B=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:j,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&B&&u;i.useEffect(()=>{p===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,B)))},[o,g.fetchState,p,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Jt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),N=y(E=>Ct(E.userState,F.userId)),R=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{U(E)};if(D!=="Completed"||d==null)return s.jsx(Ke,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(N?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(zr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Hr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:N.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:m,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Mr,{windowSize:t,children:e}):null]})},Hr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Qt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const C=pt(e,n),p=t.updateStatus,S=Ze(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Xt())||c,showMenuIcon:o,shippingAddress:m,vgsVaultId:La.cardVaultId,twoFAView:C,activationWaitStatus:p,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(an(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(en({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(ur),Mr=_e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: ${e=>`${Nr.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,$r={overlayWidth:new ua(100,100,58)},Gr=pe(function(e,t){const a=t.currentTenant?.companyId;return{plaidConnectionDetails:on(e,a,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:cn(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:a,currentTenant:r,hasZeniAccountsAdminAccess:n,isZeniAccountsUser:m,isCashbackInfoFetchStateCompleted:C,isCreditCardInfoFetchStateCompleted:p,isDebitCardInfoFetchStateCompleted:S,controllerEmails:o,paymentDetails:c,productInformation:_,cashbackInformation:A,paymentSourceInformation:f,creditAccountInformation:U,debitAccountInformation:F,paymentInitiatedDate:k,sourcePage:h}=t,{tenantEmailDomain:b}=r;return{onBackNavigation:()=>{if(C&&p&&S&&A!=null&&J.trackCardsPayEarlyFormClick(o,_,A,"Back",c.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:c.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:c.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:c.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:c.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:k?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:k?.format(Ea.visual.MMMDCommaYYYYformat)},f,U,F),h==="cardPaymentHistory")t.closeDrawerHandler(!0),e(gt());else{const g=Ne(b);a(g)}},onUpdatePaymentAccountStatus:(g,d,D)=>{e(un(g,d,"bill_pay","bill_pay_detail",D))},onEstablishConnectionSuccess:()=>{e(Fa(r.companyId,!0))},onFetchLinkTokenClick:g=>{e(ln("external_account",g))},onEstablishConnectionClick:g=>{e(dn(g,r.companyId,"charge_card_payment","charge_cards"))},onSignUpAccountClick:()=>{n?window.open(`/${b}/checking/promo`,"_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onMoveMoneyClick:()=>{m?window.open(`/${b}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(mr),at=({isPaymentDrawerOpen:e,closeDrawerHandler:t,pageName:a,creditAccountSpentAmount:r,productInformation:n,sourcePage:m,creditAccountInformation:C,debitAccountInformation:p,cashbackInformation:S,isDebitCardInfoFetchStateCompleted:o,isCreditCardInfoFetchStateCompleted:c,isCashbackInfoFetchStateCompleted:_,paymentInitiatedDate:A,retryRepayment:f})=>{const U=le(),{useDynamicConfig:F}=ce(),{configValue:k}=F(Fe.zeniAccountsConfig),h=tn(k),b=y($=>ht($)),{creditAccount:g}=y($=>Ge($)),d=y($=>ie($)),D=Wa(),v=la(),j=ue(),O=X.getSignedInUser(),P=je(),[V,u]=i.useState(!1),[l,w]=i.useState(!1),{configValue:T}=F(Fe.zeniCardsConfig),H=T.credit_card_auto_pay_threshold_by_company_id?.[d.companyId]??T.default_credit_card_auto_pay_threshold??Fr,B=ft(P?.loggedInUserRoleMap),K=nn(P?.loggedInUserRoleMap),I=!!d.companyZeniAccountInfo?.info?.isZeniAccountEnabled,L=y($=>da($,d.companyId)),N=L.companyChargeCardInfo?.primaryFundingAccount,R=L.allFundingAccounts.find($=>$.id===N?.accountId),W=y($=>ze($,d.companyId)),E=$e(W.controllers);i.useEffect(()=>{if(b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&j(rn()),b.fetchState==="Completed"&&!l){const $=d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,x=b.transferFromAccounts.find(ae=>ae.id===$);let se;if(m==="cardPaymentHistory"&&f){const ae=f.paymentAccountId!=null?b.transferFromAccounts.find(ne=>ne.id===f.paymentAccountId):void 0;se={amount:f.amount,isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:ae??x}}else se={amount:{amount:g.balance.amount+g.hold.amount,currencyCode:g.balance.currencyCode,currencySymbol:g.balance.currencySymbol},isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:x};j(tt(se)),w(!0)}},[b.fetchState,l,m,f,b.transferFromAccounts,d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,d.companyChargeCardInfo?.info?.isAutoPayEnabled,g.balance.amount,g.balance.currencyCode,g.balance.currencySymbol,g.hold.amount,j]);const G={isZeniCheckingEnabled:d.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:R?.accType==="depositAccount",creditCardPaymentSourceAccountName:R?.label,creditCardPaymentSourceAccountType:R?.accType,creditCardPaymentSourceLastFourDigits:R?.accountLast4,creditCardPaymentSourceBalance:R?.accountBalance?.available?.amount??0};if(i.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&j(Fa(d.companyId,!0))},[L.fetchState]),i.useEffect(()=>{b.updateStatus==="Completed"&&S!=null&&_&&c&&o&&J.trackCardsPayEarlyPayNowClick(E,n,S,b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:A?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:A?.format(Ea.visual.MMMDCommaYYYYformat)},G,C,p)},[b.updateStatus,S,_,c,o,A]),i.useEffect(()=>{b.fetchState==="Completed"&&S!=null&&_&&c&&o&&!V&&e&&l&&S!=null&&(J.trackCardsPayEarlyFormView(E,n,S,a,d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,g.balance.amount,G,C,p),u(!0))},[b,_,c,o,V,e,l]),O==null)throw Error("Can't access invite people page without signing in...");const q=()=>{t(!0),j(gt())};return s.jsx(s.Fragment,{children:s.jsx(Vt,{onClose:()=>{q()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:$r.overlayWidth.valuePercentage(v),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:D.colors.black,opacity:.75,cursor:"pointer"}}},children:s.jsx(Yr,{onClick:$=>$.stopPropagation(),children:s.jsx(Gr,{closeDrawerHandler:t,navigate:U,paymentDetails:b,creditAccountSpentAmount:r,onTransferClick:()=>{_&&c&&o&&S!=null&&J.trackCardsPayEarlyFormClick(E,n,S,"Pay Now",b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},G,C,p),j(sn({companyId:d.companyId}))},onDismissClick:q,onSaveChangesToLocalStore:$=>{j(tt($))},currentTenant:d,hasZeniAccountsAdminAccess:B,isZeniAccountsUser:K,isZeniAccountSetupEnabled:I,productInformation:n,sourcePage:m,controllerEmails:E,autoPayThreshold:H,paymentSourceInformation:G,creditAccountInformation:C,debitAccountInformation:p,cashbackInformation:S,isCashbackInfoFetchStateCompleted:_,isCreditCardInfoFetchStateCompleted:c,isDebitCardInfoFetchStateCompleted:o,paymentInitiatedDate:A,maxInsuredAmount:h.maxInsuredAmount})})})})},Yr=_e(Tr)`
|
|
15
|
-
display: flex;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
`,Zt="charge-card-transaction-update",Ra=qa.getLocalizedStrings().dateFormat,Zr=pe(function(e,t){const{includeCreditAccountInfo:a,cardId:r,signedInUserToken:n,isChargeCardFeatureEnabled:m}=t,C=X.getSignedInUser(),p=e.tenantState.currentTenantId,S={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:p??""},o=Ma(e,r,a,m),c=Cn(e,r),_=pn(e);return{chargeCardDetailView:o,chargeCardsRecurringExpensesState:c,vgsVaultId:La.cardVaultId,transactionAttachmentsEndpointToFetch:`${Ha}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${Ha}/card_transaction_attachment`,authParams:S,isSnackbarOpen:_.isSnackbarOpen,cardsEndPoint:`${Rt.cardMicroServiceBaseUrl}`,signedInUserToken:o.twoFAView.token??n}},function(e,t){const{cardId:a,currentTenant:r,navigate:n,location:m,cardProviderId:C,includeCreditAccountInfo:p,setIsPaymentOpen:S,controllerEmails:o,productInformation:c,cashbackInformation:_,primaryFundingAccountDetails:A,creditAccountInformation:f,debitAccountInformation:U,isChargeCardFeatureEnabled:F}=t,{tenantEmailDomain:k}=r;return{onEventReceived:h=>{h===Zt&&(e(Ga(a,!0)),e(nt(a,null,null,!0)))},onReloadTransactions:()=>{e(Xe(a,p,F))},onFetchChargeCardTransactionList:(h,b)=>{e(nt(a,h,b))},onUpdateScrollYOffset:h=>{},onGetOtp:h=>{C!=null&&e(Ta(h,"ChargeCardHolder",a))},onResendOtp:h=>{C!=null&&e(Pa(h,"ChargeCardHolder",a))},onVerifyOtp:(h,b)=>{C!=null&&e(wa(h,b,"ChargeCardHolder",a))},onVerifyOtpSuccess:h=>{h!=null&&X.saveZeniOtpTokenForCardHolder(h,a)},onColorCodeChange:h=>{e(Sn(a,h))},onLockChargeCard:(h,b)=>{e(_t(h,a,b))},onUnlockChargeCard:h=>{e(Dt(h,a))},onCloseChargeCard:h=>{e(kt(a,h))},onFetchChargeCardsRecurringExpenses:()=>{e(Et([a]))},updateChargeCardName:(h,b)=>{e(At(h,a,b))},updateChargeCardTransactionAttachments:(h,b)=>{b!=null&&e(yn({transactionId:h,data:b}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(h,b,g,d)=>{e(bn({chargeCardId:b,transactionId:h,fetchState:g,error:d}))},updateChargeCardTransactionReceiptsShowTick:(h,b,g)=>{e(gn({chargeCardId:b,transactionId:h,shouldShowTick:g}))},onChargeCardRevokeInviteClick:()=>{e(It(a))},updateChargeCardTransactionIsViewReceiptClicked:(h,b,g)=>{e(fn({chargeCardId:b,transactionId:h,isViewReceiptClicked:g}))},onChargeCardTransactionRowClick:(h,b)=>{const g=fe(m.state?.pathnameStackToGoBack,m.pathname);n(`../../transaction/${h}/${b}`,{state:{pathnameStackToGoBack:g}})},onBackClick:()=>{const h=ve(m.state?.pathnameStackToGoBack),b=Ne(k);n(b,{state:{pathnameStackToGoBack:h.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(hn())},onUpdateDebitCardPinAttempt:h=>{e(St(a,h)),h==="success"&&e(oa({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(h,b)=>{h?e(oa({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):b!=null&&e(oa({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:b.message}]}))},updateSpendLimit(h,b,g,d){e(yt(h,b,g.code,d))},shouldOpenCreditCardPaymentDrawer(h){h&&_!=null&&J.trackCardsPayEarlyClick(o,c,_,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:r.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:A?.accType==="depositAccount",creditCardPaymentSourceAccountName:A?.label,creditCardPaymentSourceAccountType:A?.accType,creditCardPaymentSourceLastFourDigits:A?.accountLast4,creditCardPaymentSourceBalance:A?.accountBalance?.available?.amount??0},f,U),S(h)}}})(pr(hr));function Kr(){const e=le(),t=ue(),a=ge(),{cardId:r}=ia(),[n,m]=i.useState(!1),[C,p]=i.useState(!1),{useDynamicConfig:S}=ce(),o=X.getSignedInUser(),c=y(M=>ie(M)),_=y(M=>ka(M).firstViewAfterActivation),A=y(M=>M.classListState.fetchState),{configValue:f}=S(Fe.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:U}=S(Fe.zeniCardsConfig),F=U.enable_card_controls_for_company_ids,k=U.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(F)&&F.includes(c.companyId),[h,b]=i.useState(!1),[g,d]=i.useState(!1),{useFeatureGate:D}=ce(),{isFeatureEnabled:v}=D(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:j}=D(Y.isDebitCardFeatureEnabled),O=Se(j,c),P=Ie({isDebitCardFeatureEnabled:j,isBankingOnlyTenant:O}),{isFeatureEnabled:V}=D(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:u}=D(Y.isCardsCommentingEnabled),l=ye(c),w=be(c),T=c.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,H=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:v,isBookKeepingTenant:l,isDebitCardProductVisible:P,chargeCardsCreditAccountLimit:T}),B=!!c.companyDebitCardInfo?.info?.isDebitCardEnabled,K=!!c.companyChargeCardInfo?.info?.isChargeCardEnabled,I=!c.userRole.includes("charge_card_user")&&H&&K;if(r==null)throw Error("Empty card id is not valid...");const L=y(M=>da(M,c.companyId)),{creditAccount:N,creditAccountRepayment:R}=y(M=>Ge(M)),W=X.getZeniOtpTokenForCardHolder(r),E=y(M=>Ma(M,r,I,H)),{isAiCfoAccessEnabled:G,onAskAiCfoClick:q}=Gt({mobileExploreReferrer:"Card Detail"});Yt({isDataReady:E.fetchState==="Completed"});const $=y(M=>Ye(M)),x=E.chargeCard,se=je(),ae=Ue(se?.loggedInUserRoleMap),ne=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_virtual_debit_card",Q=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=ma(H,K,ae,N,R),Z=Ht(ne,E),he=Xa(ae,$),ke=Re(H,P,B,K),Le=E.depositAccountLimitFetchState.fetchState!=="Completed"&&E.depositAccountLimitFetchState.fetchState!=="In-Progress",we=y(M=>ze(M,c.companyId)),Pe=$e(we.controllers),ee=y(M=>x?.cardCreatedByUser?.userId!=null?ba(M.userRoleState,x?.cardCreatedByUser?.userId):void 0),pa=y(M=>ee?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ee?.accountingClassIDs[0],reportId:"class_list"}):void 0),oe=y(M=>x?.cardHolderUser?.userId!=null?ba(M.userRoleState,x?.cardHolderUser?.userId):void 0),ea=y(M=>oe?.accountingClassIDs[0]!=null?ya(M.classState,{classId:oe?.accountingClassIDs[0],reportId:"class_list"}):void 0),de=c?.userRole,Oe=y(M=>Ze(M,!1,P,v).revokeCardInvite),aa=Ja(Oe.saveStatus.fetchState);if(i.useEffect(()=>{if(aa==="In-Progress"&&Oe.saveStatus.fetchState==="Completed"){const M=Ne(c.tenantEmailDomain);e(M)}},[aa,Oe.saveStatus.fetchState,e,c.tenantEmailDomain]),i.useEffect(()=>{_&&n===!1&&re&&(m(!0),setTimeout(()=>{t(Sa()),Ee&&t(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[_,n,re,Ee]),i.useEffect(()=>{h||E.fetchState==="Completed"||E.fetchState==="In-Progress"||r==null||(b(!0),t(Xe(r,I,H,!1)))},[h,E,r,t]),i.useEffect(()=>{!g&&E.fetchState==="Completed"&&E.chargeCard?.connectedAccountId!=null&&ne&&Le&&ae&&(d(!0),t(bt({depositAccountId:E.chargeCard?.connectedAccountId})))},[g,E,t,Le,ae]),i.useEffect(()=>{$.fetchState!=="Completed"&&$.fetchState!=="In-Progress"&&ae&&t(mt()),A!=="Completed"&&A!=="In-Progress"&&t(ut()),E.transactionStatistics.fetchState!=="Completed"&&E.transactionStatistics.fetchState!=="In-Progress"&&t(mn({chargeCardId:r})),L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&t(Fa(c.companyId,!0))},[$.fetchState,t,ae,A,E.transactionStatistics.fetchState,L.fetchState]),i.useEffect(()=>{if(!(E.fetchState!=="Completed"||H&&N.fetchState!=="Completed"||x==null||E.transactionStatistics.fetchState!=="Completed"||ne&&ae&&E.depositAccountLimitFetchState.fetchState!=="Completed")){const M=x.type.code.includes("physical"),me=M?x.cardActivationAttemptHistory[0]?.timestamp:x.createTime;J.trackCardsCardDetailView(Pe,ke,{cardId:r,cardName:x.cardName,cardType:x.type.code.includes("credit")?"credit":"debit",cardCategory:M?"physical":"virtual",cardLimit:Je(x.limit.amount),cardLastFourDigits:x.accountLast4,cardStatus:x.status.code,cardAssignedDate:x.createTime?.format(Ra.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:x.providerCardCreateTime?.format(Ra.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:me?.format(Ra.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:x.creditLimitFrequency.name,cardSpentAmount:Je(x.balance.amount),cardAvailableLimit:Je(x.available.amount),cardUtilizationPercent:x.limit.amount>0?Math.round((x.limit.amount-x.available.amount)/x.limit.amount*100):0,cardUtilizationAmount:Je(x.limit.amount-x.available.amount),totalNumberOfDeclinedTransactions:E.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:E.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:E.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:E.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:E.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:E.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:E.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:Va(x.cardCreatedByUser,!1),cardIssuedByEmail:x.cardCreatedByUser?.email,cardIssuedByUserId:x.cardCreatedByUser?.userId,cardIssuedByRole:ee?.userRoles,cardIssuedByDepartment:pa?.className},{cardholderName:Va(x.cardHolderUser,!1),cardholderEmail:x.cardHolderUser?.email,cardholderRole:oe?.userRoles,cardholderUserId:x.cardHolderUser?.userId,cardholderDepartment:ea?.className},xe,Z)}},[E.fetchState,E.depositAccountLimitFetchState.fetchState,E.transactionStatistics.fetchState,N.fetchState,ae]),o==null)throw Error("Can't access card detail page without signing in...");const We=c.companyId??X.getSignedInUserTenant(c.tenantEmailDomain)?.companyId,ta={events:We!=null?[`private-${We}.${Zt}`]:[],eventCallback:(M,me,Te)=>{Te.onEventReceived(M)}},na=()=>{if(r!=null&&x!=null){const{ownerName:M,cardName:me,utilisation:Te,limit:Ve,frequency:qe,cardColor:z}=ja(x),De=x.cardHolderUserId===o.userId;J.trackCardsDetailPageViewed(r,M,me,Te,Ve,qe,z,De)}};i.useEffect(()=>{if(E.fetchState==="Completed"){const M=E.chargeCard;if(M?.status.code==="inactive"||ne&&M?.isPinSet===!1||Q&&_){const me=Ce(c.tenantEmailDomain,r,o,x,_);e(me)}}},[E.fetchState]);const ra=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:z,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;J.trackCardsDetailPageClicked(r,Te,Ve,qe,z,De,M,He,me)}},sa=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:z,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;J.trackCardsVerifyPopUpClick(r,Te,Ve,qe,z,De,M,He,me)}},Ba=N.balance.amount+N.hold.amount,ha=c.companyChargeCardInfo?.info?.primaryFundingAccount,fa=L.allFundingAccounts.find(M=>M.id===ha?.accountId);return r==null||E.fetchState==="Error"?s.jsx(Oa,{}):E.fetchState==="In-Progress"||E.fetchState==="Not-Started"||Oe.saveStatus.fetchState==="In-Progress"||ne&&ae&&E.depositAccountLimitFetchState.fetchState!=="Completed"?s.jsx(Cr,{}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:_}),E.fetchState==="Completed"?s.jsx(Qa,{analytics:J,onLoad:na}):null,C===!0?s.jsx(at,{closeDrawerHandler:()=>p(!1),isPaymentDrawerOpen:C,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:ke,creditAccountInformation:xe,debitAccountInformation:Z,cashbackInformation:he,creditAccountSpentAmount:Ba,isDebitCardInfoFetchStateCompleted:!ne||!ae||E.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!H||N.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!ae||$.fetchState==="Completed",paymentInitiatedDate:R.initiatedRepaymentDate}):null,s.jsx(Zr,{...ta,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:sa,onFireOnClickAnalytics:ra,isSandboxEnv:Ka(),signedInUser:o,location:a,navigate:e,setIsPaymentOpen:p,cardIssuedByRoles:ee?.userRoles,cardIssuedByDepartmentName:pa?.className,cardHolderRoles:oe?.userRoles,cardHolderDepartmentName:ea?.className,loggedInUserRole:de,isChargeCardFeatureEnabled:H,isDebitCardFeatureEnabled:P,isDebitCardSetupEnabled:B,isChargeCardSetupEnabled:K,isCardControlsEnabled:k,isEarlyPayEnabled:V,controllerEmails:Pe,chargeCardCashbackDetailState:$,productInformation:ke,creditAccountInformation:xe,debitAccountInformation:Z,cashbackInformation:he,classListFetchState:A,primaryFundingAccountDetails:fa,currentTenant:c,cardProviderId:E.chargeCard?.cardProviderID,cardId:r,creditAccount:N,creditAccountRepayment:R,includeCreditAccountInfo:I,signedInUserToken:W,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:f.documentAiReceiptMaxSizeLimitBytes!=null?f.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:G,onAskAiCfoClick:q,isCardsCommentingEnabled:u})]})}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,m=e.creditLimitFrequency.name;return{ownerName:t,cardName:a,utilisation:r,cardColor:e.cardColorCode??"",frequency:m,limit:n}},Wr=_e.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,qr=pe(function(e,t){const a=Ze(e,t.includeCreditAccountDebitSummaryAndCashbackInfo,t.isDebitCardFeatureEnabled&&t.isDebitCardSetupEnabled,t.isChargeCardFeatureEnabled&&t.isChargeCardSetupEnabled);return{chargeCardListView:a,rowActionView:In(e),bulkActionView:An(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:m,chargeCardListState:C,includeCreditAccountDebitSummaryAndCashbackInfo:p,isChargeCardFeatureEnabled:S,isCreditCardProductVisibleForExpressInterest:o,isChargeCardSetupEnabled:c,isDebitCardFeatureEnabled:_,isDebitCardSetupEnabled:A,isDebitCardTOSAccepted:f,isChargeCardTOSAccepted:U,controllerEmails:F,depositAccountListWithDebitCardIssued:k,primaryFundingAccountDetails:h,chargeCardSetUpViewFetchState:b,productInformation:g,cashbackInformation:d,creditAccountInformation:D,debitAccountInformation:v,updatePayNowInfoTooltip:j,isUserHasCardsAdminLevelAccess:O}=t,{tenantEmailDomain:P}=r,{cards:V}=C;return{onChargeCardRowClick:(u,l)=>{const w=zt(V,u);let T;w!=null&&((B=>{const K=B.limit.amount-B.available.amount,I=`${B.cardHolderUser?.firstName.toLowerCase()} ${B.cardHolderUser?.lastName.toLowerCase()}`,L=B.cardName,N=B.department?.className??"",R=B.limit.amount,W=B.creditLimitFrequency.name;J.trackCardsListRowClicked(I,L,N,K,R,W,m.userId===B.cardHolderUserId)})(w),Me(_,A,k)&&J.trackCardsCardListRowClick(F,g,"Card Row Item","row_clicked",l+1,{cardOwner:Va(w.cardHolderUser,!1),cardName:w.cardName,cardType:w.type.code.includes("credit")?"credit":"debit",cardStatus:w.status.code,cardUtilizationAmount:Je(w.limit.amount-w.available.amount),cardUtilizationPercent:w.limit.amount>0?Math.round((w.limit.amount-w.available.amount)/w.limit.amount*100):0,cardLimit:Je(w.limit.amount)},d,D,v)),T=w?.status.code==="request_on_hold"&&m.userId===w.cardHolderUserId?$t(P):Ce(P,u,m,w);const H=fe(n.state?.pathnameStackToGoBack,n.pathname);a(T,{state:{pathnameStackToGoBack:H}})},onFetchChargeCardsRecurringExpenses:u=>{e(Et(u))},onFetchDepositAccountLimit:u=>{e(bt({depositAccountId:u}))},onChargeCardResendInviteClick:u=>{e(Fn(u))},onChargeCardRevokeInviteClick:u=>{e(It(u))},onLockChargeCardList:(u,l)=>{e(Tn(u,l))},onUnlockChargeCardList:u=>{e(Pn(u))},onCloseChargeCardList:(u,l)=>{e(wn(u,l))},onRevokeChargeCardList:u=>{e(_n(u))},updateChargeCardListSpendLimit(u,l,w){e(Dn(u,l,w.code))},onLockChargeCard:(u,l)=>{e(_t(O,u,l))},onUnlockChargeCard:u=>{e(Dt(O,u))},onCloseChargeCard:(u,l)=>{e(kt(u,l))},onUpdateSpendLimit(u,l,w,T){e(yt(u,l,w.code,T))},updateChargeCardName:(u,l)=>{e(At(O,u,l))},onClickSetupIcon:()=>{J.trackCardsListPageClicked("settings"),Me(_,A,k)&&d!=null&&J.trackCardsSettingsClick(F,g,d,D,v);const u=xr(P),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(u,{state:{pathnameStackToGoBack:l}})},onIssueCardClick:()=>{J.trackCardsListPageClicked("new card"),Me(_,A,k)&&d!=null&&J.trackCardsNewCardClick(F,g,d,"New Button","card_creation_initiated","Card List",D,v);const u=Jr(P),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(u,{state:{pathnameStackToGoBack:l}})},onColumnSortConfigChanged:(u,l)=>{Me(_,A,k)&&d!=null&&J.trackCardsCardListSortClick(F,g,d,"Sort Icon","sort",u,l==="ascending"?"ASC":"DESC","Cards List",D,v),e(Na({uiState:{sortKey:u,sortOrder:l}}))},onSearchTextChanged:u=>{e(kn(u))},onReloadCards:()=>{e(Ia(p,_&&A,S&&c,!0))},onLetsGoClick:()=>{a("./onboard")},onBackClick:()=>{a("../../")},onTotalCashbackClick:()=>{Me(_,A,k)&&d!=null&&J.trackCardsCashbackOverviewClick(F,g,d,"Cashback Overview","cashback_details_viewed",D,v),a("./cashback")},onClickStatementsIcon:()=>{Me(_,A,k)&&d!=null&&J.trackCardsStatementsClick(F,g,d,D,v),a("./statements")},onCreateNowClick:u=>{Me(_,A,k)&&d!=null&&J.trackCardsNewCardClick(F,g,d,"Promo Banner","card_creation_initiated","Card List",D,v),a(`./new?cardType=${u}`)},onPromoCardClick:u=>{a(u==="debit"&&_&&!f||u==="credit"&&o&&!U?`../promo?cardPromoType=${u}`:"./setup")},navigateToCreditCardPaymentPage:(u,l)=>{b==="Completed"&&r.company!=null&&d!=null&&J.trackCardsPayEarlyClick(F,g,d,"Card List",u,l,{isZeniCheckingEnabled:r.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:h?.accType==="depositAccount",creditCardPaymentSourceAccountName:h?.label,creditCardPaymentSourceAccountType:h?.accType,creditCardPaymentSourceLastFourDigits:h?.accountLast4,creditCardPaymentSourceBalance:h?.accountBalance?.available?.amount??0},D,v);const w=Qr(P);a(w)},navigateToCreditCardPaymentHistoryPage:()=>{const u=Xr(P),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(u,{state:{pathnameStackToGoBack:l}})},shouldShowPayNowInfoTooltip:j,onSetRowActionCardId:u=>{e(En(u))},onSetBulkActionCardIds:u=>{e(wt(u))}}})(fr);function ct({isPaymentDrawerOpen:e}){const t=le(),a=ue(),r=ge(),n=i.useCallback((z,De)=>{a(wt([])),t(z,De)},[a,t]),[m,C]=i.useState(!1),[p,S]=i.useState(X.getPayNowInfoTooltip()??!1),o=z=>{X.savePayNowInfoTooltip(z),S(z)},[c,_]=i.useState(!1),A=X.getSignedInUser(),f=y(z=>ie(z)),[U,F]=i.useState(!1),[k,h]=i.useState(!1),{isAiCfoAccessEnabled:b,onAskAiCfoClick:g}=Gt({mobileExploreReferrer:"Cards"}),d=f.userRole.includes("charge_card_user"),D=!d,v=!!f.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:j,useDynamicConfig:O}=ce(),{isFeatureEnabled:P}=j(Y.isCashbackFeatureEnabled),{isFeatureEnabled:V}=j(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:u}=j(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=j(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:w}=j(Y.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:T}=j(Y.isCardsCommentingEnabled),H=Se(u,f),B=Ie({isDebitCardFeatureEnabled:u,isBankingOnlyTenant:H}),K=be(f),I=ye(f),L=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,N=Ae({isCardsOnlyTenant:K,isChargeCardFeatureEnabled:V,isBookKeepingTenant:I,isDebitCardProductVisible:B,chargeCardsCreditAccountLimit:L}),R=Mt({isCardsOnlyTenant:K,isChargeCardFeatureEnabled:V,isBookKeepingTenant:I}),{configValue:W}=O(Fe.zeniCardsConfig),E=je(),G=Ue(E?.loggedInUserRoleMap),q=y(z=>ze(z,f.companyId)),$=$e(q.controllers),x=W.charge_card_cashback_rate_per_transaction!=null?W.charge_card_cashback_rate_per_transaction:.0175,se=W.credit_card_pay_now_threshold_by_company_id?.[f.companyId]??W.default_credit_card_pay_now_threshold??vr,ae=W.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(W.enable_card_controls_for_company_ids)&&W.enable_card_controls_for_company_ids.includes(f.companyId),ne=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,Q=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,re=!!f.companyChargeCardInfo?.info?.isChargeCardEnabled,Ee=y(z=>ht(z)),xe=Ja(Ee.updateStatus),Z=y(z=>Ze(z,D,B&&v,N&&re)),he=Z.cards.filter(z=>z.type.code.includes("debit")).map(z=>z.connectedAccountId),ke=[...new Set(he)],Le=y(z=>Ye(z)),we=y(z=>va(z,ke)),Pe=y(z=>da(z,f.companyId)),ee=Pe.companyChargeCardInfo?.primaryFundingAccount,pa=Pe.allFundingAccounts.find(z=>z.id===ee?.accountId),oe=Z.fetchState,ea=Z.creditAccount;Yt({isDataReady:oe==="Completed"});const{creditAccountRepayment:de}=y(z=>Ge(z)),Oe=y(z=>ka(z).firstViewAfterActivation),{areTenantIdsInSync:aa}=jt(),We=Xa(G,Le),ta=ma(N,re,G,ea,de),na=et(B,v,G,we,Z.debitCardSummary),ra=Re(N,B,v,re),sa=Z.creditAccount.balance.amount+Z.creditAccount.hold.amount;if(i.useEffect(()=>{oe==="Completed"&&(X.getPayNowInfoTooltip()==null||sa<se*Z.creditAccount.limit.amount/100)&&o(!0)},[oe,se,sa,Z.creditAccount.limit.amount]),i.useEffect(()=>{if(e!=null&&e===!0&&de.initiatedRepayments.amount===0&&de.fetchState==="Completed"||xe==="In-Progress"&&Ee.updateStatus==="Completed")o(!1),C(!0);else if(de.initiatedRepayments.amount>0&&de.fetchState==="Completed"){C(!1),document.body.style.overflow="auto";const z=Ne(f.tenantEmailDomain);n(z)}},[e,de.initiatedRepayments.amount,de.fetchState,xe,Ee.updateStatus,n,f.tenantEmailDomain]),i.useEffect(()=>{!U&&(re||v)&&aa&&(F(!0),a(Ia(D,B&&v,N&&re,!1)))},[U,D,a,aa]),i.useEffect(()=>{Oe&&c===!1&&(_(!0),setTimeout(()=>{a(Sa())},5e3))},[Oe,c]),i.useEffect(()=>{oe==="Completed"&&d&&Z.cards.length===1&&(Z.cards[0].status.code==="inactive"&&Z.cards[0].type.code==="business_physical_credit_card"?n(`./${Z.cards[0].id}/activate`):Z.cards[0].status.code!=="request_on_hold"&&(r.state?.message==="comingFromCardDetail"?n("../../"):n(`./${Z.cards[0].id}`)))},[oe,d,r.state,n,Z.cards]),i.useEffect(()=>{if(oe==="Completed"&&d){const z=Z.cards.length,De=Z.cards.filter(He=>He.cardHolderUserId===A?.userId).filter(He=>He.status.code==="request_on_hold");De.length>0&&z===De.length&&n("./onboard")}},[oe,Z.cards,d,n,A?.userId]),i.useEffect(()=>{oe!=="Completed"||N&&de.fetchState!=="Completed"||B&&v&&G&&we.fetchState!=="Completed"||J.trackCardsCardListView($,ra,We,ta,na)},[oe,ea,de.fetchState,we.fetchState,G]),A==null)throw Error("Can't access charge card list page without signing in...");const Ba=y(z=>Pt(z.userState,z.userRoleState,z.userListViewState,"cardAdmin")),ha=Ya(E?.loggedInUserRoleMap),fa=z=>{h(z)},M=Z.creditAccount.limit,me=()=>{C(!1),n("..")},Te=f.companyChargeCardInfo?.info!=null&&Qe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:N,isTOSAccepted:ne,isSetupEnabled:re,isUserHasCardsAdminLevelAccess:G,isUserHasCardsAccess:ha}),Ve=f.companyDebitCardInfo?.info!=null&&Qe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:B,isTOSAccepted:Q,isSetupEnabled:v,isUserHasCardsAdminLevelAccess:G,isUserHasCardsAccess:ha});return re||v?s.jsxs(s.Fragment,{children:[oe==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Qa,{analytics:J,onLoad:()=>{J.trackPageLoaded(Nt.Event.cardsListPage),(N&&!re||B&&!v)&&J.trackCardsPromoView($,{isCreditCardOffered:N,isDebitCardOffered:B,isDebitCardEnabled:v,isCreditCardEnabled:re},"Banner",B&&!v?"Debit Card":N&&!re?"Credit Card":"","Card List")}}),s.jsx(xa,{showConfetti:Oe})]}):null,m===!0?s.jsx(at,{closeDrawerHandler:me,isPaymentDrawerOpen:m,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:sa,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isDebitCardInfoFetchStateCompleted:!(B&&v&&G)||we.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!N||de.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!G||Le.fetchState==="Completed",paymentInitiatedDate:de.initiatedRepaymentDate}):null,s.jsxs(Wr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:k,handleDrawerToggle:fa}),s.jsx(qr,{isCashbackFeatureEnabled:P,isChargeCardFeatureEnabled:N,isDebitCardFeatureEnabled:B,isCreditCardProductVisibleForExpressInterest:R,updatePayNowInfoTooltip:o,showPayNowInfoTooltip:p,creditCardPayNowThreshold:se,signedInUser:A,chargeCardListState:Z,location:r,admins:Ba.users,navigateAndClearBulkSelection:n,currentTenant:f,isCardControlsEnabled:ae,companyChargeCardInfoCreditAccountLimit:f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:f.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:G,includeCreditAccountDebitSummaryAndCashbackInfo:D,onClickMenuIcon:()=>{fa(!0)},creditLimit:M,isChargeCardSetupEnabled:re,isDebitCardSetupEnabled:v,isEarlyPayEnabled:l,isChargeCardPaymentHistoryFeatureEnabled:w,cashbackRate:x,controllerEmails:$,chargeCardCashbackDetailState:Le,depositAccountListWithDebitCardIssued:we,isChargeCardTOSAccepted:ne,isDebitCardTOSAccepted:Q,primaryFundingAccountDetails:pa,chargeCardSetUpViewFetchState:Pe.fetchState,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isAiCfoAccessEnabled:b,onAskAiCfoClick:g,isCardsCommentingEnabled:T})]})]}):(ne||Q)&&G===!0?s.jsx(ga,{to:"../setup"}):Te||Ve?s.jsx(ga,{to:"../promo"}):s.jsx(Ke,{fetchState:oe})}const Jr=e=>`/${e}/cards/new`,Qr=e=>`/${e}/cards/payment`,Xr=e=>`/${e}/cards/payment-history`,es=pe(function(e){const t=X.getSignedInUser(),a=ie(e),r=e.tenantState.currentTenantId,n=Tt(e),m={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},C=a?.companyName??"",p=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:n.fetchState,filters:n.filters,isZeniTenant:vn(a),repaymentList:n.repaymentHistory,searchText:n.searchText,repaymentHistoryUsers:n.repaymentHistoryUsers,sortConfig:{sortKey:n.uiState.sortKey,sortOrder:n.uiState.sortOrder},downloadParams:{authParams:m,companyName:C,spendManagementEndPoint:`${Ha}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:p}},function(e,t){const{location:a,navigate:r}=t;return{onBackClick:()=>{const n=ve(a.state?.pathnameStackToGoBack),m=n.poppedPathname??"..";r(m,{state:{pathnameStackToGoBack:n.newStack}})},onColumnSortConfigChanged:(n,m)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:n,sortOrder:m}}})},onFiltersChange:n=>{e(Ln({filters:n}))},onReloadPayments:()=>{e(Ft(!0))},onSearchTextChanged:n=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:n})},updateDownloadStateHandler:n=>{e(xn({uiState:{downloadState:n}}))}}})(gr);function as(){const e=le(),t=ge(),a=ue(),{areTenantIdsInSync:r}=jt(),{useFeatureGate:n}=ce();if(X.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const m=y(q=>ie(q)),C=y(q=>Tt(q)),[p,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,U]=i.useState(null),F=!m.userRole.includes("charge_card_user"),k=!!m.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:h}=n(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:b}=n(Y.isDebitCardFeatureEnabled),g=Se(b,m),d=Ie({isDebitCardFeatureEnabled:b,isBankingOnlyTenant:g}),D=be(m),v=ye(m),j=m.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ae({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:h,isBookKeepingTenant:v,isDebitCardProductVisible:d,chargeCardsCreditAccountLimit:j}),P=!!m.companyChargeCardInfo?.info?.isChargeCardEnabled,V=je(),u=Ue(V?.loggedInUserRoleMap),l=y(q=>Ze(q,F,d&&k,O&&P)),w=i.useMemo(()=>{const q=l.cards.filter($=>$.type.code.includes("debit"));return[...new Set(q.map($=>$.connectedAccountId))]},[l.cards]),T=y(q=>Ye(q)),H=y(q=>va(q,w)),{creditAccountRepayment:B}=y(q=>Ge(q)),K=i.useMemo(()=>Xa(u,T),[u,T]),I=i.useMemo(()=>ma(O,P,u,l.creditAccount,B),[O,P,u,l.creditAccount,B]),L=i.useMemo(()=>et(d,k,u,H,l.debitCardSummary),[d,k,u,H,l.debitCardSummary]),N=i.useMemo(()=>Re(O,d,k,P),[O,d,k,P]),R=l.creditAccount.balance.amount+l.creditAccount.hold.amount,W=i.useMemo(()=>f!=null?C.repaymentHistory.find(q=>q.cardRepaymentId===f):void 0,[f,C.repaymentHistory]),E=i.useCallback(q=>{U(q),a(Ia(F,d&&k,O&&P,!1)),A(!0)},[a,F,d,k,O,P]),G=i.useCallback(()=>{A(!1),U(null),document.body.style.overflow="auto"},[]);return i.useEffect(()=>{p||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(S(!0),a(Ft()))},[p,a,C.fetchState]),i.useEffect(()=>{!o&&(P||k)&&r&&(c(!0),a(Ia(F,!1,O&&P,!1)))},[o,P,k,r,a,F,O]),s.jsxs(s.Fragment,{children:[_?s.jsx(at,{closeDrawerHandler:G,isPaymentDrawerOpen:_,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:R,productInformation:N,creditAccountInformation:I,debitAccountInformation:L,cashbackInformation:K,isDebitCardInfoFetchStateCompleted:!(d&&k&&u)||H.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!O||B.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!u||T.fetchState==="Completed",paymentInitiatedDate:B.initiatedRepaymentDate,retryRepayment:W}):null,s.jsx(es,{location:t,navigate:e,accountInfoByAccountId:C.accountInfoByAccountId,onRetryPaymentClick:E})]})}const it=_e.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100vh;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
align-items: center;
|
|
33
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
34
|
-
`,dt=qa.getLocalizedStrings().months;function ts(){const e=le(),t=ue(),a=ge(),{creditAccount:r,creditAccountRepayment:n}=y(I=>Ge(I)),m=`${Rt.cardMicroServiceBaseUrl}/1.0/credit-accounts/${r.id}`,[C,p]=i.useState(!1),[S,o]=i.useState(!1),c=y(I=>On(I)),{useFeatureGate:_}=ce(),A=y(I=>ie(I)),{isFeatureEnabled:f}=_(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:U}=_(Y.isDebitCardFeatureEnabled),F=Se(U,A),k=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:F}),h=be(A),b=ye(A),g=A.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,d=Ae({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:f,isBookKeepingTenant:b,isDebitCardProductVisible:k,chargeCardsCreditAccountLimit:g}),D=!!A.companyDebitCardInfo?.info?.isDebitCardEnabled,v=!!A.companyChargeCardInfo?.info?.isChargeCardEnabled,j=y(I=>ze(I,A.companyId)),O=$e(j.controllers),P=y(I=>vt(I)),V=P.cards.filter(I=>I.type.code.includes("debit")).map(I=>I.connectedAccountId),u=[...new Set(V)],l=y(I=>va(I,u)),w=y(I=>Bn(I));i.useEffect(()=>{S||r.fetchState==="Completed"||r.fetchState==="In-Progress"||(p(!0),t(za()))},[C,t,r.fetchState]),i.useEffect(()=>{S||r.fetchState!=="Completed"||r.id==null||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(o(!0),t(Un(r.id)))},[S,t,r.fetchState,r.id,c.fetchState]),i.useEffect(()=>{l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&k&&D&&t(xt()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&t(ca()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&k&&D&&t(Rn()),n.fetchState!=="Completed"&&n.fetchState!=="In-Progress"&&d&&v&&t($a())},[l.fetchState,k,D,P.fetchState,w.fetchState,n.fetchState,d,v]),i.useEffect(()=>{if(c.fetchState==="Completed"&&r.fetchState==="Completed"&&n.fetchState==="Completed"&&P.fetchState==="Completed"&&(!k||!D||l.fetchState==="Completed"&&w.fetchState==="Completed")){let I="",L="";if(c.statements.length>0){const E=c.statements[c.statements.length-1].period,[G,q]=E.split("-"),$=c.statements[0].period,[x,se]=$.split("-");I=`${dt[parseInt(q)-1]} ${G}`,L=`${dt[parseInt(se)-1]} ${x}`}const N=Re(d,k,D,v),R=ma(d,v,!0,r,n),W=et(k,D,!0,l,w);J.trackCardsCreditCardStatementsView(O,N,{numberOfStatements:c.statements.length,oldestStatementMonthYear:I,latestStatementMonthYear:L},R,W)}},[c.fetchState,r.fetchState,n.fetchState,l.fetchState,P.fetchState,w.fetchState]);const T=()=>{const I=ve(a.state?.pathnameStackToGoBack),L=I.poppedPathname??"..";e(L,{state:{pathnameStackToGoBack:I.newStack}})},H=y(I=>Ye(I)),B=X.getSignedInUser(),K={userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:A.tenantId??""};if(B==null)throw Error("Can't access address page without signing in...");if(c.fetchState!=="Completed")return s.jsx(it,{children:s.jsx(br,{onBackClick:T})});{const I=Re(d,k,D,v);return s.jsx(it,{children:s.jsx(yr,{currentTenantCompanyName:A.companyName,statementListView:c,productInformation:I,onBackClick:T,authParams:K,controllerEmails:O,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:k,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:v,chargeCardCashbackDetailState:H,creditAccount:r,creditAccountRepayment:n,depositAccountListWithDebitCardIssued:l,debitCardSummary:w,downloadEndPoint:m})})}}const ns={containerWidth:new ua(100,58)},rs=({appContent:e})=>{const t=la(),a=ue(),r=le(),n=ge(),{useDynamicConfig:m}=ce(),[C,p]=i.useState(!1),[S,o]=i.useState(!1),[c,_]=i.useState(!1),[A,f]=i.useState(!1),[U,F]=i.useState(!1),[k,h]=i.useState(!1),b=X.getSignedInUser();if(b==null)throw Error("Can't access onboarding card page without signing in...");const g=y(R=>ie(R)),{configValue:d}=m(Fe.zeniCardsConfig),D=y(R=>jn(R)),{tenantEmailDomain:v}=g,j=y(R=>R.settingsViewState.profile.fetchState),O=y(R=>R.chargeCardListState.fetchState),P=y(R=>R.settingsViewState.profile.userId),V=y(R=>R.chargeCardConfigState.fetchState);i.useEffect(()=>{C===!1&&j!=="In-Progress"&&j!=="Completed"&&(a(Nn()),p(!0)),S===!1&&V!=="In-Progress"&&V!=="Completed"&&(a(Da()),o(!0)),c===!1&&O==="Not-Started"&&(_(!0),a(ca()))},[C,c,O,S,V]),i.useEffect(()=>{j==="Completed"&&U===!1&&P!=null&&O==="Completed"&&D.cards.length>0&&(a(Vn({userId:P})),a(Lt({cardId:D.cards[D.cards.length-1].id})),F(!0))},[j,U,P,O]),i.useEffect(()=>{if(!A&&D.fetchState==="Completed"&&D.cards.length===0){const R=ve(n.state?.pathnameStackToGoBack),W=R.poppedPathname??Ne(v);r(W,{state:{pathnameStackToGoBack:R.newStack}})}},[D.fetchState,D.cards,A]);const u=y(R=>ka(R)),l=Ja(u.updateStatus.fetchState),w=u.currentDisplayedCardId,{useFeatureGate:T}=ce(),{isFeatureEnabled:H}=T(Y.isChargeCardFeatureEnabled),B=!!g.companyChargeCardInfo?.info?.isChargeCardEnabled,K=!g.userRole.includes("charge_card_user")&&H&&B,I=y(R=>w!=null?Ot(R.chargeCardState,w):null),L=()=>{w!=null&&(a(Xe(w,K,!0)),a(ca()),f(!0))};i.useEffect(()=>{if(A&&w!=null&&I!=null&&I.status.code!=="request_on_hold"){const R=Ce(g.tenantEmailDomain,w,b,I),W=fe(n.state?.pathnameStackToGoBack,n.pathname);a(Hn()),I?.type.code==="business_virtual_credit_card"&&a(_a()),r(R,{state:{pathnameStackToGoBack:W},replace:!0})}},[A,I?.status.code]),i.useEffect(()=>{l==="In-Progress"&&u.updateStatus.fetchState==="Completed"&&setTimeout(L,3e3)},[l,u.updateStatus.fetchState]);const N=R=>{h(R)};if(!A&&O!=="Completed"||j!=="Completed"||D.cards.length===0)return s.jsx(Ke,{fetchState:"In-Progress"});if(P==null)throw Error("Can't access my userId.");return s.jsxs(cs,{children:[s.jsx(Ca,{isAppContentDrawerOpen:k,handleDrawerToggle:N}),s.jsx(ss,{chargeCardListView:D,cardUserOnboardingView:u,navigate:r,currentTenant:g,myUserId:P,location:n,chargeCardCashbackRatePerTransaction:d.charge_card_cashback_rate_per_transaction!=null?d.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{N(!0)}}),e!=null?s.jsx(os,{windowSize:t,children:e}):null]})},ss=pe(function(e,{currentTenant:t,cardUserOnboardingView:a,chargeCardListView:r,myUserId:n}){const m=Ze(e,!1,!1,!1);let C=!1;return m.fetchState==="Completed"&&m.cards.length<=1&&(C=!0),{cards:r.cards,showMenuIcon:C,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:m}=t,{tenantEmailDomain:C}=m;return{updateCardUserOnboardingLocalData:p=>{e(rt({localData:p}))},onGetOtp:p=>{if(r.cardUserOnboardingLocalData!=null){const S={...r.cardUserOnboardingLocalData,phone:p};e(rt({localData:S}))}e(Ta(p,"CardUserOnboarding"))},onResendOtp:p=>{e(Pa(p,"CardUserOnboarding"))},onVerifyOtp:(p,S)=>{e(wa(p,S,"CardUserOnboarding"))},onVerifyOtpSuccess:p=>{e(Mn()),p!=null&&X.saveZeniOtpToken(p)},setCurrentDisplayedCardId:p=>{e(Lt({cardId:p}))},onBackClick:()=>{const p=ve(n.state?.pathnameStackToGoBack),S=p.poppedPathname??Ne(C);a(S,{state:{pathnameStackToGoBack:p.newStack}})}}})(Sr),os=_e.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: ${e=>`${ns.containerWidth.value(e.windowSize)}%`};
|
|
38
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
39
|
-
`,cs=_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
|
-
`,is={containerWidth:new ua(100,58)},ds=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C,useFeatureGate:p}=ce(),[S,o]=i.useState(!1),[c,_]=i.useState(!1),[A,f]=i.useState(!1),[U,F]=i.useState(!1),k=X.getSignedInUser();if(k==null)throw Error("Can't access onboarding card page without signing in...");const h=y(L=>ie(L));if(n==null)throw Error("Empty card id is not valid...");const{configValue:b}=C(Fe.zeniCardsConfig),g=y(L=>zn(L,n)),{isFeatureEnabled:d}=p(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:D}=p(Y.isDebitCardFeatureEnabled),v=Se(D,h),j=Ie({isDebitCardFeatureEnabled:D,isBankingOnlyTenant:v}),O=be(h),P=ye(h),V=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,u=Ae({isCardsOnlyTenant:O,isChargeCardFeatureEnabled:d,isBookKeepingTenant:P,isDebitCardProductVisible:j,chargeCardsCreditAccountLimit:V}),l=g.chargeCard,w=y(L=>L.chargeCardConfigState.fetchState);i.useEffect(()=>{S===!1&&w!=="In-Progress"&&w!=="Completed"&&(a(Da()),o(!0)),c===!1&&g.fetchState==="Not-Started"&&(_(!0),a(Xe(n,!1,u)))},[c,g.fetchState,S,w]);const T=l?.type.code==="business_physical_debit_card"||l?.type.code==="business_virtual_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(A===!1&&(T===!1||T&&l.status?.code!=="active"||T&&l.status.code==="active"&&l.isPinSet||l.cardHolderUserId!==k.userId)){const L=Ce(h.tenantEmailDomain,n,k,l,!0),N=fe(m.state?.pathnameStackToGoBack,m.pathname);r(L,{state:{pathnameStackToGoBack:N}})}else if(A&&g.isRefreshingViewInBackground===!1&&l?.isPinSet===!0){a($n({chargeCardId:n}));const L=Ce(h.tenantEmailDomain,n,k,l,!0),N=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(L,{state:{pathnameStackToGoBack:N}})}}},[g.fetchState,l?.type.code,A,g.isRefreshingViewInBackground]);const H=X.getZeniOtpTokenForCardHolder(n),B=y(L=>Ct(L.userState,k.userId)),K=()=>{l?.isPinSet!==!0&&a(Ga(n,!0))};i.useEffect(()=>{g.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout(K,3e3),f(!0))},[g.updateDebitCardPinAttemptFetchState.fetchState]);const I=L=>{F(L)};if(w!=="Completed"||l==null)return s.jsx(Ke,{fetchState:"In-Progress"});if(B?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(ms,{children:[s.jsx(Ca,{isAppContentDrawerOpen:U,handleDrawerToggle:I}),s.jsx(ls,{cardId:n,card:l,phone:B.phone,signedInUser:k,isSandboxEnv:Ka(),debitCardDetailState:g,signedInUserToken:H,navigate:r,currentTenant:h,location:m,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{I(!0)}}),e!=null?s.jsx(us,{windowSize:t,children:e}):null]})},ls=pe(function(e,{debitCardDetailState:t,cardId:a}){const r=pt(e,a),n=t.updateStatus,m=Ze(e,!1,!1,!1);let C=!1;return m.fetchState==="Completed"&&m.cards.length<=1&&(C=!0),{showMenuIcon:C,vgsVaultId:La.cardVaultId,twoFAView:r,setPinWaitStatus:n}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,debitCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdateDebitCardPinAttempt:o=>{e(St(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onSetPinSuccess:()=>{e(Gn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("activate")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(Ir),us=_e.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
width: ${e=>`${is.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
|
-
`,ms=_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
|
-
`,Cs={overlayWidth:new ua(Ua[12],Ua[12],Ua[9])},ps=pe(function(e,t){const a=Za(e,!1,!1),r=t.lineId,n=a.customAddress[r],m=a.customAddressStatus[r]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:t.googleAPIKey,customAddress:n,customAddressStatus:m,lineId:r}},function(e,t){const{newCustomAddressId:a,lineId:r,chargeCardTypeOption:n}=t;return{onSubmitHandler:m=>{a!=null&&e(Bt(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`));const C=Or(m);e(Kn({addressType:`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`,addressToCreate:C})),e(Wn(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`))},onDismissClick:()=>{t.onDismissClick(),a!=null&&e(Zn({addressId:a,cardLineId:r,cardType:n==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(Ar),hs=({lineId:e,closeDrawerHandler:t,chargeCardTypeOption:a})=>{const r=Wa(),n=la(),m=()=>{t()},C=y(p=>Yn(`${a==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,p))?.newAddressId;return s.jsx(Vt,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:Cs.overlayWidth.valuePercentage(n),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:(p,S)=>(S==="backdropClick"||S==="escapeKeyDown")&&m(),children:s.jsx(ps,{googleAPIKey:La.googleMapsAPIKey,onDismissClick:m,lineId:e,chargeCardTypeOption:a,newCustomAddressId:C})})},fs=pe(function(e,t){const{isChargeCardFeatureEnabled:a,isDebitCardFeatureEnabled:r,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:m,isChargeCardSetupEnabled:C,isDebitCardSetupEnabled:p}=t,S=Za(e,a&&C,r&&p);return{companyName:t.companyName,signedInUser:t.signedInUser,issueChargeCards:S,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:m,isDebitCardFeatureEnabled:r,isChargeCardFeatureEnabled:a,isChargeCardSetupEnabled:C,isDebitCardSetupEnabled:p,cardHolderCandidates:S.userList.map(o=>o.user).filter(Boolean),allRoles:S.userList.map(o=>o.userRole),allAccountingClasses:S.allAccountingClasses,userList:S.userList}},function(e,t){return{onIssueCardClick:()=>{e(Qn())},onSaveChangesToLocalStore:a=>{e(Jn(a))},onDismissClick:()=>{e(Ut()),t.navigate("../")},resetCustomAddressByLineID:(a,r)=>{e(Bt(`${r==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`))},openAddAddressDrawerHandler:t.openAddAddressDrawerHandler}})(Dr);function gs(){const e=X.getSignedInUser(),t=le(),a=ue(),r=Er(),[n]=lt(),m=n.get("cardType"),{useFeatureGate:C}=ce(),{isFeatureEnabled:p}=C(Y.isIssuePhysicalCardEnabled),{isFeatureEnabled:S}=C(Y.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:o}=C(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=C(Y.isChargeCardFeatureEnabled),_=y(I=>ie(I)),A=Se(o,_),f=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:A}),U=be(_),F=ye(_),k=_.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=Ae({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:c,isBookKeepingTenant:F,isDebitCardProductVisible:f,chargeCardsCreditAccountLimit:k}),[b,g]=i.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");i.useEffect(()=>{b||(g(!0),a(qn(f&&D,h&&d,!1)))},[b,g,a]);const d=!!_.companyChargeCardInfo?.info?.isChargeCardEnabled,D=!!_.companyDebitCardInfo?.info?.isDebitCardEnabled,v=_.companyName,j=y(I=>Za(I,h&&d,f&&D)),O=j.fetchState,P=j.issueCardStatus.fetchState,V=j.lastSelfIssuedDebitCardId,u=y(I=>V!=null?Ot(I.chargeCardState,V):void 0),[l,w]=i.useState(null),[T,H]=i.useState(null),B=()=>{w(null)},K=(I,L)=>{w(I),H(L)};return i.useEffect(()=>{if(P==="Completed"){if(V!=null&&u?.type.code==="business_virtual_debit_card"){let I;I=u?.status.code==="request_on_hold"&&e.userId===u.cardHolderUserId?$t(_.tenantEmailDomain):Ce(_.tenantEmailDomain,V,e,u),t(I)}else t("../");a(Ut())}},[P,V]),O==="Completed"?s.jsxs(s.Fragment,{children:[l!==null&&T!==null?s.jsx(hs,{closeDrawerHandler:B,lineId:l,chargeCardTypeOption:T}):null,s.jsx(fs,{companyName:v,signedInUser:e,themeState:r,isIssuePhysicalCardEnabled:p,isIssuePhysicalDebitCardEnabled:S,isDebitCardFeatureEnabled:f,isChargeCardFeatureEnabled:h,isChargeCardSetupEnabled:d,isDebitCardSetupEnabled:D,navigate:t,fetchState:j.fetchState,openAddAddressDrawerHandler:K,defaultCardType:m==="creditCard"||m==="debitCard"?m:void 0})]}):O==="Error"?s.jsx(Oa,{}):s.jsx(kr,{})}const bs=_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
|
-
`,ys=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:m,myPendingActivationChargeCardListState:C}=t,{tenantEmailDomain:p}=r,{cards:S}=C;return{onChargeCardRowClick:o=>{const c=zt(S,o),_=Ce(p,o,m,c),A=fe(n.state?.pathnameStackToGoBack,n.pathname);a(_,{state:{pathnameStackToGoBack:A}})},onColumnSortConfigChanged:(o,c)=>{e(Na({uiState:{sortKey:o,sortOrder:c}}))},onReloadCards:()=>{e(ca())},onBackClick:()=>{const o=r.userRole.includes("charge_card_user");e(Na({uiState:{sortKey:o?"cardName":"owner",sortOrder:"ascending"}})),a("../")}}})(_r);function Ss(){const e=le(),t=ue(),a=ge(),r=Wa(),[n,m]=i.useState(!1),C=y(T=>Xn(T)),p=y(T=>ie(T)),S=y(T=>ze(T,p.companyId)),o=$e(S.controllers),{useFeatureGate:c}=ce(),{isFeatureEnabled:_}=c(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:A}=c(Y.isDebitCardFeatureEnabled),f=Se(A,p),U=Ie({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:f}),F=!!p.companyDebitCardInfo?.info?.isDebitCardEnabled,k=!!p.companyChargeCardInfo?.info?.isChargeCardEnabled,h=je(),b=be(p),g=ye(p),d=p.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=Ae({isCardsOnlyTenant:b,isChargeCardFeatureEnabled:_,isBookKeepingTenant:g,isDebitCardProductVisible:U,chargeCardsCreditAccountLimit:d}),v=Ue(h?.loggedInUserRoleMap),j=y(T=>Ye(T)),{creditAccount:O,creditAccountRepayment:P}=y(T=>Ge(T)),V=y(T=>vt(T)).cards.filter(T=>T.type.code.includes("debit")).map(T=>T.connectedAccountId),u=[...new Set(V)],l=y(T=>va(T,u));i.useEffect(()=>{n||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(m(!0),t(ca()),t(Da()))},[n,t,C.fetchState]),i.useEffect(()=>{if(C.fetchState==="Completed"&&C.cards.length===1&&w!=null){const T=Ce(p.tenantEmailDomain,C.cards[0].id,w,C.cards[0]);e(T,{state:{message:a.state?.message}})}},[C.fetchState,C.cards]);const w=X.getSignedInUser();if(i.useEffect(()=>{O.fetchState!=="Completed"&&O.fetchState!=="In-Progress"&&D&&k&&v&&t(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&v&&t($a()),l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&U&&F&&v&&t(xt())},[O.fetchState,P.fetchState,t,l.fetchState,U,F,v,D,k]),w==null)throw Error("Can't access address page without signing in...");if(C.fetchState!=="Completed")return s.jsx(Ke,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}});{const T=Re(D,U,F,k);return s.jsx(bs,{children:s.jsx(ys,{navigate:e,currentTenant:p,signedInUser:w,productInformation:T,myPendingActivationChargeCardListState:C,isChargeCardFeatureEnabled:D,isDebitCardFeatureEnabled:U,isDebitCardSetupEnabled:F,isChargeCardSetupEnabled:k,chargeCardCashbackDetailState:j,creditAccount:O,creditAccountRepayment:P,depositAccountListWithDebitCardIssued:l,controllerEmails:o,location:a})})}}const Is=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:m,isChargeCardSetupEnabled:C,signedInUser:p,location:S,productInformation:o,isEarlyPayEnabled:c,controllerEmails:_,chargeCardsCreditAccountLimit:A}=t;return{onSetupButtonClick:f=>{if(p!=null&&J.trackCardsPromoPageClicked("enable cards"),n)switch(J.trackCardsEnableCardsClick(_,o,"Cards Promo"),f){case"credit":e(Be(r,!0,"charge_cards",c,!1));break;case"debit":e(Be(r,!0,"debit_cards",c,!1));break;case"debit_and_credit":e(A===0?Be(r,!0,"debit_cards",c,!0):Be(r,!0,"charge_cards__debit_cards",c,!1))}else switch(J.trackCardsSetupCardsClick(_,o,"Cards Promo"),f){case"credit":e(Be(r,!1,"charge_cards",c,!1));break;case"debit":e(Be(r,!1,"debit_cards",c,!1));break;case"debit_and_credit":e(A===0?Be(r,!1,"debit_cards",c,!0):Be(r,!1,"charge_cards__debit_cards",c,!1))}},onBackClick:()=>{const f=ve(S.state?.pathnameStackToGoBack);let U=f.poppedPathname;U==null&&(U=m||C?"..":"../.."),a(U,{state:{pathnameStackToGoBack:f.newStack}})},onLetsGoClick:()=>{a("./onboard")},onSetupChargeCardSuccess:()=>{n?(e(_a()),a("../",{relative:"path"})):a("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(tr(r))}}})(wr),As=()=>{const e=le(),{tenantEmailDomain:t}=ia(),[a]=lt(),r=a.get("cardPromoType"),n=ue(),{useDynamicConfig:m,useFeatureGate:C}=ce(),[p,S]=i.useState(!1),{isFeatureEnabled:o}=C(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=C(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:_}=C(Y.isChargeCardFeatureEnabled),{configValue:A}=m(Fe.zeniCardsConfig),f=y(ee=>ie(ee)),U=y(ee=>ze(ee,f.companyId)),F=$e(U.controllers),k=A.charge_card_cashback_rate_per_transaction!=null?A.charge_card_cashback_rate_per_transaction:.0175,h=ge(),b=X.getSignedInUserTenant(t)?.companyId??f.companyId,g=y(ee=>da(ee,b)),d=g.primaryFundingAccount,D=f.companyBillPayInfo?.info,v=be(f),j=ye(f),O=Se(o,f),P=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,V=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:O}),u=Ae({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:_,isBookKeepingTenant:j,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:P}),l=Mt({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:_,isBookKeepingTenant:j}),w=V&&u===!1,T=D?.businessVerificationStatus?.code==="verified"&&(w||d?.accType==="depositAccount"||er(d?.providerVerificationStatus?.code??"")),H=X.getSignedInUser(),B=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,K=!!f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,I=!!f.company?.companyChargeCardInfo.isChargeCardEnabled,L=!!f.company?.companyDebitCardInfo.isDebitCardEnabled,N=!!f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,R=ee=>{S(ee)},W=y(ee=>ee.chargeCardSetupViewState.fetchState);if(H==null)throw Error("Can't access Charge Card promo page without signing in...");const E=je(),G=Ue(E?.loggedInUserRoleMap),q=Ya(E?.loggedInUserRoleMap),[$,x]=i.useState(!1),[se,ae]=i.useState(!1),[ne,Q]=i.useState(!1);i.useEffect(()=>{$===!1&&h.state?.message==="activation"&&x(!0)},[h.state]),i.useEffect(()=>{se||W!=="Not-Started"||b==null||(ae(!0),n(Fa(b,!0)))},[se,W,b,n]);const re=f.companyChargeCardInfo?.info!=null&&Qe({cardInfo:f.companyChargeCardInfo.info,isProductVisible:l,isTOSAccepted:K,isSetupEnabled:I,isUserHasCardsAdminLevelAccess:G,isUserHasCardsAccess:q}),Ee=f.companyDebitCardInfo?.info!=null&&Qe({cardInfo:f.companyDebitCardInfo.info,isProductVisible:V,isTOSAccepted:N,isSetupEnabled:L,isUserHasCardsAdminLevelAccess:G,isUserHasCardsAccess:q}),xe=V&&Ee&&l&&P>=0&&re?"debit_and_credit":V&&Ee?"debit":"credit",Z=Lr(r,xe),he=g?.chargeCardTermsDetails?.fetchStatus?.fetchState,ke=i.useRef(null);i.useEffect(()=>{he==="In-Progress"?ke.current=Z:he!=="Error"&&he!=="Not-Started"||(ke.current=null)},[he,Z]);const Le=he!=="In-Progress"&&he!=="Completed"||ke.current==null?Z:ke.current;i.useEffect(()=>{Z==="credit"&&(I||l===!1&&L)||Z==="debit"&&L||Z==="debit_and_credit"&&L&&I?e("../"):(Z==="debit_and_credit"&&K===!0&&N===!0||Z==="credit"&&(K===!0||l===!1&&N===!0)||Z==="debit"&&N===!0)&&G===!0&&e("../setup")},[T,I,L,Z,K,N]),i.useEffect(()=>{ne||(n(ar("cardAdmin")),Q(!0))},[ne]);const we=y(ee=>Pt(ee.userState,ee.userRoleState,ee.userListViewState,"cardAdmin")),Pe=Re(l,V,L,I);return(re||Ee)&&W==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Qa,{analytics:J,onLoad:()=>{if(J.trackPageLoaded(Nt.Event.cardsPromoPage),!!l&&!I||!!V&&!L||!!l&&!!V&&!L&&!I){const ee=Es({isDebitCardSetupEnabled:L,isChargeCardSetupEnabled:I,isCreditCardProductVisibleForExpressInterest:l,isDebitCardProductVisible:V});J.trackCardsPromoView(F,Pe,"Page",ee,"Promo Page")}}}),s.jsx(xa,{showConfetti:$}),s.jsx(Ca,{isAppContentDrawerOpen:p,handleDrawerToggle:R}),s.jsx(Is,{signedInUser:H,location:h,showEnableCardButton:T,isCompanyBusinessVerificationAndPaymentSetUpDone:T,isChargeCardSetupEnabled:I,isDebitCardSetupEnabled:L,companyLegalName:f.companyName,adminList:we.users,isCheckingEnabled:B,navigate:e,companyId:b,cardPromoType:Le,controllerEmails:F,productInformation:Pe,isCreditCardProductVisible:u,isDebitCardFeatureEnabled:o,isEarlyPayEnabled:c,cashbackRate:k,chargeCardsCreditAccountLimit:P,onClickMenuIcon:()=>{R(!0)}})]}):s.jsx(Ke,{fetchState:"Not-Started"})},Es=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:t,isCreditCardProductVisibleForExpressInterest:a,isDebitCardProductVisible:r})=>a&&r&&!e&&!t?"Credit & Debit Card":a&&!t?"Credit Card":r&&!e?"Debit Card":"";function Ks(){const e=ge(),t=y(W=>ie(W)),{useFeatureGate:a}=ce(),{isFeatureEnabled:r}=a(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:n}=a(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=a(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:C}=a(Y.isChargeCardPaymentHistoryFeatureEnabled),p=Se(n,t),S=Ie({isDebitCardFeatureEnabled:n,isBankingOnlyTenant:p}),o=Pr(t,r,n),c=!!t.company?.companyChargeCardInfo.isChargeCardTOSAccepted,_=!!t.company?.companyDebitCardInfo.isDebitCardTOSAccepted,A=!!t.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!t.company?.companyDebitCardInfo.isDebitCardEnabled,U=je(),F=Ue(U?.loggedInUserRoleMap),k=Ya(U?.loggedInUserRoleMap),{isFeatureEnabled:h}=a(Y.isCashbackFeatureEnabled),b=t.userRole.includes("charge_card_user"),g=!b,d=!b&&A,D=t?.userRole!=null&&nr(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!D)&&rr(U?.loggedInUserRoleMap),j=sr(U?.loggedInUserRoleMap),O=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!D)&&or(U?.loggedInUserRoleMap),{isFeatureEnabled:P}=a(Y.isDepositAccountsFeatureEnabled),V=P&&!D&&ft(U?.loggedInUserRoleMap),u=A&&!D,l=f&&!D,w=o&&!D&&Ue(U?.loggedInUserRoleMap),T=cr(U?.loggedInUserRoleMap),H=be(t),B=ye(t),K=t.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,I=Ae({isCardsOnlyTenant:H,isChargeCardFeatureEnabled:r,isBookKeepingTenant:B,isDebitCardProductVisible:S,chargeCardsCreditAccountLimit:K}),L=t.companyChargeCardInfo?.info!=null&&Qe({cardInfo:t.companyChargeCardInfo.info,isProductVisible:I,isTOSAccepted:c,isSetupEnabled:A,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:k}),N=t.companyDebitCardInfo?.info!=null&&Qe({cardInfo:t.companyDebitCardInfo.info,isProductVisible:S,isTOSAccepted:_,isSetupEnabled:f,isUserHasCardsAdminLevelAccess:F,isUserHasCardsAccess:k}),R=L||N;return s.jsxs(Kt,{children:[F?s.jsx(te,{path:"setup",element:s.jsx(st,{isBillPayAdminLevelAccess:v,isReimbursementAdminLevelAccess:O,isZeniAccountAdminLevelAccess:V,isChargeCardAdminLevelAccess:w,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:j,productType:"charge_cards",type:"setup"})}):null,F?s.jsx(te,{path:"verification",element:s.jsx(st,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:j,isReimbursementAdminLevelAccess:O,isZeniAccountAdminLevelAccess:V,isChargeCardAdminLevelAccess:w,isUserHasOnlyCardAccess:T,productType:"charge_cards",type:"verification"})}):null,s.jsx(te,{path:"promo",element:s.jsx(As,{})}),u||l?s.jsxs(s.Fragment,{children:[s.jsx(te,{path:"/",element:s.jsx(ct,{isPaymentDrawerOpen:!1})}),w&&m?s.jsx(te,{path:"payment",element:s.jsx(ct,{isPaymentDrawerOpen:!0})}):null,s.jsx(te,{path:"activate",element:s.jsx(Ss,{})}),s.jsx(te,{path:"onboard",element:s.jsx(rs,{})}),F?s.jsx(te,{path:"new",element:s.jsx(gs,{})}):null,h&&g?s.jsx(te,{path:"cashback",element:s.jsx(Rr,{})}):null,d?s.jsx(te,{path:"statements",element:s.jsx(ts,{})}):null,w&&C&&A?s.jsx(te,{path:"payment-history",element:s.jsx(as,{})}):null,s.jsx(te,{path:":cardId/activate",element:s.jsx(Vr,{})}),s.jsx(te,{path:":cardId/setPin",element:s.jsx(ds,{})}),s.jsx(te,{path:":cardId/addToWallet",element:s.jsx(Br,{})}),s.jsx(te,{path:":cardId/*",element:s.jsx(Kr,{})}),s.jsx(te,{path:"*",element:s.jsx(Oa,{})})]}):(c||_)&&F?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../setup"})}):R?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../promo",state:e.state})}):s.jsx(te,{path:"*",element:null})]})}export{Ks as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-uNyEitSP.js";import{a as g}from"./sentry-DkoJdbiW.js";import{j as v,h as k,u as x,l as T,g as O,k as E}from"./core-C1D_J1Tm.js";import{z as N,b1 as F,C as P,c as L,e as V,ab as C,b2 as j,ap as A,aq as U,y as B}from"./index-DivBM1Ub.js";import{eN as D,fB as _,rw as M,fw as R,c0 as z,Lv as G,bn as Y,pE as q,ps as H,j_ as Z,lu as S,Lw as $,bC as J,ct as b,lC as K,lF as Q}from"./zeni-epic-state-B_OPwxNR.js";import"./mui-Bl9HwrRv.js";import{c as W}from"./routePaths-BLYSnXgw.js";import{M as X}from"./MobileAppDrawer-D4h5JdAm.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6c71dff2-6ba7-416a-96e2-0d097ed19e58",t._sentryDebugIdIdentifier="sentry-dbid-6c71dff2-6ba7-416a-96e2-0d097ed19e58")}catch{}})();const ee=E(function(t){const a=R(t),i=N.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,w={companyInfo:{...n,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:w}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t($(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(Z({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(q(e,n.split(".")[0]))}}})(j);function de(){const t=v(),a=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(_(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(M())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-uNyEitSP.js";import{a}from"./sentry-DkoJdbiW.js";import{h as D,u as v,g as m,N as w}from"./core-C1D_J1Tm.js";import{Ig as O,eN as A,fi as _,ml as U,fK as E,fh as j,eO as L,In as F}from"./zeni-epic-state-B_OPwxNR.js";import{u as $,z as u,L as g,D as k,o as H}from"./index-DivBM1Ub.js";import{n as z}from"./mui-Bl9HwrRv.js";import{t as R}from"./getLocaleForTenant-M6IdYirk.js";import{g as P,Q as G}from"./QBOConnectionScreen-CmOBvomD.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./empty-sYgfsPuY.js";import"./pdf-lib-Bs8DTePl.js";import"./index-DMaAvz9E.js";import"./url-BsgtzK-J.js";import"./index-D2qnbHpC.js";import"./decodeURIComponentSafe-DU65qRFr.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="f8f6cb81-5e78-403d-a489-46afc299ebc0",t._sentryDebugIdIdentifier="sentry-dbid-f8f6cb81-5e78-403d-a489-46afc299ebc0")}catch{}})();const K=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function ce(){const t=D(),i=v(),{setLoading:d,clearAllLoading:b}=$(),c=a.useRef(!1),p=a.useRef(!1),{code:x,realmId:N,state:T}=P(i.search),y=x!==""&&N!==""&&T!=="",I=m(l=>O(l)),e=m(l=>A(l)),n=m(l=>l.tenantState.fetchState),r=m(l=>l.tenantState.activeTenantFetchState.fetchState),o=u.getSignedInUser(),f=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,h=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{c.current||o==null||f==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(_(o.userId,f))))},[c,n,d]),a.useEffect(()=>{e.tenantId==null&&!p.current&&o!=null&&(p.current=!0,!(f==null||f!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(U(o.userId)))},[p,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||h!=="Error"||(d(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(j(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&u.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:y||S===!1?C.jsx(K,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-uNyEitSP.js";import{z as n}from"./index-DivBM1Ub.js";import{g as p}from"./QBOConnectionScreen-CmOBvomD.js";import"./sentry-DkoJdbiW.js";import{u as a,N as i}from"./core-C1D_J1Tm.js";import"./zeni-epic-state-B_OPwxNR.js";import"./recharts-B3ReBiRu.js";import"./mui-Bl9HwrRv.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./empty-sYgfsPuY.js";import"./pdf-lib-Bs8DTePl.js";import"./index-DMaAvz9E.js";import"./url-BsgtzK-J.js";import"./index-D2qnbHpC.js";import"./decodeURIComponentSafe-DU65qRFr.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-uNyEitSP.js";import{a as u}from"./sentry-DkoJdbiW.js";import{h as y,g as b,k as w,u as A,N}from"./core-C1D_J1Tm.js";import{Ig as k,eN as _,fi as U,Ih as L,ml as R,Ii as z}from"./zeni-epic-state-B_OPwxNR.js";import{u as O,z as f,L as T,t as S,D as $,b as j}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{t as P}from"./getLocaleForTenant-M6IdYirk.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="25aa12d1-2af3-4507-9532-9acbfc7286e2",t._sentryDebugIdIdentifier="sentry-dbid-25aa12d1-2af3-4507-9532-9acbfc7286e2")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=j(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>k(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-uNyEitSP.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-C1D_J1Tm.js";import{Mc as k,Mj as _,fz as J,fy as K,fx as L,im as W,Jk as q,pv as Q,eN as V,LK as D,ik as T,Md as v,Mm as F,ii as G,iG as j}from"./zeni-epic-state-B_OPwxNR.js";import{bn as X,r as N,p as R,z as U,h as z,w as p,m as S,B as M,bo as Y,o as O,bp as ee,y as te}from"./index-DivBM1Ub.js";import{n as Z}from"./mui-Bl9HwrRv.js";import"./sentry-DkoJdbiW.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]="0de73331-9ad8-49dc-a6d7-7586bfbc6014",e._sentryDebugIdIdentifier="sentry-dbid-0de73331-9ad8-49dc-a6d7-7586bfbc6014")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function me({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,{useFeatureGate:d}=R(),c=U.getSignedInUser(),b=h(u=>V(u)),g=z(),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h(u=>k(u,i)),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(M,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},fe=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return E(e,"ach",t,n)}function Se(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},de=Z.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:i}=r;return{onFetchBankName:d=>{e(j(d))},onSaveHandler:d=>{e(G(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:c}=d;e(F({data:c}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),c=d.poppedPathname??$();a(c,{state:{pathnameStackToGoBack:d.newStack}})})(),e(v())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(i,d,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),c=d.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:d.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),i=e??s,d=U.getSignedInUser(),{useFeatureGate:c}=R(),b=z(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h(u=>k(u,i)),{isFeatureEnabled:I}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(M,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{me as A,xe as D,H as V,fe as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-uNyEitSP.js";import{r as l,F as c,h as f}from"./index-DivBM1Ub.js";import{D as p}from"./mui-Bl9HwrRv.js";import"./sentry-DkoJdbiW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c50ea600-5f91-4292-ad12-9502dc38fbde",e._sentryDebugIdIdentifier="sentry-dbid-c50ea600-5f91-4292-ad12-9502dc38fbde")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import{a as d}from"./sentry-DkoJdbiW.js";import{j as A,h as B,u as q,l as J,g as l,N,k as F,n as W,o as _}from"./core-C1D_J1Tm.js";import{Kr as z,eN as O,JQ as K,kq as M,Gz as k,Kw as R,Jj as V,jq as Y,GA as S,JV as $,JW as Q,Jl as H,Jk as L}from"./zeni-epic-state-B_OPwxNR.js";import{aN as U,c as X,w as Z,y as tt}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{d as b}from"./decodeURIComponentSafe-DU65qRFr.js";import{w as et}from"./withTransactionSidePanel-CaH_VfNh.js";import{e as at,b as nt}from"./routePaths-BLYSnXgw.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import"./TransactionDetailScreen-DTxQe0TM.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="b154e75e-7c6b-4ae3-8120-84b34d3f2fe0",a._sentryDebugIdIdentifier="sentry-dbid-b154e75e-7c6b-4ae3-8120-84b34d3f2fe0")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=R(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:V(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:Y(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(Q()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:j}=J(),r=b(w??""),p=b(j??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(M(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:I(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(W,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import{a as r}from"./sentry-DkoJdbiW.js";import{Y as l,Z as p,_ as b,w as f}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import m from"./NotFoundScreen-DtzClrNV.js";import{j as c,u}from"./core-C1D_J1Tm.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b9a83aa7-b690-4828-8ae7-7b69f878cdb8",a._sentryDebugIdIdentifier="sentry-dbid-b9a83aa7-b690-4828-8ae7-7b69f878cdb8")}catch{}})();const j=()=>{const a=c(),e=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(e.pathname);return o!=null?s.jsx(p,{menuItem:b(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{j as F};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-uNyEitSP.js";import{l as w,k as x,j,u as y,h as Z,q as ee,g as D,N as te,n as ae,o as p}from"./core-C1D_J1Tm.js";import{Ix as S,Iy as k,Iz as N,yT as $,yF as L,IA as C,IB as ne,IC as oe,yJ as ie,eO as v,yQ as se,yN as le}from"./zeni-epic-state-B_OPwxNR.js";import{r as g,o as r,s as re,c as I,i as E,v as de,w as ce,x as me,y as F,p as pe,m as ue,T as he,A as xe,h as ge,B as be,C as fe,I as we,S as ye,E as Se,F as ke,G as Ie}from"./index-DivBM1Ub.js";import{n as c}from"./mui-Bl9HwrRv.js";import b from"./NotFoundScreen-DtzClrNV.js";import{a as P}from"./sentry-DkoJdbiW.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="0518dec6-1da0-4884-b43b-40d272abe14e",e._sentryDebugIdIdentifier="sentry-dbid-0518dec6-1da0-4884-b43b-40d272abe14e")}catch{}})();const ve=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,je=x(function(e){const a=S(e),n=k(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(re);function z(){const e=g(),{vendorId:a,billId:n}=w();return a==null||n==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(ve,{windowSize:e,children:t.jsx(je,{vendorId:a,billId:n})})})}const $e=c.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Ce=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Ae();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=De(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const a=j(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:o,children:t.jsx(Ce,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},De=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,ze=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(N({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Ne(){const e=j(),a=y(),n=g(),{vendorId:o,billId:i}=w();return o==null||i==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(Pe,{windowSize:n,children:t.jsx(ze,{location:a,navigate:e,vendorId:o,billId:i})})})}const Le=c.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Ee=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),a=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(b,{}):t.jsx(Le,{windowSize:n,children:t.jsx(Ee,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
|
|
38
|
-
width: ${r.sp4};
|
|
39
|
-
height: ${r.sp4};
|
|
40
|
-
margin-bottom: ${r.sp3};
|
|
41
|
-
margin-top: ${r.sp3};
|
|
42
|
-
margin-left: ${r.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,He=c.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,Me=c.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,Ve=c.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,Ke=x(function(e,a){return{file:a.file,type:a.type}})(Se);function h({appContent:e}){const a=Z(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=w(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),f=g(),G=xe(),B=ge(),H=()=>{G.toggle()},M=D(u=>S(u)),V=D(u=>k(u)),{authParams:K,fetchState:m,billAttachment:W,billFetchState:A,companyName:_,currencySymbol:U,amount:q}=M,{tenantId:J,userId:O,sessionId:Q}=K,{fetchState:R,internationalBankAccountCreateStatus:X}=V;return P.useEffect(()=>{v(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(v(O,Q,J),l!=null&&a(le(l)))},[m]),m==="Error"?t.jsx(b,{}):R==="Completed"||X.fetchState==="Completed"?(v(),t.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?t.jsx(be,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[m==="Completed"&&A==="Completed"&&t.jsx(fe,{analytics:I,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",_,l??"",We(n.pathname),U,q))(u)}),t.jsxs(He,{windowSize:f,children:[f!=="small"?t.jsx(Ge,{onClick:H}):null,t.jsx(Ve,{windowSize:f,isAddressPage:T,children:A==="In-Progress"?t.jsx(we,{size:"ExtraLarge",start:!0}):t.jsx(Ke,{file:W,type:"bill"})}),t.jsx(Me,{windowSize:f,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return t.jsx(Ie,{})}function lt(){return t.jsxs(ae,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(_e,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Be,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ne,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Fe,{})})}),t.jsx(p,{path:"*",element:t.jsx(b,{})})]})}export{lt as default};
|