@zeniai/web-app-ui 5.4.9-qa → 5.4.10-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/AccountMappingScreen-BT4O8HTD.js +9 -0
- package/dist/assets/ActualMatchingMatchDetailScreen-Ce_XDU4u.js +1 -0
- package/dist/assets/AddressRoutes-BQEPn0Yr.js +1 -0
- package/dist/assets/{AddressScreen-DZ_c_5Zf.js → AddressScreen-D2FVWJY-.js} +2 -2
- package/dist/assets/AiCfoScreen-RbcUBAdM.js +22 -0
- package/dist/assets/{AppDrawer-ChtStfcd.js → AppDrawer-Sa4LLULj.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Ci65jTNa.js → BillPayApprovalRoutes-BbNV-MR5.js} +1 -1
- package/dist/assets/{BillPayRoutes-DWk9JwLZ.js → BillPayRoutes-uNYLvj5o.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-ibSIK2nI.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-BY7HwVCQ.js → CardsAiCfoScreen-CkEc2DEo.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Bgou4C5o.js → ChargeCardRoutes-CO87Ou5-.js} +8 -8
- package/dist/assets/CompanyPassportScreen-DJeoMdCg.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bf2Ucb1Q.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-D3RbfqTk.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-y-XZ3h_L.js → CustomerOnboardingRoutes-BynW3iC3.js} +3 -3
- package/dist/assets/{DashboardRoutes-ATh0KGw_.js → DashboardRoutes-ndbO6Qws.js} +4 -4
- package/dist/assets/{DefaultTenantHome-B3PSqzEU.js → DefaultTenantHome-2hNb0a3U.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BqDioG6P.js +18 -0
- package/dist/assets/DrawerScreen-b7QdOhuW.js +1 -0
- package/dist/assets/EntityDetailRoutes-aGFvyTv5.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-D20NQ6Ld.js → ExpenseAutomationRoutes-C6_zyg5Q.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-B5U7lEG-.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-Dr1Xep8u.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-BNnEDiYb.js → InboxNotificationsProvider-Cph6MP0g.js} +1 -1
- package/dist/assets/InvoicingRoutes-C4zfN1Wc.js +3 -0
- package/dist/assets/{MagicLinkRoutes-BrH570zs.js → MagicLinkRoutes-BDl3Flj2.js} +10 -10
- package/dist/assets/MagicLinkSignInScreen-Bie6nkkJ.js +12 -0
- package/dist/assets/{MobileAppDrawer-CMzKILM6.js → MobileAppDrawer-DVldqyUl.js} +1 -1
- package/dist/assets/NotFoundScreen-BXfz4Cwt.js +1 -0
- package/dist/assets/{NotificationRoutes-BnaKM5ci.js → NotificationRoutes-UAhv091T.js} +1 -1
- package/dist/assets/OAuthConsentScreen-yv2un5zc.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DZO_Ak_R.js +1 -0
- package/dist/assets/{PaymentLinkScreen-BoGqW_lB.js → PaymentLinkScreen-DgjQbdJS.js} +6 -6
- package/dist/assets/PeopleRoutes-CBBW0nYr.js +22 -0
- package/dist/assets/PerformanceRoutes-CIoRY1pR.js +1 -0
- package/dist/assets/{Preview-DYRIGspn.js → Preview-CU7aguP4.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D4OqW6nd.js → QBOConnectionScreen-CI47ZrlS.js} +22 -22
- package/dist/assets/ReimbursementApprovalRoutes-DrsMWkl8.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CBCuls2I.js → ReimbursementApprovalRuleDetailScreen-Dw7QQEoQ.js} +1 -1
- package/dist/assets/ReimbursementRoutes-BiacT-VJ.js +68 -0
- package/dist/assets/ReportsRoutes-B5lACyrL.js +1 -0
- package/dist/assets/RewardsRoutes-26PBDRkk.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DQewo07g.js → ScheduleDetailsPrepaidExpensesScreen-LwZh192V.js} +5 -5
- package/dist/assets/ScreenRoutes-CdEeBqiV.js +2 -0
- package/dist/assets/{SettingsRoutes-Oo3D3ieu.js → SettingsRoutes-DEHUtOgG.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DREgcFPr.js → SetupPagesScreen-Dv6lGRG5.js} +5 -5
- package/dist/assets/SignInScreen-CzvdRg4U.js +1 -0
- package/dist/assets/SignOutScreen-DfTRMdjb.js +9 -0
- package/dist/assets/{TaskListScreen-D4luV6T1.js → TaskListScreen-8hq6cEbk.js} +2 -2
- package/dist/assets/TaskRoutes-C1KzEFV7.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BB45JvGj.js +1 -0
- package/dist/assets/TransactionDetailScreen-It6ORIbN.js +5 -0
- package/dist/assets/{TransactionListRoutes-Dnnc7PPg.js → TransactionListRoutes-BTjkHFVX.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BdlM3dTj.js → TreasuryRoutes-Bys8F57E.js} +6 -6
- package/dist/assets/{VendorsRoutes-tHp2Iw_J.js → VendorsRoutes-abjQ1HGQ.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-DewxnFTy.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DlvpS2Bq.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-DVR6RIK2.js +9 -0
- package/dist/assets/{accountMappingHelper-DC08PpIK.js → accountMappingHelper-C9fFA6EC.js} +1 -1
- package/dist/assets/{analytics-DHe7CR-k.js → analytics-C3OBHjEG.js} +1 -1
- package/dist/assets/{analyticsHelper-C_JoV9rX.js → analyticsHelper-exrV7AE9.js} +1 -1
- package/dist/assets/{core-CWdVdeoj.js → core-o-ca34AJ.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B92hORfx.js → decodeURIComponentSafe-CdLVPaCS.js} +1 -1
- package/dist/assets/{dnd-27tNAcHF.js → dnd-sqKp8sUm.js} +1 -1
- package/dist/assets/{empty-ulld4y6j.js → empty-BnmFWJHQ.js} +1 -1
- package/dist/assets/{empty-tb2EjPHb.js → empty-CynSKeaU.js} +1 -1
- package/dist/assets/{emptyVideoElement-CR8yMX_6.js → emptyVideoElement-BUTaximG.js} +1 -1
- package/dist/assets/epic-bBvrG0DE.js +2 -0
- package/dist/assets/expenseAutomationHelper-8n6GRk1T.js +1 -0
- package/dist/assets/getLocaleForTenant-CBmE-ohA.js +1 -0
- package/dist/assets/{index-BMVAdMdD.js → index-BLrePuqf.js} +1 -1
- package/dist/assets/{index-CwuQnbjb.js → index-Bqod5kmp.js} +1 -1
- package/dist/assets/{index-KMZ-jS_5.js → index-Btt0Zihe.js} +1 -1
- package/dist/assets/{index-DWfuxgo1.js → index-Bx2gJO4r.js} +15017 -15017
- package/dist/assets/{index-BEWFj_EB.js → index-BzW-Y7Lk.js} +1 -1
- package/dist/assets/{index-d9IRID_L.js → index-Cmb8jqqj.js} +1 -1
- package/dist/assets/{index-BeEpI6W_.js → index-D4vHXZ_y.js} +2 -2
- package/dist/assets/{index-B2_iddAo.js → index-j2p4Lnj3.js} +1 -1
- package/dist/assets/{lexical-BpsogPnC.js → lexical-CEO4_NFb.js} +1 -1
- package/dist/assets/{liveblocks-uYjymIZp.js → liveblocks-BdMPZzDQ.js} +1 -1
- package/dist/assets/{lottie-diNsKuuh.js → lottie-Dl8uwTmw.js} +1 -1
- package/dist/assets/{mui-C50ypouB.js → mui-cK5UWUvi.js} +1 -1
- package/dist/assets/{pathToGoBack-BBvR0vTh.js → pathToGoBack-Bk8jMuE9.js} +1 -1
- package/dist/assets/{pdf-Ck1fv3t0.js → pdf-BNJo5ucI.js} +4 -4
- package/dist/assets/{pdf-lib-BfGu-009.js → pdf-lib-C69QvBGc.js} +1 -1
- package/dist/assets/{plaid-ByLFGZs_.js → plaid-C8bTkbCG.js} +1 -1
- package/dist/assets/{pusher-s7-0OhRM.js → pusher-C6PXikRK.js} +1 -1
- package/dist/assets/{react-y78eSftG.js → react-BCP4YdKf.js} +1 -1
- package/dist/assets/{react-BHe9Gwj5.js → react-BfzBm-jN.js} +1 -1
- package/dist/assets/{react-CmpqE2zl.js → react-BgHw6ZMD.js} +1 -1
- package/dist/assets/{react-CBIJ-b4r.js → react-CTNewL67.js} +1 -1
- package/dist/assets/{react-DdlqItln.js → react-UiIuY6Fo.js} +1 -1
- package/dist/assets/{react-D6gZVFjz.js → react-ixvlVzZ9.js} +1 -1
- package/dist/assets/{recharts-Bg4ChN3A.js → recharts-DK1tbN_A.js} +1 -1
- package/dist/assets/{reportTimeframe-UINv8cFg.js → reportTimeframe-6FnDbaGY.js} +1 -1
- package/dist/assets/{routePaths-BAWZQTun.js → routePaths-DBf4ybcn.js} +1 -1
- package/dist/assets/{sentry-2dGMDW9b.js → sentry-Buwow292.js} +1 -1
- package/dist/assets/{stripSplatSuffix-CafmusDE.js → stripSplatSuffix-BKbpznmZ.js} +1 -1
- package/dist/assets/{url-DMT_XMh8.js → url-B_oojQRK.js} +1 -1
- package/dist/assets/{url-CXMIbehw.js → url-C7oPARVv.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-DBoUtV2d.js +1 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-D_VhexUa.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-B6lOnQ69.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-B6OwhCNo.js +1 -0
- package/dist/assets/{useDeviceId-DTc-o5JP.js → useDeviceId-CeB6LWI8.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DkcY_ZHK.js → useEmailConnectResultRefresh-t37-D3lN.js} +1 -1
- package/dist/assets/{useEnsureVendorListLoaded-CVciy2pO.js → useEnsureVendorListLoaded-BmranjK0.js} +1 -1
- package/dist/assets/useInitialThreadRequest-C3w5IRp7.js +1 -0
- package/dist/assets/{useTaskManagerAccess-Cht8h7vG.js → useTaskManagerAccess-By_NjZen.js} +1 -1
- package/dist/assets/useTaskManagerPusherEvents-LOx5aVW8.js +1 -0
- package/dist/assets/{utils-tucfLrt-.js → utils-D4KfE2cr.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-ioEX9Mpy.js → withTransactionSidePanel-CVCleugc.js} +5 -5
- package/dist/assets/{zeni-epic-state-BD9eq4uF.js → zeni-epic-state-MQ0qdl-Q.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-DwsWtlL3.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-BWmuK_1y.js +0 -1
- package/dist/assets/AddressRoutes-Bw3Oe13l.js +0 -1
- package/dist/assets/AiCfoScreen-BG2AgRdt.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-BC5aFSvs.js +0 -9
- package/dist/assets/CompanyPassportScreen-CgfAyHzj.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B6Iq8Io7.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BEN6jbx7.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DCi8W08h.js +0 -18
- package/dist/assets/DrawerScreen-051Ir8Gc.js +0 -1
- package/dist/assets/EntityDetailRoutes-Zkuv9QI9.js +0 -1
- package/dist/assets/FeaturePreviewScreen-D0YCRsQV.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-B8cLywkN.js +0 -1
- package/dist/assets/InvoicingRoutes-CmC5s6eX.js +0 -3
- package/dist/assets/MagicLinkSignInScreen-BvgZDDSS.js +0 -12
- package/dist/assets/NotFoundScreen-BkWLiAe_.js +0 -1
- package/dist/assets/OAuthConsentScreen-ZIqIXW8N.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DTuPBw_A.js +0 -1
- package/dist/assets/PeopleRoutes-Bfxe9uc1.js +0 -22
- package/dist/assets/PerformanceRoutes-CT8np-58.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DIPF3Jao.js +0 -1
- package/dist/assets/ReimbursementRoutes-T9x_Liz1.js +0 -68
- package/dist/assets/ReportsRoutes-CLTwR10n.js +0 -1
- package/dist/assets/RewardsRoutes-C5D4dqxr.js +0 -1
- package/dist/assets/ScreenRoutes-DpIHvmC2.js +0 -2
- package/dist/assets/SignInScreen-BO9fn6dB.js +0 -1
- package/dist/assets/SignOutScreen-g089YQs4.js +0 -9
- package/dist/assets/TaskRoutes-BLnrMZJs.js +0 -9
- package/dist/assets/TransactionDetailRoutes-B1gY-gFj.js +0 -1
- package/dist/assets/TransactionDetailScreen-CeZrAaYH.js +0 -5
- package/dist/assets/WiseConfirmationScreen-DkZ1Jerd.js +0 -12
- package/dist/assets/ZeniAccountRoutes-C0esdz20.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-CBB7Mpyi.js +0 -9
- package/dist/assets/epic-CvT02aJz.js +0 -2
- package/dist/assets/expenseAutomationHelper-YR9YM6r6.js +0 -1
- package/dist/assets/getLocaleForTenant-CpRHGW6n.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-BtYRi4BF.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-J-yxmgna.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C0DT0xU1.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-CH-2PvmA.js +0 -1
- package/dist/assets/useInitialThreadRequest-CKJ7jgv2.js +0 -1
- package/dist/assets/useTaskManagerPusherEvents-CKW_jM-O.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-uYjymIZp.js";import{h as r,l as i}from"./core-CWdVdeoj.js";import{ak as n}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import"./sentry-2dGMDW9b.js";import"./zeni-epic-state-BD9eq4uF.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.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]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-uYjymIZp.js";import{a as r}from"./sentry-2dGMDW9b.js";import{u as A,g as j,j as o,N as C}from"./core-CWdVdeoj.js";import{Vl as P,fI as V,gp as x,Vm as z,Vn as D,Vo as M,Vp as R,pW as k,U0 as L}from"./zeni-epic-state-BD9eq4uF.js";import{z as h,af as I}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="a2186d74-3437-4e2e-b827-ed9e4f4d0446",n._sentryDebugIdIdentifier="sentry-dbid-a2186d74-3437-4e2e-b827-ed9e4f4d0446")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,U]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=S??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{U("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-uYjymIZp.js";import{h as G,u as Y,g as z,i as X,j as d,l as H,n as J,o as S}from"./core-CWdVdeoj.js";import{fI as v,Az as O,vc as K,We as w,v7 as T,bq as Q,c1 as Z,v8 as ee,Wf as ae,VX as C,ek as te,Es as se,Wg as oe,ER as re,e1 as ne,e0 as ce}from"./zeni-epic-state-BD9eq4uF.js";import{ag as ie,z as le,ao as de,aq as me,V as fe,a6 as pe,j as M,aB as ue,k as he,p as ge,c as Fe}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import Ie from"./NotFoundScreen-BkWLiAe_.js";import{F as be}from"./FeaturePreviewScreen-D0YCRsQV.js";import{a as g}from"./sentry-2dGMDW9b.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import{u as Ce}from"./useInitialThreadRequest-CKJ7jgv2.js";import{t as Te}from"./routePaths-BAWZQTun.js";import{M as ye}from"./MobileAppDrawer-CMzKILM6.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="81c6b1ca-6eb4-4f26-97c2-1498fe678a4a",s._sentryDebugIdIdentifier="sentry-dbid-81c6b1ca-6eb4-4f26-97c2-1498fe678a4a")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=le.getSignedInUser(),k=d((t=>v(t))),q=k.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>x.pandLByForecastID[t]!=null&&ee(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:W}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(K());else if(l&&!m){A(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):R!=null?f.forecasts.findIndex((b=>b.id===R)):f.forecasts.length>0?0:-1)(i,r,D?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,I]);const E=fe(),_=E?.loggedInUserRole!=null&&Q(E.loggedInUserRole),N=Ce(k?.companyId,{clearParams:l&&m}),[V,$]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{$(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,initialOpenThreadRequest:N,onClickMenuIcon:()=>{L(!0)}})]})}function Xe(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(J,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Xe as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-uYjymIZp.js";import{Wa as re,fI as Y,m3 as G,e1 as N,e0 as le,S$ as Q,Vy as ce,Di as Pe,Wb as J,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,Wc as ue,sx as Ae,g9 as Ve,gG as Oe,Wd as H,Df as me,De as ge,Dv as Re,ca as Fe}from"./zeni-epic-state-BD9eq4uF.js";import{$ as fe,p as X,c as W,z as _,g as he,K as Ce,ad as ye,ax as be,ay as Ze,a9 as Se,H as R,ae as De,G as K,az as Be,ao as Ue,aq as $e,a6 as ze,j as we,O as He,k as We,aA as Ge,V as _e}from"./index-DWfuxgo1.js";import{D as xe,n as M,S as Ie}from"./mui-C50ypouB.js";import ae from"./NotFoundScreen-BkWLiAe_.js";import{a as c}from"./sentry-2dGMDW9b.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-CWdVdeoj.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import{M as Ne}from"./MobileAppDrawer-CMzKILM6.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.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]="14a9be6f-38d0-4a71-9b80-9cecf8046086",e._sentryDebugIdIdentifier="sentry-dbid-14a9be6f-38d0-4a71-9b80-9cecf8046086")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(W.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=Q(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{F===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(W.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),y=!L||V,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,ke=M(De.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=M(De.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[F,Z]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(W.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),v=Q(r),T=ce(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(J())},C=()=>{F===!0?S(!0):w()},A={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(W.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:V}=Ce(r?.tenantId),y=!L||V,O=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:O===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Je((function(e,t){const d=ue(e),n=_.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),b=_.getSignedInUser(),h=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(W.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!N(F,h)&&Z,S=Q(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,v]=c.useState(!1),[T,B]=c.useState("off"),[U,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Ve(s.userState,s.userRoleState,s.userListViewState,"manager"))),V=g((s=>Oe(s))),y=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const O=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:O,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:O,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=We(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=_e();return Fe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uYjymIZp.js";import E from"./NotFoundScreen-BkWLiAe_.js";import{a as r}from"./sentry-2dGMDW9b.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as O,n as z,o as b}from"./core-CWdVdeoj.js";import{fI as B,a20 as h,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-BD9eq4uF.js";import{s as $,z as I,aq as G,dO as H}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import{M as K}from"./MobileAppDrawer-CMzKILM6.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.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]="c9538f22-6d4e-47c9-92b4-19b509b7f0ed",e._sentryDebugIdIdentifier="sentry-dbid-c9538f22-6d4e-47c9-92b4-19b509b7f0ed")}catch{}})();const L=O((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),c=$(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-uYjymIZp.js";import z from"./NotFoundScreen-BkWLiAe_.js";import{a as p}from"./sentry-2dGMDW9b.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as K,o as g}from"./core-CWdVdeoj.js";import{fI as E,_4 as h,_m as w,Oe as U,Oa as L,Od as f,O3 as N,_L as B,O7 as q,Og as F}from"./zeni-epic-state-BD9eq4uF.js";import{z as _,w as T,cb as G,o as $,bU as H,cc as J}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import{u as M}from"./useEnsureVendorListLoaded-CVciy2pO.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-CBCuls2I.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2988ffe3-3d4d-48b7-9c61-8a67a83ff2b5",e._sentryDebugIdIdentifier="sentry-dbid-2988ffe3-3d4d-48b7-9c61-8a67a83ff2b5")}catch{}})();const j="reimbursement-approval-rule-update",P=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(G)),Q=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),b=u((r=>w(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),_.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(r,y,I)=>{r.endsWith(j)&&I.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",X=O((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(F(t,!0))}}}))(T(J)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=H(e?.tenantId);return s?o.jsx(Z,{isLoading:n}):o.jsx(Q,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));M();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(q(!1,!0)))}),[v,b,e,a]),_.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function ue(){return o.jsxs(K,{children:[o.jsx(g,{path:"/",element:o.jsx(Y,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(z,{})})]})}export{ue as R};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uYjymIZp.js";import{u as ae,j as R,h as Q,g as Y,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-CWdVdeoj.js";import{fI as H,Oa as ct,$R as ge,ca as he,Ng as Fe,me as dt,Nv as ce,Nu as de,$S as ut,bn as fe,gZ as Le,$T as pt,XB as bt,m3 as $e,XC as ke,XD as gt,kR as ht,ZS as ft,l4 as St,N4 as It,CA as yt,kY as vt,NR as Ne,$U as Pe,$V as Ce,$W as At,$X as Rt,$Y as kt,NB as we,la as Ct,Z$ as wt,Nt as Et,Ne as xt,$Z as Bt,Nd as Tt,$_ as Dt,Nl as Ee,NF as jt,NE as Ut,NA as Ft,$$ as _e,S$ as Lt,bo as $t,No as Nt,O7 as Pt,a00 as _t,a01 as Mt,NN as Ot,NK as xe,Zm as Zt,Nb as zt,a02 as Me,OA as Be,OI as Gt,a03 as Vt,a04 as X,a05 as Ht,a06 as Oe,a07 as Wt,a08 as Ze,a09 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a0a as Xt,gk as Kt,Zz as Yt,a0b as Jt,a0c as He,ZD as Qt,_m as en,a0d as tn,_L as nn,OF as Te,OE as an,a0e as sn,a0f as on,a0g as rn,a0h as ln,a0i as mn,_5 as cn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,U$ as Sn,dc as In,df as yn,de as vn,cH as An}from"./zeni-epic-state-BD9eq4uF.js";import{bU as Rn,s as We,$ as qe,p as oe,c as F,z as L,cT as Xe,a6 as re,j as E,aQ as De,H as j,ac as se,ad as kn,G as Ke,cU as Cn,k as K,aq as Ye,cV as wn,V as le,cW as En,ao as xn,a9 as Bn,a5 as ye,O as Je,w as Tn,bC as Dn,at as jn,ag as Un,cX as Fn,g as Ln}from"./index-DWfuxgo1.js";import{n as P,S as $n,u as Qe}from"./mui-C50ypouB.js";import pe from"./NotFoundScreen-BkWLiAe_.js";import{S as je}from"./SetupPagesScreen-DREgcFPr.js";import{F as et}from"./FeaturePreviewScreen-D0YCRsQV.js";import{a as g}from"./sentry-2dGMDW9b.js";import{u as ve}from"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import{u as tt}from"./useInitialThreadRequest-CKJ7jgv2.js";import{D as Nn}from"./DrawerScreen-051Ir8Gc.js";import{M as nt}from"./MobileAppDrawer-CMzKILM6.js";import{F as Pn}from"./ScreenRoutes-DpIHvmC2.js";import{R as _n}from"./ReimbursementApprovalRoutes-DIPF3Jao.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./BusinessVerificationPageScreen-BC5aFSvs.js";import"./routePaths-BAWZQTun.js";import"./analyticsHelper-C_JoV9rX.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.js";import"./getLocaleForTenant-CpRHGW6n.js";import"./useEnsureVendorListLoaded-CVciy2pO.js";import"./ReimbursementApprovalRuleDetailScreen-CBCuls2I.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]="3a752fc9-887a-4092-96c3-069fd58623df",e._sentryDebugIdIdentifier="sentry-dbid-3a752fc9-887a-4092-96c3-069fd58623df")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=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"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(Rt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=K(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Q(),t=ae(),n=Y(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=ve({mobileExploreReferrer:"Reimbursement Details"}),B=Y().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,v]=g.useState(!1),S=L.getSignedInUser(),w=R((b=>H(b))),h=R((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(w?.userRole??[]);(function(){const b=ae(),M=R((J=>H(J))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=Rn(O),z=R((J=>J.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(v(!0),t(Fe(!1,I,u,r)))}));const A=R((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.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
|
-
`,zn=P.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${kn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Gn=P.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
|
-
`,Vn=P.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
|
-
`,Hn=P.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.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: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=P.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=ee((function(e,t){const n=_e(e,t.reimbursementId),r=L.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,Mt(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=K(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=K(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function Xn(){const e=Q(),t=ae(),n=Y(),r=n.hash.substring(1),m=We(),{reimbursementId:c}=ie(),d=L.getSignedInUser(),i=R((A=>H(A))),a=R((A=>_e(A,c??""))),o=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(i?.companyId,{clearParams:a.fetchState==="Completed"&&!o}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:I}=ve({mobileExploreReferrer:"Reimbursement Details"});Ye({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=oe(),{isFeatureEnabled:T}=u(F.isLimitedCategoryForReimbursement),[y,B]=g.useState(!1),[D,k]=g.useState(!1),[C,v]=g.useState(!1),{isFeatureEnabled:S}=u(F.isShowDeletedReimbursementsFeatureEnabled),w=R((A=>ge(A,c??""))),h=Lt(i),$=$t(i.userRole),U=a.fetchState;if(g.useEffect((()=>{y||c==null?y==1&&U==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(c,!1,S)))}),[y,c,t,U]),g.useEffect((()=>{S&&a.remiDetails?.isDeleted===!0||i.isZeni===!0&&d?.userEmailDomain==="zeni.ai"&&h===!1?v(!1):v(a.remiActivities[0]?.isRealTimeApprovalEnabled&&($||a.allApprovers.find((A=>A.user.userId===d?.userId))!=null||a.remiDetails?.lastUpdatedBy===d?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,$,i.isZeni,h,d]),g.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||w.fetchState=="Completed"||w.fetchState=="In-Progress"||(k(!0),t(Fe(!1,T,S,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,c,t]),d==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.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"&&w.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:A=>(_=>{c!=null&&_.trackReimbursementReimbursementDetails(c)})(A)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:C,currentTenant:i,reimbursementId:c??"",themeState:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:I})]})}const Kn=ee((function(e,t){return{remisReviewView:Me(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(X())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(Be("approved",r??""));break;case"reject":e(Be("rejected",r??""))}}}}))(En);function Yn({tenantEmailDomain:e}){const t=Q(),n=R((d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=R((d=>Me(d))),m=le(),c=m?.loggedInUserRole?.includes("admin")===!0;return g.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Kn,{navigate:t,analytics:E,isAdmin:c,tenantEmailDomain:e})}const V=Qt(),st="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:Jn,common:me}=Ke.getLocalizedStrings(),Qn=Jn.reimbursement.bulkActions,ea=P.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
|
-
`,ta=ee((function(e,t){const n=ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=L.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/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:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(X()),e(Oe(i))},onSubtabChange:i=>{e(X()),e(Ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=K(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=K(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=K(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(X())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=Q(),t=ae(),n=Y(),r=n.state,m=qe(),[c,d]=g.useState(null),i=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Ht(r.tab.toString());f!=null?t(Oe(f)):console.log("Warning:Not a valid remiListTab");const G=Wt(r.subTab.toString());G!=null?t(Ze(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(X())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:o}=a(F.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(F.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:p}=a(F.isReimbursementBulkActionEnabled),I=L.getSignedInUser(),u=R((f=>H(f))),[T,y]=g.useState(!1),[B,D]=g.useState(!1),k=le(),C=k?.loggedInUserRole?.includes("admin")===!0,v=R((f=>ze(f,V,p))),{areTenantIdsInSync:S}=xn(),w=v.fetchState,{isAiCfoAccessEnabled:h,onAskAiCfoClick:$}=ve({mobileExploreReferrer:"Reimbursement List"});if(Ye({isDataReady:w==="Completed"}),g.useEffect((()=>{!B&&S&&(D(!0),t(ue(V,!0,l,!1,!0)))}),[B,V,t,S]),I==null)throw Error("Can't access address page without signing in...");const U=!!u?.userRole&&qt(u),A=Se(k?.loggedInUserRoleMap),_=Ie(k?.loggedInUserRoleMap),b=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,M=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,O=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,Z=R((f=>Le(f.companyState,u.companyId))),W=Z?.company.featuresActivationInfo.connectedAccountProvider,z=f=>{y(f)},{isFeatureEnabled:J}=a(F.isDebitCardFeatureEnabled),it=Ge(J,u),ot=Ve(u),{remisProcessed:te,remisProcessing:Ae}=R((f=>Xt(f)));g.useEffect((()=>{te===Ae&&c!=null&&(t(Kt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:Qn.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(Jt()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),d(null))}),[te,Ae]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(f,G,Re)=>{f.endsWith(be)?Re.onReimbursementApprovalRulesEventReceived?.(f):G.entity_type==="reimbursement"&&(d(G.operation_type),Re.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(et,{}):M&&(!U||A)||_&&b?s.jsxs(s.Fragment,{children:[w==="Completed"?s.jsx(re,{analytics:E,onLoad:f=>(G=>G.trackPageLoaded(Je.Event.reimbursementHome))(f)}):null,s.jsx(nt,{isAppContentDrawerOpen:T,handleDrawerToggle:z}),s.jsxs(ea,{windowSize:m,children:[s.jsx(Nn,{isOpen:i,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(X())},children:s.jsx(ia,{onClick:f=>f.stopPropagation(),children:s.jsx(Yn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:o,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:V,isAdmin:C,isEmployee:U,entity:"reimbursement",onClickMenuIcon:()=>{z(!0)},createdByUserList:v.createdByUserList,createdByUserListFetchState:v.createdByUserListFetchState,isDownloadEnabled:v.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:p,bulkSubmissionLimit:v.remiBulkSubmissionLimit,bulkSubmissionFetchState:v.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:h,onAskAiCfoClick:$,...rt})]})]}):O&&A?s.jsx(N,{to:"../setup"}):k!=null&&He(u,k.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=P($n)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,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(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Fn),ra=()=>{const e=Un(),t=Q(),n=Y(),{tenantEmailDomain:r}=ie(),m=Qe(),[c,d]=g.useState(!1),i=R((C=>H(C))),a=L.getSignedInUserTenant(r)?.companyId??i.companyId,o=L.getSignedInUser(),l=i.userRoleId,p=!!i.userRole?.includes("reimbursements_user"),I=le(),u=Se(I?.loggedInUserRoleMap),T=Ie(I?.loggedInUserRoleMap),y=!!i.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!i.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!i.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,k=C=>{d(C)};if(o==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&T&&y?s.jsx(N,{to:"../../../reimbursements"}):D&&u?s.jsx(N,{to:"../../reimbursements/setup"}):i.companyReimbursementInfo&&!D||i.userReimbursementInfo&&T&&y===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:C=>(v=>v.trackPageLoaded(Je.Event.reimbursementPromoPage))(C)}),s.jsx(nt,{isAppContentDrawerOpen:c,handleDrawerToggle:k}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:i.userReimbursementInfo,userRoleId:l,isEmployee:p,onClickMenuIcon:()=>{k(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})};function Ma(){const e=R((z=>H(z))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Qe(),m=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:d}=oe(),{isFeatureEnabled:i}=d(F.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=d(F.isDebitCardFeatureEnabled),o=Ge(a,e),l=Ve(e),p=e?.userRole!=null&&pn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,y=Se(t?.loggedInUserRoleMap),B=T&&y,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,k=D&&hn(t?.loggedInUserRoleMap),C=Ln(e,i,a)&&!p,v=C&&fn(t?.loggedInUserRoleMap),S=Sn(t?.loggedInUserRoleMap),w=In(t?.loggedInUserRoleMap),h=yn(t?.loggedInUserRoleMap),$=D&&w,U=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&h,A=vn(t?.loggedInUserRoleMap),_=An(t?.loggedInUserRoleMap),b=Ie(t?.loggedInUserRoleMap),M=C&&A,{tenantEmailDomain:O}=ie(),Z=Y(),W=n===!0&&(y||b&&c);return s.jsxs(mt,{children:[Z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"verification",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"verification"})}),s.jsx(x,{path:"setup",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"setup"})}),s.jsx(x,{path:"promo",element:s.jsx(ra,{})}),s.jsx(x,{path:"approval-rules/*",element:B?s.jsx(_n,{}):s.jsx(Pn,{showZeniAccountRoute:$,isUserHasBillPayAccess:_,isUserHasReimbursementAccess:b,showTreasuryRoute:U,isTenantBankingOnly:o,showChargeCardRoute:M,tenantEmailDomain:O??""})}),W&&s.jsx(x,{path:"*",element:s.jsx(na,{})}),(o===!0||l===!0)&&s.jsx(x,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../promo"})}),m&&y&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):Z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"new",element:s.jsx(Ue,{})}),s.jsx(x,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(x,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(x,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]})}export{Ma as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-uYjymIZp.js";import{g as te,h as ve,u as Ye,i as Ue,j as _,l as xe,n as ze,o as oe}from"./core-CWdVdeoj.js";import{fI as J,ED as S,Vx as Ge,m3 as ue,uh as he,v6 as Y,lK as D,lT as F,lL as V,kO as A,kF as E,kE as P,DG as U,vb as ye,bq as He,Vy as Ne,bn as We,E$ as $e,Vz as qe,VA as Ze,ck as I,Dz as ne,VB as re,VC as Ke,VD as Qe,VE as Je,VF as Xe,VG as ea,VH as aa,VI as sa,VJ as ta,VK as oa,VL as na,VM as ra,VN as la,VO as k,VP as x,VQ as z,VR as G,VS as H,VT as N,VU as W,VV as $,VW as q,VX as Z,ek as ca,EF as ia,Er as le,Es as ce,EL as da,Ew as ie,bG as O,VY as de,di as pe,Ex as _e,ER as pa,VZ as _a,V_ as fa,V$ as ba,W0 as ma,W1 as ua,W2 as ha,W3 as ya,W4 as Ca,W5 as wa,W6 as ga,e1 as Ia,e0 as Ra}from"./zeni-epic-state-BD9eq4uF.js";import{al as Sa,am as Ta,an as ka,a as Oa,$ as ja,p as Ce,c as K,z as we,ao as Da,V as Fa,e as Va,ap as Aa,aq as Ea,a6 as Pa,j as Q,O as Ma,A as La,k as ge,ar as Ba,as as va,at as Ya}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import Ua from"./NotFoundScreen-BkWLiAe_.js";import{F as xa}from"./FeaturePreviewScreen-D0YCRsQV.js";import{a as u}from"./sentry-2dGMDW9b.js";import{u as za}from"./useInitialThreadRequest-CKJ7jgv2.js";import{t as fe,a as be,b as Ga}from"./routePaths-BAWZQTun.js";import{t as me}from"./reportTimeframe-UINv8cFg.js";import{M as Ha}from"./MobileAppDrawer-CMzKILM6.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.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]="ff1e1143-08ca-47e8-908b-76ec3582ea52",e._sentryDebugIdIdentifier="sentry-dbid-ff1e1143-08ca-47e8-908b-76ec3582ea52")}catch{}})();const Na=["profit_loss","balance_sheet","cash_flow"],R=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(W({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0}))},Wa=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=xe((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=J(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=Ne(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:Q,isZeniUser:We(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Ya}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(Y(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=O(a),i=O(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(P(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(P(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(P(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(D(r,!0,a,s));break;case"cash_flow_by_classes":e(D(r,!0,a,s)),o.isAccountingClassesEnabled&&e(V());break;case"cash_flow_by_projects":e(D(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(F())}const i=O(a),d=O(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(R(a)||I(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ga(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(W({scrollPosition:s}));break;case"balance_sheet_by_classes":e(N({scrollPosition:s}));break;case"balance_sheet_by_projects":e(H({scrollPosition:s}));break;case"cash_flow_by_classes":e(G({scrollPosition:s}));break;case"cash_flow_by_projects":e(z({scrollPosition:s}));break;case"cash_flow":e(x({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=R(t),r=I(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{I(o.selectedReportID)?e(Xe({classesToFilterOut:a})):R(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{I(o.selectedReportID)?e(Ke({projectsToFilterOut:a})):R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):e(Je({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=R(o.selectedReportID),s=I(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?V():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?F():a?A():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Wa(e),e(qe(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):F(!0):V(!0):A(!0):E(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Oa(),b=ja(),m=va(b),a=ve(),s=Ye(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(K.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(K.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Ie]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>J(l))),Re=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=za(L?.companyId),w=_((l=>S(l).fetchState)),ke=_((l=>Ge(l))),{areTenantIdsInSync:y}=Da(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),Oe=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),je=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(Y(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(Y(c.userId,!1,!0,!1)),Ie(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(P(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":g&&s(A());break;case"cash_flow_by_classes":T&&s(V());break;case"cash_flow_by_projects":g&&s(F());break;case"cash_flow":s(D(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Fa(),De=ee?.loggedInUserRole!=null&&He(ee?.loggedInUserRole)!==!0,[Fe,Ve]=u.useState(!1),ae=l=>{Ve(l)},Ae=Va(),Ee=Aa();return(function(l){const{isDataReady:Pe}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Pe),Be=u.useMemo((()=>se?Na:void 0),[se]);ka({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Ea({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Pa,{analytics:Q,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ha,{isAppContentDrawerOpen:Fe,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:je,selectedReportID:B,analytics:Q,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:Oe,hasTransactionAccess:De,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:ke.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Re)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ys(){const e=_((s=>J(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(K.isDebitCardFeatureEnabled),m=Ia(b,e),a=Ra(e);return m===!0||a===!0?f.jsx(xa,{}):f.jsxs(ze,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-uYjymIZp.js";import{z as j,a6 as N,j as u,O as S,e6 as I,p as k,c as C}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import g from"./NotFoundScreen-BkWLiAe_.js";import{a as c}from"./sentry-2dGMDW9b.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-CWdVdeoj.js";import{fI as U,a2Z as w,a2_ as p,Ei as P,q3 as V,a2$ as q,Eg as z}from"./zeni-epic-state-BD9eq4uF.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.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]="55debf4f-7914-49ca-a7d6-da526a1dacee",e._sentryDebugIdIdentifier="sentry-dbid-55debf4f-7914-49ca-a7d6-da526a1dacee")}catch{}})();const G=_((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(I),O=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),x=L(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),b=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:x,currentTenant:r,companyName:E,userName:b,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BkWLiAe_.js","assets/sentry-2dGMDW9b.js","assets/core-CWdVdeoj.js","assets/zeni-epic-state-BD9eq4uF.js","assets/index-DWfuxgo1.js","assets/mui-C50ypouB.js","assets/analytics-DHe7CR-k.js","assets/utils-tucfLrt-.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-ATh0KGw_.js","assets/withTransactionSidePanel-ioEX9Mpy.js","assets/useAskAiCfoHostNavButtonProps-C0DT0xU1.js","assets/TransactionDetailScreen-CeZrAaYH.js","assets/decodeURIComponentSafe-B92hORfx.js","assets/useInitialThreadRequest-CKJ7jgv2.js","assets/routePaths-BAWZQTun.js","assets/expenseAutomationHelper-YR9YM6r6.js","assets/stripSplatSuffix-CafmusDE.js","assets/reportTimeframe-UINv8cFg.js","assets/analyticsHelper-C_JoV9rX.js","assets/CompanyPassportScreen-CgfAyHzj.js","assets/MobileAppDrawer-CMzKILM6.js","assets/InboxNotificationsProvider-BNnEDiYb.js","assets/useTaskManagerAccess-Cht8h7vG.js","assets/useAiCfoDashboardSuggestedQuestionsChips-J-yxmgna.js","assets/FeaturePreviewScreen-D0YCRsQV.js","assets/BillPayRoutes-DWk9JwLZ.js","assets/AddressScreen-DZ_c_5Zf.js","assets/DomesticWireDetailScreen-DCi8W08h.js","assets/BusinessVerificationPageScreen-BC5aFSvs.js","assets/DrawerScreen-051Ir8Gc.js","assets/SetupPagesScreen-DREgcFPr.js","assets/BillPayApprovalRoutes-Ci65jTNa.js","assets/useEnsureVendorListLoaded-CVciy2pO.js","assets/ReimbursementApprovalRuleDetailScreen-CBCuls2I.js","assets/getLocaleForTenant-CpRHGW6n.js","assets/ReimbursementRoutes-T9x_Liz1.js","assets/ReimbursementApprovalRoutes-DIPF3Jao.js","assets/TransactionListRoutes-Dnnc7PPg.js","assets/ZeniAccountStatementScreen-CBB7Mpyi.js","assets/SettingsRoutes-Oo3D3ieu.js","assets/AccountMappingScreen-DwsWtlL3.js","assets/QBOConnectionScreen-D4OqW6nd.js","assets/empty-ulld4y6j.js","assets/index-BMVAdMdD.js","assets/url-CXMIbehw.js","assets/index-d9IRID_L.js","assets/accountMappingHelper-DC08PpIK.js","assets/useEmailConnectResultRefresh-DkcY_ZHK.js","assets/ReportsRoutes-CLTwR10n.js","assets/ChargeCardRoutes-Bgou4C5o.js","assets/useChargeCardPusherEvents-CH-2PvmA.js","assets/PeopleRoutes-Bfxe9uc1.js","assets/ExpenseAutomationRoutes-D20NQ6Ld.js","assets/useActualMatchingMatchDetail-BtYRi4BF.js","assets/ScheduleDetailsPrepaidExpensesScreen-DQewo07g.js","assets/pathToGoBack-BBvR0vTh.js","assets/TreasuryRoutes-BdlM3dTj.js","assets/VendorsRoutes-tHp2Iw_J.js","assets/ZeniAccountRoutes-C0esdz20.js","assets/AddressRoutes-Bw3Oe13l.js","assets/PandLWithForecastRoutes-DTuPBw_A.js","assets/CustomerOnboardingRoutes-y-XZ3h_L.js","assets/TransactionDetailRoutes-B1gY-gFj.js","assets/EntityDetailRoutes-Zkuv9QI9.js","assets/InvoicingRoutes-CmC5s6eX.js","assets/NotificationRoutes-BnaKM5ci.js","assets/PerformanceRoutes-CT8np-58.js","assets/ActualMatchingMatchDetailScreen-BWmuK_1y.js","assets/RewardsRoutes-C5D4dqxr.js","assets/TaskRoutes-BLnrMZJs.js","assets/TaskListScreen-D4luV6T1.js","assets/useTaskManagerPusherEvents-CKW_jM-O.js","assets/AiCfoScreen-BG2AgRdt.js","assets/CardsAiCfoScreen-BY7HwVCQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fI as Es,e1 as ps,e0 as xs,Bo as gs,dk as Rs,ca as Is,gM as js,gc as Ts,dh as pe,cI as As,gq as bs,cA as fs,bG as Ds,br as ys,UX as Cs,v as vs,U_ as Os,bq as Ps,U$ as Us,bM as ws,bL as Fs,bu as Ls,cw as Vs,V0 as ks,V1 as Hs,dc as Bs,df as Ss,de as Ns,cH as Ms,cO as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as Ie,gP as je,go as Gs}from"./zeni-epic-state-BD9eq4uF.js";import{j as e}from"./liveblocks-uYjymIZp.js";import{a as U}from"./sentry-2dGMDW9b.js";import{N as u,u as zs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Xs,o as n}from"./core-CWdVdeoj.js";import{I as l,u as Ks,z as y,p as Js,e as Qs,r as et,c as S,g as st,K as tt,V as nt,L as F,G as Ae,t as _,P as at,M as ot,j as ne}from"./index-DWfuxgo1.js";import{u as rt}from"./mui-C50ypouB.js";import{f as be}from"./analyticsHelper-C_JoV9rX.js";import{t as it}from"./getLocaleForTenant-CpRHGW6n.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="447949b4-2c90-42fe-9579-d87fb1859693",o._sentryDebugIdIdentifier="sentry-dbid-447949b4-2c90-42fe-9579-d87fb1859693")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-BkWLiAe_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):f?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-ATh0KGw_.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])),bills:()=>s((()=>import("./BillPayRoutes-DWk9JwLZ.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-T9x_Liz1.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Dnnc7PPg.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-Oo3D3ieu.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-CLTwR10n.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Bgou4C5o.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-Bfxe9uc1.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-D20NQ6Ld.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BdlM3dTj.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-tHp2Iw_J.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-C0esdz20.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-CLTwR10n.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),ht=l((()=>s((()=>import("./AddressRoutes-Bw3Oe13l.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-Bfxe9uc1.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-DTuPBw_A.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-y-XZ3h_L.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-tHp2Iw_J.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-B1gY-gFj.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-Zkuv9QI9.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-ATh0KGw_.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-DWk9JwLZ.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-Oo3D3ieu.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-CmC5s6eX.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-T9x_Liz1.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-C0esdz20.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-BdlM3dTj.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),ft=l((()=>s((()=>import("./TransactionListRoutes-Dnnc7PPg.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),Dt=l((()=>s((()=>import("./ChargeCardRoutes-Bgou4C5o.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-BnaKM5ci.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-CT8np-58.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-D20NQ6Ld.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BWmuK_1y.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Pt=l((()=>s((()=>import("./RewardsRoutes-C5D4dqxr.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),Ut=l((()=>s((()=>import("./TaskRoutes-BLnrMZJs.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-BG2AgRdt.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-BY7HwVCQ.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-BkWLiAe_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-D4luV6T1.js").then((o=>o.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(f)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):f?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=zs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ks(),D=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),X=hs(j),G=Ys(),[L,we]=U.useState(!1),r=$((a=>Es(a))),{useFeatureGate:H}=Js(),M=Qs(),K=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,J=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,ke=st(r,Ve,oe),{isCardsHidden:He}=tt(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=$((a=>js(a)));if(i!=null){const a=y.getSignedInUserTenant(i);j!=null&&a!=null&&be(j,r,V)}const Z={tenantId:D,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=Ds(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?f(Cs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,f,y]),U.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,f,qe))}),[D]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(Gs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,j,O,f))}),[D,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),j!=null&&be(j,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(v(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const P=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:We}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=H(S.isAccrualEnabled),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Je=Us(E?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!P,ss=Le&&!P,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=ks(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),g=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&g,R=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ge===!0||Je===!0||os===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(j!=null&&T!=="In-Progress"&&f(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||X&&!ee)&&es&&Qe!==!0&&h===!1&&J===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||X?!L||te!==!1||ee||X?L&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Xe||Ke?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(ft,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ut,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ct,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&P===!1?e.jsx(vt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&P===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Pt,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,$t as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-uYjymIZp.js";import{a as f,R as T,t as A}from"./sentry-2dGMDW9b.js";import{u as z,h as D,j as l,g as j,N as M,l as O}from"./core-CWdVdeoj.js";import{u as P,z as s,j as E,G as V,N as _,O as F,S as N,R as B,T as G,W as v}from"./index-DWfuxgo1.js";import{fI as R,UG as W,U_ as $,gl as J,gn as Y,V3 as H,gY as q,dl as K,V4 as U,V5 as Q,V6 as X,c1 as y}from"./zeni-epic-state-BD9eq4uF.js";import{u as Z}from"./mui-C50ypouB.js";import{u as ee}from"./useDeviceId-DTc-o5JP.js";import{f as te}from"./analyticsHelper-C_JoV9rX.js";import{t as ne}from"./getLocaleForTenant-CpRHGW6n.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.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]="39c1bc63-4210-4a02-ae01-7822f06abd23",t._sentryDebugIdIdentifier="sentry-dbid-39c1bc63-4210-4a02-ae01-7822f06abd23")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(U())}}}))(G),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>R(e))),I=l((e=>W(e))),m=j(),w=Z().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants($(I.tenantsInOrder),o.zeniSessionId),J(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),V.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),q().then((()=>{const e=B();e!=null&&_(e)})),setTimeout((()=>{E.trackLogin(F.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?u.jsx(N,{onClose:()=>i(U()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uYjymIZp.js";import{a as i}from"./sentry-2dGMDW9b.js";import{u as l,g as c,N as u}from"./core-CWdVdeoj.js";import{z as n,j as a,O as m,a5 as p}from"./index-DWfuxgo1.js";import{g$ as g,Vk as y}from"./zeni-epic-state-BD9eq4uF.js";import{n as b}from"./mui-C50ypouB.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.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]="d857efee-ce6d-4ee5-a881-b775614d7f05",e._sentryDebugIdIdentifier="sentry-dbid-d857efee-ce6d-4ee5-a881-b775614d7f05")}catch{}})();function N(){const e=l(),t=c(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.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{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-uYjymIZp.js";import Te from"./NotFoundScreen-BkWLiAe_.js";import{a as u}from"./sentry-2dGMDW9b.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as Ee,l as De,n as Ie,o as h}from"./core-CWdVdeoj.js";import{Qz as se,QC as be,Qw as Ce,a30 as _e,fI as te,a31 as ne,Q_ as D,QQ as E,Qt as Re,Rt as ye,Rm as Ge,a32 as oe,gk as ie,a33 as W,a34 as Ae,Qp as Ue,Qm as ve,v2 as we,uS as xe,mD as Be,QO as je,a35 as Pe,RF as Fe,QK as Ke,R8 as Le,R5 as Qe,QF as $e,R2 as Ne,QZ as Ze}from"./zeni-epic-state-BD9eq4uF.js";import{z as I,e7 as Oe,s as ze,p as Ve,c as R,a2 as re,k as y,a6 as qe,j as X,O as Me,e8 as Je,W as Y,ac as We}from"./index-DWfuxgo1.js";import{n as Xe}from"./mui-C50ypouB.js";import{u as Ye}from"./useInitialThreadRequest-CKJ7jgv2.js";import{M as He}from"./MobileAppDrawer-CMzKILM6.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as H,e as na}from"./TaskListScreen-D4luV6T1.js";import{u as oa}from"./useTaskManagerPusherEvents-CKW_jM-O.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./InboxNotificationsProvider-BNnEDiYb.js";import"./useTaskManagerAccess-Cht8h7vG.js";import"./useAskAiCfoHostNavButtonProps-C0DT0xU1.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]="37da5fca-9022-4aa1-a939-7c57fd33271f",e._sentryDebugIdIdentifier="sentry-dbid-37da5fca-9022-4aa1-a939-7c57fd33271f")}catch{}})();function ia(){const e=ee(),a=ae(),n=I.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,b,C)=>{a(be({name:i,content:b,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Oe,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const L=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=_e([F,(e,a)=>{const n=F(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=De((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?W(e.taskGroupState,S):void 0,i=I.getSignedInUser(),b=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:b??""},v=ne(e),{tenantEmailDomain:w}=l,G=t.recurringSourceTaskId,x=G!=null?`${Y.appUrl}/${w}/tasks/${encodeURIComponent(G)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:I.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:We.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Y.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:v,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((f=>W(e.taskGroupState,f))).filter((f=>f!=null&&!f.isDeleted)).map((f=>({id:f.id,name:f.name,isDefault:f.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Ne(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Qe(s,i))},onUnsnoozeTask:s=>{e(Le(s))},onCreateSubtask:(s,i)=>{e(Ke({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=U(S),i=y(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(Be({files:s}))},onDeleteFile:s=>{e(xe(s))},onEditFileName:(s,i)=>{e(we(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(D(!1,n))},onCreateTagClick:s=>{e(ve(s,n))},onDeleteTagClick:s=>{e(Ue(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(Je);function K(){const e=ee(),a=ae(),n=ge(),c=ze(),{taskId:t,taskGroupId:l}=he(),d=g((o=>te(o))),S=Ye(d?.companyId),{useFeatureGate:s}=Ve(),{isFeatureEnabled:i}=s(R.isTaskSnoozeEnabled),{isFeatureEnabled:b}=s(R.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(R.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(R.isTaskRecurringParentEnabled),{isFeatureEnabled:w}=s(R.isTaskGroupAssigneesEnabled),[G,x]=u.useState(!1),[f,ce]=u.useState(!1),[Q,le]=u.useState(!1),[$,B]=u.useState(!1),_=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),N=g((o=>ne(o))),Z=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(D(!1,t)),t!=null&&a(E(t))}),[a,t]);const O=I.getSignedInUser()?.userId,de=I.isZeniUser(),ke=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),z=()=>{d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain))},V=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),z()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(O,k)]}),[d?.companyId,O]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(D(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:fe,taskId:J})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const T=ea(me);return T==null?"none":T.parent_task_id===J?"refreshSubtasks":P!==m.TASK_UPDATED||T.task_id!==J?"none":T.is_deleted===!0?"leaveDeleted":T.is_private!==!0||Se?T.sync_token!=null&&T.sync_token===fe?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(D(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?V():p==="leaveNoAccess"&&z();break}case m.TASKS_BULK_UPDATED:{const p=H(k);if(p==null)break;p.task_ids.includes(t)&&a(D(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=H(k);if(p==null)break;if(p.task_ids.includes(t)){V();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(D(!0,t));break}}}}),u.useEffect((()=>{f||N.fetchState==="Completed"||(ce(!0),a(Re()))}),[f,a,N.fetchState]),u.useEffect((()=>{Q||Z==="Completed"||(le(!0),a(ye()))}),[Q,a,Z]);const pe=u.useCallback((()=>{t!=null&&(_.current=!1,a(Ge([t],null,{isArchived:!1})),B(!0))}),[a,t]);u.useEffect((()=>{if($)if(A!=="In-Progress"){if(_.current){if(A==="Error")return B(!1),void(_.current=!1);if(A==="Completed"){B(!1),_.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=U(o);e(k,{state:{pathnameStackToGoBack:y(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else _.current=!0}),[$,A,d,n,e]);const q=g((o=>oe(o,t))),j=q.fetchState,M=I.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&q.error?.code===400){const{tenantEmailDomain:o}=d,k=U(o),p=y(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(qe,{analytics:X,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(He,{isAppContentDrawerOpen:G,handleDrawerToggle:o=>{x(o)}}),r.jsx(ca,{analytics:X,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:b,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:w})]})]})}const la=Xe.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
|
-
`,U=e=>`/${e}/tasks`;function xa(){return r.jsxs(Ie,{children:[r.jsx(h,{path:"/new",element:r.jsx(K,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(K,{})}),r.jsx(h,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(h,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(h,{path:"/:taskId",element:r.jsx(K,{})}),r.jsx(h,{path:"*",element:r.jsx(Te,{})})]})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-uYjymIZp.js";import V from"./NotFoundScreen-BkWLiAe_.js";import{a as n}from"./sentry-2dGMDW9b.js";import{u as ft,h as yt,g as bt,i as St,j as o,n as ht,o as f}from"./core-CWdVdeoj.js";import{fI as It,gZ as Lt,m3 as Tt,uh as jt,XM as Ct,XB as Et,XN as gt,R_ as At,R$ as kt,i3 as L,m1 as vt,ui as xt,RQ as Dt,Sp as Rt,XO as _t,XP as Nt,RX as Mt,RU as Xt,XQ as wt,XR as Ft,XS as Pt}from"./zeni-epic-state-BD9eq4uF.js";import{p as zt,V as Ht,c as H,b0 as Ut,z as qt,f as Bt,b1 as Vt,j as U,b2 as $t,ac as Gt,G as Ot}from"./index-DWfuxgo1.js";import"./mui-C50ypouB.js";import{d as Qt}from"./decodeURIComponentSafe-B92hORfx.js";import{u as Jt}from"./useEnsureVendorListLoaded-CVciy2pO.js";import{u as Kt,T}from"./TransactionDetailScreen-CeZrAaYH.js";import{c as Zt}from"./routePaths-BAWZQTun.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.js";import"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import"./useInitialThreadRequest-CKJ7jgv2.js";import"./expenseAutomationHelper-YR9YM6r6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="fb9870fc-6d0c-4c85-8bfe-5dcda78ddcaf",e._sentryDebugIdIdentifier="sentry-dbid-fb9870fc-6d0c-4c85-8bfe-5dcda78ddcaf")}catch{}})();const Wt=["bank","credit_card","other_current_assets"],q=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:B}}=Ot.getLocalizedStrings();function Yt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:$}=St(),{useFeatureGate:j}=zt(),G=Ht(),{isFeatureEnabled:O}=j(H.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(H.isProjectsTransactionsEnabled),Q=Qt($??""),a=Pt.find((t=>t===Q)),S=o((t=>It(t))),E=Ut(S.companyId,a),g=o((t=>Lt(t.companyState,S.companyId)?.company.companyLocaleInfo)),J=g?.currencyCode??B.currencyCode,K=g?.currencySymbol??B.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=qt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",Z=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),W=o((t=>Tt(t))),D=o((t=>jt(t))),R=D&&C===!0,h=o((t=>t.projectListState)),_=o((t=>t.projectState)),Y=n.useMemo((()=>Ct(_,h).projects),[_,h]),I=o((t=>Et(t,"common"))),N=o((t=>t.accountListState.byReportId.accountList.fetchState)),M=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),X=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),w=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Bt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&N==="Not-Started"&&e(L("accountList"))}),[e,r,a,N]),n.useEffect((()=>{r&&M==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,M]),n.useEffect((()=>{r&&X==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Wt))}),[e,r,X]),n.useEffect((()=>{r&&w==="Not-Started"&&e(vt())}),[e,r,w]);const F=h.fetchState;n.useEffect((()=>{r&&R&&F==="Not-Started"&&e(xt())}),[e,r,R,F]),Jt(r),Kt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Vt(m.state)??[q(u)];d(Zt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(q(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Rt(t))}),[e]),P=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;P.current!==t&&(P.current=t,U.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),z=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===z));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,z]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(Nt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Mt(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&O===!0&&E&&G?.connectionName!=="netsuite"?c.jsx($t,{analytics:U,attachmentUploadEndpoint:Gt.accountMicroServiceBaseUrl,authParams:Z,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:W,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Y,currencyCode:J,currencySymbol:K,bookCloseDate:S.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(Ft(a)),onRemoveLine:t=>e(wt(a,t)),onSubmit:()=>e(Xt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(V,{})}function Ce(){return c.jsxs(ht,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Yt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(V,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as _}from"./liveblocks-uYjymIZp.js";import{a as i}from"./sentry-2dGMDW9b.js";import{u as M,k as ot,j as g,s as ge,g as De,h as Ce,i as Ae,N as st,l as ct}from"./core-CWdVdeoj.js";import{pz as Ie,fI as Q,gZ as it,Vr as rt,oF as lt,of as dt,E0 as se,XT as ut,gk as mt,bn as pt,dh as _e,bq as Re,sZ as W,Wy as q,XU as we,XV as le,WY as Pe,me as Fe,XW as Ue,X1 as de,X2 as ue,n3 as xe,SX as me,XC as G,m8 as Ve,m6 as Le,mi as ft,pm as ht,XX as St,XY as yt,DT as J,md as Be,Sg as Oe,co as Tt,dn as bt,XZ as gt,XB as It,X_ as vt,X$ as Et,Y0 as kt,Y1 as Dt,DP as Ct,Y2 as At,Y3 as _t,Y4 as Rt,Y5 as wt,Y6 as Pt,mh as Ft,Y7 as Ut,Y8 as xt,XD as Vt,Y9 as Lt,Ya as Bt,Yb as Ot,Sa as Nt,S0 as zt,Sp as jt,mj as Mt,SY as ve,pr as Yt}from"./zeni-epic-state-BD9eq4uF.js";import{p as H,c as w,j as $,b3 as Gt,z as Ne,$ as $t,b4 as Xt,a9 as Wt,a2 as ce,V as qt,b5 as Ht,k as ie,aq as Zt,b6 as Jt,b7 as Kt,b8 as Qt,ac as en,at as oe}from"./index-DWfuxgo1.js";import{n as tn,S as nn,u as an,D as on}from"./mui-C50ypouB.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-C0DT0xU1.js";import{d as ze}from"./decodeURIComponentSafe-B92hORfx.js";import{u as cn}from"./useInitialThreadRequest-CKJ7jgv2.js";import{h as je,c as Me,g as rn,e as ln}from"./routePaths-BAWZQTun.js";import{u as dn}from"./expenseAutomationHelper-YR9YM6r6.js";import{A as un}from"./utils-tucfLrt-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="19e729d9-9b03-42ae-99e0-e492dc151174",t._sentryDebugIdIdentifier="sentry-dbid-19e729d9-9b03-42ae-99e0-e492dc151174")}catch{}})();function mn(t=!0,e=!0){const o=M(),n=ot(),{useFeatureGate:a}=H(),{isFeatureEnabled:s}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||e&&s!==!0)return;const c=d=>{const h=n.getState().createTransferEntryState.transferAccountsByType[d].fetchState;return h!=="In-Progress"&&h!=="Completed"};c("transferEntryEligible")&&o(Ie({kind:"transferEntryEligible"})),c("creditCardOnlyEligible")&&o(Ie({kind:"creditCardOnlyEligible"}))}),[t,e,s,o,n])}function pn(t,e){const o=(function(){const d=M(),[h,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=H(),{configValue:v,isDynamicConfigLoading:f}=y("transaction_categorization_config"),T=!f&&v?.capitalization_enabled===!0,k=g((I=>Q(I))),C=k.companyId,P=g((I=>it(I.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:F,dismissedAccounts:U}=g((I=>{const b=I.tenantState.currentTenantId,R=b!=null?I.tenantState.tenantsById[b]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),ge),L=i.useRef(A);L.current=A;const x=i.useRef(F);x.current=F;const B=i.useRef(U);B.current=U;const O=g((I=>rt(I.accountState)),ge),Y=i.useMemo((()=>{const I={};for(const b of O)b.accountId!=null&&b.accountName!=null&&(I[b.accountId]=b.accountName);return I}),[O]),X=l!=null?Y[l]??null:null,N=i.useCallback((I=>{if(!T)return;const b=L.current;if(b==null)return;const R=b.accounts??[],Z=new Set(I),ee=x.current??{},te=B.current;for(const z of R)if(Z.has(z.accountId)&&ee[z.accountId]==null&&te?.[z.accountId]==null)return p(z.classificationType),u(z.accountId),void S(!0)}),[T]),E=i.useCallback(((I,b)=>{d(lt(C,I,b,!0)),S(!1),p(null),u(null)}),[d,C]),r=i.useCallback((()=>{l!=null&&(d(dt(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:h&&T,popupType:D,popupAccountId:l,popupAccountName:X,currencySymbol:P,checkAndShowPopup:N,handleSubmit:E,handleDismiss:r}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const j=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,K=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Ye=(t,e,o)=>{$.trackRecommendationFeedbackRetracted(K(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Ln=(t,e)=>{const o=new Set(e.map(String));j.forEach(((n,a)=>{o.has(n.transactionId)&&(j.delete(a),Ye(t,n.feedback,n.transactionId))}))},Bn=t=>{const e=new Set(t.map(String));j.forEach(((o,n)=>{e.has(o.transactionId)&&j.delete(n)}))};function fn(t){const e=M(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(ut),{isEnabled:d,fallbackTransactionId:h}=t,S=i.useCallback((u=>u.transactionId??h??""),[h]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((f,T,k,C)=>{const P=Ee(T,k,C),A=j.get(P);return A!=null&&(j.delete(P),Ye(f,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((f,T)=>{$.trackRecommendationAccepted(K(f,T))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((v,f,T)=>{$.trackRecommendationFeedbackSubmitted({...K(v,f),feedbackReason:T})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((v,f)=>{j.set(Ee(f,v.lineId,v.dimension),{feedback:v,transactionId:f})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),$.trackRecommendationFeedbackSkipped(K(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(mt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?_.jsx(Gt,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:o}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>pt(t)&&o),[t,o])};function Ge(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function On(t,e){const o=M(),{useFeatureGate:n}=H(),a=g((r=>Q(r))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&_e(a.userRole),d=a.userRole!=null&&Re(a.userRole),{isFeatureEnabled:h}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(w.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:W(e)})),[t,e]),l=g((r=>q(r,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,v=g((r=>{const I=q(r,p)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":r.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),f=i.useMemo((()=>l?.fetchState==="Completed"?Ge(l?.transaction):void 0),[l?.fetchState,l?.transaction]),T=g((r=>{if(f!=null)return we(r.customerIncomeState,r.vendorExpenseState,r.trendState,f,"month")})),k=g((r=>le(r))),C=g((r=>{if(f!=null)return Pe(r.trendWithTransactionsState,f,"TransactionDetail")})),P=a.company?.companyInfo.firstMonthOfFY??1,A=g((r=>Fe(r.accountState,r.accountListState,"accountList"))),[F,U]=i.useState(!1),[L,x]=i.useState(!1),[B,O]=i.useState(!1);i.useEffect((()=>{U(!1),x(!1),O(!1)}),[t,e]);const Y=i.useCallback((()=>{U(!1),x(!1)}),[]),[X,N]=i.useState(!1),E=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{B||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),O(!0)),f!=null&&(!s||c&&d===!1)&&(F?L||T==null||(x(!0),o(me(f,"TransactionDetail",{timeframe:"month",timePeriod:E??T}))):(o(de()),o(ue()),U(!0),o(xe(f))))}),[o,B,l?.fetchState,l?.transaction,f,s,c,d,F,L,T,E]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?N(!0):N(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o(G("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:h,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:v,tranEntity:f,defaultTrendTransactionTimePeriod:T,vendorViewDetails:k,uiState:C,firstMonthOfFY:P,uncategorizedAccounts:A,resetTrendIsFetchedStates:Y,isCreateVendorDrawerOpen:X,setIsCreateVendorDrawerOpen:N}}const hn={overlayWidth:new Wt(100,100,58)},Sn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=an(),c=$t(),d=M(),h=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??h,onSaveSuccess:()=>{d(Le()),d(ft("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return _.jsx(on,{anchor:"right",open:t,PaperProps:{style:{width:hn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:_.jsx(yn,{onClick:p=>p.stopPropagation(),children:_.jsx(Xt,{...D})})})},yn=tn(nn)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function Tn(t,e){t(ht({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:W(e.transactionType),sourceTransactionType:W(e.sourceTransactionType)}))}function bn({currentTransactionId:t,enabled:e=!0,buildPath:o,beforeNavigate:n,navigate:a,navigateState:s}){const c=g((h=>h.createTransferEntryState.lastTransferEntryReplacement)),d=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||d.current===c)return;const{previousTransactionId:h,newTransactionId:S}=c;t.id===h.id&&t.type===h.type&&(d.current=c,n?.(),a(o(S),{replace:!0,state:s}))}),[e,c,t,o,n,a,s])}const gn=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:o})=>{const n=De(),a=Ce(),s=M(),c=pe(),{transactionTypeEncoded:d,transactionId:h}=Ae(),S=e??h,D=o??ze(d??"");let p;je(S,D)&&(p={id:S,type:W(D)});const l=p!=null?g((y=>q(y,p))):void 0,u=()=>{const y=ce(n.state?.pathnameStackToGoBack),v=y.poppedPathname??((f=2)=>{let T="../";for(let k=0;k<f;k++)T=`${T}../`;return T})(1);a(v,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:p,onSaveVendor:()=>{s(Be(p,void 0))},onSaveSuccess:()=>{if(l!=null&&l?.transaction&&l?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&l?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=l?.transactionDetailLocalData.vendorUpdates,v={id:l?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:l?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:l?.transactionDetailLocalData.vendorUpdates?.qboId??""},f={transactionId:{id:l?.transaction?.id,type:l?.transaction?.type},transaction:l?.transaction,lineIds:l?.transaction?.lines?.map((T=>T.id))??[]};s(J({entity:v,amount:l?.transaction?.amount.amount,transactionDetails:f,flowType:"detail",isFetchCOT:c}))}u()},onCancel:()=>{p!=null&&s(St({transactionId:p})),s(Le()),s(yt()),t(!0),u()}}},In=ct((function(t,e){const o=q(t,e.selectedTransaction);let n;o==null&&console.warn("Check if the you've selected the transaction before getting the details");const a=Ne.getSignedInUser(),s=t.tenantState.currentTenantId,c={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:s??""};o!=null&&o.fetchState==="Completed"&&o.transaction!=null&&e.entity!=null&&(n=gt(t,e.entity,"TransactionDetail"));const d=t.entityAutoCompleteState.autoCompleteText.common,h=It(t,"common"),S=Q(t);return{transactionDetail:o,transactionAttachmentEndpointToDownload:`${oe}/transaction_attachment`,transactionAttachmentsEndpointToFetch:S.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${oe}/transaction_attachments_accounting_provider`:`${oe}/transaction_attachments`,attachmentUploadEndpoint:`${en.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:n,analytics:$,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:h},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails"),isTransactionSplitEditMode:o?.transactionDetailLocalData?.editMode??!1}}),(function(t,e){const{isCOTEnabled:o}=e;return{onBackClick:()=>{if(t(G("common")),e.onBackClick!=null)return void e.onBackClick();const n=ce(e.location.state?.pathnameStackToGoBack),a=n.poppedPathname??$e(2);e.navigate(a,{state:{pathnameStackToGoBack:n.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(n,a)=>{e.transaction!=null&&t(Yt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:n,customerId:a}))},onTransactionClick:n=>{e.resetTrendIsFetchedStates(),t(de()),t(ue());const a=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Me(n,e.tenantEmailDomain),{state:{pathnameStackToGoBack:a}})},onTrendSelectedPeriodChange:n=>{if(n==null)e.defaultTrendTransactionTimePeriod!=null&&t(ve(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const a=n.currentTimePeriod==null?n.addTimePeriod:{startDate:n.addTimePeriod.startDate,endDate:n.currentTimePeriod.endDate};t(me(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:n.addTimePeriod})),t(ve(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:a}))}},onSaveUpdates:(n,a,s,c)=>{t(c===!0&&s!=null?Be(n,s,!0,e.isExpenseAutomationEnabled):Mt({transactionId:n,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:a})),t(G("common"))},onUploadAttachmentAttachment:n=>{t(jt(n))},onDeleteAttachment:n=>{e.transaction!=null&&t(zt(n,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(n,a)=>{t(Nt({transactionId:n,transactionLocalData:a}))},onUpdateAllChecked:(n,a,s,c)=>{e.transaction!=null&&t(Ot(e.selectedTransaction,e.transaction,n,a,s,c))},onResetLineItemsCategoryClassInLocalData:(n,a,s,c,d,h)=>{t(Bt(n,a,s,c,d,h))},onChangeCategoryClassWhenUpdateAllIsChecked:(n,a)=>{e.transaction!=null&&t(Lt({id:e.transaction.id,type:e.transaction.type},e.transaction,n,a))},onSaveSuccess:()=>{const n=ce(e.location.state?.pathnameStackToGoBack);if(n.poppedPathname!=null){const a=un(n.poppedPathname,"/").split("/"),s=a[a.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(s)&&e.navigate(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${rn(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${ln(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(Oe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(n,a)=>{n.trim().length>=2?t(Vt({searchString:n,entityType:a,searchOrigin:"common"})):n.trim().length===0&&t(G("common"))},onCancelAutoComplete:()=>{t(G("common"))}},onFetchRecommendationsForEntity:(n,a,s,c)=>{t(J({entity:n,amount:a,transactionDetails:s,flowType:"detail",isBulkFetch:c,isFetchCOT:o}))},clearRecommendationForLineId:n=>{const{transactionId:a,transaction:s,lineId:c}=n;t(xt(a,s,c))},resetUpdateErrorState:()=>{const n={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(Ut(n))},onSaveVendorInLocalData:(n,a,s,c,d)=>{if(t(Ft({transactionId:n,vendorUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(J({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o})),t(Ve({vendorId:a.id?a.id:void 0,localData:{vendorName:a.name,vendorId:a.id?a.id:void 0}})),!a.id&&e.transaction!=null){const h=e.transaction,S=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(h.type??"")}/${h.id}/vendor/create`,{state:{pathnameStackToGoBack:S}})}},onSaveCustomerInLocalData:(n,a,s,c,d)=>{t(Pt({transactionId:n,customerUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(J({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o}))},onUpdateAllTranactionsWithCurrentVendorChecked:n=>{t(wt({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:n}))},onClickUpdateVendorToAllLineItems:(n,a,s)=>{t(Rt(n,a,s))},onResetVendorToAllLineItems:(n,a,s)=>{t(_t(n,a,s))},saveLatestSelectedEntity:(n,a,s)=>{t(At({transactionId:n,lineId:a,entity:s}))},updateVendorBulkRecommendationsFetchStatus:(n,a)=>{t(Ct(n,a))},setIsVendorUpdateAllChecked:(n,a,s)=>{t(Dt(n,a,s))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?n=>Tn(t,n):void 0,onLineAdd:()=>{if(e.transaction==null)return;const n={id:e.transaction.id,type:e.transaction.type},a=e.transaction.type==="journal_entry",s=e.transaction.amount?.currencyCode??"",c=e.transaction.amount?.currencySymbol??"",d=a?{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"journal_entry_line_detail",type:"journal_entry_transaction_line",postingType:void 0,postingTypeName:"",lineTransactionType:"journal_entry"}:{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"account_based_expense_line_detail",type:"transaction_with_account_and_class_line"};t(kt(n,d))},onLineDelete:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(Et(a,n))},onToggleSplitEditMode:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(vt(a,n))}}}))(Qt);function Nn(){const t=Ce(),e=M(),o=De(),{useFeatureGate:n}=H(),a=qt(),s=g((m=>Q(m))),c=s.userRole.includes("charge_card_user")||s.userRole.includes("charge_card_admin"),d=s.userRole!=null&&_e(s.userRole),h=s.userRole!=null&&Re(s.userRole),{isFeatureEnabled:S}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:D}=n(w.isExpenseAutomationEnabled),{tenantEmailDomain:p,transactionTypeEncoded:l,transactionId:u}=Ae(),[y,v]=i.useState(!1),f=ze(l??""),T=je(u,f),k=g((m=>m.transactionVendorViewState)),C=pe(),{isFeatureEnabled:P}=n(w.isRecommendationFeedbackEnabled),A=Ht(),{onRecommendationSelection:F,popup:U}=fn({isEnabled:P,fallbackTransactionId:u}),L=i.useMemo((()=>({...A,onRecommendationSelection:F})),[A,F]),{isFeatureEnabled:x}=n(w.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:B}=n(w.isProjectsTransactionsEnabled),{isFeatureEnabled:O}=n(w.isTransactionSplitEnabled),Y=a?.currentTenant?.companyId,X=a?.currentTenant?.companyName,N=cn(Y),E=i.useMemo((()=>{if(T)return{id:u,type:W(f)}}),[T,u,f]),r=E!=null?g((m=>q(m,E))):void 0,I=r?.transactionDetailLocalData.vendorUpdates?.id!=null?k.editVendorStateById[r?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",b=r?.fetchState==="Completed"?Ge(r?.transaction):void 0,R=g((m=>b!=null?we(m.customerIncomeState,m.vendorExpenseState,m.trendState,b,"month"):void 0)),Z=g((m=>le(m))),ee=g((m=>b!=null?Pe(m.trendWithTransactionsState,b,"TransactionDetail"):void 0)),te=s.company?.companyInfo.firstMonthOfFY??1,z=g((m=>Fe(m.accountState,m.accountListState,"accountList"))),[Xe,fe]=i.useState(!1),[We,he]=i.useState(!1),[qe,Se]=i.useState(!1),He=i.useCallback((m=>Me(m,p??"")+o.search),[p,o.search]),Ze=i.useCallback((()=>{Se(!1)}),[]);bn({currentTransactionId:E,enabled:p!=null&&p!=="",buildPath:He,beforeNavigate:Ze,navigate:t,navigateState:o.state});const ye=()=>{fe(!1),he(!1)},Te=dn();mn();const ne=i.useRef(r?.transaction);ne.current=r?.transaction;const Je=r?.transactionDetailUpdateStatus?.fetchState,V=pn(Je,(()=>{const m=[];if(ne.current!=null)for(const ae of ne.current.lines??[])"account"in ae&&ae.account?.accountId!=null&&m.push(ae.account.accountId);return m}));i.useEffect((()=>{E!=null&&r!=null&&r.fetchState==="Not-Started"&&(e(Oe(E,!1)),ye())}),[e,E,r?.fetchState]),i.useEffect((()=>{if(E!=null&&r?.fetchState==="Error"){const m=ie(o.state?.pathnameStackToGoBack,o.pathname);t("page-not-found",{replace:!0,state:Te?{pathnameStackToGoBack:m,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:m,message:"pageNotFound",origin:"transaction_detail"}})}}),[E,r?.fetchState,t,o.state,o.pathname,Te]),i.useEffect((()=>{qe||r==null||r.transaction==null||(e(Ue({id:r.transaction.id,type:r.transaction.type})),Se(!0));const m=o.state?.searchContext;b==null&&r?.fetchState==="Completed"&&ke(r?.transaction,m),b!=null&&(!c||d&&h===!1)&&(Xe?We||R==null||(he(!0),e(me(b,"TransactionDetail",{timeframe:"month",timePeriod:ee?.selectedPeriod?.timePeriod??R}))):(e(de()),e(ue()),ke(r?.transaction,m),fe(!0),e(xe(b))))}),[r?.fetchState,r?.transaction,R,c]),i.useEffect((()=>{Z.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)}),[Z.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e(G("common"))}),[]);const Ke=[l,u].filter((m=>m!=null)),{transactionId:be,onSaveVendor:Qe,onSaveSuccess:et,onCancel:tt}=gn({closeDrawerHandler:m=>{v(!1),t(m?"../":"../..")}}),{isAiCfoAccessEnabled:nt,onAskAiCfoClick:at}=sn({mobileExploreReferrer:"Transaction Details"});return Zt({isDataReady:r?.fetchState==="Completed"}),T?_.jsxs(_.Fragment,{children:[be!=null&&y&&_.jsx(Sn,{isOpen:y,transactionId:be,onSaveVendor:Qe,onSaveSuccess:et,onCancel:tt}),_.jsx(Jt,{toolkit:L,children:_.jsx(In,{hideDeleteAttachment:!0,firstMonthOfFY:te,isDisabled:r?.transaction?.type==="transfer"&&a?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:p,location:o,navigate:t,selectedTransaction:E,entity:b,isCOTEnabled:C,defaultTrendTransactionTimePeriod:R,resetTrendIsFetchedStates:ye,transaction:r?.transaction,uncategorizedAccounts:z,vendorSaveStatus:I,isVendorBulkUpdateOnTransactionEnabled:S,isCreateTransferEntryFromExpenseEnabled:x,isExpenseAutomationEnabled:D,isAiCfoAccessEnabled:nt,onAskAiCfoClick:at,isProjectsTransactionsEnabled:B,isTransactionSplitEnabled:O,companyId:Y,companyName:X,initialOpenThreadRequest:N})}),U,V.showPopup&&V.popupType!=null&&_.jsx(Kt,{popupType:V.popupType,currencySymbol:V.currencySymbol,accountId:V.popupAccountId??"",accountName:V.popupAccountName??"",onSubmit:V.handleSubmit,onDismiss:V.handleDismiss})]}):_.jsx(st,{to:$e(Ke.length)})}const $e=(t=2)=>{let e="../";for(let o=0;o<t;o++)e=`${e}../`;return e},ke=(t,e)=>{if(t!=null){const{transactionCategory:o,transactionClass:n}=vn(t),a=En(t);$.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,o.length>0?o:void 0,n.length>0?n:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((s=>s.fileName)),e!=null?"Search":void 0,e?.searchTerm,e?.resultPosition,e?.resultsCount)}},vn=t=>{const e=[],o=[];return t.lines?.forEach((n=>{switch(n.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 a=n;a!=null&&a.account!=null&&a.account.accountName?.length>0&&e.push(a.account.accountName),a.class!=null&&a.class.className?.length>0&&o.push(a.class.className);break}}})),{transactionCategory:e,transactionClass:o}},En=t=>Tt(t)===!0?t.customer?.name??"":bt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{Sn as C,Nn as T,On as a,fn as b,pn as c,gn as d,In as e,bn as f,pe as g,Tn as h,Bn as i,ke as l,Ln as r,mn as u};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-uYjymIZp.js";import{a as f}from"./sentry-2dGMDW9b.js";import{t as u,u as h,j as y,N as I}from"./core-CWdVdeoj.js";import{Vh as w,gl as b,K4 as j}from"./zeni-epic-state-BD9eq4uF.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-DWfuxgo1.js";import{n as g}from"./mui-C50ypouB.js";import"./recharts-Bg4ChN3A.js";import"./analytics-DHe7CR-k.js";import"./plaid-ByLFGZs_.js";import"./dnd-27tNAcHF.js";import"./stripe-cKAAJElX.js";import"./lottie-diNsKuuh.js";import"./lexical-BpsogPnC.js";import"./pdf-Ck1fv3t0.js";import"./utils-tucfLrt-.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]="712154e0-8713-4560-84ad-5989284e4aff",e._sentryDebugIdIdentifier="sentry-dbid-712154e0-8713-4560-84ad-5989284e4aff")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y((c=>w(c))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(m(!0),a(j(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.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
|
-
`,_=g(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|