@zeniai/web-app-ui 5.0.5-qa → 5.0.6-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-CmXsyh03.js +1 -0
- package/dist/assets/{AddressScreen-BmUTIXDQ.js → AddressScreen-B-X5qzW-.js} +2 -2
- package/dist/assets/{AiCfoScreen-DOESDB_y.js → AiCfoScreen-BXFT8pmq.js} +2 -2
- package/dist/assets/BillPayApprovalRoutes-BgkcOK5x.js +1 -0
- package/dist/assets/{BillPayRoutes-CVZSwrXO.js → BillPayRoutes-DnNe2V-N.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-rlQFJbcN.js → BusinessVerificationPageScreen-BozjmV34.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-DhwHiThG.js → ChargeCardRoutes-BmFwoUcK.js} +8 -8
- package/dist/assets/CompanyPassportScreen-DKZTridw.js +1 -0
- package/dist/assets/ConnectionAuthScreen-BWWysV6W.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BE5NZZ2P.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-VbVi0pO3.js → CustomerOnboardingRoutes-BNCOn51l.js} +3 -3
- package/dist/assets/{DashboardRoutes-Djz9fKJS.js → DashboardRoutes-D_29lPSL.js} +3 -3
- package/dist/assets/{DefaultTenantHome-xquI5mdg.js → DefaultTenantHome-8ivrSAg_.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DRuDx2R4.js +18 -0
- package/dist/assets/DrawerScreen-BpzUrArB.js +1 -0
- package/dist/assets/EntityDetailRoutes-ChGJOxFU.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-BLZeM7AE.js → ExpenseAutomationRoutes-DDo7uzxT.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-Spg3mNdc.js +1 -0
- package/dist/assets/{MagicLinkRoutes-CFl_3geL.js → MagicLinkRoutes-BkTnVxqc.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-D_E3Nfyt.js +12 -0
- package/dist/assets/{MobileAppDrawer-DkCKi5Fn.js → MobileAppDrawer-et5RYcH3.js} +1 -1
- package/dist/assets/NotFoundScreen-Dd9439rT.js +1 -0
- package/dist/assets/{NotificationRoutes-DZhNQVLE.js → NotificationRoutes-CyPpEPXZ.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DnBZbbr-.js +1 -0
- package/dist/assets/PeopleRoutes-DQ4IO61u.js +22 -0
- package/dist/assets/PerformanceRoutes-peUbq12W.js +1 -0
- package/dist/assets/{Preview-MGBTnTFX.js → Preview-BtYnn859.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CaGgw5Mo.js → QBOConnectionScreen-CWgLDb58.js} +1 -1
- package/dist/assets/{ReferralListScreen-mDnpbI4k.js → ReferralListScreen-CK5E5ThX.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-BAOjsKJE.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B4m_Prkq.js → ReimbursementApprovalRuleDetailScreen-EtwHZA7l.js} +1 -1
- package/dist/assets/ReimbursementRoutes-DW8oFqsG.js +68 -0
- package/dist/assets/{ReportsRoutes-B55Mm_bZ.js → ReportsRoutes-Bn-b11tM.js} +1 -1
- package/dist/assets/RewardsRoutes-C6Oc1Eao.js +1 -0
- package/dist/assets/{ScreenRoutes-CR4LbxNH.js → ScreenRoutes-CprmvN-0.js} +2 -2
- package/dist/assets/{SettingsRoutes-BAZtLZO7.js → SettingsRoutes-D1j9Juy5.js} +7 -7
- package/dist/assets/{SetupPagesScreen-Ck1fJ-gD.js → SetupPagesScreen-DxPXSE-8.js} +5 -5
- package/dist/assets/{SignInScreen-BGmMngZm.js → SignInScreen-nkVjzVHM.js} +1 -1
- package/dist/assets/SignOutScreen-C2vLpGLo.js +9 -0
- package/dist/assets/{TaskListScreen-C_FkV4uq.js → TaskListScreen-DkMDnCdZ.js} +2 -2
- package/dist/assets/TaskRoutes-9jinTN2e.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CNRZjvBK.js +1 -0
- package/dist/assets/TransactionDetailScreen-DRseecoZ.js +5 -0
- package/dist/assets/{TransactionListRoutes-C4fPXh7s.js → TransactionListRoutes-BieAMU0D.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CMZcHv3V.js → TreasuryRoutes-Dt-qNZ5M.js} +6 -6
- package/dist/assets/{VendorsRoutes-BlU_E8-4.js → VendorsRoutes-D3kwdSzs.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-sjN-MVdu.js +12 -0
- package/dist/assets/ZeniAccountRoutes-BTlXrevh.js +66 -0
- package/dist/assets/ZeniAccountStatementScreen-C0dNryvZ.js +9 -0
- package/dist/assets/{accountMappingHelper-QKMWvJHt.js → accountMappingHelper-Du9JpeqN.js} +1 -1
- package/dist/assets/{analytics-vyykHm3I.js → analytics-TRk1FnxP.js} +1 -1
- package/dist/assets/{analyticsHelper-UdYvDCQO.js → analyticsHelper-BuN_uMfF.js} +1 -1
- package/dist/assets/{core-a8i-_0Kh.js → core-DpUaSmvm.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B_IVipCF.js → decodeURIComponentSafe-BLyCvwpO.js} +1 -1
- package/dist/assets/{dnd-CDdU3ON0.js → dnd-DSHtKbZK.js} +1 -1
- package/dist/assets/{empty-wLiJa_AW.js → empty-BZ5MPGvt.js} +1 -1
- package/dist/assets/{empty-9qzWTKUd.js → empty-DRO_6jBS.js} +1 -1
- package/dist/assets/{emptyVideoElement-CLFouTmB.js → emptyVideoElement-BnbjPngU.js} +1 -1
- package/dist/assets/epic-DAKL4alI.js +2 -0
- package/dist/assets/getLocaleForTenant-BwQGGu8x.js +1 -0
- package/dist/assets/{index-HUopGLCJ.js → index-BPoOO_8E.js} +1 -1
- package/dist/assets/{index-DvmHdckU.js → index-Bga2U2NV.js} +1 -1
- package/dist/assets/{index-DYi-byqV.js → index-ChjxQ77O.js} +2 -2
- package/dist/assets/{index-DfNhtpOm.js → index-Cr3sKd0Z.js} +1 -1
- package/dist/assets/{index-DTPu_Uy6.js → index-DaUwBxJq.js} +1 -1
- package/dist/assets/{index-BgPY0rlK.js → index-JTC5t-nb.js} +1 -1
- package/dist/assets/{index-CtIv1cPm.js → index-ZCpiztuj.js} +11164 -11137
- package/dist/assets/{lexical-BzneVI9m.js → lexical-BEQMr6JI.js} +1 -1
- package/dist/assets/{liveblocks-ZAKgWoPK.js → liveblocks-CiVr43xr.js} +1 -1
- package/dist/assets/{lottie-DN0gYkdx.js → lottie-NYt-mSTs.js} +1 -1
- package/dist/assets/{mui-B8yatdty.js → mui-CsdmIe4O.js} +1 -1
- package/dist/assets/{pathToGoBack-EHg1lj9D.js → pathToGoBack-Do6wdmvl.js} +1 -1
- package/dist/assets/{pdf-C4rebPwh.js → pdf-BTUpRiCj.js} +3 -3
- package/dist/assets/{pdf-lib-OiZx9iEf.js → pdf-lib-Bbn4DthR.js} +1 -1
- package/dist/assets/{plaid-CP3hLhCR.js → plaid-6OVQznh-.js} +1 -1
- package/dist/assets/{pusher-BCOUDezq.js → pusher-DcNsnCBT.js} +1 -1
- package/dist/assets/{react-BEOXxta6.js → react-Bzvmtxrz.js} +1 -1
- package/dist/assets/{react-DqZkiZdy.js → react-CRKcY_m2.js} +1 -1
- package/dist/assets/{react-DHgntsyD.js → react-CnYG2hfo.js} +1 -1
- package/dist/assets/{react-B7vOmlcy.js → react-Cskb3f9B.js} +1 -1
- package/dist/assets/{react-DWmQOvam.js → react-epz72mwm.js} +1 -1
- package/dist/assets/{react-C3aQn_52.js → react-x0J6tH4c.js} +1 -1
- package/dist/assets/{recharts-BhJEeZEG.js → recharts-Bx9Bx3a3.js} +1 -1
- package/dist/assets/{routePaths-CAPvhOau.js → routePaths-DcJX3UgM.js} +1 -1
- package/dist/assets/{sentry-Bp45iw9z.js → sentry-DnSOFLDc.js} +1 -1
- package/dist/assets/{url-asQ2Q_hT.js → url-DdienGVG.js} +1 -1
- package/dist/assets/{url-DV9yGLNd.js → url-Du8gNQY5.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-B2GpnLqR.js +1 -0
- package/dist/assets/{useDeviceId-AHvFaHki.js → useDeviceId-CRKD2ns4.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-DNAzr1uv.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BTSPvXZ7.js → useInitialThreadRequest-Ds9_vLOY.js} +1 -1
- package/dist/assets/{utils-ikosPjSL.js → utils-D153Jmpv.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BRNXRpXy.js → withTransactionSidePanel-lqX86aez.js} +2 -2
- package/dist/assets/{zeni-epic-state-ZCc1K30S.js → zeni-epic-state-Cch--5Rd.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Dg5wTso4.js +0 -1
- package/dist/assets/BillPayApprovalRoutes-Devc75aa.js +0 -1
- package/dist/assets/CompanyPassportScreen-OV_RlgTD.js +0 -1
- package/dist/assets/ConnectionAuthScreen-CXSm9A3K.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-kIRiytnK.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BPKqOjuc.js +0 -18
- package/dist/assets/DrawerScreen-BAinUAiT.js +0 -1
- package/dist/assets/EntityDetailRoutes-C426Mprw.js +0 -1
- package/dist/assets/FeaturePreviewScreen-BOGEp7mZ.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BDCry5qq.js +0 -12
- package/dist/assets/NotFoundScreen-DPOmbROX.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DSOuY0Sq.js +0 -1
- package/dist/assets/PeopleRoutes-DJ5vAQLD.js +0 -22
- package/dist/assets/PerformanceRoutes-B6wY-7PG.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-CiEDO6E-.js +0 -1
- package/dist/assets/ReimbursementRoutes-DvqIKhWH.js +0 -68
- package/dist/assets/RewardsRoutes-D3siXOf6.js +0 -1
- package/dist/assets/SignOutScreen-B7Ls3yjH.js +0 -9
- package/dist/assets/TaskRoutes-DubqoBe-.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BLrzFmca.js +0 -1
- package/dist/assets/TransactionDetailScreen-Dq4Bv7Yw.js +0 -5
- package/dist/assets/WiseConfirmationScreen-DcnsS_39.js +0 -12
- package/dist/assets/ZeniAccountRoutes-C1H652qU.js +0 -66
- package/dist/assets/ZeniAccountStatementScreen-BUk4IFgX.js +0 -9
- package/dist/assets/epic-CvkQWhDA.js +0 -2
- package/dist/assets/getLocaleForTenant-B5XIMdPl.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-D6kPXOEr.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-D_w411d6.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-ZCpiztuj.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DnSOFLDc.js"><link rel="modulepreload" crossorigin href="/assets/core-DpUaSmvm.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Cch--5Rd.js"><link rel="modulepreload" crossorigin href="/assets/mui-CsdmIe4O.js"><link rel="modulepreload" crossorigin href="/assets/analytics-TRk1FnxP.js"><link rel="modulepreload" crossorigin href="/assets/utils-D153Jmpv.js"><link rel="stylesheet" crossorigin href="/assets/index-D-vub4_t.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.6-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.2",
|
|
31
|
+
"@zeniai/client-epic-state": "5.0.3",
|
|
32
|
+
"@zeniai/web-components": "4.0.7",
|
|
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-ZAKgWoPK.js";import{A as i}from"./AddressScreen-BmUTIXDQ.js";import s from"./NotFoundScreen-DPOmbROX.js";import"./sentry-Bp45iw9z.js";import{n as d,o as r}from"./core-a8i-_0Kh.js";import"./zeni-epic-state-ZCc1K30S.js";import"./recharts-BhJEeZEG.js";import"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.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]="339d6624-b51b-426b-a0cc-e8e8bd837ae0",t._sentryDebugIdIdentifier="sentry-dbid-339d6624-b51b-426b-a0cc-e8e8bd837ae0")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-ZAKgWoPK.js";import{a as f}from"./sentry-Bp45iw9z.js";import{j as U,u as B,h as T,g as v,N,k as j,l as $,n as L,o as h}from"./core-a8i-_0Kh.js";import{eM as O,M2 as A,LK as b,wT as w,wN as F,wR as I,wG as M,LM as W,wJ as q,wV as z,wU as C}from"./zeni-epic-state-ZCc1K30S.js";import{m as P,z as k,B as V,a1 as G,bu as J,aa as _,bv as K}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import{i as H}from"./ReimbursementApprovalRuleDetailScreen-B4m_Prkq.js";import Q from"./NotFoundScreen-DPOmbROX.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]="92c86552-2b18-4ae4-97bb-c2f2cfdc1d67",e._sentryDebugIdIdentifier="sentry-dbid-92c86552-2b18-4ae4-97bb-c2f2cfdc1d67")}catch{}})();const R="bill-approval-rule-update",X=j(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(R)&&e(W(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(G(J)),Y=()=>{const e=U(),o=B(),t=T(),[p,a]=f.useState(!1),[u,s]=f.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>O(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(f.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),f.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...");f.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const y={events:c.companyId!=null?[`private-${c.companyId}.${R}`]:[],eventCallback:(i,x,m)=>{i.endsWith(R)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(X,{currentTenant:c,location:o,navigate:e,...y})},Z=j(function(e,o){const t=b(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=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(y=>{const i=y.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),x=y.actors.selectedNonUsers.map(S=>{const E=!!H(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(x);g.push({action:y.stepType.selectedOption,actors:m,operator:m.length>1?y.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(z())},onSaveRuleSuccess:()=>{t("../")}}})(K);function D(){const e=U(),o=T(),t=B(),{approvalRuleId:p}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=f.useState(!1);if(f.useEffect(()=>{n||(c(!0),o(q(!0)))}),f.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(V,{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(L,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(Q,{})})]})}export{se as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-ZAKgWoPK.js";import{a as g}from"./sentry-Bp45iw9z.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-a8i-_0Kh.js";import{z as C,aZ as F,v as P,d as L,f as V,aa as N,a_ as j,ao as A,ap as M,q as U}from"./index-CtIv1cPm.js";import{eM as D,fC as B,rf as _,fx as R,b$ as z,Lf as G,bm as Y,pn as Z,pb as $,jI as q,lc as S,Lg as H,bB as J,cr as b,lk as K,ln as Q}from"./zeni-epic-state-ZCc1K30S.js";import"./mui-B8yatdty.js";import{c as W}from"./routePaths-CAPvhOau.js";import{M as X}from"./MobileAppDrawer-DkCKi5Fn.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]="b639a60f-642c-4d36-85d0-94d544c7dd3d",t._sentryDebugIdIdentifier="sentry-dbid-b639a60f-642c-4d36-85d0-94d544c7dd3d")}catch{}})();const ee=E(function(t){const a=R(t),i=C.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=U(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,v={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.subIndustry?.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:M(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:v}))},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(H(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(q({files:e}))},onDeleteFile:e=>{t($(e))},onEditFileName:(e,n)=>{t(Z(e,n.split(".")[0]))}}})(j);function de(){const t=w(),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??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(B(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[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,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-ZAKgWoPK.js";import{a}from"./sentry-Bp45iw9z.js";import{h as D,u as v,g as u,N as w}from"./core-a8i-_0Kh.js";import{H_ as _,eM as A,fj as O,m3 as j,fJ as h,fi as U,eN as L,I6 as F}from"./zeni-epic-state-ZCc1K30S.js";import{u as H,z as p,L as g,D as $,o as k}from"./index-CtIv1cPm.js";import{n as z}from"./mui-B8yatdty.js";import{t as R}from"./getLocaleForTenant-B5XIMdPl.js";import{g as P,Q as G}from"./QBOConnectionScreen-CaGgw5Mo.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./empty-9qzWTKUd.js";import"./pdf-lib-OiZx9iEf.js";import"./index-DTPu_Uy6.js";import"./url-asQ2Q_hT.js";import"./index-DvmHdckU.js";import"./decodeURIComponentSafe-B_IVipCF.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]="90c8535a-7421-4913-8938-db06dfde49a0",t._sentryDebugIdIdentifier="sentry-dbid-90c8535a-7421-4913-8938-db06dfde49a0")}catch{}})();const J=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 ${k.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function fe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=H(),f=a.useRef(!1),c=a.useRef(!1),{code:b,realmId:N,state:T}=P(i.search),y=b!==""&&N!==""&&T!=="",I=u(l=>_(l)),e=u(l=>A(l)),n=u(l=>l.tenantState.fetchState),r=u(l=>l.tenantState.activeTenantFetchState.fetchState),o=p.getSignedInUser(),m=p.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{f.current||o==null||m==null||(f.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(O(o.userId,m))))},[f,n,d]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),p.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&p.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:y||S===!1?C.jsx(J,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-ZAKgWoPK.js";import{z as m}from"./index-CtIv1cPm.js";import{g as n}from"./QBOConnectionScreen-CaGgw5Mo.js";import"./sentry-Bp45iw9z.js";import{u as p,N as a}from"./core-a8i-_0Kh.js";import"./zeni-epic-state-ZCc1K30S.js";import"./recharts-BhJEeZEG.js";import"./mui-B8yatdty.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./empty-9qzWTKUd.js";import"./pdf-lib-OiZx9iEf.js";import"./index-DTPu_Uy6.js";import"./url-asQ2Q_hT.js";import"./index-DvmHdckU.js";import"./decodeURIComponentSafe-B_IVipCF.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]="34360189-ad08-40f6-93e1-76035a2c6a6d",t._sentryDebugIdIdentifier="sentry-dbid-34360189-ad08-40f6-93e1-76035a2c6a6d")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-ZAKgWoPK.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-a8i-_0Kh.js";import{LY as k,M3 as M,fA as _,fz as q,fy as J,i3 as W,J4 as Y,pe as K,eM as V,Lu as D,i1 as T,LZ as S,M6 as F,h$ as G,io as j}from"./zeni-epic-state-ZCc1K30S.js";import{bj as Q,Z as R,a as N,z as U,m as Z,p,i as v,B as z,bk as X,o as O,bl as ee,q as te}from"./index-CtIv1cPm.js";import{n as H}from"./mui-B8yatdty.js";import"./sentry-Bp45iw9z.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]="36a5c6a4-7dc1-484e-a56e-6fb481f087c1",e._sentryDebugIdIdentifier="sentry-dbid-36a5c6a4-7dc1-484e-a56e-6fb481f087c1")}catch{}})();const ae=A(null,function(e,t){return{onSaveVendor:a=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(J(a,"BillPayVendor"))},onResendOtp:a=>{e(q(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(_(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(M(a,n,o))}}})(Q);function L({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=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
|
-
`,oe=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),r=s.poppedPathname??E();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??E(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(X);function fe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:r}=B(),d=e??s,{useFeatureGate:c}=N(),i=U.getSignedInUser(),b=h(u=>V(u)),g=Z(),x=p(n.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(L,{vendorId:d,billId:r}),l.jsx(oe,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},me=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},$=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function Se(e,t,a){return $(e,"ach",t,a)}function ve(e,t,a){return $(e,"domestic",t,a)}function ge(e,t,a){return $(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},ce=H.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:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:i}=c;e(F({data:i}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),i=c.poppedPathname??P();n(i,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(d,c,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),i=c.poppedPathname??P(0);t.navigate(i,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:r}=B(),d=e??s,c=U.getSignedInUser(),{useFeatureGate:i}=N(),b=Z(),g=h(u=>V(u)),x=p(n.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(L,{vendorId:d,billId:r}),l.jsx(re,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{fe as A,xe as D,L as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-ZAKgWoPK.js";import{Z as l,w as c,m as f}from"./index-CtIv1cPm.js";import{D as p}from"./mui-B8yatdty.js";import"./sentry-Bp45iw9z.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]="b4cc9519-6a54-4b57-ae43-7dee2d554313",e._sentryDebugIdIdentifier="sentry-dbid-b4cc9519-6a54-4b57-ae43-7dee2d554313")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??b.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{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import{a as d}from"./sentry-Bp45iw9z.js";import{j as A,h as B,u as F,l as J,g as l,N as q,k as M,n as N,o as O}from"./core-a8i-_0Kh.js";import{Kb as _,eM as K,JA as R,k8 as W,Gi as k,Kg as Y,J3 as $,j8 as z,Gj as S,JF as V,JG as H,J5 as L,J4 as Q}from"./zeni-epic-state-ZCc1K30S.js";import{aM as U,d as X,p as Z,q as tt}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import{d as b}from"./decodeURIComponentSafe-B_IVipCF.js";import{w as et}from"./withTransactionSidePanel-BRNXRpXy.js";import{e as at,b as nt}from"./routePaths-CAPvhOau.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import"./TransactionDetailScreen-Dq4Bv7Yw.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]="d5f26bd0-13df-4277-a7c5-d32217bb2e02",a._sentryDebugIdIdentifier="sentry-dbid-d5f26bd0-13df-4277-a7c5-d32217bb2e02")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(H()),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=F(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:G}=J(),r=b(j??""),p=b(G??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),x=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:x,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:I(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Gt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Gt as EntityDetailRoutes,Gt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import{a as r}from"./sentry-Bp45iw9z.js";import{V as c,X as d,Y as l,p}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import m from"./NotFoundScreen-DPOmbROX.js";import{j as u,u as b}from"./core-a8i-_0Kh.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]="eaf11e13-591f-4afe-82bb-7c7fc7a5da21",e._sentryDebugIdIdentifier="sentry-dbid-eaf11e13-591f-4afe-82bb-7c7fc7a5da21")}catch{}})();const D=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(d,{menuItem:l(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-ZAKgWoPK.js";import{a as f}from"./sentry-Bp45iw9z.js";import{h as U,u as _,j as w,q as M,g as l,N as T}from"./core-a8i-_0Kh.js";import{z as r,m as P,D as V,e as A,d as N,f as R,s as $,$ as q,g as W}from"./index-CtIv1cPm.js";import{eM as B,I0 as G,Ib as H,I1 as J,eN as K,fi as Q,I7 as X,fF as Y,cR as Z,Ic as ee,Id as te}from"./zeni-epic-state-ZCc1K30S.js";import{n as ne}from"./mui-B8yatdty.js";import{u as se}from"./useDeviceId-AHvFaHki.js";import{f as ae}from"./analyticsHelper-UdYvDCQO.js";import{t as ie}from"./getLocaleForTenant-B5XIMdPl.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.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]="a56af1ff-d798-4cd2-9533-c65c1665dc5d",t._sentryDebugIdIdentifier="sentry-dbid-a56af1ff-d798-4cd2-9533-c65c1665dc5d")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=_(),m=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),k=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(R.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,b,s,o,k,v,a.state,t]);const F=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx($,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:O,onCancelVerifyDevice:F});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-ZAKgWoPK.js";import{j as r,k as i}from"./core-a8i-_0Kh.js";import{U as n}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import"./sentry-Bp45iw9z.js";import"./zeni-epic-state-ZCc1K30S.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8569e781-4cca-432a-a9cb-bfb8f16b11e6",o._sentryDebugIdIdentifier="sentry-dbid-8569e781-4cca-432a-a9cb-bfb8f16b11e6")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-ZAKgWoPK.js";import{j as Z,h as J,u as Q,l as K,g as d,k as X,n as ee,o as C}from"./core-a8i-_0Kh.js";import{eM as M,pZ as U,px as ae,IT as $,ps as S,bu as te,bm as se,bQ as oe,pt as re,IU as ne,IE as T,dF as ie,tk as ce,IV as le,tH as de,eT as me,eR as fe}from"./zeni-epic-state-ZCc1K30S.js";import{I as pe,z as ue,J as he,j as be,a as w,i as q,v as Fe,d as B,aj as ge,q as Ie}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import Ce from"./NotFoundScreen-DPOmbROX.js";import{F as Te}from"./FeaturePreviewScreen-BOGEp7mZ.js";import{a as h}from"./sentry-Bp45iw9z.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import{c as ye}from"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import{u as Ae}from"./useInitialThreadRequest-BTSPvXZ7.js";import{t as ke}from"./routePaths-CAPvhOau.js";import{M as xe}from"./MobileAppDrawer-DkCKi5Fn.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="97c5cf89-c6b1-469d-880d-b9b43bed600f",s._sentryDebugIdIdentifier="sentry-dbid-97c5cf89-c6b1-469d-880d-b9b43bed600f")}catch{}})();const y=(s,a,e,o)=>{if(s!=a){const r=o||"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},je=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(S(e)),y(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const b=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=ke(a.tenantEmailDomain,e.accountId,e.accountType,b,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(T({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(ge);function v(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=Z(),o=J(),r=Q(),{forecastId:i,tenantEmailDomain:b}=K(),[f,p]=h.useState(!1),[F,A]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),G=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),j=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>x.pandLByForecastID[t]!=null&&re(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=he();ye({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Se({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&g)p(!0),l||o(ae());else if(l&&!F){A(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(I=>I.id===R):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(c,i,j?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(o($(c.forecasts[t].id,t)),y(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&y(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!D(c.forecasts[t].id)&&g&&o(S(c.forecasts[t].id))}},[f,p,o,l,c,F,A,U,S,g]);const E=be(),V=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:L}=W(q.isReportsCommentingEnabled),Y=Ae(L?k?.companyId:void 0,{clearParams:l&&F}),[z,H]=h.useState(!1),O=t=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(xe,{isAppContentDrawerOpen:z,handleDrawerToggle:O}),n.jsx(je,{firstMonthOfFY:G,tenantEmailDomain:b,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:D,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Je(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Te,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as PandLWithForecastRoutes,Je as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import{IO as oe,eM as X,j8 as W,eT as J,eR as ie,Gm as Y,Iq as re,ss as ke,IP as N,sg as Pe,sB as je,sv as le,sk as de,sz as Te,sw as ve,IQ as ce,u6 as Le,IR as Fe,fx as Ae,IS as G,sp as pe,sn as ue,sE as Oe,b$ as Re}from"./zeni-epic-state-ZCc1K30S.js";import{Z as me,a as ee,i as E,z as _,a4 as ge,E as he,af as fe,ag as Ve,w as Ce,o as A,F as be,D as ye,ah as Ue,J as Be,I as Ze,v as $e,d as we,f as ze,q as Ge,ai as He,j as Me}from"./index-CtIv1cPm.js";import{D as Se,n as q,S as De}from"./mui-B8yatdty.js";import te from"./NotFoundScreen-DPOmbROX.js";import{a as l}from"./sentry-Bp45iw9z.js";import{h as se,l as We,g,j as _e,u as qe,k as Ke,n as ne,o as z}from"./core-a8i-_0Kh.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import{M as Xe}from"./MobileAppDrawer-DkCKi5Fn.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7638860e-e3ee-4aec-a7d0-4b78c5ddf524",e._sentryDebugIdIdentifier="sentry-dbid-7638860e-e3ee-4aec-a7d0-4b78c5ddf524")}catch{}})();const Je={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=We(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>W(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=J(I,m),v=ie(m),L=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(L))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=q(De)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,xe=q(be.H6Regular)`
|
|
6
|
-
margin-top: ${A.sp7};
|
|
7
|
-
padding-left: ${A.sp8};
|
|
8
|
-
padding-right: ${A.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=q(be.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${A.sp8};
|
|
14
|
-
padding-right: ${A.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${A.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,ss={overlayWidth:new Ce(100,100,48)},M=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),S=g(r=>oe(r)),c=g(r=>X(r)),m=g(r=>W(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=J(C,c),P=ie(c),v=Y(c),L=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(N())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:Z}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=D(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:v,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):ve())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:M.discardTitle}),descriptionComponent:s.jsx(Ee,{children:M.discardDescription}),primaryButtonText:M.discard,secondaryButtonText:M.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=q(De)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,ns=Ke(function(e,n){const d=ce(e),o=_.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:W(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}})(He);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=_e(),o=se(),h=qe(),{areTenantIdsInSync:i}=Be(),y=_.getSignedInUser(),f=g(a=>X(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>W(a)),k=!J(O,f)&&R,w=Y(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,v]=l.useState(!1),[L,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:B}=Ze(),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:$}=Qe({isAiCfoOpen:F,setIsAiCfoOpen:B,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Ne({isDataReady:p.fetchState==="Completed"});const j=g(a=>Le(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=f?.companyId;l.useEffect(()=>{m&&L===p.uiState.mode||!i||(o(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,S,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),v(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),v(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:we,onLoad:a=>a.trackPageLoaded(ze.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,K)=>{o(G({sortKey:a,sortOrder:K}))},onRowClick:a=>{const K=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Ge(h.state?.pathnameStackToGoBack,h.pathname);d(K,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:Z,onAskAiCfoClick:$})]})}function Es(){const e=Me();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(z,{path:"/",element:s.jsx(Q,{})}),s.jsx(z,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx(z,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx(z,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(z,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import _ from"./NotFoundScreen-DPOmbROX.js";import{a as r}from"./sentry-Bp45iw9z.js";import{j as M,u as v,g as u,l as U,h as P,N as z,k as Q,n as V,o as h}from"./core-a8i-_0Kh.js";import{eM as B,Ot as b,bn as F,bm as N,gQ as H,gy as $}from"./zeni-epic-state-ZCc1K30S.js";import{Q as q,z as I,I as G,cp as J}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import{u as K}from"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import{c as L}from"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import{M as W}from"./MobileAppDrawer-DkCKi5Fn.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.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]="e1b9eb94-03e9-4cef-99cd-4461a56614aa",e._sentryDebugIdIdentifier="sentry-dbid-e1b9eb94-03e9-4cef-99cd-4461a56614aa")}catch{}})();const X=Q(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=M(),t=v(),c=q(),o=u(a=>B(a)),{aggregatedReportViewState:n}=u(a=>b(a)),{tenantEmailDomain:m}=U(),p=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,S]=r.useState(!1),w=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(d),A=w||k||y,l=r.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),x=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=K({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),A?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:g}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:x,handleDrawerToggle:g,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return s.jsxs(V,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{Ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-ZAKgWoPK.js";import x from"./NotFoundScreen-DPOmbROX.js";import{a as p}from"./sentry-Bp45iw9z.js";import{j as I,u as C,h as A,g as c,N as E,k,n as D,o as u}from"./core-a8i-_0Kh.js";import{eM as T,Mb as v,Mr as S,C7 as V,Bg as B,C6 as m,BZ as M,MG as U}from"./zeni-epic-state-ZCc1K30S.js";import{m as _,z as $,B as N,a1 as O,bF as W,aa as z}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-B4m_Prkq.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]="7511c9dc-84b4-4f3b-bf7c-7fc615663406",e._sentryDebugIdIdentifier="sentry-dbid-7511c9dc-84b4-4f3b-bf7c-7fc615663406")}catch{}})();const f="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:v(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(f)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(M(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),G=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[d,y]=p.useState(!1),b=c(s=>s.remiSetupApproverViewState.fetchState),o=c(s=>T(s)),w=_(),i=c(s=>v(s)),g=c(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(V())},[g]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(B(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(s,P,R)=>{s.endsWith(f)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Y(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(G,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Y as R};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import{j as W,h as le,u as J,l as Y,g as w,N,k as q,i as ut,n as pt,o as B}from"./core-a8i-_0Kh.js";import{eM as V,MH as me,b$ as ce,Bb as xe,jj as bt,Bo as ae,Bn as se,MI as gt,bm as de,fG as Te,MJ as ht,J3 as ft,j8 as je,J4 as Se,J5 as St,i1 as It,LZ as yt,ih as Rt,A$ as At,rQ as vt,i8 as Ct,BL as De,MK as Fe,ML as kt,MM as Et,MN as Bt,MO as wt,MP as xt,Bv as Ie,io as Tt,M6 as jt,Bp as Dt,B9 as Ft,MQ as Ut,B8 as Lt,MR as Mt,Bh as ye,Bz as Pt,By as $t,Bu as Nt,MS as Ue,Gm as _t,bn as Ot,Bk as Gt,C1 as zt,MT as Ht,MU as Zt,BH as Jt,BE as Re,Ls as Vt,B6 as Wt,MV as Le,Cq as Ae,Cy as qt,MW as Kt,MX as H,MY as Qt,MZ as Me,M_ as Xt,M$ as Pe,N0 as $e,BT as ie,bs as Yt,bD as ue,cy as pe,eT as Ne,eR as _e,N1 as en,gy as tn,LF as nn,N2 as an,N3 as Oe,LJ as sn,Mr as on,N4 as rn,MG as ln,Cv as ve,Cu as mn,N5 as cn,N6 as dn,N7 as un,N8 as pn,N9 as bn,Mc as gn,Cl as hn,Cp as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,I2 as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-ZCc1K30S.js";import{Q as Ge,Z as ze,a as ee,i as v,z as P,bG as He,v as te,d as C,aC as Ce,o as U,ao as X,E as wn,D as Ze,bH as xn,q as Z,I as Je,bI as Tn,j as ne,bJ as jn,J as Dn,w as Fn,B as be,f as Ve,a1 as Un,b7 as Ln,O as Mn,m as We,bK as Pn,a4 as $n}from"./index-CtIv1cPm.js";import{n as _,S as Nn}from"./mui-B8yatdty.js";import oe from"./NotFoundScreen-DPOmbROX.js";import{S as ke}from"./SetupPagesScreen-Ck1fJ-gD.js";import{F as qe}from"./FeaturePreviewScreen-BOGEp7mZ.js";import{a as g}from"./sentry-Bp45iw9z.js";import{u as Ke}from"./useInitialThreadRequest-BTSPvXZ7.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import{D as _n}from"./DrawerScreen-BAinUAiT.js";import{M as Ye}from"./MobileAppDrawer-DkCKi5Fn.js";import{R as On}from"./ReimbursementApprovalRoutes-CiEDO6E-.js";import{FallBackRoute as Gn}from"./ScreenRoutes-CR4LbxNH.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./analyticsHelper-UdYvDCQO.js";import"./routePaths-CAPvhOau.js";import"./BusinessVerificationPageScreen-rlQFJbcN.js";import"./ReimbursementApprovalRuleDetailScreen-B4m_Prkq.js";import"./getLocaleForTenant-B5XIMdPl.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]="d1da21ee-bdbc-4264-9100-8b915848afd2",e._sentryDebugIdIdentifier="sentry-dbid-d1da21ee-bdbc-4264-9100-8b915848afd2")}catch{}})();const et=e=>`/${e}/reimbursements`,zn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=q(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Mt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=W(),t=le(),n=J(),{reimbursementId:r}=Y(),c=Ge(),d=ze(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=J().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>V(u)),f=w(u=>me(u,r)),D=Ke(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(N,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(M=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Jn,{}):null,m&&d!=="small"?s.jsx(Vn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Jn=_.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${wn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Vn=_.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Wn=_.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,qn=_.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${U.sp2} ${U.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${U.sp4};
|
|
49
|
-
height: ${U.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Kn=_.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Qn=q(function(e,t){const n=Ue(e,t.reimbursementId),r=P.getSignedInUser(),c=de(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=ce(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=et(o),i=Z(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Wt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(De(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Jt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Xn(){const e=W(),t=le(),n=J(),r=n.hash.substring(1),c=Ge(),{reimbursementId:d}=Y(),m=P.getSignedInUser(),o=w(E=>V(E)),a=w(E=>Ue(E,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ke(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:I}=Je(),{isAiCfoAccessEnabled:S,onAskAiCfoClick:x}=Qe({isAiCfoOpen:p,setIsAiCfoOpen:I,mobileExploreReferrer:"Reimbursement Details"});Xe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:R}=ee(),{isFeatureEnabled:j}=R(v.isLimitedCategoryForReimbursement),[b,k]=g.useState(!1),[y,T]=g.useState(!1),[f,D]=g.useState(!1),{isFeatureEnabled:$}=R(v.isReimbursementCommentingEnabled),{isFeatureEnabled:A}=R(v.isShowDeletedReimbursementsFeatureEnabled),F=w(E=>me(E,d??"")),u=_t(o),M=Ot(o.userRole),z=a.fetchState;if(g.useEffect(()=>{b||d==null?b==1&&z==="Error"&&e("page-not-found",{replace:!0}):(k(!0),t(Gt(d,!1,A)))},[b,d,t,z]),g.useEffect(()=>{A&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&u===!1?D(!1):D(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(M||a.allApprovers.find(E=>E.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,M,o.isZeni,u,m]),g.useEffect(()=>{y||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||F.fetchState=="Completed"||F.fetchState=="In-Progress"||(T(!0),t(xe(!1,j,A,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(zt(!1,!0,!0,a.lastUpdatedByUserId)))},[y,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(N,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:C,onLoad:E=>(K=>{d!=null&&K.trackReimbursementReimbursementDetails(d)})(E)}),s.jsx(Qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:$,isShowDeletedReimbursementEnabled:A,location:n,navigate:e,isRealTimeApprovalEnabled:f,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:S,onAskAiCfoClick:x})]})}const Yn=q(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(H())},onCloseReviewItem:n=>{e(Kt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(qt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(jn);function ea(){const e=W(),t=w(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(d=>Le(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return g.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Yn,{navigate:e,analytics:C,isAdmin:c})}const G=sn(),tt="bulk-operation-update",re="reimbursement-approval-rule-update",{spendManagement:ta,common:Be}=Ze.getLocalizedStrings(),we=ta.reimbursement.bulkActions,na=_.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=q(function(e,t){const n=$e(e,G,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=de(c),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(S=>S!=="deleted"));const p=n.fetchState,I=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(S=>S.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:G,spendManagementEndPoint:`${Mn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(H()),e(Me(o))},onSubtabChange:o=>{e(H()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=Z(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=Z(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ie(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(H())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(ve("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ve("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(re)&&e(ln(!1))},onEventReceived:o=>{o===tt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=Je(),n=W(),r=le(),c=J(),d=c.state,m=ze(),[o,a]=g.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const h=Qt(d.tab.toString());h!=null?r(Me(h)):console.log("Warning:Not a valid remiListTab");const O=Xt(d.subTab.toString());O!=null?r(Pe(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(H())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(v.isReimbursementCommentingEnabled),{isFeatureEnabled:R}=l(v.isReimbursementBulkActionEnabled),j=P.getSignedInUser(),b=w(h=>V(h)),[k,y]=g.useState(!1),[T,f]=g.useState(!1),D=ne(),$=D?.loggedInUserRole?.includes("admin")===!0,A=w(h=>$e(h,G,R)),{areTenantIdsInSync:F}=Dn(),u=A.fetchState,{isAiCfoAccessEnabled:M,onAskAiCfoClick:z}=Qe({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Xe({isDataReady:u==="Completed"}),g.useEffect(()=>{!T&&F&&(f(!0),r(ie(G,!0,I,!1,!0)))},[T,G,r,F]),j==null)throw Error("Can't access address page without signing in...");const E=!!b?.userRole&&Yt(b),K=ue(D?.loggedInUserRoleMap),nt=pe(D?.loggedInUserRoleMap),at=!!b.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!b.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!b.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=w(h=>Te(h.companyState,b.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,ge=h=>{y(h)},{isFeatureEnabled:lt}=l(v.isDebitCardFeatureEnabled),mt=Ne(lt,b),ct=_e(b),{remisProcessed:Q,remisProcessing:he}=w(h=>en(h));g.useEffect(()=>{Q===he&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Q>1?we.reports:we.report},{variableName:"_has_",variableValue:Q>1?Be.texts.have:Be.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(ie(G,!0,I,!1,!0,!0))},3e3),a(null))},[Q,he]);const dt={events:b.companyId!=null?[`private-${b.companyId}.${tt}`,`private-${b.companyId}.${re}`]:[],eventCallback:(h,O,fe)=>{h.endsWith(re)?fe.onReimbursementApprovalRulesEventReceived?.(h):O.entity_type==="reimbursement"&&(a(O.operation_type),fe.onEventReceived(h))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(qe,{}):st&&(!E||K)||nt&&at?s.jsxs(s.Fragment,{children:[u==="Completed"?s.jsx(te,{analytics:C,onLoad:h=>(O=>O.trackPageLoaded(Ve.Event.reimbursementHome))(h)}):null,s.jsx(Ye,{isAppContentDrawerOpen:k,handleDrawerToggle:ge}),s.jsxs(na,{windowSize:m,children:[s.jsx(_n,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(H())},children:s.jsx(ra,{onClick:h=>h.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:p,isShowDeletedReimbursementEnabled:I,isBillPayCommentingEnabled:S,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:b,period:G,isAdmin:$,isEmployee:E,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:A.createdByUserList,createdByUserListFetchState:A.createdByUserListFetchState,isDownloadEnabled:A.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:R,bulkSubmissionLimit:A.remiBulkSubmissionLimit,bulkSubmissionFetchState:A.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:M,onAskAiCfoClick:z,...dt})]})]}):it&&K?s.jsx(N,{to:"../setup"}):D!=null&&Oe(b,D.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(be,{fetchState:"In-Progress"}):s.jsx(oe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=_(Nn)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,la=q(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:C,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Pn),ma=()=>{const e=W(),t=J(),{tenantEmailDomain:n}=Y(),r=We(),[c,d]=g.useState(!1),m=w(k=>V(k)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),p=ne(),I=ue(p?.loggedInUserRoleMap),S=pe(p?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,R=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,j=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,b=k=>{d(k)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return R&&S&&x?s.jsx(N,{to:"../../../reimbursements"}):j&&I?s.jsx(N,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!j||m.userReimbursementInfo&&S&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:C,onLoad:k=>(y=>y.trackPageLoaded(Ve.Event.reimbursementPromoPage))(k)}),s.jsx(Ye,{isAppContentDrawerOpen:c,handleDrawerToggle:b}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{b(!0)}})]}):s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function _a(){const e=w(E=>V(E)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=We(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(v.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(v.isDebitCardFeatureEnabled),i=Ne(a,e),l=_e(e),p=e?.userRole!=null&&Sn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&In(t?.loggedInUserRoleMap),S=yn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,R=ue(t?.loggedInUserRoleMap),j=x&&R,{isFeatureEnabled:b}=m(v.isDepositAccountsFeatureEnabled),k=b&&!p&&Rn(t?.loggedInUserRoleMap),y=$n(e,o,a)&&!p&&An(t?.loggedInUserRoleMap),T=vn(t?.loggedInUserRoleMap),f=Cn(t?.loggedInUserRoleMap),D=kn(t?.loggedInUserRoleMap),$=En(t?.loggedInUserRoleMap),A=Bn(t?.loggedInUserRoleMap),F=pe(t?.loggedInUserRoleMap),{tenantEmailDomain:u}=Y(),M=J(),z=n===!0&&(R||F&&d);return s.jsxs(pt,{children:[M.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(B,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:j,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"verification"})}),s.jsx(B,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:j,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"setup"})}),s.jsx(B,{path:"promo",element:s.jsx(ma,{})}),s.jsx(B,{path:"approval-rules/*",element:j?s.jsx(On,{}):s.jsx(Gn,{isUserHasZeniAccountsAccess:f,isUserHasChargeCardAccess:$,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:F,isUserHasTreasuryAccess:D,isTenantBankingOnly:i,tenantEmailDomain:u??""})}),z&&s.jsx(B,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(B,{path:"/*",element:s.jsx(qe,{})}),t!=null&&Oe(e,t?.loggedInUserRoleMap)&&s.jsx(B,{path:"*",element:s.jsx(N,{to:"../promo"})}),c&&R&&s.jsx(B,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):M.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(B,{path:"new",element:s.jsx(Ee,{})}),s.jsx(B,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(B,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(B,{path:"*",element:s.jsx(oe,{})})]}):s.jsx(B,{path:"*",element:s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${U.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(B,{path:"*",element:s.jsx(oe,{})})]})}export{_a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-ZAKgWoPK.js";import{a as j,z as w,aI as y,v as E,d as p,f as F,cy as P,i as L}from"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import l from"./NotFoundScreen-DPOmbROX.js";import{a as f}from"./sentry-Bp45iw9z.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as u}from"./core-a8i-_0Kh.js";import{eM as z,P0 as C,LS as Y,P1 as k,ta as G,eZ as M,P2 as O,t8 as Z}from"./zeni-epic-state-ZCc1K30S.js";import{R as x}from"./ReferralListScreen-mDnpbI4k.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import"./MobileAppDrawer-DkCKi5Fn.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]="904b3f74-a629-490e-83f5-b62c97e70adf",e._sentryDebugIdIdentifier="sentry-dbid-904b3f74-a629-490e-83f5-b62c97e70adf")}catch{}})();const q=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(Z())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=V(),v=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),S=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:_}=g(y.zeniAccountsConfig),D=Y(_);f.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(M(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(q,{navigate:c,location:v,currentTenant:r,companyName:I,userName:S,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import{a}from"./sentry-Bp45iw9z.js";import{h as u,u as m,j as p,N as g}from"./core-a8i-_0Kh.js";import{z as d,B as b,t as y,d as f,f as h}from"./index-CtIv1cPm.js";import{In as I,I5 as x,Io as j}from"./zeni-epic-state-ZCc1K30S.js";import{n as w}from"./mui-B8yatdty.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.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]="d5ec8f45-2615-4d3b-99b5-91c73370eb6b",e._sentryDebugIdIdentifier="sentry-dbid-d5ec8f45-2615-4d3b-99b5-91c73370eb6b")}catch{}})();function q(){const e=u(),t=m(),i=p(),n=a.useRef(!1),c=d.isSignedIn(),r=t.state?.message==="logout",o=r||c;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{d.clearAll(),e(I()),e(x(!1)),j(),y.reset(),f.trackLogout(h.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.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
|
-
`;export{q as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ZAKgWoPK.js";import z from"./NotFoundScreen-DPOmbROX.js";import{a as p}from"./sentry-Bp45iw9z.js";import{j as M,h as _,u as $,l as q,g as f,N as A,k as V,n as O,o as u}from"./core-a8i-_0Kh.js";import{Q as R,z as b,q as w,v as Q,d as j,f as H,cz as W,h as Z,ao as J,p as K}from"./index-CtIv1cPm.js";import{eM as C,P3 as G,Ey as v,Em as X,E_ as Y,P4 as P,P5 as ee,Ei as ae,Ef as te,pn as se,pb as ne,jI as oe,Es as ie,P6 as re,Ep as le,ED as ce,EC as de}from"./zeni-epic-state-ZCc1K30S.js";import{n as pe}from"./mui-B8yatdty.js";import{u as me}from"./useInitialThreadRequest-BTSPvXZ7.js";import{M as ue}from"./MobileAppDrawer-DkCKi5Fn.js";import ke from"./TaskListScreen-C_FkV4uq.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import"./useFetchSuggestedQuestionsWhenReady-D_w411d6.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]="5d06b4ae-ed31-4f66-a566-800618b5b128",e._sentryDebugIdIdentifier="sentry-dbid-5d06b4ae-ed31-4f66-a566-800618b5b128")}catch{}})();const fe=V(function(e,t){const{location:n,taskGroupId:l}=t,d=P(e,t.taskId),c=C(e),i=l!=null?ee(e.taskGroupState,l):void 0,m=b.getSignedInUser(),a=c.tenantId,r={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},k=G(e);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:J.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:k,taskGroupName:l!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(e,t){const{taskId:n,navigate:l,currentTenant:d,location:c,taskGroupId:i}=t,{tenantEmailDomain:m}=d;return{onSaveChangesToLocalStore:a=>{e(de({taskDetailLocalData:a,taskId:n}))},onSaveDetailClick:()=>{e(ce(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&e(le(t.taskId))},onDismissClick:()=>{if(c.state?.message==="triggerBackClick"){const a=K(c.state?.pathnameStackToGoBack),r=a.poppedPathname??"../../dashboard";l(r,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=B(m),r=w(c.state?.pathnameStackToGoBack,c.pathname);l(a,{state:{pathnameStackToGoBack:r}})}e(re({taskId:n}))},onDeleteTaskClick:()=>{e(ie(n))},updateFilesEntity:a=>{e(oe({files:a}))},onDeleteFile:a=>{e(ne(a))},onEditFileName:(a,r)=>{e(se(a,r.split(".")[0]))},onReloadTaskDetailPage:()=>{e(v(!1,n))},onCreateTagClick:a=>{e(te(a,n))},onDeleteTagClick:a=>{e(ae(a,n))}}})(W);function I(){const e=M(),t=_(),n=$(),l=R(),{taskId:d,taskGroupId:c}=q(),i=f(o=>C(o)),m=me(i?.companyId),[a,r]=p.useState(!1),[k,L]=p.useState(!1),[S,F]=p.useState(!1),[x,N]=p.useState(!1),y=f(o=>G(o)),D=f(o=>o.taskGroupViewState.fetchState);p.useEffect(()=>{k||(L(!0),t(v(!1,d)))},[k,t]),p.useEffect(()=>{S||y.fetchState==="Completed"||(F(!0),t(X()))},[S,t,y.fetchState]),p.useEffect(()=>{x||D==="Completed"||(N(!0),t(Y()))},[x,t,D]);const E=f(o=>P(o,d)),g=E.fetchState,T=b.getSignedInUser();if(T==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&E.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=w(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(A,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:j,onLoad:o=>(h=>h.trackPageLoaded(H.Event.taskDetailPage))(o)}):null,s.jsxs(ge,{children:[s.jsx(ue,{isAppContentDrawerOpen:a,handleDrawerToggle:o=>{r(o)}}),s.jsx(fe,{analytics:j,currentTenant:i,handleZeniLogoClick:()=>{l.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:T,navigate:e,taskGroupId:c,taskId:d,taskDetailFetchState:g})]})]})}const ge=pe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,B=e=>`/${e}/tasks`;function Me(){return s.jsxs(O,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(ke,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(z,{})})]})}export{Me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-ZAKgWoPK.js";import i from"./NotFoundScreen-DPOmbROX.js";import{T as r}from"./TransactionDetailScreen-Dq4Bv7Yw.js";import"./sentry-Bp45iw9z.js";import{n as s,o}from"./core-a8i-_0Kh.js";import"./zeni-epic-state-ZCc1K30S.js";import"./recharts-BhJEeZEG.js";import"./index-CtIv1cPm.js";import"./mui-B8yatdty.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.js";import"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import"./decodeURIComponentSafe-B_IVipCF.js";import"./routePaths-CAPvhOau.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="004616b6-9a8d-4249-8f63-7ccdecb2e86b",e._sentryDebugIdIdentifier="sentry-dbid-004616b6-9a8d-4249-8f63-7ccdecb2e86b")}catch{}})();function q(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-ZAKgWoPK.js";import{a as d}from"./sentry-Bp45iw9z.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as Ke}from"./core-a8i-_0Kh.js";import{bm as $e,eM as W,cM as ue,bu as me,p2 as H,Ja as P,Kb as pe,Kc as Y,JA as fe,jj as he,Kd as ge,JF as X,JG as Z,k8 as Se,Gi as Q,J4 as _,jd as Te,jb as ye,jn as Me,Ke as qe,Kf as Je,sT as N,ji as ve,FF as Ee,cS as We,cT as He,Kg as Ye,J3 as Xe,Kh as Ze,sX as Qe,Ki as ea,Kj as aa,Kk as ta,Kl as na,Km as oa,jm as sa,Kn as ia,Ko as ca,J5 as ra,Kp as la,Kq as da,Kr as ua,Fz as ma,Fn as pa,FR as fa,jo as ha,Gj as ie,Fw as ga}from"./zeni-epic-state-ZCc1K30S.js";import{z as De,a as ee,i as F,aI as Ce,m as Sa,Z as Ta,aJ as ya,w as va,p as q,j as Ea,aK as Da,q as J,I as Ca,d as be,aL as ba,ao as Ia,O as M}from"./index-CtIv1cPm.js";import{n as ka,S as Aa,D as Ua}from"./mui-B8yatdty.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-D6kPXOEr.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-D_w411d6.js";import{d as Ie}from"./decodeURIComponentSafe-B_IVipCF.js";import{h as ke,g as Fa,d as Va,b as wa}from"./routePaths-CAPvhOau.js";import{t as Pa}from"./utils-ikosPjSL.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]="363ef27d-8752-42f2-bfe3-6ccff8bb9775",a._sentryDebugIdIdentifier="sentry-dbid-363ef27d-8752-42f2-bfe3-6ccff8bb9775")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Qa(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(F.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),h=f?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>P(u,y)),C=S(u=>{const R=P(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return R==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[R]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),V=S(u=>{if(p!=null)return fe(u.trendWithTransactionsState,p,"TransactionDetail")}),K=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>he(u.accountState,u.accountListState,"accountList")),[B,w]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{w(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{w(!1),v(!1)},[]),[U,x]=d.useState(!1),z=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(B?L||E==null||(v(!0),s(Q(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(X()),s(Z()),w(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,B,L,E,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:h,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:A,uiState:V,firstMonthOfFY:K,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Ba={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=G(),g=S(f=>Y(f)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:f=>{l(Te({vendorId:void 0,localData:f}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:f=>f.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,za=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=G(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let f;ke(T,b)&&(f={id:T,type:H(b)});const h=f!=null?S(y=>P(y,f)):void 0,k=()=>{const y=q(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((C=2)=>{let p="../";for(let E=0;E<C;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:f,onSaveVendor:()=>{o(ve(f,void 0))},onSaveSuccess:()=>{if(h!=null&&h?.transaction&&h?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&h?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=h?.transactionDetailLocalData.vendorUpdates,m={id:h?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:h?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:h?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:h?.transaction?.id,type:h?.transaction?.type},transaction:h?.transaction,lineIds:h?.transaction?.lines?.map(p=>p.id)??[]};o(N(m,h?.transaction?.amount.amount,C,!1,!1,i))}k()},onCancel:()=>{f!=null&&o(qe({transactionId:f})),o(ye()),o(Je()),a(!0),k()}}},Ra=Ke(function(a,e){const s=P(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Xe(a,"common"),T=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=q(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(X()),a(Z());const n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(wa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Q(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(fa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=q(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Pa(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Fa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(N(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Qe(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Ze(t,n,o))}}})(ba);function et(){const a=le(),e=G(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ea(),i=S(r=>W(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:f}=t(F.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),k=h?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:C}=de(),[p,E]=d.useState(!1),A=Ie(m??""),V=ke(C,A),K=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:B}=t(F.isTransactionCommentingEnabled),w=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;V&&(v={id:C,type:H(A)});const c=v!=null?S(r=>P(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?K.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),x=S(r=>Y(r)),z=S(r=>D!=null?fe(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,R=S(r=>he(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Fe,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},we=Da();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=J(s.state?.pathnameStackToGoBack,s.pathname),j={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};we&&(j.message="expenseAutomation",j.origin="transaction_categorization",j.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:j})}},[v]),d.useEffect(()=>{Fe||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Q(D,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(X()),e(Z()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Pe=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:Be,onSaveSuccess:Le,onCancel:Oe}=za({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoOpen:ze,setIsAiCfoOpen:Re}=Ca(),{isAiCfoAccessEnabled:je,onAskAiCfoClick:Ne}=xa({isAiCfoOpen:ze,setIsAiCfoOpen:Re,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Be,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Ra,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:R,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:f,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:je,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:B,companyId:w,companyName:L})]}):I.jsx(Ge,{to:Ue(Pe.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=ja(a),t=Na(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},ja=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Na=a=>We(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,za as a,Ra as b,ae as c,Qa as u};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-ZAKgWoPK.js";import{a as d}from"./sentry-Bp45iw9z.js";import{q as u,h,g as y,N as I}from"./core-a8i-_0Kh.js";import{Im as b,eN as w,yH as x}from"./zeni-epic-state-ZCc1K30S.js";import{z as c,B as j,E as S,F as E}from"./index-CtIv1cPm.js";import{n as l}from"./mui-B8yatdty.js";import"./recharts-BhJEeZEG.js";import"./lottie-DN0gYkdx.js";import"./analytics-vyykHm3I.js";import"./plaid-CP3hLhCR.js";import"./dnd-CDdU3ON0.js";import"./stripe-DMRn4zHo.js";import"./lexical-BzneVI9m.js";import"./pdf-C4rebPwh.js";import"./utils-ikosPjSL.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]="f67c44ce-9839-48c8-9c0a-f477b47afb75",e._sentryDebugIdIdentifier="sentry-dbid-f67c44ce-9839-48c8-9c0a-f477b47afb75")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=d.useState(!1),a=h(),i=y(m=>b(m)),r=c.getSignedInUser(),f=c.getSignedInUserTenantWithId(s);if(r==null||f==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,f?.tenantId),d.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=l.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=l(E.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{W as default};
|