@zeniai/web-app-ui 5.3.32-dev → 5.3.32-prod
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-BXftSVn-.js +9 -0
- package/dist/assets/AddressRoutes-Dx1aQN-n.js +1 -0
- package/dist/assets/{AddressScreen-LFBV9KsX.js → AddressScreen-TLZdvXNy.js} +2 -2
- package/dist/assets/{AiCfoScreen-N1tWqaxl.js → AiCfoScreen-DmLnUFml.js} +1 -1
- package/dist/assets/{AppDrawer-DmTC2F7R.js → AppDrawer-BnHpD6dG.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-sbvXc3_Z.js → BillPayApprovalRoutes-DPALyyf2.js} +1 -1
- package/dist/assets/{BillPayRoutes-Cf4T_cOn.js → BillPayRoutes-qAhjjusa.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-BYV8fDWH.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-p_ZDfSVk.js → CardsAiCfoScreen-Cd63K_-0.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-DWtJK7tn.js → ChargeCardRoutes-BH9evnp_.js} +7 -7
- package/dist/assets/{CompanyPassportScreen-Cr55ZhHa.js → CompanyPassportScreen-D0g6Nmxq.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CpG3pE-i.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CXLOaLgp.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CI_z4poM.js +30 -0
- package/dist/assets/{DashboardRoutes-DmGJojZS.js → DashboardRoutes-C_4oAXQg.js} +3 -3
- package/dist/assets/{DefaultTenantHome-CWi1XNJj.js → DefaultTenantHome-D3eb-jo9.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-i7JC-m7w.js +18 -0
- package/dist/assets/{DrawerScreen-DVJ1nhu5.js → DrawerScreen-DUO1Z5ow.js} +1 -1
- package/dist/assets/EntityDetailRoutes-B2ai8pR3.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-OyBtxM5J.js → ExpenseAutomationRoutes-DQA6yQ4O.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-CjFoHQHk.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-qemWA0jI.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-DBc6Mphu.js → InboxNotificationsProvider-7eYmgI1F.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B1FBFxmX.js → InvoicingRoutes-DOUUybBE.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-70CKQAmw.js → MagicLinkRoutes-CTs6OYkH.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CDEl_Ic_.js +12 -0
- package/dist/assets/MobileAppDrawer-BMvh-RAa.js +1 -0
- package/dist/assets/NotFoundScreen-Wkt8x0Ja.js +1 -0
- package/dist/assets/NotificationRoutes-BF1aTPUh.js +1 -0
- package/dist/assets/OAuthConsentScreen-8oM_ijmg.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-DHCQWgYM.js → PandLWithForecastRoutes-DvwOSp2G.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-nMdnk521.js → PaymentLinkScreen-D0VzMTpF.js} +4 -4
- package/dist/assets/PeopleRoutes-CMx_k0hr.js +22 -0
- package/dist/assets/PerformanceRoutes-OuxZJbf_.js +1 -0
- package/dist/assets/{Preview-C_55fm97.js → Preview-Dkzm36JB.js} +1 -1
- package/dist/assets/QBOConnectionScreen-Cxvr0UGn.js +100 -0
- package/dist/assets/ReimbursementApprovalRoutes-ChPdj5ky.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-kIivYyt0.js +1 -0
- package/dist/assets/ReimbursementRoutes-DlTMcw_k.js +68 -0
- package/dist/assets/{ReportsRoutes-BMuQOI7M.js → ReportsRoutes-DUvTlB32.js} +1 -1
- package/dist/assets/RewardsRoutes-CANJzBfw.js +1 -0
- package/dist/assets/ScreenRoutes-B2jpCRd2.js +2 -0
- package/dist/assets/{SettingsRoutes-6XcFcNwI.js → SettingsRoutes-D405mYiE.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BxDIT7Xu.js → SetupPagesScreen-o-PhLBXH.js} +5 -5
- package/dist/assets/SignInScreen-CsdAWM0a.js +1 -0
- package/dist/assets/SignOutScreen-DjO_hTaY.js +9 -0
- package/dist/assets/TaskListScreen-D5rs0HLr.js +9 -0
- package/dist/assets/TaskRoutes-IWzYaX-F.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DExFe-03.js +1 -0
- package/dist/assets/{TransactionDetailScreen-2kUyCbFm.js → TransactionDetailScreen-7v-3l9dA.js} +2 -2
- package/dist/assets/TransactionListRoutes-hxVuwPcb.js +1 -0
- package/dist/assets/TreasuryRoutes-C4GA1Tde.js +37 -0
- package/dist/assets/{VendorsRoutes-zeljYW53.js → VendorsRoutes-DLC5o9yJ.js} +20 -20
- package/dist/assets/WiseConfirmationScreen-BJNaaQrG.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-Dl9FUScI.js → ZeniAccountRoutes-CPdfqL23.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-Butd8DWu.js +9 -0
- package/dist/assets/{accountMappingHelper-ZLBxLrOl.js → accountMappingHelper-DsN6SM7a.js} +1 -1
- package/dist/assets/{analytics-DHBkdK00.js → analytics-NBT5BH2R.js} +1 -1
- package/dist/assets/{analyticsHelper-C8sM1z8L.js → analyticsHelper-Bw6Cjeqd.js} +1 -1
- package/dist/assets/{core-DuNHGHBC.js → core-Dlma5MIa.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CcNRl55W.js → decodeURIComponentSafe-MgEJs-XP.js} +1 -1
- package/dist/assets/{dnd-DKR3QBLX.js → dnd-BgBEAfSC.js} +1 -1
- package/dist/assets/{empty-DRiI770H.js → empty-BRn9rxGR.js} +1 -1
- package/dist/assets/{empty-BA0WbUFe.js → empty-DpC6uPKD.js} +1 -1
- package/dist/assets/{emptyVideoElement-h3Sv0Oh_.js → emptyVideoElement-BpruyOrt.js} +1 -1
- package/dist/assets/epic-TdjWG3DC.js +2 -0
- package/dist/assets/{expenseAutomationHelper-DGi7tuOw.js → expenseAutomationHelper-BpaM_jjL.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D1jcEP43.js → getLocaleForTenant-B0nO-Z7L.js} +1 -1
- package/dist/assets/{index-CxkwDRG8.js → index-Blw4A66-.js} +30310 -31275
- package/dist/assets/{index-y1KlwLzp.js → index-BtQ2P-s4.js} +1 -1
- package/dist/assets/{index-DgXVMYGv.js → index-CYHgs6V3.js} +1 -1
- package/dist/assets/{index-CFb8siio.js → index-CexFEAIL.js} +1 -1
- package/dist/assets/{index-DplrRYRh.js → index-Cr8P80rT.js} +1 -1
- package/dist/assets/{index-DRythsNE.js → index-DHUOQOTf.js} +1 -1
- package/dist/assets/{index-bPK7WXlx.js → index-YntXYqu4.js} +2 -2
- package/dist/assets/{index-B21g9_qj.js → index-ui_UfE_7.js} +1 -1
- package/dist/assets/{lexical-CcqvVKiN.js → lexical-Cc-23sPJ.js} +1 -1
- package/dist/assets/{liveblocks-BkTNzfNi.js → liveblocks-BD1fi6wA.js} +1 -1
- package/dist/assets/{lottie-DACJJNY9.js → lottie-Dd5kLrRz.js} +1 -1
- package/dist/assets/{mui-DaLeH41l.js → mui-DPmPgDDD.js} +1 -1
- package/dist/assets/{pathToGoBack-CmznLvKE.js → pathToGoBack-C5NlBrdk.js} +1 -1
- package/dist/assets/{pdf-BjtwR-dW.js → pdf-BCsxh4ki.js} +3 -3
- package/dist/assets/{pdf-lib-oygBYinp.js → pdf-lib-BSghpPvP.js} +1 -1
- package/dist/assets/{plaid-BVNoSR_u.js → plaid-w5kSeMkL.js} +1 -1
- package/dist/assets/{pusher-Db4sFIYV.js → pusher-D_NnYp1B.js} +1 -1
- package/dist/assets/{react-CYKQo_kF.js → react-BRcmo_so.js} +1 -1
- package/dist/assets/{react-1oTTb5wo.js → react-BYFmdCmG.js} +1 -1
- package/dist/assets/{react-CEkBTHgm.js → react-BiCIC8nJ.js} +1 -1
- package/dist/assets/{react-CMoOPPDa.js → react-CKnkKWiv.js} +1 -1
- package/dist/assets/{react-CNf8hG5M.js → react-Co4WxHXe.js} +1 -1
- package/dist/assets/{react-eY-XTCmQ.js → react-wEOgqpw3.js} +1 -1
- package/dist/assets/{recharts-CkuQpH_L.js → recharts-WuCIKI4c.js} +1 -1
- package/dist/assets/{routePaths-CKTfFzY9.js → routePaths-1GgW-roh.js} +1 -1
- package/dist/assets/{sentry-CNLjKkQW.js → sentry-C6D8WJ15.js} +1 -1
- package/dist/assets/{url-C3nvEZls.js → url-7hMA9KrE.js} +1 -1
- package/dist/assets/url-BVCS53n5.js +6 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BnMQqj78.js → useAiCfoDashboardSuggestedQuestionsChips-Cox0FTmj.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-5qRN6gKs.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-B74EcXIV.js → useChargeCardPusherEvents-Cu201ke6.js} +1 -1
- package/dist/assets/{useDeviceId-J3kskmrp.js → useDeviceId-p2IpPhWq.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-pFVkjSX_.js +1 -0
- package/dist/assets/{useInitialThreadRequest-DANB6KeB.js → useInitialThreadRequest-Ddm4sao-.js} +1 -1
- package/dist/assets/useTaskManagerAccess-BKVtGCGL.js +1 -0
- package/dist/assets/utils-Bv9LDtmr.js +36 -0
- package/dist/assets/{withTransactionSidePanel-CbsHNOl9.js → withTransactionSidePanel-QyMR1bIP.js} +2 -2
- package/dist/assets/{zeni-epic-state-IKQP0lNP.js → zeni-epic-state-2zvjmkUL.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AccountMappingScreen-Dst-9gUw.js +0 -9
- package/dist/assets/AddressRoutes-O-cTW9EV.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen--LjYD0BK.js +0 -9
- package/dist/assets/ConnectionAuthScreen-D-vDZGov.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Cs_F35vo.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-deFe2P-n.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-D5RLzOT3.js +0 -18
- package/dist/assets/EntityDetailRoutes-DJgrP2Nz.js +0 -1
- package/dist/assets/FeaturePreviewScreen-BhrA_knX.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Dm5LF-fb.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CC7wdqci.js +0 -12
- package/dist/assets/MobileAppDrawer-BtnNKdri.js +0 -1
- package/dist/assets/NotFoundScreen-DjDyDYWZ.js +0 -1
- package/dist/assets/NotificationRoutes-Jy_Q0gUN.js +0 -1
- package/dist/assets/OAuthConsentScreen-DB2EvPsq.js +0 -1
- package/dist/assets/PeopleRoutes-rPdm-Ydn.js +0 -22
- package/dist/assets/PerformanceRoutes-CF0jBH_I.js +0 -1
- package/dist/assets/QBOConnectionScreen-Dlky0ESM.js +0 -100
- package/dist/assets/ReimbursementApprovalRoutes-Bf9cBzdf.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-XQSOHGYn.js +0 -1
- package/dist/assets/ReimbursementRoutes-CgvBDllF.js +0 -68
- package/dist/assets/RewardsRoutes-CF7hyIJJ.js +0 -1
- package/dist/assets/ScreenRoutes-vV1s5761.js +0 -2
- package/dist/assets/SignInScreen-UcqpfzAX.js +0 -1
- package/dist/assets/SignOutScreen-14vW04Vy.js +0 -9
- package/dist/assets/TaskListScreen-CwNgkHwd.js +0 -9
- package/dist/assets/TaskRoutes-uBt2S29g.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Burs226A.js +0 -1
- package/dist/assets/TransactionListRoutes-Dm5jOGqp.js +0 -1
- package/dist/assets/TreasuryRoutes-C3nO4w9n.js +0 -37
- package/dist/assets/WiseConfirmationScreen-BBqG7Bw5.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BjcRzB88.js +0 -9
- package/dist/assets/epic-leJAVePQ.js +0 -2
- package/dist/assets/url-CaYHIgYK.js +0 -6
- package/dist/assets/useAskAiCfoHostNavButtonProps-D-XiURTy.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-F2D_LM69.js +0 -1
- package/dist/assets/useTaskManagerAccess-CgZlooKP.js +0 -1
- package/dist/assets/utils-BN2UhEgk.js +0 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-BD1fi6wA.js";import ut from"./NotFoundScreen-Wkt8x0Ja.js";import{a as k}from"./sentry-C6D8WJ15.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as Z}from"./core-Dlma5MIa.js";import{cz as It,S_ as O,fB as X,g_ as Tt,T2 as b,$V as H,T6 as m,SZ as E,zt as j,F9 as Ct,$W as yt,SY as Et,T8 as At,zy as _t,$X as M,br as F,gd as x,zC as J,$Y as Nt,cL as Bt,cE as wt}from"./zeni-epic-state-2zvjmkUL.js";import{ao as xt,e as vt,I as Rt,d as Dt,aq as Pt,dI as Gt,p as B,dJ as Ut,w as $t,dK as Mt,i as Ft,a2 as jt}from"./index-Blw4A66-.js";import"./mui-DPmPgDDD.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-5qRN6gKs.js";import{u as zt}from"./useTaskManagerAccess-BKVtGCGL.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="b43d38ef-41d5-41a5-96e5-d8b7092fe39e",t._sentryDebugIdIdentifier="sentry-dbid-b43d38ef-41d5-41a5-96e5-d8b7092fe39e")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Wt=St((function(t,l){const n=O(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&At(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t(M([a],F())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(H(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(J("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(M([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(E({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(M(o,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(E({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))($t(Mt)),Yt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=vt(),[I,R]=k.useState(!1),a=S((e=>O(e))),s=S((e=>X(e))),{useFeatureGate:d}=Rt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Pt({isDataReady:!0});const Q=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),z=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),P=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:Y,isFetchingMore:q,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(z!==c&&c!=null&&o(H(c)),c==null){const e=`../${z}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(A===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[A,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=A||G===!0||C!==!0||A||G===!0||C!==!0;k.useEffect((()=>{U&&P!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||P!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,P]),k.useEffect((()=>{o(E({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(R(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(A===!1&&W===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const $=L.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return $!=null?{inboxNotification:{...u,threadId:$.id},thread:$}:(q||K===!0||Y==null||Y(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[A,G,q,C,K,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const y=Et(p.mode);if(y==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=zt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(Z,{path:"/:selectedTab",element:N.jsx(Yt,{})}),N.jsx(Z,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-BD1fi6wA.js";import{a as r}from"./sentry-C6D8WJ15.js";import{u as A,g as C,j as o,N as j}from"./core-Dlma5MIa.js";import{Ty as z,fB as P,gi as x,Tz as D,TA as M,TB as R,TC as B,pw as k,Sh as L}from"./zeni-epic-state-2zvjmkUL.js";import{z as h,af as I}from"./index-Blw4A66-.js";import"./mui-DPmPgDDD.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="cc779f62-37dc-4c1a-acfa-672e1c6f32db",n._sentryDebugIdIdentifier="sentry-dbid-cc779f62-37dc-4c1a-acfa-672e1c6f32db")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo((()=>z(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>P(e))),l=o((e=>x(e))),c=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),d=o(R),[v,b]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(B())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,c,n]),r.useEffect((()=>{d!=null&&d!==""&&(window.location.href=d)}),[d]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:T??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(s.userId,s.zeniSessionId??void 0,u,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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-DHCQWgYM.js → PandLWithForecastRoutes-DvwOSp2G.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-BD1fi6wA.js";import{h as J,u as K,g as Q,i as X,j as d,l as Z,n as ee,o as C}from"./core-Dlma5MIa.js";import{fB as M,ze as O,ub as ae,Up as q,u6 as T,bq as te,b_ as se,u7 as oe,Uq as re,U7 as S,e8 as ne,D0 as ce,Ur as ie,Do as le,dV as de,dU as me}from"./zeni-epic-state-2zvjmkUL.js";import{ag as fe,z as pe,ao as ue,aq as he,U as ge,I as w,d as B,a6 as Fe,l as _,aB as be,p as Ie}from"./index-Blw4A66-.js";import"./mui-DPmPgDDD.js";import Ce from"./NotFoundScreen-Wkt8x0Ja.js";import{F as Se}from"./FeaturePreviewScreen-CjFoHQHk.js";import{a as g}from"./sentry-C6D8WJ15.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-5qRN6gKs.js";import{u as ye}from"./useInitialThreadRequest-Ddm4sao-.js";import{t as De}from"./routePaths-1GgW-roh.js";import{M as Ae}from"./MobileAppDrawer-BMvh-RAa.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.js";import"./InboxNotificationsProvider-7eYmgI1F.js";import"./useTaskManagerAccess-BKVtGCGL.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]="b437cc5c-a50e-41c9-9f8e-9b00d39dfbf6",s._sentryDebugIdIdentifier="sentry-dbid-b437cc5c-a50e-41c9-9f8e-9b00d39dfbf6")}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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(q(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(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=ne(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=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=J(),a=K(),o=Q(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,D]=g.useState(!1),F=pe.getSignedInUser(),A=d((t=>M(t))),$=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),U=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:G}=Te({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((I=>I.id===P)):R!=null?f.forecasts.findIndex((I=>I.id===R)):f.forecasts.length>0?0:-1)(i,r,U?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=U?.index?(a(q(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)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,O,T,b]);const k=ge(),V=k?.loggedInUserRole!=null&&te(k.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:E}=W(B.isReportsCommentingEnabled),Y=ye(E?A?.companyId:void 0,{clearParams:l&&m}),[z,H]=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=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:se(h.toString()),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:G,isReportsCommentingEnabled:E,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d((c=>M(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(B.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-BD1fi6wA.js";import{a as p}from"./sentry-C6D8WJ15.js";import{J as c,K as a,a7 as m,ab as f,ac as h}from"./index-Blw4A66-.js";import"./mui-DPmPgDDD.js";import{i as y}from"./core-Dlma5MIa.js";import"./zeni-epic-state-2zvjmkUL.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.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]="2012cfb4-548c-4aab-9220-efd79b933e1c",e._sentryDebugIdIdentifier="sentry-dbid-2012cfb4-548c-4aab-9220-efd79b933e1c")}catch{}})();const g=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,b=c("header")`
|
|
8
8
|
flex-shrink: 0;
|
|
9
9
|
padding: ${a.sp3} ${a.sp4};
|
|
10
|
-
`,
|
|
10
|
+
`,k=c(m)`
|
|
11
11
|
width: ${a.sp4};
|
|
12
12
|
height: ${a.sp4};
|
|
13
13
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
@@ -18,4 +18,4 @@ import{j as r}from"./liveblocks-BkTNzfNi.js";import{a as p}from"./sentry-CNLjKkQ
|
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
padding: ${a.sp4};
|
|
21
|
-
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(
|
|
21
|
+
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(b,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-BD1fi6wA.js";import{Ul as re,fB as Y,lF as G,dV as N,dU as le,Rh as Q,TK as ce,BZ as Pe,Um as J,BO as je,C7 as Le,C1 as de,BS as pe,C5 as Te,C2 as ve,Un as ue,rr as Ae,g2 as Oe,gA as Re,Uo as H,BW as me,BV as ge,Ca as Ve,c7 as Fe}from"./zeni-epic-state-2zvjmkUL.js";import{$ as fe,I as X,d as _,z as K,j as he,O as Ce,ad as ye,ax as be,ay as Be,a9 as Se,K as V,ae as we,G as W,az as Ue,ao as Ze,aq as $e,a6 as ze,l as xe,S as He,p as _e,aA as Ge,U as Ke}from"./index-Blw4A66-.js";import{D as De,n as M,S as Ie}from"./mui-DPmPgDDD.js";import ae from"./NotFoundScreen-Wkt8x0Ja.js";import{a as c}from"./sentry-C6D8WJ15.js";import{u as ee,i as We,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-Dlma5MIa.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-5qRN6gKs.js";import{M as Ne}from"./MobileAppDrawer-BMvh-RAa.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.js";import"./InboxNotificationsProvider-7eYmgI1F.js";import"./useTaskManagerAccess-BKVtGCGL.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]="68af401e-d3fb-4423-94cf-04964b51eec2",e._sentryDebugIdIdentifier="sentry-dbid-68af401e-d3fb-4423-94cf-04964b51eec2")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=W.getLocalizedStrings().peoplePage.invitePage,ne=W.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[F,B]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=We(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:D}=X(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),U=ce(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.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}=D(_.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:O}=Ce(p?.tenantId),y=!L||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(De,{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(Be,{...s})]})})},ea=M(Ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,ke=M(we.H6Regular)`
|
|
6
|
+
margin-top: ${V.sp7};
|
|
7
|
+
padding-left: ${V.sp8};
|
|
8
|
+
padding-right: ${V.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Ee=M(we.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${V.sp8};
|
|
14
|
+
padding-right: ${V.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${V.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,aa={overlayWidth:new Se(100,100,48)},oe=W.getLocalizedStrings().peoplePage.invitePage,ie=W.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[F,B]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=N(D,r),P=le(r),T=Q(r),v=ce(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(J())},C=()=>{F===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=he(r,j,D),{isCardsHidden:O}=Ce(r?.tenantId),y=!L||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),B(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[w.invitePersonState.fetchState]),a.jsx(De,{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(Ue,{...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=K.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:xe}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Ve(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}=Ze(),b=K.getSignedInUser(),h=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(F,h)&&B,S=Q(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[D,I]=c.useState(!1),[P,T]=c.useState(!1),[v,U]=c.useState("off"),[Z,x]=c.useState(!1),C=s=>{x(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=>Oe(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Re(s))),y=h?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:xe,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:Z,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=_e(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ke();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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-BD1fi6wA.js";import E from"./NotFoundScreen-Wkt8x0Ja.js";import{a as r}from"./sentry-C6D8WJ15.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as b}from"./core-Dlma5MIa.js";import{fB as O,$Z as h,bo as F,bn as N,iI as V,gd as $}from"./zeni-epic-state-2zvjmkUL.js";import{c as q,z as I,aq as L,dL as Z}from"./index-Blw4A66-.js";import"./mui-DPmPgDDD.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-5qRN6gKs.js";import{M as H}from"./MobileAppDrawer-BMvh-RAa.js";import"./recharts-WuCIKI4c.js";import"./analytics-NBT5BH2R.js";import"./plaid-w5kSeMkL.js";import"./dnd-BgBEAfSC.js";import"./stripe-cKAAJElX.js";import"./lottie-Dd5kLrRz.js";import"./lexical-Cc-23sPJ.js";import"./pdf-BCsxh4ki.js";import"./utils-Bv9LDtmr.js";import"./InboxNotificationsProvider-7eYmgI1F.js";import"./useTaskManagerAccess-BKVtGCGL.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]="5b1ca5eb-8922-47a1-b48b-d0efe53e39c0",e._sentryDebugIdIdentifier="sentry-dbid-5b1ca5eb-8922-47a1-b48b-d0efe53e39c0")}catch{}})();const J=z((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)}}}))(Z),K=()=>{const e=_(),t=v(),c=q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),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($({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}=G({mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-C6D8WJ15.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|