@zeniai/web-app-ui 5.0.93-qa → 5.0.94-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-HF97OiuD.js +1 -0
- package/dist/assets/AddressScreen-D79PPd-o.js +9 -0
- package/dist/assets/AiCfoScreen-CrvwqXvB.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-Btsu3H48.js → BillPayApprovalRoutes-CHeXH92D.js} +1 -1
- package/dist/assets/{BillPayRoutes-CZNt9nN-.js → BillPayRoutes-BTV6oUW7.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Bpubo3oO.js → BusinessVerificationPageScreen-COhCODO3.js} +2 -2
- package/dist/assets/ChargeCardRoutes-jlodpUTF.js +71 -0
- package/dist/assets/{CompanyPassportScreen-BN0_lZh1.js → CompanyPassportScreen-oolpa5Ca.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CpX3K7rD.js → ConnectionAuthScreen-CmfFicXn.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-dJPDlAs9.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DE5g8gop.js → CustomerOnboardingRoutes-Dc6Ovlz3.js} +4 -4
- package/dist/assets/{DashboardRoutes-LjpSDL97.js → DashboardRoutes-BU1BeRRW.js} +3 -3
- package/dist/assets/{DefaultTenantHome-B3GQtREy.js → DefaultTenantHome-Ch-_hudk.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-xS5yR7KI.js → DomesticWireDetailScreen-C4hZPJdB.js} +3 -3
- package/dist/assets/DrawerScreen-Dhr1itui.js +1 -0
- package/dist/assets/EntityDetailRoutes-DtAVASvN.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-0uEo0sF6.js → ExpenseAutomationRoutes-Dt21PcAV.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-1ynGY-A8.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-V8qKg5-6.js → HubSpotOAuthCallbackScreen-DI3niet7.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Cew60Z39.js → MagicLinkRoutes-CcECDB6W.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-C-0tiAXs.js +12 -0
- package/dist/assets/{MobileAppDrawer-CPI95lgy.js → MobileAppDrawer-D38LtL34.js} +1 -1
- package/dist/assets/NotFoundScreen-Dz0534r9.js +1 -0
- package/dist/assets/{NotificationRoutes-CQtvYBtP.js → NotificationRoutes-B-vlIUTm.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CbMZbxsS.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Z2m1-YQn.js +1 -0
- package/dist/assets/PeopleRoutes-B-Kt1ScJ.js +22 -0
- package/dist/assets/PerformanceRoutes-BzPr2Nnu.js +1 -0
- package/dist/assets/{Preview-D3Uiphuo.js → Preview-CX79dadf.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-iMpRDnN4.js → QBOConnectionScreen-DiKCakpQ.js} +1 -1
- package/dist/assets/{ReferralListScreen-yxuUKjxd.js → ReferralListScreen-kpr6aOuh.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-Det6cqdB.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CBzX3JSO.js → ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B8qr_kkC.js → ReimbursementRoutes-DTIV_kcP.js} +4 -4
- package/dist/assets/{ReportsRoutes-D1LUbrVF.js → ReportsRoutes-3VuypKeW.js} +1 -1
- package/dist/assets/RewardsRoutes-B2QW-eU5.js +1 -0
- package/dist/assets/ScreenRoutes-0jsh5TOL.js +2 -0
- package/dist/assets/{SettingsRoutes-BATsExuY.js → SettingsRoutes-BihUnYT-.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BVkXSSWw.js → SetupPagesScreen-rBBoQAuI.js} +5 -5
- package/dist/assets/SignInScreen-DyfaUAWP.js +1 -0
- package/dist/assets/SignOutScreen-B4hTTXUy.js +9 -0
- package/dist/assets/{TaskListScreen-BadjlUfo.js → TaskListScreen-B7mkcqsp.js} +2 -2
- package/dist/assets/{TaskRoutes-sUZt1FTw.js → TaskRoutes-BIYOSzTN.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-BsU_4MLZ.js → TransactionDetailRoutes-BCR0Vehv.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BQ6sw9a7.js → TransactionDetailScreen-Hfy201z1.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Cy_qlp5W.js → TransactionListRoutes-Cbfw3Mig.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BRpP2lkX.js → TreasuryRoutes-Nis2HK0P.js} +6 -6
- package/dist/assets/{VendorsRoutes-CTRK7ynr.js → VendorsRoutes-D8Pby__-.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-CQq7U1h7.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BFhwnSRQ.js → ZeniAccountRoutes-DXX67VtM.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-B4C2kMj5.js +9 -0
- package/dist/assets/{accountMappingHelper-BOtLSvYe.js → accountMappingHelper-ClJz5V9X.js} +1 -1
- package/dist/assets/{analytics-CoOmPlNt.js → analytics-NZ6ROu06.js} +1 -1
- package/dist/assets/{analyticsHelper-BocYRaaP.js → analyticsHelper-DrdSzHTB.js} +1 -1
- package/dist/assets/{core-B_XHMrqe.js → core-D-NK-UK9.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-D2C9TGj8.js → decodeURIComponentSafe-C48GZJfu.js} +1 -1
- package/dist/assets/{dnd-CtoU_fHu.js → dnd-C49i2BE4.js} +1 -1
- package/dist/assets/{empty-B3mnnOau.js → empty-CtUkBjnR.js} +1 -1
- package/dist/assets/{empty-Cdv-ZWIg.js → empty-DH2H1-Nx.js} +1 -1
- package/dist/assets/{emptyVideoElement-roYGDErm.js → emptyVideoElement-BCGqnPYV.js} +1 -1
- package/dist/assets/{epic-CAXHXwTI.js → epic-D64Ymfe0.js} +1 -1
- package/dist/assets/getLocaleForTenant-DL4YoPxV.js +1 -0
- package/dist/assets/{index-BfaZdimW.js → index-AU1I47Je.js} +1 -1
- package/dist/assets/{index-DnWe9s1s.js → index-Bx6iIwrK.js} +1 -1
- package/dist/assets/{index-_X_wZ3pf.js → index-CTaHBGA6.js} +1 -1
- package/dist/assets/{index-BiyNQ4T-.js → index-Cii2mjSS.js} +1 -1
- package/dist/assets/{index-BHo5Qa5_.js → index-CppZNJwq.js} +1 -1
- package/dist/assets/{index-IhJ3VQPC.js → index-DCy8xCNa.js} +1 -1
- package/dist/assets/{index-hGk2kzA3.js → index-DUe_bU79.js} +2 -2
- package/dist/assets/{index-DcF25xRC.js → index-DrTnWXwv.js} +13303 -13262
- package/dist/assets/{lexical-Dx9Jj1SY.js → lexical-Bp-0qESw.js} +1 -1
- package/dist/assets/{liveblocks-DyzG7jl-.js → liveblocks-D6iO1SmY.js} +1 -1
- package/dist/assets/{lottie-CqwrfSWf.js → lottie-BWZi4J-8.js} +1 -1
- package/dist/assets/{mui-CfonSYhg.js → mui-DqRlPgPp.js} +1 -1
- package/dist/assets/{pathToGoBack-B-fIvw6x.js → pathToGoBack-DvdlIQjg.js} +1 -1
- package/dist/assets/{pdf-CsFFdLdL.js → pdf-BpZ3cLIj.js} +4 -4
- package/dist/assets/{pdf-lib-BT18iM_Z.js → pdf-lib-CNmHIzRc.js} +1 -1
- package/dist/assets/{plaid-B7Pmnnvt.js → plaid-BzyOi-ir.js} +1 -1
- package/dist/assets/{pusher-wr2FxlsB.js → pusher-BMtiLftw.js} +1 -1
- package/dist/assets/{react-Bvcd48RT.js → react-BJh7Ho8n.js} +1 -1
- package/dist/assets/{react-Ymya1N-w.js → react-CmUCRpgB.js} +1 -1
- package/dist/assets/{react-DDIv_AwX.js → react-D3MVFA0D.js} +1 -1
- package/dist/assets/{react-CH1Ok2Rn.js → react-Djxq7qii.js} +1 -1
- package/dist/assets/{react-B2o52OqD.js → react-DxEGkukB.js} +1 -1
- package/dist/assets/{react-BdDGVOeS.js → react-TFItAO3U.js} +1 -1
- package/dist/assets/{recharts-CaK7MRaR.js → recharts-Dt8dM4EI.js} +2 -2
- package/dist/assets/{routePaths-Dgf8Lpxl.js → routePaths-B-3pox1f.js} +1 -1
- package/dist/assets/{sentry-Cdif28fl.js → sentry-DJeJwz74.js} +1 -1
- package/dist/assets/{url-DOMbcgX5.js → url-Cab0ioG_.js} +1 -1
- package/dist/assets/{url-x3nND-T-.js → url-CawXuWkK.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-ChY2Lwaz.js → useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BxaFyJbc.js +1 -0
- package/dist/assets/{useDeviceId-B_i0E4gh.js → useDeviceId-CYAkkrZp.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-B1Dx2jH5.js → useInitialThreadRequest-D-JPWLWk.js} +1 -1
- package/dist/assets/{utils-DMgIZDY7.js → utils-CGva6Exy.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-9CO_VCKb.js → withTransactionSidePanel-CMaq9uFn.js} +3 -3
- package/dist/assets/{zeni-epic-state-D9HDY_8v.js → zeni-epic-state-22WFBgK9.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-tQsdf2VE.js +0 -1
- package/dist/assets/AddressScreen-sxiJIRy-.js +0 -9
- package/dist/assets/AiCfoScreen-CCHEYuBL.js +0 -22
- package/dist/assets/ChargeCardRoutes-DcKS_cxy.js +0 -71
- package/dist/assets/CustomerOnboardingAuthScreen-C5p6u6fC.js +0 -1
- package/dist/assets/DrawerScreen-DOrBrG-6.js +0 -1
- package/dist/assets/EntityDetailRoutes-pbHs2RhY.js +0 -1
- package/dist/assets/FeaturePreviewScreen-2-p5K2P0.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-C10R5m-o.js +0 -12
- package/dist/assets/NotFoundScreen-BUqotHFB.js +0 -1
- package/dist/assets/OAuthConsentScreen-DkF2l_Ng.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Cg8SffI2.js +0 -1
- package/dist/assets/PeopleRoutes-BnLCJA6K.js +0 -22
- package/dist/assets/PerformanceRoutes-Bqj2LPVg.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-RL8S1isL.js +0 -1
- package/dist/assets/RewardsRoutes-B8Zxnta2.js +0 -1
- package/dist/assets/ScreenRoutes-BYm6h7dp.js +0 -2
- package/dist/assets/SignInScreen-KM09ZzEo.js +0 -1
- package/dist/assets/SignOutScreen-yw_T1K5k.js +0 -9
- package/dist/assets/WiseConfirmationScreen-DdfNZb9c.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-aPQ0-Az6.js +0 -9
- package/dist/assets/getLocaleForTenant-EkX2Npfp.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BYtw9cd1.js +0 -1
package/dist/assets/{ExpenseAutomationRoutes-0uEo0sF6.js → ExpenseAutomationRoutes-Dt21PcAV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-D6iO1SmY.js";import Rn from"./NotFoundScreen-Dz0534r9.js";import{a,b as Pt}from"./sentry-DJeJwz74.js";import{n as Fe,S as Dn}from"./mui-DqRlPgPp.js";import{h as re,l as wt,u as Ge,g as U,n as Un,i as rt,o as Fn,p as Le}from"./core-D-NK-UK9.js";import{eQ as Re,PX as Bn,n1 as ke,fi as _n,qG as Vn,nj as xt,nE as Rt,PY as Dt,nO as On,PZ as Ut,nc as Mn,qc as jn,f1 as Ie,P_ as De,sM as Ft,BZ as Bt,P$ as _t,Q0 as Ln,pT as qe,LB as dt,LD as zn,jG as Qn,LE as $n,jN as Gn,cV as qn,tR as Ye,np as Vt,nT as Ue,Q1 as Yn,Ku as ut,Kt as Pe,Q2 as mt,k2 as Jn,Q3 as Nn,Q4 as Kn,Q5 as Hn,Q6 as Zn,nw as Wn,nh as de,nW as we,Q7 as Xn,Q8 as ea,Q9 as ta,o1 as na,jR as aa,jI as oa,Qa as sa,jQ as ht,LL as ca,Qb as ia,Qc as la,pP as ra,ps as da,nU as fe,pr as ze,Qd as ua,Qe as ma,ll as ha,bq as pa,lg as pt,l2 as ga,Qf as Ca,gQ as gt,fU as Sa,ld as Ia,vK as fa,Qg as ka,os as Ea,on as va,or as ya,oc as ba,Qh as Aa,f4 as Ot,nH as Ta,ns as Pa,fj as Ct,nY as wa,Qi as xa,nV as Mt,Qj as Ra,Qk as Da,Ql as Ua,Qm as Fa,Qn as St,p$ as Ba,pi as _a,Ks as Va,jP as Oa,Qo as Ma,Gv as ja,jO as La,jD as za,f3 as Qa,oT as jt,pa as $a,nS as It,nX as Ga,bE as qa,la as Ya,l7 as Ja,Qp as Na,ob as ft,p8 as kt,p6 as Ka,oY as Ha,oD as Za,p9 as Wa,Qq as Xa,Qr as eo,oH as to,Qs as no,ox as ao,oG as oo,oE as so,pd as co}from"./zeni-epic-state-22WFBgK9.js";import{w as Lt,I as le,c as L,r as H,Y as zt,_ as Qt,cB as io,z as Be,cC as lo,at as xe,cD as ro,aT as Et,x as $t,cE as uo,aq as Qe,O as mo,cF as ho,a1 as po,cG as go,X as Co,cH as So,cI as Io,s as fo,k as ko,aN as Eo,b5 as vo,A as yo,cJ as bo}from"./index-DrTnWXwv.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{c as vt,C as Ao}from"./TransactionDetailScreen-Hfy201z1.js";import{w as To}from"./withTransactionSidePanel-CMaq9uFn.js";import{h as Po,v as wo}from"./routePaths-B-3pox1f.js";import{g as $e}from"./accountMappingHelper-ClJz5V9X.js";import{D as xo}from"./DrawerScreen-Dhr1itui.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./decodeURIComponentSafe-C48GZJfu.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]="9d871720-99ae-4f67-a140-0cbaa8560058",t._sentryDebugIdIdentifier="sentry-dbid-9d871720-99ae-4f67-a140-0cbaa8560058")}catch{}})();const Ro=()=>{const t=re(),i=wt(),A=Ge(),f=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(le.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,N=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:N}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=zt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Do,{children:C.jsx(io,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Do=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{a2 as l,a3 as c,a4 as p,q as d}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import m from"./NotFoundScreen-Dz0534r9.js";import{l as u,u as b}from"./core-D-NK-UK9.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]="0e86e759-78f4-4bc0-bf96-ce87199f9155",e._sentryDebugIdIdentifier="sentry-dbid-0e86e759-78f4-4bc0-bf96-ce87199f9155")}catch{}})();const _=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=d(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(t.pathname);return o!=null?s.jsx(c,{menuItem:p(o),onDemoClick:a,onGoBack:f}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-DJeJwz74.js";import{h as l,l as f,u as m}from"./core-D-NK-UK9.js";import{gx as p,JH as g,JI as _}from"./zeni-epic-state-22WFBgK9.js";import{u as b,L as h,z as y}from"./index-DrTnWXwv.js";import"./liveblocks-D6iO1SmY.js";import"./recharts-Dt8dM4EI.js";import"./mui-DqRlPgPp.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c79c3850-dde0-4ee5-927c-1b14a6cf997f",e._sentryDebugIdIdentifier="sentry-dbid-c79c3850-dde0-4ee5-927c-1b14a6cf997f")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-D6iO1SmY.js";import{i as S,n as x,l as C,u as y,h as ee,s as te,g as L,N as ae,o as ne,p}from"./core-D-NK-UK9.js";import{JA as k,JB as v,JC as T,zA as A,zm as G,JD as D,JE as oe,JF as ie,zq as se,eU as $,zx as le,zu as re}from"./zeni-epic-state-22WFBgK9.js";import{n as g,o as r,p as de,c as j,h as J,W as ce,q as me,B as pe,r as M,w as ue,I as he,E as xe,s as ge,m as fe,v as we,x as be,H as Se,T as ye,S as ke,y as ve,A as je,C as $e}from"./index-DrTnWXwv.js";import{n as m}from"./mui-DqRlPgPp.js";import f from"./NotFoundScreen-Dz0534r9.js";import{a as I}from"./sentry-DJeJwz74.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="96e93b10-53ce-4160-9c06-36ea38d376e3",e._sentryDebugIdIdentifier="sentry-dbid-96e93b10-53ce-4160-9c06-36ea38d376e3")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -7,7 +7,7 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
9
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:
|
|
10
|
+
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Ae=m.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
height: 100vh;
|
|
13
13
|
width: 100%;
|
|
@@ -16,7 +16,7 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${e=>e.theme.colors.grey4};
|
|
18
18
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,
|
|
19
|
+
`,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Be();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Pe(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function ze({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Ae,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Be=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ee=m.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100%;
|
|
22
22
|
width: 100%;
|
|
@@ -25,7 +25,7 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
25
25
|
align-items: center;
|
|
26
26
|
background-color: ${e=>e.theme.colors.grey4};
|
|
27
27
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ne=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:
|
|
28
|
+
`,Ne=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(pe);function Le(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ee,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
height: 100%;
|
|
31
31
|
width: 100%;
|
|
@@ -34,7 +34,7 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
36
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:
|
|
37
|
+
`,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Je={containerWidth:new je(100,58)},Me=m(ke)`
|
|
38
38
|
width: ${r.sp4};
|
|
39
39
|
height: ${r.sp4};
|
|
40
40
|
margin-bottom: ${r.sp3};
|
|
@@ -43,14 +43,14 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
position: absolute;
|
|
45
45
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,
|
|
46
|
+
`,He=m.div`
|
|
47
47
|
display: flex;
|
|
48
48
|
height: 100vh;
|
|
49
49
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
50
|
width: 100vw;
|
|
51
51
|
overflow-y: scroll;
|
|
52
52
|
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,
|
|
53
|
+
`,Ve=m.div`
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
56
|
flex-direction: column;
|
|
@@ -58,7 +58,7 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
58
58
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
59
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
60
|
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,
|
|
61
|
+
`,We=m.div`
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
align-items: center;
|
|
@@ -69,4 +69,4 @@ import{j as t}from"./liveblocks-DyzG7jl-.js";import{i as S,n as x,l as C,u as y,
|
|
|
69
69
|
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
70
|
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
71
|
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,_e=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:
|
|
72
|
+
`,_e=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=te(),d=s.get("token"),H=n.pathname.includes("address"),w=g(),V=ge(),z=fe(),b=we(),W=()=>{V.toggle()},_=L(u=>k(u)),K=L(u=>v(u)),{authParams:U,fetchState:c,billAttachment:q,billFetchState:B,companyName:O,currencySymbol:Q,amount:R}=_,{tenantId:P,userId:E,sessionId:N}=U,{fetchState:X,internationalBankAccountCreateStatus:Y}=K;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(le(i,o,d))},[b,c,i,o,d,a]),I.useEffect(()=>{b&&c==="Completed"&&($(E,N,P),l!=null&&a(re(l)))},[c,b,E,N,P,l,a]),c==="Error"?t.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:z.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${z.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&B==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",O,l??"",Ke(n.pathname),Q,R))(u)}),t.jsxs(He,{windowSize:w,children:[w!=="small"?t.jsx(Me,{onClick:W}):null,t.jsx(We,{windowSize:w,isAddressPage:H,children:B==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:q,type:"bill"})}),t.jsx(Ve,{windowSize:w,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Ue,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(ze,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Le,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-D6iO1SmY.js";import{a as g}from"./sentry-DJeJwz74.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-D-NK-UK9.js";import{z as r,m as M,O as P,d as V,c as A,e as N,i as Q,T as R,g as W}from"./index-DrTnWXwv.js";import{eQ as $,Jl as q,Jv as B,Jm as G,eU as H,fm as K,Jr as X,fL as Y,cT as Z,Jw as ee,Jx as te}from"./zeni-epic-state-22WFBgK9.js";import{n as ne}from"./mui-DqRlPgPp.js";import{u as se}from"./useDeviceId-CYAkkrZp.js";import{f as ae}from"./analyticsHelper-DrdSzHTB.js";import{t as ie}from"./getLocaleForTenant-DL4YoPxV.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="608bea5e-2875-4116-8c77-d8e6b2fbdd2a",t._sentryDebugIdIdentifier="sentry-dbid-608bea5e-2875-4116-8c77-d8e6b2fbdd2a")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=w(),f=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,v,a.state,t]);const O=g.useCallback(()=>{f("/signin/auth")},[f]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(Q,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:O});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as U}from"./liveblocks-D6iO1SmY.js";import{a as c}from"./sentry-DJeJwz74.js";import{h as pe,g as s,i as qe,u as Ke,l as ea,k as R}from"./core-D-NK-UK9.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as ba,cJ as pa,fh as ha,cO as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-22WFBgK9.js";import{a6 as Ia,a7 as Ta,s as wa,w as _a,z as k,n as Aa,a8 as Fa,X as Da,v as va,u as $a,I as r,a9 as Ba,aa as Ga,k as Pa,a as Ra,ab as Ma,a2 as Na,ac as Ua,ad as Va,ae as fe,af as me,L as xa,ag as Oa,ah as be,c as M,r as _,a0 as La,ai as N,aj as ja}from"./index-DrTnWXwv.js";import{D as za}from"./mui-DqRlPgPp.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="e4bbe494-9b36-4f09-8a93-6d0a59918b9e",m._sentryDebugIdIdentifier="sentry-dbid-e4bbe494-9b36-4f09-8a93-6d0a59918b9e")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Ke(),C=wa(),o=ea(),V=ta(),b=pe(),{useFeatureGate:i}=_a(),x=k.getSignedInUser(),A=na(x),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),L=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,j]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:we}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&b(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),_e=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),W=Q||J&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:Pe}=i(r.isTaskManagerCustomerUserAccessEnabled),Re=A||!A&&Pe,Me=n.company!=null&&la(n.company),w=Ge&&Me,Ne=s(e=>g(e).totalUnreadCount),Ue=s(e=>g(e).reducedFetchCountState),X=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ve=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Ga();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;j(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ve.fetchState==="Not-Started"&&V.tenantId!=null&&b(ca("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||b(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(b(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),b(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Ue,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Le=Pa(),oe=s(e=>fa(e,S,h,Q,J,w).fetchState),ie=s(e=>ma(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=c.useMemo(()=>ba(n.userRole),[n.userRole]),Ye=pa(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ra(),Je=re&&Ma(t),de=Sa(Le?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[Qe,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const We=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Ua(We);return U.jsx(za,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Va,{signedInUser:x,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?_e:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:we,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:w,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:Qe,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:W&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=X===0&&q>0?"notifications/comments":"notifications/tasks";me(t)&&(e=X===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=_(t.state?.pathnameStackToGoBack,t.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(La(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=ja(e.type);be(e.type)?(L!=null&&b(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Oa(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(b(ka(e.tenantId)),b(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Je,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{b(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Re,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Ya,{...m,...t})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-D6iO1SmY.js";import{l as r,n}from"./core-D-NK-UK9.js";import{Q as i}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import"./sentry-DJeJwz74.js";import"./zeni-epic-state-22WFBgK9.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="a2ae25d7-9a32-4991-980a-ee1458238305",o._sentryDebugIdIdentifier="sentry-dbid-a2ae25d7-9a32-4991-980a-ee1458238305")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-D6iO1SmY.js";import lt from"./NotFoundScreen-Dz0534r9.js";import{a as k}from"./sentry-DJeJwz74.js";import{l as ft,u as ut,i as ht,h as pt,g as S,n as kt,o as gt,p as Z}from"./core-D-NK-UK9.js";import{cr as St,e$ as J,eQ as Y,fe as bt,f6 as b,PS as K,fa as d,e_ as y,q_ as M,wl as It,PT as Ct,eZ as Tt,fh as yt,r3 as _t,PU as $,bq as F,gQ as x,r7 as H,PV as At,cC as Et,cw as Nt}from"./zeni-epic-state-22WFBgK9.js";import{Y as wt,z as Bt,w as xt,I as Pt,_ as Rt,cy as Ut,r as N,a6 as Dt,cz as vt,a7 as Gt,q as $t}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="3b4d4e73-1780-4bb9-a813-e5b1fa7b6c93",t._sentryDebugIdIdentifier="sentry-dbid-3b4d4e73-1780-4bb9-a813-e5b1fa7b6c93")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Y(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:w,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>J(e)),o=S(e=>Y(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),X=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:Q,isFetchingMore:L,hasFetchedAll:W}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{X.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const G=q.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(L||W===!0||Q==null||Q(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,W,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(Z,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(Z,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as A,u as J,g as o,N as C}from"./core-D-NK-UK9.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-22WFBgK9.js";import{z as h,J as I}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="b524ebe1-52fb-4452-bb39-8cbbef0577c0",n._sentryDebugIdIdentifier="sentry-dbid-b524ebe1-52fb-4452-bb39-8cbbef0577c0")}catch{}})();function ee(){const n=A(),s=J(),{params:t,error:i}=r.useMemo(()=>M(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),c=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(R(a.userId,a.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{_("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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-D6iO1SmY.js";import{l as V,h as z,u as H,i as Q,g as d,n as Z,o as J,p as I}from"./core-D-NK-UK9.js";import{eQ as U,qO as P,qm as X,Kg as v,qh as T,bv as ee,bn as ae,bT as te,qi as se,Kh as oe,K2 as C,dE as re,ui as ne,Ki as ce,uF as ie,eY as le,eW as de}from"./zeni-epic-state-22WFBgK9.js";import{z as me,Y as fe,_ as pe,k as ue,w as q,I as w,H as he,c as M,ao as ge,r as Fe}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import be from"./NotFoundScreen-Dz0534r9.js";import{F as Ie}from"./FeaturePreviewScreen-1ynGY-A8.js";import{a as g}from"./sentry-DJeJwz74.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{u as Te}from"./useInitialThreadRequest-D-JPWLWk.js";import{t as Se}from"./routePaths-B-3pox1f.js";import{M as ye}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="cbb7ed07-c6c7-4363-81cd-394092b20a5c",s._sentryDebugIdIdentifier="sentry-dbid-cbb7ed07-c6c7-4363-81cd-394092b20a5c")}catch{}})();const S=(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})}},ke=Z(function(s){const e=oe(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(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(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=re(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 m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,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("../../")}}})(ge);function R(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=Q(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),$=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,j,O)=>j!=null?f.forecasts.findIndex(b=>b.id===j):O!=null?f.forecasts.findIndex(b=>b.id===O):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,P,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=q(),{isFeatureEnabled:E}=N(w.isReportsCommentingEnabled),Y=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=g.useState(!1),L=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:W,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d(c=>U(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{Kb as te,eQ as q,jD as H,eY as J,eW as ne,HD as Q,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as K,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-22WFBgK9.js";import{n as pe,w as X,I as E,z,a9 as ue,D as me,ak as ge,al as Re,A as he,o as R,G as fe,O as Ce,am as Oe,Y as Ve,_ as Ue,H as Be,c as be,e as Ze,r as $e,an as Ke,k as _e}from"./index-DrTnWXwv.js";import{D as ye,n as W,S as we}from"./mui-DqRlPgPp.js";import ae from"./NotFoundScreen-Dz0534r9.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as ee,i as Ge,g as m,l as He,u as ze,n as We,o as se,p as $}from"./core-D-NK-UK9.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as Me}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="72c85aaf-6ac1-4024-9a83-dd37b8ae68db",a._sentryDebugIdIdentifier="sentry-dbid-72c85aaf-6ac1-4024-9a83-dd37b8ae68db")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>q(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),L=ne(u),T=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=W(we)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,Se=W(fe.H6Regular)`
|
|
6
|
+
margin-top: ${R.sp7};
|
|
7
|
+
padding-left: ${R.sp8};
|
|
8
|
+
padding-right: ${R.sp8};
|
|
9
|
+
color: ${a=>a.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,De=W(fe.LargeRegularSp)`
|
|
12
|
+
color: ${a=>a.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
|
+
`,Qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>H(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),L=Q(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,aa=We(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!J(O,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ye({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),b=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Y)=>{n(K({sortKey:e,sortOrder:Y}))},onRowClick:e=>{const Y=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(Y,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import E from"./NotFoundScreen-Dz0534r9.js";import{a as r}from"./sentry-DJeJwz74.js";import{l as _,u as v,g as p,i as M,h as P,N as U,n as z,o as O,p as h}from"./core-D-NK-UK9.js";import{eQ as B,PW as b,bo as F,bn as N,hk as Q,gQ as V}from"./zeni-epic-state-22WFBgK9.js";import{s as W,z as I,_ as $,cA as q}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as H}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="9c5c4b4c-965e-434a-9c94-123f3ecd3c0d",e._sentryDebugIdIdentifier="sentry-dbid-9c5c4b4c-965e-434a-9c94-123f3ecd3c0d")}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}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),K=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=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)=>{f(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(V({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]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({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:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-DJeJwz74.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`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:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-D6iO1SmY.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DJeJwz74.js";import{L as dt,bT as Tc,eQ as Ac,Jl as Rc,JP as kl,c2 as Tl,fm as Al,fn as Rl}from"./zeni-epic-state-22WFBgK9.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-CGva6Exy.js";import{r as un}from"./empty-DH2H1-Nx.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CNmHIzRc.js";import{r as Gl}from"./index-DCy8xCNa.js";import{r as zl}from"./index-AU1I47Je.js";import{l as Zl,u as Hl,h as Vl,g as En,n as Yl}from"./core-D-NK-UK9.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,h as Ql,c as tf}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{d as Pe}from"./decodeURIComponentSafe-C48GZJfu.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="c11f6e6b-d349-4566-9326-021171e3ea74",t._sentryDebugIdIdentifier="sentry-dbid-c11f6e6b-d349-4566-9326-021171e3ea74")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as o}from"./sentry-DJeJwz74.js";import{g as f,l as B,h as L,u as M,n as V}from"./core-D-NK-UK9.js";import{m as F,n as N,z as R,b7 as W,A as U,Y as $,_ as z,H as G,c as l,e as Q,a6 as Y,b8 as q}from"./index-DrTnWXwv.js";import{f0 as J,eQ as K,MG as I,MH as X,u8 as Z,t_ as g,f2 as ee,bO as re,u3 as ae,MI as ne}from"./zeni-epic-state-22WFBgK9.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DqRlPgPp.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as de}from"./MobileAppDrawer-D38LtL34.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="379d7849-cf5d-4e9d-bf7e-c558be62c336",e._sentryDebugIdIdentifier="sentry-dbid-379d7849-cf5d-4e9d-bf7e-c558be62c336")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>J(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",we=
|
|
5
|
+
`,P="refer-and-earn-status-update",we=V(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(Y(q));function ve({isReferralDrawerOpen:e}){const r=B(),a=L(),n=M(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>K(t)),m=f(t=>I(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=X([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(a(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(D(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[A,j]=o.useState(!1),v=t=>{j(t)},{isAiCfoAccessEnabled:H,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${P}`]:[],eventCallback:(t,S,_)=>{_.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(G,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:A,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:H,onAskAiCfoClick:O,...T})]})}export{ve as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-D6iO1SmY.js";import j from"./NotFoundScreen-Dz0534r9.js";import{a as p}from"./sentry-DJeJwz74.js";import{l as C,u as I,h as A,g as c,N as D,n as E,o as k,p as u}from"./core-D-NK-UK9.js";import{eQ as T,NA as b,NQ as S,D5 as V,Ce as N,D4 as m,CX as O,O4 as U}from"./zeni-epic-state-22WFBgK9.js";import{m as _,z as $,x as Q,a6 as W,bO as z,af as B}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{R as g}from"./ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="cc124702-c039-44e3-94a3-514e2c423203",e._sentryDebugIdIdentifier="sentry-dbid-cc124702-c039-44e3-94a3-514e2c423203")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{B(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(W(z)),X=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),h=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>T(n)),w=_(),i=c(n=>b(n)),v=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(V())},[v]),p.useEffect(()=>{l||h!=="Not-Started"||(s(!0),a(N(!0)))},[l,h,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const x={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,q,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(Q,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...x})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(X,{})}),t.jsx(u,{path:"/new",element:t.jsx(g,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(g,{})}),t.jsx(u,{path:"*",element:t.jsx(j,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-D6iO1SmY.js";import{a as y}from"./sentry-DJeJwz74.js";import{l as A,h as w,u as T,i as U,g as b,n as E}from"./core-D-NK-UK9.js";import{NQ as D,NA as C,C_ as x,D7 as _,D5 as S,D6 as h,NR as B}from"./zeni-epic-state-22WFBgK9.js";import{z as k,m as N,x as V,bF as F,af as O}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.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]="9f65aa7c-7c1a-4414-b3e7-c89d4ad2b115",e._sentryDebugIdIdentifier="sentry-dbid-9f65aa7c-7c1a-4414-b3e7-c89d4ad2b115")}catch{}})();function $(e){return B(e)==null}const j=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const R=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=N(),r=b(p=>D(p)),i=b(p=>C(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(j,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|