@zeniai/web-app-ui 5.0.20-qa → 5.0.22-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-BJrRevGa.js +1 -0
- package/dist/assets/{AddressScreen-Cb_9EmBQ.js → AddressScreen-BQPPe7pR.js} +2 -2
- package/dist/assets/AiCfoScreen-C5DOIEt_.js +11 -0
- package/dist/assets/{BillPayApprovalRoutes-y7moBK-h.js → BillPayApprovalRoutes-Qtg1Jo5l.js} +1 -1
- package/dist/assets/{BillPayRoutes-BWxnSvNr.js → BillPayRoutes-DkAPd68y.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BLm71CWm.js → BusinessVerificationPageScreen-CktedTYt.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-BzNwraqW.js → ChargeCardRoutes-B8s0w6So.js} +8 -8
- package/dist/assets/CompanyPassportScreen-C8EcswEA.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-Djma4Bm8.js → ConnectionAuthScreen-Zh5E4_CJ.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-HXUuepjr.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CbHAqwxG.js → CustomerOnboardingRoutes-RiQ255x9.js} +4 -4
- package/dist/assets/{DashboardRoutes-BtQI7NbJ.js → DashboardRoutes-DD6E0pG7.js} +3 -3
- package/dist/assets/{DefaultTenantHome-B81akhAm.js → DefaultTenantHome-feQeI0F_.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-eW-I-lqX.js +18 -0
- package/dist/assets/DrawerScreen-HBFMcVvk.js +1 -0
- package/dist/assets/{EntityDetailRoutes-CYe5GW55.js → EntityDetailRoutes-Bh44Er44.js} +1 -1
- package/dist/assets/ExpenseAutomationRoutes-CgCGvHQG.js +25 -0
- package/dist/assets/FeaturePreviewScreen-Bd18oGQj.js +1 -0
- package/dist/assets/MagicLinkRoutes-DFA8OahA.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CLhGIPxm.js +12 -0
- package/dist/assets/MobileAppDrawer-CwjUL5yD.js +1 -0
- package/dist/assets/NotFoundScreen-DZbU-KCv.js +1 -0
- package/dist/assets/{NotificationRoutes-CRynelUf.js → NotificationRoutes-BOGZiZZG.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DZ6jC1bX.js +1 -0
- package/dist/assets/{PeopleRoutes-Bo95azg1.js → PeopleRoutes-DD_GpPXZ.js} +9 -9
- package/dist/assets/PerformanceRoutes-BEO8LXrv.js +1 -0
- package/dist/assets/{Preview-BXohszpd.js → Preview-DQaLRQjm.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B_Iv-Jup.js → QBOConnectionScreen-ZhIN2-uP.js} +1 -1
- package/dist/assets/{ReferralListScreen-CT8COHO0.js → ReferralListScreen-CWHCaSQw.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-DLby1pC7.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BSJvMfmy.js → ReimbursementApprovalRuleDetailScreen-roSj06Ji.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Crxj9U5j.js → ReimbursementRoutes-BQAXwJX9.js} +6 -6
- package/dist/assets/{ReportsRoutes-Brd5m0YA.js → ReportsRoutes-COAdHt4D.js} +1 -1
- package/dist/assets/RewardsRoutes-Dw-aqOm5.js +1 -0
- package/dist/assets/{ScreenRoutes-BgcK48e3.js → ScreenRoutes-DV65D9fc.js} +2 -2
- package/dist/assets/{SettingsRoutes-CogpjDxD.js → SettingsRoutes-XQ9e9KID.js} +5 -5
- package/dist/assets/{SetupPagesScreen-C5z2OQ3X.js → SetupPagesScreen-BcfdYSeZ.js} +1 -1
- package/dist/assets/{SignInScreen-BrGMsoQX.js → SignInScreen-Cc84lO8c.js} +1 -1
- package/dist/assets/SignOutScreen-DzSDmVnc.js +9 -0
- package/dist/assets/{TaskListScreen-DT8MICZp.js → TaskListScreen-B_Yspya7.js} +2 -2
- package/dist/assets/TaskRoutes-DkUNX7ep.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C5W6mPZ3.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DRrJTiHG.js → TransactionDetailScreen-CbyG0n1m.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DVfBJ6Ob.js → TransactionListRoutes-Uz8iUZDH.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CNL9l3-q.js → TreasuryRoutes-DMgnld7f.js} +6 -6
- package/dist/assets/{VendorsRoutes-DL99Yq-y.js → VendorsRoutes-JX67ErLJ.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-B_bo1Cpn.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BzgEiwqj.js → ZeniAccountRoutes-Cy1TFPrS.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-Dvs4m1EF.js +9 -0
- package/dist/assets/{accountMappingHelper-BR6VxhSD.js → accountMappingHelper-DpblOBXy.js} +1 -1
- package/dist/assets/{analytics-CgaqSFat.js → analytics-BSnG8C1z.js} +1 -1
- package/dist/assets/{analyticsHelper-Co0biJvM.js → analyticsHelper-BlP3gsal.js} +1 -1
- package/dist/assets/{core-AMZJGpoV.js → core-BF8mCLAO.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DNGRwvKs.js → decodeURIComponentSafe-BogCAdat.js} +1 -1
- package/dist/assets/{dnd-C4u70dJH.js → dnd-BwvUecBQ.js} +1 -1
- package/dist/assets/{empty-AgaGyBlm.js → empty-CH1gmPwH.js} +1 -1
- package/dist/assets/{empty-DmTCdHiz.js → empty-DhgRx5Ms.js} +1 -1
- package/dist/assets/{emptyVideoElement-DgTh6sDI.js → emptyVideoElement-CIPD7QoK.js} +1 -1
- package/dist/assets/{epic-Bz0gIByF.js → epic-CBSMbAdJ.js} +1 -1
- package/dist/assets/getLocaleForTenant-BZ9xLliJ.js +1 -0
- package/dist/assets/index-Bc34frN_.css +1 -0
- package/dist/assets/{index-Bwb8m5V-.js → index-BjHWZg4v.js} +1 -1
- package/dist/assets/{index-CjJS6JvG.js → index-Bv4UcPLE.js} +2 -2
- package/dist/assets/{index-DClxQldp.js → index-C-wmbsLK.js} +1 -1
- package/dist/assets/{index-iatPGBna.js → index-Cuo-3WZY.js} +1 -1
- package/dist/assets/{index-N5K3qQkU.js → index-Drj6C88E.js} +22813 -22319
- package/dist/assets/{index-BglIPIvl.js → index-DxU2jKyi.js} +1 -1
- package/dist/assets/{index-Swai7U66.js → index-DzmJ6hZq.js} +1 -1
- package/dist/assets/{lexical-hn7WhrHW.js → lexical-BHRXj1_E.js} +1 -1
- package/dist/assets/{liveblocks-Cm6P1Xg9.js → liveblocks-it_Rhm8-.js} +1 -1
- package/dist/assets/{lottie-CEe6fZ1i.js → lottie-CJdx3HBv.js} +1 -1
- package/dist/assets/{mui-5LlzyiP2.js → mui-B87RTrAV.js} +1 -1
- package/dist/assets/{pathToGoBack-De67_VBD.js → pathToGoBack-_pwiC6EH.js} +1 -1
- package/dist/assets/{pdf-lib-BXQxUj4c.js → pdf-lib-BX9OJ6Nl.js} +1 -1
- package/dist/assets/{pdf-DzINawGT.js → pdf-oE7nS36B.js} +4 -4
- package/dist/assets/{plaid-nK_3ZvzH.js → plaid-lXH1vlKo.js} +1 -1
- package/dist/assets/{pusher-CjEZkdOe.js → pusher-BuqNN16A.js} +1 -1
- package/dist/assets/{react-DCJKQzil.js → react-BPb4kZZA.js} +1 -1
- package/dist/assets/{react-D9RPLCn-.js → react-BqI_r-ls.js} +1 -1
- package/dist/assets/{react-T4GM5RLO.js → react-DcdwnIrk.js} +1 -1
- package/dist/assets/{react-BIiJHpnP.js → react-K11bZKBw.js} +1 -1
- package/dist/assets/{react-DgmtF1S_.js → react-Z36nuoKZ.js} +1 -1
- package/dist/assets/{react-DOoN7l3d.js → react-fYlmVc1c.js} +1 -1
- package/dist/assets/{recharts-LaAu_fL4.js → recharts-BBMAmq_A.js} +1 -1
- package/dist/assets/{routePaths-meDm6KLz.js → routePaths-Cqx2U__X.js} +1 -1
- package/dist/assets/{sentry-CH1ai1xG.js → sentry-C-hGmJ4T.js} +1 -1
- package/dist/assets/{url-CoAFnj2p.js → url-0lwNJByp.js} +1 -1
- package/dist/assets/{url-jOgcU75X.js → url-DTsNJhPz.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-wDzGPcQn.js +1 -0
- package/dist/assets/{useDeviceId-C9Bh2Mvx.js → useDeviceId-CGZ6TLY7.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js +1 -0
- package/dist/assets/{useInitialThreadRequest-vKKjrofy.js → useInitialThreadRequest-sUCtW719.js} +1 -1
- package/dist/assets/{utils-DRDD4XTN.js → utils-C4NhxqJn.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bf8LYRg6.js → withTransactionSidePanel-DTDtCDdY.js} +3 -3
- package/dist/assets/{zeni-epic-state-CaufR46d.js → zeni-epic-state-Ds1G4QGX.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-B6j12uTF.js +0 -1
- package/dist/assets/AiCfoScreen-CLp8S2lW.js +0 -11
- package/dist/assets/CompanyPassportScreen-BUkmQF51.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DJn2pUgu.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-D_8szANI.js +0 -18
- package/dist/assets/DrawerScreen-hOKdmqaY.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-U-buIEG3.js +0 -20
- package/dist/assets/FeaturePreviewScreen-XRpSmfAA.js +0 -1
- package/dist/assets/MagicLinkRoutes-z2OnGDhR.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BzZa4ZxZ.js +0 -12
- package/dist/assets/MobileAppDrawer-CAbg3Q-N.js +0 -1
- package/dist/assets/NotFoundScreen-DCVl9MiG.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BZgxjZvQ.js +0 -1
- package/dist/assets/PerformanceRoutes-SK18oh8d.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-D_X7Se2H.js +0 -1
- package/dist/assets/RewardsRoutes-CpyGkHSD.js +0 -1
- package/dist/assets/SignOutScreen-kYocp39P.js +0 -9
- package/dist/assets/TaskRoutes-n4RYkvEl.js +0 -9
- package/dist/assets/TransactionDetailRoutes-yTZfc_Av.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DSPUSzLW.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BP58chZP.js +0 -9
- package/dist/assets/getLocaleForTenant-Cuk0zyAy.js +0 -1
- package/dist/assets/index-D-vub4_t.css +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Du0DR5Lw.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-ChhFydzB.js +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{j as p}from"./liveblocks-it_Rhm8-.js";import xn from"./NotFoundScreen-DZbU-KCv.js";import{a as s,b as Pt}from"./sentry-C-hGmJ4T.js";import{n as De,S as Rn}from"./mui-B87RTrAV.js";import{h as se,j as wt,u as Ge,g as B,k as Dn,l as rt,n as On,o as je}from"./core-BF8mCLAO.js";import{eM as we,OH as Un,e$ as Ce,fd as Bn,q2 as Fn,mI as xt,mO as Rt,OI as Dt,nb as _n,OJ as Ot,mB as Vn,pA as Mn,eX as he,OK as xe,s1 as Ut,Bc as Bt,OL as Ft,OM as jn,pf as qe,Kp as dt,Kr as zn,jp as Ln,Ks as $n,jw as Gn,cT as qn,t4 as Je,jm as Jn,mP as _t,ng as Re,ON as Nn,Ji as ut,Jh as Ae,OO as mt,jN as Yn,OP as Kn,OQ as Zn,OR as Hn,OS as Qn,mY as Wn,mG as ce,nj as Te,OT as Xn,OU as ea,OV as ta,nq as na,jA as aa,jr as oa,OW as sa,jz as ht,Kz as ca,OX as ia,OY as la,pb as ra,oS as da,nh as pe,oR as ze,OZ as ua,O_ as ma,l4 as ha,bp as pa,k$ as pt,kN as ga,O$ as Ca,gy as gt,fL as Sa,kY as fa,uZ as Ia,P0 as ka,nR as Ea,nM as ya,nQ as va,nB as ba,P1 as Aa,e_ as Vt,n4 as Ta,mV as Pa,fe as Ct,nl as wa,P2 as xa,ni as Mt,P3 as Ra,P4 as Da,P5 as Oa,P6 as Ua,P7 as St,pn as Ba,oB as Fa,Jg as _a,jy as Va,P8 as Ma,Fw as ja,jx as za,eZ as La,ob as jt,oJ as $a,nf as ft,nk as Ga,bB as qa,kV as Ja,kS as Na,P9 as Ya,nA as It,ok as kt,ot as Ka,og as Za,oG as Ha,ol as Qa,Pa as Wa,Pb as Xa,n_ as eo,Pc as to,nY as no,nZ as ao,nW as oo,ov as so}from"./zeni-epic-state-Ds1G4QGX.js";import{H as zt,s as Lt,d as ge,e as L,n as Q,I as $t,cq as co,z as Oe,cr as io,ao as Pe,cs as lo,aO as Et,r as Gt,ct as ro,al as Le,O as uo,cu as mo,Q as ho,cv as po,cw as go,cx as Co,q as So,S as fo,aI as Io,aZ as ko,A as Eo,cy as yo}from"./index-Drj6C88E.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{c as yt,C as vo}from"./TransactionDetailScreen-CbyG0n1m.js";import{w as bo}from"./withTransactionSidePanel-DTDtCDdY.js";import{h as Ao,v as To}from"./routePaths-Cqx2U__X.js";import{g as $e}from"./accountMappingHelper-DpblOBXy.js";import{D as Po}from"./DrawerScreen-HBFMcVvk.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./decodeURIComponentSafe-BogCAdat.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="580df9b9-fbc6-4873-970e-9c9f09fced9e",t._sentryDebugIdIdentifier="sentry-dbid-580df9b9-fbc6-4873-970e-9c9f09fced9e")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),O=se(),E=wt(),S=Ge(),u=B(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:F}=c(ge.isRealtimeInsightsFeatureEnabled),m=B(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=B(g=>Un(g,u.tenantId)),{isAiCfoAccessEnabled:y,onAskAiCfoClick:I}=qt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),v=s.useCallback((g,T,_=!1)=>{O(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),V=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),O(Bn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),v(i,u.tenantId,!0)},[v,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=Q(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&v(i,u.tenantId)},[v,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&O(Fn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:F,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:V,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:y,onAskAiCfoClick:I})})},xo=De.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
+
`,Ro=Pt.memo(({reconciliation:t,selectedDrawerAccountId:d,onClose:O,onFetchLinkTokenClick:E,onEstablishConnectionClick:S})=>{const u=se(),c=Oe.getSignedInUser(),F=B(n=>we(n)),m=t.excludedAccountIDs,o=s.useMemo(()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:F?.tenantId??""}),[c?.userId,c?.zeniSessionId,F?.tenantId]),{accountReconciliationsByAccountID:y,monthYearPeriod:I,statementUploadChosen:v}=t,V=y[d],i=V?.accountReconEntity.statementMetaData?.statementUploadId,h=(n,a)=>{u(Mn(n,a.split(".")[0]))},w=n=>{i!=null&&u(Vn({accountId:d,selectedPeriod:I,fileId:n,statementUploadId:i}))},A=()=>{u(Dt({statementUploadChosen:!1}))},x=n=>{u(_n({accountId:d,selectedPeriod:I,payload:n}))},g=n=>{u(Ot({accountId:d,selectedPeriod:I,localData:{accountSource:n}}))},T=s.useCallback(()=>{u(xt({accountId:d}))},[u,d]),_=s.useCallback(()=>{u(Rt({accountId:d}))},[u,d]),e=m.includes(d)?t.excludedAccountReconciliationByAccountID[d]:void 0;return V!=null?p.jsx(vt,{children:p.jsx(bt,{children:p.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:V,monthYearPeriod:I,onDismissClick:O,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:S,onEditFileName:h,onDeleteFile:w,onSelectSourceType:g,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:o,openFilePicker:v,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:T})})}):e!=null?p.jsx(vt,{children:p.jsx(bt,{children:p.jsx(lo,{excludedAccountReconciliation:e,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:_})})}):null}),vt=De.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
`,bt=De.div`
|
|
13
|
+
flex: 1;
|
|
14
|
+
min-height: 0;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
overflow-x: hidden;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
`;function Do({companyId:t,closeCustomerRequestDrawer:d,addCustomerRequest:O,resetCustomerRequest:E}){const S=Oe.getSignedInUser();if(S==null)throw Error("Can't access Customer Request page without signing in...");const u=B(c=>jn(c,t,S));return s.useEffect(()=>{E()},[]),p.jsx(p.Fragment,{children:u.fetchState==="In-Progress"||u.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?p.jsx(Gt,{fetchState:"In-Progress"}):p.jsx(ro,{onCloseClick:d,addCustomerRequest:O,snippets:u.companyMonthEndReportTemplatesData,bulletPoints:u.zeniRequestsData??[]})})}const Oo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Uo,comma:At,space:Bo}},dateFormat:Nt}=uo.getLocalizedStrings(),Tt=so,Fo=Dn(function(t,d){const{uncategorizedAccounts:O,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,companyId:c,isMissingReceiptsBulkUploadEnabled:F,isTransactionActivityEnabled:m}=d,o=Oe.getSignedInUser(),y=t.tenantState.currentTenantId,I={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:y??""},v=he(t),{selectedTransactionCategorizationTab:V}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:F===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:I,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:F===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:V,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:o,uncategorizedAccounts:O,companyId:c,isTransactionActivityEnabled:m,isAccountingClassesEnabled:Jn(t)}},function(t,d){const{themeState:O,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:u,location:c,vendorSearchAutoCompleteData:F,expenseAutomationViewSelector:m,currentTenant:o,uncategorizedAccounts:y,navigate:I,onClickCustomerRequest:v,handleEditClick:V,setActivityLogTransactionId:i}=d,{selectedPeriod:h,currentSelectedView:w,reconciliation:{selectedAccountId:A}}=m,{accountSettingsView:x}=m.jeSchedules,g=_t(h),T=Re(g.start),_=Re(g.end);return{onZeniLogoClick:()=>{O.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(h.month,h.year),t(Fa(e))},onUploadTransactionReceipt:(e,n,a,r,f,C)=>{t(St(e,n,{fetchState:"In-Progress"}));const k=()=>t(St(e,n,{fetchState:"Error"}));po(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,a,r,f).then(R=>{R!=null?t(Ba(e,R)):k()}).catch(k)},onMissingReceiptsRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);I(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ua(e,n)),o!=null&&t(Ce({tenantId:o.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,a,r)=>{t(Oa(e,{fetchState:n,error:a})),a!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:r!=null?Bo+Uo+r+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&T!=null&&t(Mt({start:T,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,a,r,f)=>{t(eo(e,n,a,r,f))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Wa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Qa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ha())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=m.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Za(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=m.currentSelectedView,a=m.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:a,uiState:{searchString:e}})),_!=null&&T!=null&&t(pe(a,{start:T,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{d.trackExpenseAutomationTabAnalytics(!0),t(wa(S))},onClose:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0})),I("../")},onBack:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=m,a=Q(c.state?.pathnameStackToGoBack,c.pathname);I(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:a,referrer:m.currentSelectedView}}),t(Vt(e))},handleLogOutClick:()=>{const e=Q(c.state?.pathnameStackToGoBack,c.pathname);I("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:a,fixedAssetsAccount:r,accruedExpensesAccount:f}=n,C=$e(x.prepaidExpensesAccountList,a.selectedOptions),k=$e(x.fixedAssetsAccountList,r.selectedOptions),R=$e(x.accruedExpensesAccountList,f.selectedOptions),G={selectedPrepaidExpensesAccountIds:C.map(b=>b.accountId),selectedFixedAssetsAccountIds:k.map(b=>b.accountId),selectedAccruedExpensesAccountIds:R.map(b=>b.accountId)};t(Aa({data:G}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:a,accumulatedDepreciationCategory:r,scheduleClass:f,scheduleExpenseCategory:C,vendor:k}=n,{allAccountList:R,allClassList:G,allDepreciationAccountList:b}=m.jeSchedules,q=F.entityAutoCompleteView.vendor.length>0?F.entityAutoCompleteView.vendor.find(j=>j.id===k?.selectedOption):void 0,Z={id:q?.zeniId??k?.selectedOption??"",name:q?.name??k?.defaultOptions.find(j=>j.value===k?.selectedOption)?.label??"",logo:q?.logo},Ue=C?.selectedOption!=null?R.find(j=>j.qboId===C.selectedOption):void 0,Se=f?.selectedOption!=null?G.find(j=>j.classId===f.selectedOption):void 0,fe=r?.selectedOption!=null?b.find(j=>j.qboId===r.selectedOption):void 0;t(va({scheduledJournalEntryID:e,localData:{jeScheduleID:a,scheduledJournalEntryID:e,updatedCategoryId:Ue?.accountId,updatedClassId:Se?.classId,updatedAccumulatedDepreciationCategoryID:fe?.accountId,updatedVendor:{id:Z.id,name:Z.name}}}))},ignoreRecommendedJeSchedule(e,n){t(ya(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onCancelAutoComplete:()=>{t(Ae("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,a)=>{t(Ia({selectedJEScheduleKey:n}));const r=Q(c.state?.pathnameStackToGoBack,c.pathname);I(`../../vendors/schedules/${a}/details/${e}`,{state:{pathnameStackToGoBack:r,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{o!=null&&t(fa(e,o.companyId,o.tenantId))},onClickCustomerRequest:v,setActivityLogTransactionId:i,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Sa())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ca(e))},onUpdateFileAttachment:e=>{t(ga({files:e}))},previewMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!0,a,r,o.tenantId))},saveMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!1,a,r,o.tenantId))},onEditMonthEndInsightsClick:V,sendMonthEndReport:e=>{const n=c.state?.referrer,{selectedPeriod:a,auditSummary:r}=m;o!=null&&r?.auditScorePercentage!=null&&(t(ha(o.companyId,e,o.tenantId)),L.trackInsightsEmailPage(a.month,a.year,!1,"draft",r.auditScorePercentage,pa().format(Nt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);I(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,a,r,f,C,k,R,G,b,q)=>{t(ma(e,n,a,r,y,f,C,k,R,G,b,q))},onCancelAutoComplete:()=>{t(Ae("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{d.closeSidePanel?.(),_!=null&&T!=null&&(t(pe(e,{start:T,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&T!=null&&t(pe(e,{start:T,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,a,r,f,C,k)=>{_!=null&&T!=null&&t(pe(e,{start:T,end:_},!0,a,n,r,f,C,k))},resetTransactionCategorizationLocalData:(e,n,a,r,f,C,k,R)=>{t(da(e,n,a,r,R??null,f,C,!1,k))},updateSelectedVendorForTransaction:(e,n,a,r,f)=>{t(ht({selectedTab:e,transactionId:n,lineId:a,selectedTransaction:r,uncategorizedAccounts:y,updatedVendor:f}))},onSaveUpdateTransactionCategorization:(e,n,a)=>{const r=c.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(h.month,h.year,m.transactionView.totalCountByTab.autoCategorized,n.length,!1,r??null):L.trackTransactionsReviewPage(h.month,h.year,m.transactionView.totalCountByTab.review,n.length,!1,r??null),t(ra(e,n,a,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,a,r,f,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&t(ca({transactionId:R,customerUpdates:C})),t(ia({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:y,updatedCustomer:C,selectedEntity:f,isUncategorizedExpenseCategoryEnabled:k})),f!=null&&t(Je(f,e,n,a,!0,E,k))},onFetchRecommendationsForEntityCategorization:(e,n,a,r,f,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&(t(aa({transactionId:R,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(oa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(ht({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:y,updatedVendor:C,selectedEntity:f,isUncategorizedExpenseCategoryEnabled:k})),f!=null&&t(Je(f,e,n,a,!0,E,k))):t(sa({selectedTab:r,transactionId:R.id,lineId:b[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Te(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Te(h,!0,!1,null,!1,!1))},markAsReview:(e,n,a,r)=>{L.trackFluxAnalysisReviewed(a.month,a.year,r??!1,e),t(na(n,e,a,r??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(d.tenantEmailDomain!=null){const n=To(e.id,e.qboId,d.tenantEmailDomain),a=Q(d.location.state?.pathnameStackToGoBack,d.location.pathname);d.navigate(n,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,n,a)=>{t(Te(e,!0,!1,n,!0,a))},onReviewClicked:e=>{t(ce(h,e))},setOpenDrawerClicked:e=>{t(xe({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ut("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const a=o?.companyId;a!=null&&(t(Bt(e,a,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Ft({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(xe({selectedDrawerAccountId:e})),t(Ot({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ce(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Wn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Qn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{d.closeSidePanel?.(),t(Zn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,a)=>{const r=e.vendor?.id;a&&r!=null&&t(Yn(r)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,qe("bill"));const n=Q(c.state?.pathnameStackToGoBack,c.pathname);I(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{I(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Nn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,d,O)=>{const{isMissingReceiptsBulkUploadEnabled:E,...S}=O;return function(u,c,F){return{...u,...c,...F,onUploadTransactionReceipt:(m,o,y,I,v)=>{c.onUploadTransactionReceipt(m,o,y,I,v,u.authParams)}}}(t,d,S)})(mo),_o=bo(function(t){const d=t.displayName??t.name??"Component",O=Pt.memo(t),E=S=>{const u=se(),c=function(){const h=se(),w=B(A=>he(A).reconciliation.selectedDrawerAccountId);return{isOpen:w!=null,selectedAccountId:w,openPanel:s.useCallback(A=>{h(xe({selectedDrawerAccountId:A}))},[h]),closePanel:s.useCallback(()=>{h(xe({selectedDrawerAccountId:void 0}))},[h])}}(),F=B(h=>he(h).reconciliation),m=B(h=>we(h)),o=s.useCallback((h,w)=>{u(Ut("expense_automation_reconcile",h,w))},[u]),y=s.useCallback((h,w)=>{const A=m?.companyId;A!=null&&(u(Bt(h,A,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",w)),u(Ft({accountId:w,connectionInProgress:!0})))},[u,m?.companyId]),I=s.useMemo(()=>{if(c.isOpen&&c.selectedAccountId!=null)return p.jsx(Ro,{reconciliation:F,selectedDrawerAccountId:c.selectedAccountId,onClose:c.closePanel,onFetchLinkTokenClick:o,onEstablishConnectionClick:y})},[c.isOpen,c.selectedAccountId,c.closePanel,F,o,y]),v=s.useMemo(()=>({reconPanelContent:I,reconSidePanelIsOpen:c.isOpen,closeReconSidePanel:c.closePanel}),[I,c.isOpen,c.closePanel]),V=s.useContext(Et),i=s.useMemo(()=>c.isOpen?{closePanel:c.closePanel,selectedItemId:c.selectedAccountId}:V,[c.isOpen,c.closePanel,c.selectedAccountId,V]);return p.jsx(Et.Provider,{value:i,children:p.jsx(O,{...S,...v})})};return E.displayName=`withReconSidePanel(${d})`,E}(({closeSidePanel:t,openTransactionPanel:d,panelContent:O,sidePanelIsFullView:E,sidePanelIsOpen:S,reconPanelContent:u,reconSidePanelIsOpen:c,closeReconSidePanel:F})=>{const{isAiCfoOpen:m,setIsAiCfoOpen:o}=zt(),y=go(),{isOpen:I}=Co(),v=wt(),V=Ge(),i=se(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:w}=qt({isAiCfoOpen:m,setIsAiCfoOpen:o,mobileExploreReferrer:"Transaction categorization"}),A=s.useCallback(()=>{S===!0&&E!==!0&&t?.()},[t,S,E]),{areTenantIdsInSync:x}=$t(),g=(()=>{const l=B(J=>he(J)),z=Ge(),{currentSelectedViewFetchState:K,currentSelectedView:M,selectedPeriod:U}=l,me=Le(M),ee=Le(K.fetchState),ye=s.useCallback(J=>{const H=z.state?.referrer;M==="transaction_categorization"&&(l.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(U.month,U.year,l.transactionView.totalCountByTab.review,0,J,H??null):L.trackTransactionsAutoCategorisedPage(U.month,U.year,l.transactionView.totalCountByTab.autoCategorized,0,J,H??null)),M==="missing_receipts"&&L.trackMissingReceiptsPage(U.month,U.year,J,l.missingReceipts.transactions.length,H??null),M==="je_schedules"&&L.trackMonthCloseScheduleListPage(U.month,U.year,J,l.jeSchedules.draftSchedules.length,l.jeSchedules.resolveSchedules.length,H??null),M==="flux_analysis"&&L.trackFluxAnalysisPage(U.month,U.year,J,Oo(l.fluxAnalysis),H??null),M==="month_end_insights"&&l.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(U.month,U.year,J,"draft",l.auditSummary.auditScorePercentage,null,H??null)},[U,l]);return s.useEffect(()=>{ee===K.fetchState&&M===me||K.fetchState!=="Completed"||ye(!1)},[M,K.fetchState,me]),ye})(),T=So(),[_,e]=s.useState(!1),n=B(l=>dt(l)),a=B(l=>we(l)),[r,f]=s.useState(!1),[C,k]=s.useState(!1),[R,G]=s.useState([]),[b,q]=s.useState(void 0),Z=s.useCallback(l=>{l!=null&&(m&&o(!1),y(),A()),q(l)},[A,m,y,o]),Ue=s.useCallback(()=>{y(),q(void 0),A(),w()},[A,w,y]),Se=s.useRef(m);s.useEffect(()=>{m===!0&&Se.current===!1&&(y(),q(void 0),A()),Se.current=m},[A,m,y]);const fe=s.useRef(I);s.useEffect(()=>{I===!0&&fe.current===!1&&(m&&o(!1),q(void 0),S===!0&&E!==!0&&t?.()),fe.current=I},[t,I,m,o,E,S]);const j=S===!0&&E!==!0,Ne=s.useRef(j);s.useEffect(()=>{j&&!Ne.current&&(m&&o(!1),y(),q(void 0)),Ne.current=j},[m,j,y,o]);const[Ye,Yt]=s.useState(!1),Ke=s.useRef(!1),{selectedTab:Ze}=rt(),{tenantEmailDomain:Kt}=rt(),[Be,He]=s.useState(V.state?.message==="comingFromTransactionDetail"),Qe=V.state?.message==="comingFromOverview",Zt=fo(),Fe=Oe.getSignedInUser(),{useDynamicConfig:Ht,useFeatureGate:Ie}=Lt(),{configValue:Qt}=Ht(Io.enableUncategorizedExpenseCategory),W=Qt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:We}=Ie(ge.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:ie}=Ie(ge.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=Ie(ge.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=Ie(ge.isExpenseAutomationCommentingEnabled),Xt=s.useCallback(l=>{const z=qe(l.view==="reconciliation"?"bill":"expense");d?.(l.entityId,z)},[d]),en=B(l=>_a(l,"common")),$=B(l=>he(l)),{monthEndCloseChecksView:Y,currentSelectedView:P,selectedPeriod:D,selectedTransactionCategorizationTab:ne,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:X,jeSchedules:_e,reconciliation:nn}=$;s.useEffect(()=>{P==="transaction_categorization"&&S!==!0||Z(void 0)},[P,Z,S]);const ke=s.useRef(null);s.useEffect(()=>{ke.current!==null?ke.current!==ne&&(ke.current=ne,P==="transaction_categorization"&&Z(void 0)):ke.current=ne},[P,ne,Z]);const an=B(l=>b==null?void 0:Va(l.transactionState,b)),ae=an?.qboId,on=B(l=>ae==null?void 0:Ma(l,ae));s.useEffect(()=>{ae!=null&&i(ja(ae))},[i,ae]);const{selectedAccountId:le}=nn,et=Le(_e.accountSettingsView.saveState.fetchState),sn=B(l=>za(l.accountState,l.accountListState,"accountList")),re=Ze!=null?La(Ze):P,cn=B(l=>l.entityAutoCompleteState.autoCompleteText.common);if(Jt({isDataReady:X.fetchState==="Completed"}),Fe==null)throw Error("Can't access expense automation screen without signing in...");const tt=_t(D),de=Re(tt.start),ue=Re(tt.end);if(de==null||ue==null)throw Error(`Invalid start - ${de} and end - ${ue} period from given ${D}`);const ln=s.useCallback(()=>{f(!1)},[]),rn=s.useCallback(()=>{k(!0)},[]),dn=s.useCallback(l=>{G(l),k(!1)},[]),un=s.useCallback(()=>{G([])},[]),Ee=$.missingReceipts.bulkUpload.phase,nt=$.missingReceipts.bulkUpload.currentBatchId;s.useEffect(()=>{ie===!0&&P==="missing_receipts"&&Ee==="matching"&&nt!=null&&i(jt({cacheOverride:!0}))},[ie,P,Ee,nt,i]);const at=Fe?.userId,mn=D.month,hn=D.year,ot=a?.tenantId;s.useEffect(()=>{P==="missing_receipts"&&ie!==!1&&Ee==="idle"&&at!=null&&ot!=null&&i($a())},[P,ie,Ee,at,ot,mn,hn,i]),s.useEffect(()=>{n.newVendorState?.vendorDetailLocalData?.vendorName!=null?e(!0):e(!1)},[n.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect(()=>{re!=null&&P!==re&&i(Vt(re))},[re]),s.useEffect(()=>{Ye!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!x||(Yt(!0),i(ft(!1,!1,W)))},[Ye,X,x,W]),s.useEffect(()=>{!Qe&&x&&(i(ft(!1,!1,W)),i(ce(D,le,!1,!1)))},[D.month,D.year,x,W]);const st=s.useCallback((l=!1,z=!1)=>{const K={start:de,end:ue};switch(P){case"transaction_categorization":i(pe(ne,K,l,!Be,void 0,void 0,z,void 0,W)),He(!1);break;case"flux_analysis":i(Te(D,l,z,null));break;case"month_end_insights":if(z===!1){const M=new Date(D.year,D.month,0),U=qa(M.toDateString()).format(Nt.analytics.YYYYDashMMDashDDFormat);i(Ja(!0,a.companyId,a.tenantId,U)),i(Na(a.companyId,a.tenantId))}break;case"je_schedules":i(Ga(K,z));break;case"missing_receipts":i(Mt(K,{amount:75,currencyCode:"USD",currencySymbol:"$"},l,z));break;default:i(ce(D,le,l,z))}},[P,de,ue,a.companyId,a.tenantId,ne,D,le,Be,He,W]);s.useEffect(()=>{P===re&&X.fetchState==="Not-Started"&&x&&st(!0)},[X,de,ue,a.companyId,a.tenantId,x]),s.useEffect(()=>{Qe||Be||Ke.current||tn.fetchState==="In-Progress"||X.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),s.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!1}))},[Y.fetchState,a.tenantId]),s.useEffect(()=>{$.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?f(!0):f(!1)},[$.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect(()=>{$.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&x&&(i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0})),i(Ya({companyId:a.companyId})),v("../"))},[$.monthEndInsights?.sendMonthEndReportStatus?.fetchState,a.tenantId,D,a.companyId,x]),s.useEffect(()=>{const l=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(l)},[Y.fetchState,a.tenantId,D,i]),s.useEffect(()=>{const l=setInterval(()=>{P==="reconciliation"&&le==null&&$.reconciliation.fetchStatus.fetchState==="Completed"&&$.reconciliation.refreshStatus.fetchState!=="In-Progress"&&i(ce(D,void 0,!0,!0))},3e5);return()=>clearInterval(l)},[P,i,$.reconciliation.fetchStatus.fetchState,$.reconciliation.refreshStatus.fetchState,ce,le,D]);const pn=yt();s.useEffect(()=>{const l=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(z=>z.id==="month_end_insights")?.isDisabled??!1)&&!We;P!=="month_end_insights"||!l&&Y.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[P,Y.monthEndCloseChecks]);const gn=c===!0?u:O,Cn=c===!0||S===!0,Sn=c===!0?F:t;s.useEffect(()=>{et==="In-Progress"&&_e.accountSettingsView.saveState.fetchState==="Completed"&&i(It())},[et,_e.accountSettingsView.saveState.fetchState,It]);const{transactionId:ct,onSaveVendor:fn,onSaveSuccess:In,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:l,closeDrawerHandler:z,currentSelectedView:K})=>{const M=se();let U,me,ee;const ye=yt(),J=l.transactionView;let H=()=>{};const{transactions:yn,selectedTransactionId:oe,selectedTransactionLineId:ve,transactionLocalData:vn}=J;if(K==="transaction_categorization"){const Ve=vn.find(te=>te.transactionId===oe),N=yn.find(te=>te.id===oe),it=ve!=null?Ve?.transactionReviewLocalData?.lineItemById[ve]:void 0,lt=it?.account;me=it?.class?.classId,U=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const An=Ao(oe,N?.typeOfTransaction);N!=null&&An&&(ee={id:oe,type:qe(N.typeOfTransaction)}),H=()=>{if(oe!=null&&ve!=null&&N!=null){const te=J.transactionLocalData.find(be=>be.transactionId===oe)?.transactionReviewLocalData;if(te!=null&&N.lines!=null&&N.lines.length>0){const be=te.lineItemById[ve];let Me=te.selectedEntity;if(qn(N)||(Me=be.selectedEntityLine),Me!=null){const Tn=Me,Pn={transactionId:{id:N.id,type:N.type},transaction:N,lineIds:N.lines.map(wn=>wn.id)??[]};M(Je(Tn,be.amount.amount,Pn,!1,!0,ye))}}}}}const bn=B(Ve=>dt(Ve,void 0,U,me));return{transactionId:ee,onSaveVendor:()=>{M(Gn(ee,void 0,!1,!0))},onSaveSuccess:H,onCancel:()=>{ee!=null&&M(zn({transactionId:ee})),M(Ln()),M($n()),z()},vendorViewDetails:bn}})({expenseAutomationViewSelector:$,closeDrawerHandler:()=>{e(!1)},currentSelectedView:P});return Zt?.loggedInUserRoleMap==null?Y.fetchState==="Error"?p.jsx(ko,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):p.jsx(Gt,{fetchState:"In-Progress"}):p.jsxs(p.Fragment,{children:[p.jsx(Po,{isOpen:C,drawerLeftMargin:new Eo(0,0,300,650),onClose:()=>{k(!1)},children:p.jsx(Vo,{onClick:l=>l.stopPropagation(),children:p.jsx(Do,{companyId:a.companyId,closeCustomerRequestDrawer:()=>k(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&_&&p.jsx(vo,{isOpen:_,transactionId:ct,onSaveVendor:fn,onSaveSuccess:In,onCancel:kn,vendorViewDetails:En}),p.jsx(Fo,{navigate:v,location:V,themeState:T,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:en},expenseAutomationViewSelector:$,isMissingReceiptsBulkUploadEnabled:ie,monthEndInsightsPreviewMode:r,monthEndInsightsCustomerRequestData:R,isRealtimeInsightsFeatureEnabled:We,isUncategorizedExpenseCategoryEnabled:W,isCOTEnabled:pn,currentTenant:a,companyId:a.companyId,signedInUser:Fe,isTransactionActivityEnabled:Xe,activityLogTransactionId:P==="transaction_categorization"?b:void 0,activityLogPanel:P==="transaction_categorization"&&Xe===!0&&b!=null?p.jsx(yo,{activityLogView:on,qboId:ae,onClose:()=>Z(void 0),selectedTransactionId:b},String(b)):null,uncategorizedAccounts:sn,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Kt,trackExpenseAutomationTabAnalytics:g,setActivityLogTransactionId:Z,closeSidePanel:Sn,openTransactionPanel:d,sidePanelIsOpen:Cn,sidePanelIsFullView:c!==!0&&E,panelContent:gn,isAiCfoAccessEnabled:h,onAskAiCfoClick:Ue,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:c===!0?66:void 0})]})})),Vo=De(Rn)`
|
|
22
|
+
display: flex;
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
`;function ls(){return p.jsxs(On,{children:[p.jsx(je,{path:"*",element:p.jsx(wo,{})}),p.jsx(je,{path:"/:selectedTab/:selectedPeriod/*",element:p.jsx(_o,{})}),p.jsx(je,{path:"*",element:p.jsx(xn,{})})]})}export{ls as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-it_Rhm8-.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{W as i,Y as l,_ as p,p as c}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import m from"./NotFoundScreen-DZbU-KCv.js";import{j as u,u as b}from"./core-BF8mCLAO.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="118adab5-fa9d-47c4-a924-6dd394fd860f",a._sentryDebugIdIdentifier="sentry-dbid-118adab5-fa9d-47c4-a924-6dd394fd860f")}catch{}})();const j=()=>{const a=u(),e=b(),t=d.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),r=d.useCallback(()=>{(()=>{const n=c(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:r}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{j as F};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-it_Rhm8-.js";import{l as w,k as x,j,u as y,h as Y,q as ee,g as A,N as ae,n as te,o as p}from"./core-BF8mCLAO.js";import{It as S,Iu as k,Iv as N,yP as $,yB as L,Iw as C,Ix as ne,Iy as oe,yF as ie,eN as I,yM as se,yJ as le}from"./zeni-epic-state-Ds1G4QGX.js";import{K as g,o as d,Z as de,e as v,j as E,k as re,p as ce,m as me,n as F,s as pe,d as ue,J as he,q as xe,h as ge,r as be,v as fe,w as we,x as ye,y as Se,A as ke,X as ve}from"./index-Drj6C88E.js";import{n as c}from"./mui-B87RTrAV.js";import b from"./NotFoundScreen-DZbU-KCv.js";import{a as P}from"./sentry-C-hGmJ4T.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="823ba5ab-c971-4fc2-84bd-a4e32b99d11d",e._sentryDebugIdIdentifier="sentry-dbid-823ba5ab-c971-4fc2-84bd-a4e32b99d11d")}catch{}})();const Ie=c.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,je=x(function(e){const t=S(e),n=k(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(de);function z(){const e=g(),{vendorId:t,billId:n}=w();return t==null||n==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(je,{vendorId:t,billId:n})})})}const $e=c.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,Ce=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(re);function Be({isSubPage:e}){const t=j(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:o,children:a.jsx(Ce,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,ze=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(N({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),r=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}})(me);function Ne(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=w();return o==null||i==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Pe,{windowSize:n,children:a.jsx(ze,{location:t,navigate:e,vendorId:o,billId:i})})})}const Le=c.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Ee=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:r}=s;e(oe({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),r=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}})(he);function Fe(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(b,{}):a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
|
|
38
|
+
width: ${d.sp4};
|
|
39
|
+
height: ${d.sp4};
|
|
40
|
+
margin-bottom: ${d.sp3};
|
|
41
|
+
margin-top: ${d.sp3};
|
|
42
|
+
margin-left: ${d.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,Me=c.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
height: 100vh;
|
|
49
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
+
width: 100vw;
|
|
51
|
+
overflow-y: scroll;
|
|
52
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
+
`,He=c.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
|
|
61
|
+
`,Ke=c.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,Ve=x(function(e,t){return{file:t.file,type:t.type}})(Se);function h({appContent:e}){const t=Y(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=w(),[s]=ee(),r=s.get("token"),T=n.pathname.includes("address"),f=g(),G=xe(),B=ge(),M=()=>{G.toggle()},H=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:W,billFetchState:D,companyName:_,currencySymbol:J,amount:U}=H,{tenantId:q,userId:O,sessionId:X}=V,{fetchState:Z,internationalBankAccountCreateStatus:Q}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&r!=null&&t(se(i,o,r))},[]),P.useEffect(()=>{m==="Completed"&&(I(O,X,q),l!=null&&t(le(l)))},[m]),m==="Error"?a.jsx(b,{}):Z==="Completed"||Q.fetchState==="Completed"?(I(),a.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?a.jsx(be,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[m==="Completed"&&D==="Completed"&&a.jsx(fe,{analytics:v,onLoad:u=>(R=>R.trackBillPayMagicLinkPageLoad(o??"",i??"",_,l??"",We(n.pathname),J,U))(u)}),a.jsxs(Me,{windowSize:f,children:[f!=="small"?a.jsx(Ge,{onClick:M}):null,a.jsx(Ke,{windowSize:f,isAddressPage:T,children:D==="In-Progress"?a.jsx(we,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:W,type:"bill"})}),a.jsx(He,{windowSize:f,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return a.jsx(ve,{})}function la(){return a.jsxs(te,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(_e,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Fe,{})})}),a.jsx(p,{path:"*",element:a.jsx(b,{})})]})}export{la as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-it_Rhm8-.js";import{a as g}from"./sentry-C-hGmJ4T.js";import{h as U,u as w,j as _,q as M,g as l,N as T}from"./core-BF8mCLAO.js";import{z as r,h as P,O as V,f as A,e as N,g as q,D as R,w as W,i as $}from"./index-Drj6C88E.js";import{eM as B,Id as G,Io as H,Ie as J,eN as K,fh as Q,Ik as X,fF as Y,cR as Z,Ip as ee,Iq as te}from"./zeni-epic-state-Ds1G4QGX.js";import{n as ne}from"./mui-B87RTrAV.js";import{u as se}from"./useDeviceId-CGZ6TLY7.js";import{f as ae}from"./analyticsHelper-BlP3gsal.js";import{t as ie}from"./getLocaleForTenant-BZ9xLliJ.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="b63b7d5a-8b2c-4dea-a355-886e176d0c7b",t._sentryDebugIdIdentifier="sentry-dbid-b63b7d5a-8b2c-4dea-a355-886e176d0c7b")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=w(),f=_(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),b=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const F=g.useCallback(()=>{f("/signin/auth")},[f]),O=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=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(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:O,onVerifyOtp:j,onCancelVerifyDevice:F});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||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(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{De as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as U}from"./liveblocks-it_Rhm8-.js";import{a as c}from"./sentry-C-hGmJ4T.js";import{h as pe,g as t,l as Ze,u as qe,j as Je,i as R}from"./core-BF8mCLAO.js";import{eM as he,eT as Ke,eU as Se,eO as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as ma,cL as fa,bu as ba,eL as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Ds1G4QGX.js";import{a1 as Ea,a2 as ka,q as Ca,s as ya,z as k,a3 as Ia,u as Ta,d as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,W as va,a7 as $a,a8 as Ba,a9 as me,aa as fe,L as Ma,ab as Pa,ac as be,e as x,n as F,ad as N,ae as Ra}from"./index-Drj6C88E.js";import{D as xa}from"./mui-B87RTrAV.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]="e87ebe54-a0b7-48c6-9fce-a106d6c545b3",m._sentryDebugIdIdentifier="sentry-dbid-e87ebe54-a0b7-48c6-9fce-a106d6c545b3")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=Ze(),a=qe(),C=Ca(),o=Je(),V=Qe(),f=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Xe(G),s=t(e=>he(e)),L=t(e=>ea(e)),O=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,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:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:W}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,W),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&f(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabledV2),J=q||Z&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Me=t(e=>g(e).totalUnreadCount),Pe=t(e=>g(e).reducedFetchCountState),K=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Fa();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;j(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&f(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||f(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(f(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),f(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Pe,count:Me},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),J===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=t(e=>da(e,S,h,q,Z,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,W,s),re=_a(),ze=re&&Da(a),de=fa(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[Ye,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const We=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(We);return U.jsx(xa,{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(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:fe(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:je,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:J&&ba(s.userRole)===!1,selectedMenu:me(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";fe(a)&&(e=K===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=F(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(a.state?.pathnameStackToGoBack,a.pathname);return x.trackAICFOChatScreenStateChanged("viewed","left_menu",O??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ra(e.type);be(e.type)?(O!=null&&f(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=me(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(f(ha(e.tenantId)),f(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;x.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{f(pa({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=m=>{const d=pe(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Ke(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...m,...a})};export{za as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as r,k as i}from"./core-BF8mCLAO.js";import{V as n}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import"./sentry-C-hGmJ4T.js";import"./zeni-epic-state-Ds1G4QGX.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="a6101124-68fb-49b2-8a98-0d630e11e347",o._sentryDebugIdIdentifier="sentry-dbid-a6101124-68fb-49b2-8a98-0d630e11e347")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-
|
|
1
|
+
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-it_Rhm8-.js";import ut from"./NotFoundScreen-DZbU-KCv.js";import{a as k}from"./sentry-C-hGmJ4T.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as H}from"./core-BF8mCLAO.js";import{cn as It,eV as Q,eM as X,f9 as Ct,f1 as b,OC as J,f5 as d,eU as A,qm as $,vA as Tt,OD as At,eT as yt,fc as Et,qr as _t,OE as F,bp as M,gy as w,qv as K,OF as Nt,cy as Bt,cs as xt}from"./zeni-epic-state-Ds1G4QGX.js";import{I as wt,z as vt,s as Dt,d as Rt,H as Ut,cn as Gt,n as N,a1 as Pt,co as Ft,a2 as Mt,p as $t}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="fae5f8e0-f0f4-403c-a22a-0dddddbc6c76",t._sentryDebugIdIdentifier="sentry-dbid-fae5f8e0-f0f4-403c-a22a-0dddddbc6c76")}catch{}})();const Vt=(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)})}),qt=St(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(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:B,fetchMoreCommentsNotifications:v}=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(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!xt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t($("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],M())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({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")),Vt(s,B).then(()=>{t(F(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({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}})}}})(Pt(Ft)),zt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=wt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>X(e)),{useFeatureGate:m}=Dt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Ut(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(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),O=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:x,isLoading:y,hasFetchedAll:C,isFetchingMore:U,fetchMore:nt}=dt(),{threads:V,isLoading:q,fetchMore:z,isFetchingMore:L,hasFetchedAll:W}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(J(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&x!=null){const e=`dashboard_${o.companyId}`,p=x.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||U===!0||C!==!0||y||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&q===!1&&x!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=x.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||W===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,U,L,C,W,q,x?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Mt(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s($("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(H,{path:"/:selectedTab",element:_.jsx(zt,{})}),_.jsx(H,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-it_Rhm8-.js";import{j as z,h as H,u as K,l as Z,g as d,k as X,n as ee,o as C}from"./core-BF8mCLAO.js";import{eM as M,qa as U,pK as ae,J4 as $,pF as A,bu as te,bm as se,bQ as oe,pG as re,J5 as ne,IR as S,dA as ie,tx as ce,J6 as le,tU as de,eS as me,eQ as fe}from"./zeni-epic-state-Ds1G4QGX.js";import{H as pe,z as ue,I as he,S as be,s as w,d as q,v as Fe,e as B,aj as ge,n as Ie}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import Ce from"./NotFoundScreen-DZbU-KCv.js";import{F as Se}from"./FeaturePreviewScreen-Bd18oGQj.js";import{a as h}from"./sentry-C-hGmJ4T.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Te}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{u as ye}from"./useInitialThreadRequest-sUCtW719.js";import{t as xe}from"./routePaths-Cqx2U__X.js";import{M as ke}from"./MobileAppDrawer-CwjUL5yD.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="2da7cbfe-267b-4c10-bd6a-11654b37a857",s._sentryDebugIdIdentifier="sentry-dbid-2da7cbfe-267b-4c10-bd6a-11654b37a857")}catch{}})();const T=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(A(e)),T(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const b=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=xe(a.tenantEmailDomain,e.accountId,e.accountType,b,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(ge);function v(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=z(),o=H(),r=K(),{forecastId:i,tenantEmailDomain:b}=Z(),[f,p]=h.useState(!1),[F,y]=h.useState(!1),u=ue.getSignedInUser(),x=d(t=>M(t)),G=x.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>k.pandLByForecastID[t]!=null&&re(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=he();Te({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&g)p(!0),l||o(ae());else if(l&&!F){y(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(I=>I.id===R):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o($(c.forecasts[t].id,t)),T(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&T(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&g&&o(A(c.forecasts[t].id))}},[f,p,o,l,c,F,y,U,A,g]);const E=be(),V=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:L}=W(q.isReportsCommentingEnabled),Y=ye(L?x?.companyId:void 0,{clearParams:l&&F}),[J,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ke,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:G,tenantEmailDomain:b,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function He(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{He as PandLWithForecastRoutes,He as default};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-it_Rhm8-.js";import{I$ as oe,eM as X,jm as K,eS as q,eQ as ie,Gz as Y,ID as re,sF as ke,J0 as N,st as Pe,sO as je,sI as le,sx as de,sM as Te,sJ as Le,J1 as ce,uj as ve,J2 as Fe,fw as Ae,J3 as G,sC as pe,sA as ue,sR as Oe,b$ as Re}from"./zeni-epic-state-Ds1G4QGX.js";import{K as me,s as ee,d as E,z as M,a4 as ge,E as fe,af as he,ag as Ve,A as Ce,o as A,F as be,O as ye,ah as Ue,I as $e,H as Be,v as Ze,e as we,g as ze,n as Ge,ai as He,S as Je}from"./index-Drj6C88E.js";import{D as Se,n as _,S as De}from"./mui-B87RTrAV.js";import te from"./NotFoundScreen-DZbU-KCv.js";import{a as l}from"./sentry-C-hGmJ4T.js";import{h as se,l as Ke,g,j as Me,u as _e,k as We,n as ne,o as z}from"./core-BF8mCLAO.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as Xe}from"./MobileAppDrawer-CwjUL5yD.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="8649f27f-b24f-4645-bd78-19049528d587",e._sentryDebugIdIdentifier="sentry-dbid-8649f27f-b24f-4645-bd78-19049528d587")}catch{}})();const qe={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=Ke(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>K(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},$=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:B}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=C(E.isChargeCardFeatureEnabled),p=ge(m,Z,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=_(De)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
`,xe=_(be.H6Regular)`
|
|
6
|
-
margin-top: ${
|
|
7
|
-
padding-left: ${
|
|
8
|
-
padding-right: ${
|
|
6
|
+
margin-top: ${A.sp7};
|
|
7
|
+
padding-left: ${A.sp8};
|
|
8
|
+
padding-right: ${A.sp8};
|
|
9
9
|
color: ${e=>e.theme.colors.primary};
|
|
10
10
|
word-break: break-word;
|
|
11
11
|
`,Ee=_(be.LargeRegularSp)`
|
|
12
12
|
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${
|
|
14
|
-
padding-right: ${
|
|
13
|
+
padding-left: ${A.sp8};
|
|
14
|
+
padding-right: ${A.sp8};
|
|
15
15
|
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${
|
|
16
|
+
margin-top: ${A.sp4};
|
|
17
17
|
white-space: pre-line;
|
|
18
|
-
`,ss={overlayWidth:new Ce(100,100,48)},
|
|
18
|
+
`,ss={overlayWidth:new Ce(100,100,48)},J=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),S=g(r=>oe(r)),c=g(r=>X(r)),m=g(r=>K(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(N())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},$=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:B}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=D(E.isChargeCardFeatureEnabled),p=ge(c,Z,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(f==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:J.discardTitle}),descriptionComponent:s.jsx(Ee,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=_(De)`
|
|
19
19
|
display: flex;
|
|
20
20
|
min-height: 100%;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,ns=We(function(e,n){const d=ce(e),o=
|
|
22
|
+
`,ns=We(function(e,n){const d=ce(e),o=M.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:K(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:f}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}})(He);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=Me(),o=se(),f=_e(),{areTenantIdsInSync:i}=$e(),y=M.getSignedInUser(),h=g(a=>X(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>K(a)),k=!q(O,h)&&R,w=Y(h),S=h?.tenantId,{tenantEmailDomain:c}=h,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:$}=Be(),{isAiCfoAccessEnabled:B,onAskAiCfoClick:Z}=Qe({isAiCfoOpen:F,setIsAiCfoOpen:$,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Ne({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=h?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,S,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Ze,{analytics:we,onLoad:a=>a.trackPageLoaded(ze.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,W)=>{o(G({sortKey:a,sortOrder:W}))},onRowClick:a=>{const W=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Ge(f.state?.pathnameStackToGoBack,f.pathname);d(W,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:Z})]})}function Es(){const e=Je();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(z,{path:"/",element:s.jsx(Q,{})}),s.jsx(z,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx(z,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx(z,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(z,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-it_Rhm8-.js";import _ from"./NotFoundScreen-DZbU-KCv.js";import{a as r}from"./sentry-C-hGmJ4T.js";import{j as M,u as v,g,l as U,h as P,N as z,k as V,n as q,o as h}from"./core-BF8mCLAO.js";import{eM as B,OG as b,bn as F,bm as H,h2 as N,gy as G}from"./zeni-epic-state-Ds1G4QGX.js";import{q as $,z as I,H as J,cp as K}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as W}from"./MobileAppDrawer-CwjUL5yD.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="76849dee-6640-4d34-a2c9-8205bbc61ad1",e._sentryDebugIdIdentifier="sentry-dbid-76849dee-6640-4d34-a2c9-8205bbc61ad1")}catch{}})();const X=V(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)}}})(K),Y=()=>{const e=M(),t=v(),c=$(),o=g(s=>B(s)),{aggregatedReportViewState:n}=g(s=>b(s)),{tenantEmailDomain:f}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[C,S]=r.useState(!1),k=F(o?.userRole??[]),w=o?.userRole?.includes("bookkeeping_admin")??!1,y=H(l),A=k||w||y,d=r.useCallback((s,i,O)=>{p(N({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(p(G({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),m.current=!0},[n?.fetchState,d]),x=r.useCallback((s,i)=>{d(s,i,!1)},[d]),u=s=>{S(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=J(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:x,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${f}/dashboard`,replace:!0})};function Ie(){return a.jsxs(q,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-C-hGmJ4T.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-it_Rhm8-.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-C-hGmJ4T.js";import{L as dt,bQ as Tc,eM as Ac,Id as Rc,IX as kl,b$ as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-Ds1G4QGX.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-C4NhxqJn.js";import{r as un}from"./empty-CH1gmPwH.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BX9OJ6Nl.js";import{r as Gl}from"./index-Cuo-3WZY.js";import{r as zl}from"./index-DzmJ6hZq.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-BF8mCLAO.js";import{u as Kl,z as Pc,L as Wl,T as Jl,U as Xl,j as Ql,e as tf}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{d as Pe}from"./decodeURIComponentSafe-BogCAdat.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]="3d3e1152-55d6-43ae-ace9-d1bf4846dad6",t._sentryDebugIdIdentifier="sentry-dbid-3d3e1152-55d6-43ae-ace9-d1bf4846dad6")}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-it_Rhm8-.js";import{a as o}from"./sentry-C-hGmJ4T.js";import{g as f,j as M,h as V,u as F,k as N}from"./core-BF8mCLAO.js";import{h as _,K as $,z as R,a$ as U,A as z,I as K,H as Y,v as q,e as l,g as G,a1 as J,b0 as Q}from"./index-Drj6C88E.js";import{eW as X,eM as Z,Lu as I,Lv as ee,tn as ae,td as g,eY as re,bL as ne,ti as te,Lw as se}from"./zeni-epic-state-Ds1G4QGX.js";import{D as oe,e as ie,n as le,S as de}from"./mui-B87RTrAV.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as ue}from"./MobileAppDrawer-CwjUL5yD.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]="b2713102-0654-4ba5-8c0d-265d79bbeb5f",e._sentryDebugIdIdentifier="sentry-dbid-b2713102-0654-4ba5-8c0d-265d79bbeb5f")}catch{}})();const pe={overlayWidth:new z(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=$();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>X(d));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",ke=N(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(
|
|
5
|
+
`,P="refer-and-earn-status-update",ke=N(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(J(Q));function Pe({isReferralDrawerOpen:e}){const a=M(),r=V(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),b=f(t=>Z(t)),h=f(t=>I(t)),m=h.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),v=ee([h,w]),{areTenantIdsInSync:c}=K();o.useEffect(()=>{b?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&c&&(u(!0),r(g(!0)))},[m,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(re(!0)))},[w,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),y=t=>{j(t)},{isAiCfoOpen:L,setIsAiCfoOpen:O}=Y(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:L,setIsAiCfoOpen:O,mobileExploreReferrer:"Rewards"});fe({isDataReady:v===!0});const H={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,S,W)=>{W.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(q,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(G.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:y}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:a,currentTenant:b,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...H})]})}export{Pe as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-it_Rhm8-.js";import x from"./NotFoundScreen-DZbU-KCv.js";import{a as p}from"./sentry-C-hGmJ4T.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as c}from"./core-BF8mCLAO.js";import{eM as T,Mo as g,ME as S,Ck as V,Bt as M,Cj as m,Ca as U,MT as _}from"./zeni-epic-state-Ds1G4QGX.js";import{h as $,z as B,r as N,a1 as O,bF as W,aa as z}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-roSj06Ji.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]="0bd8025e-c07c-454e-8017-bd046b061b88",e._sentryDebugIdIdentifier="sentry-dbid-0bd8025e-c07c-454e-8017-bd046b061b88")}catch{}})();const d="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),P=()=>{const e=C(),r=I(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),b=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>T(s)),w=$(),i=u(s=>g(s)),h=u(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(M(!0)))},[l,b,a]),B.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 j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,q,R)=>{s.endsWith(d)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(P,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as g}from"./liveblocks-it_Rhm8-.js";import{a as y}from"./sentry-C-hGmJ4T.js";import{j as w,h as A,u as C,l as T,g as b,k as E}from"./core-BF8mCLAO.js";import{ME as R,Mo as U,Cd as x,Cm as _,Ck as S,Cl as h,MF as k}from"./zeni-epic-state-Ds1G4QGX.js";import{z as B,h as V,r as F,bw as j,aa as O}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.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]="87690c36-06c9-4b7e-9fa3-360c7b44140b",e._sentryDebugIdIdentifier="sentry-dbid-87690c36-06c9-4b7e-9fa3-360c7b44140b")}catch{}})();function $(e){return k(e)==null}const M=E(function(e,a){const t=R(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 D=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=D.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("../")}}})(j);function H(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=B.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>U(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(F,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|