@zeniai/web-app-ui 5.1.26-qa → 5.1.27-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-BEx7pIyJ.js +1 -0
- package/dist/assets/{AddressScreen-Dps-w1Sa.js → AddressScreen-NX75uxLP.js} +2 -2
- package/dist/assets/AiCfoScreen-CZb65z7d.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-C699yoIf.js → BillPayApprovalRoutes-DpviM7Hj.js} +1 -1
- package/dist/assets/{BillPayRoutes-B_jmsrni.js → BillPayRoutes-CEExTPhN.js} +17 -17
- package/dist/assets/BusinessVerificationPageScreen-BrTGOncN.js +9 -0
- package/dist/assets/ChargeCardRoutes-B1YXL7MO.js +71 -0
- package/dist/assets/CompanyPassportScreen-i0UsKfLm.js +1 -0
- package/dist/assets/ConnectionAuthScreen-C5vKD3w5.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CiW0f9pK.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-OE4wpozP.js +23 -0
- package/dist/assets/{DashboardRoutes-DYXQlmSB.js → DashboardRoutes-7xj8FEBo.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CpRE7___.js → DefaultTenantHome-ChjGBZYC.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-D6V50bQg.js +18 -0
- package/dist/assets/DrawerScreen-DJHmM0O7.js +1 -0
- package/dist/assets/EntityDetailRoutes-C4efmnJS.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-D9ixaUzm.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BAyL66YE.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BPiwWr2-.js +1 -0
- package/dist/assets/MagicLinkRoutes-cUIc5JL6.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-C33e3haJ.js +12 -0
- package/dist/assets/{MobileAppDrawer-BOy-szv4.js → MobileAppDrawer-CZdE1-bN.js} +1 -1
- package/dist/assets/NotFoundScreen-DX_llqMh.js +1 -0
- package/dist/assets/NotificationRoutes-DaXop-Kw.js +1 -0
- package/dist/assets/OAuthConsentScreen-pOZW-eNU.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Co54bj0J.js +1 -0
- package/dist/assets/{PeopleRoutes-cXSqv2P1.js → PeopleRoutes-9vWHHz2M.js} +5 -5
- package/dist/assets/PerformanceRoutes-sQeICA2b.js +1 -0
- package/dist/assets/{Preview-Co7v0DAd.js → Preview-BcqiqhZQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CZn0CzWI.js → QBOConnectionScreen-CfgNXch3.js} +1 -1
- package/dist/assets/ReferralListScreen-fPRYSLID.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-FiPJZbl-.js → ReimbursementApprovalRoutes---hNOkvq.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DxDFeMjQ.js → ReimbursementApprovalRuleDetailScreen-Dyn7RSI8.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-iHn99P-N.js → ReimbursementRoutes-BYrKyLZ5.js} +9 -9
- package/dist/assets/{ReportsRoutes-BJsMusqx.js → ReportsRoutes-CUKyDjF3.js} +1 -1
- package/dist/assets/RewardsRoutes-CaV3J1uX.js +1 -0
- package/dist/assets/ScreenRoutes-BFQCZFGJ.js +2 -0
- package/dist/assets/{SettingsRoutes-oPPfz0yw.js → SettingsRoutes-CkJ075Ax.js} +8 -8
- package/dist/assets/{SetupPagesScreen-DsWBsj_S.js → SetupPagesScreen-XTexjMJo.js} +5 -5
- package/dist/assets/SignInScreen-pvkgtVi3.js +1 -0
- package/dist/assets/SignOutScreen-Cbyp-03M.js +9 -0
- package/dist/assets/TaskListScreen-D710Rpak.js +9 -0
- package/dist/assets/TaskRoutes-COd2p3oz.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-6f67vhWs.js → TransactionDetailRoutes-WDvIYLwr.js} +1 -1
- package/dist/assets/TransactionDetailScreen-BGtmtzWU.js +5 -0
- package/dist/assets/{TransactionListRoutes-AHD9rIHD.js → TransactionListRoutes-CYIV6Wye.js} +1 -1
- package/dist/assets/TreasuryRoutes-DGqpKuqj.js +37 -0
- package/dist/assets/{VendorsRoutes-CIru2JcE.js → VendorsRoutes-MGXSfJTY.js} +27 -27
- package/dist/assets/WiseConfirmationScreen-CaHgXzgN.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-D578Oh7m.js → ZeniAccountRoutes-Bk5y1BRP.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-BWYeePA_.js +9 -0
- package/dist/assets/{accountMappingHelper-BbUNiO4D.js → accountMappingHelper-spXTehHl.js} +1 -1
- package/dist/assets/{analytics-DAPZ8UkE.js → analytics-D1kzjJGV.js} +1 -1
- package/dist/assets/{analyticsHelper-DkqHV9MS.js → analyticsHelper-MLU40ae_.js} +1 -1
- package/dist/assets/{core-BQFH-fG_.js → core-Csep4njy.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-FTPGDiF3.js → decodeURIComponentSafe-C5ifH7fM.js} +1 -1
- package/dist/assets/{dnd-B3Cb0yFb.js → dnd-Cjdb2KWD.js} +1 -1
- package/dist/assets/{empty-CCdqFUNi.js → empty-DUEvEoMc.js} +1 -1
- package/dist/assets/{empty-BhjonfxI.js → empty-D_3geiNL.js} +1 -1
- package/dist/assets/{emptyVideoElement-C74DZm73.js → emptyVideoElement-Wm2X1tw3.js} +1 -1
- package/dist/assets/epic-DeTdbD7V.js +2 -0
- package/dist/assets/getLocaleForTenant-BVJn38ps.js +1 -0
- package/dist/assets/{index-BgqVo229.js → index--68azm8o.js} +2 -2
- package/dist/assets/{index-Dwk8MdkZ.js → index-BhYWNhjL.js} +1 -1
- package/dist/assets/{index-D3gRohM1.js → index-Bkr1b7Ol.js} +1 -1
- package/dist/assets/{index-YS7LSrzH.js → index-BmlRyOVO.js} +1 -1
- package/dist/assets/{index-Bqg0NLiJ.js → index-Brq6QGrX.js} +1 -1
- package/dist/assets/{index-BXu263au.js → index-CNDQ8F1I.js} +1 -1
- package/dist/assets/{index-DW_f1QJQ.js → index-Cz7ZsetT.js} +1 -1
- package/dist/assets/{index-DAJNLQVj.js → index-Dccod20C.js} +13630 -13431
- package/dist/assets/{lexical-DynK9JnD.js → lexical-wVYu_9-d.js} +1 -1
- package/dist/assets/{liveblocks-DnYW4p-1.js → liveblocks-DAjhbt80.js} +1 -1
- package/dist/assets/{lottie-BI7v3w73.js → lottie-DYZ-hqab.js} +1 -1
- package/dist/assets/{mui-6mK3ua6E.js → mui-BwrnAXoT.js} +1 -1
- package/dist/assets/{pathToGoBack-CvX5reKt.js → pathToGoBack-odCpMm49.js} +1 -1
- package/dist/assets/{pdf-DtE7k_wa.js → pdf-Cc8ZGklh.js} +4 -4
- package/dist/assets/{pdf-lib-CkuBIllJ.js → pdf-lib-jdfyLvIR.js} +1 -1
- package/dist/assets/{plaid-qfqRxaag.js → plaid-BKdRBTqL.js} +1 -1
- package/dist/assets/{pusher-BbXyQD1M.js → pusher-BUjJSsoy.js} +1 -1
- package/dist/assets/{react-Mz05y32W.js → react-BrtFI20B.js} +1 -1
- package/dist/assets/{react-Nj8kNdFS.js → react-C4jn9LlB.js} +1 -1
- package/dist/assets/{react-5YXauGmt.js → react-CZYvjgmH.js} +1 -1
- package/dist/assets/{react-CuOw1j25.js → react-DLx9jDCf.js} +1 -1
- package/dist/assets/{react-DSMpXhfr.js → react-DbE9JPRz.js} +1 -1
- package/dist/assets/{react-BFVcZZOu.js → react-Dn4PiCyS.js} +1 -1
- package/dist/assets/{recharts-CI0D2Tbj.js → recharts-D7BeuhCa.js} +1 -1
- package/dist/assets/{routePaths-zO9L3kzJ.js → routePaths-DiDc2DBY.js} +1 -1
- package/dist/assets/{sentry-DaKeBrSN.js → sentry-BchnSYMz.js} +1 -1
- package/dist/assets/{url-D5dmOsin.js → url-DFsuq-eL.js} +1 -1
- package/dist/assets/{url-CtNDkGG_.js → url-UFdKDvUl.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D_4gi03n.js → useAiCfoDashboardSuggestedQuestionsChips-CFwAZJWa.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CR3Kbk6n.js +1 -0
- package/dist/assets/{useDeviceId-B0EbDUDU.js → useDeviceId-C6SeJyTl.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DdGVicw1.js → useInitialThreadRequest-C5nc3ybP.js} +1 -1
- package/dist/assets/{utils-ypIEo-Nu.js → utils-aai5Jslk.js} +1 -1
- package/dist/assets/withTransactionSidePanel-B8L5PzVM.js +21 -0
- package/dist/assets/{zeni-epic-state-BAtVrn2l.js → zeni-epic-state-B_XLk_Px.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +11 -6
- package/dist/assets/AddressRoutes-C5z7aThH.js +0 -1
- package/dist/assets/AiCfoScreen-DCx0xhxZ.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-B93ovLXv.js +0 -9
- package/dist/assets/ChargeCardRoutes-BjzMHtf-.js +0 -71
- package/dist/assets/CompanyPassportScreen-BtCmSOhL.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DvvRMktn.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-B02nk7NU.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-BgV3Ywve.js +0 -23
- package/dist/assets/DomesticWireDetailScreen-Dim3H7hW.js +0 -18
- package/dist/assets/DrawerScreen-Zl5iUHN2.js +0 -1
- package/dist/assets/EntityDetailRoutes-2ToQ-PxA.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-CCzkh7Kp.js +0 -25
- package/dist/assets/FeaturePreviewScreen-BbqD4Bts.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-C9uvk8cq.js +0 -1
- package/dist/assets/MagicLinkRoutes-DDfENhin.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BtgqsnwV.js +0 -12
- package/dist/assets/NotFoundScreen-B7WJWy8d.js +0 -1
- package/dist/assets/NotificationRoutes-BR8CGEdy.js +0 -1
- package/dist/assets/OAuthConsentScreen-CIkNmP4t.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Bt_Qf5jN.js +0 -1
- package/dist/assets/PerformanceRoutes-Sz-hKroj.js +0 -1
- package/dist/assets/ReferralListScreen-DX_12LsC.js +0 -5
- package/dist/assets/RewardsRoutes-y74gXpju.js +0 -1
- package/dist/assets/ScreenRoutes-DLCPKAGX.js +0 -2
- package/dist/assets/SignInScreen-CYjB5nt-.js +0 -1
- package/dist/assets/SignOutScreen-Cv1NVkZK.js +0 -9
- package/dist/assets/TaskListScreen-FsK8ANL_.js +0 -9
- package/dist/assets/TaskRoutes-DpMV3zKd.js +0 -9
- package/dist/assets/TransactionDetailScreen-DaprpGui.js +0 -5
- package/dist/assets/TreasuryRoutes--1kmPJfR.js +0 -37
- package/dist/assets/WiseConfirmationScreen-2Lfbesew.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-qp3Z3vYC.js +0 -9
- package/dist/assets/epic-DulUzlUc.js +0 -2
- package/dist/assets/getLocaleForTenant-DHjgfN6C.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BGvRON95.js +0 -1
- package/dist/assets/withTransactionSidePanel-Ci9yGR5x.js +0 -21
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{j as S}from"./liveblocks-DAjhbt80.js";import Bn from"./NotFoundScreen-DX_llqMh.js";import{a,b as xt}from"./sentry-BchnSYMz.js";import{n as Fe,S as _n}from"./mui-BwrnAXoT.js";import{u as de,h as Pt,g as qe,j as A,n as Vn,i as dt,o as zn,p as je}from"./core-Csep4njy.js";import{eQ as Re,Qh as On,n5 as ke,fk as Mn,qT as jn,nn as Rt,nI as Dt,Qi as Ut,nS as Ln,Qj as Ft,ng as Qn,qp as $n,f4 as fe,Qk as De,sS as Bt,Cc as _t,Ql as Vt,Qm as qn,pZ as Ge,LQ as ut,LS as Gn,jK as Jn,LT as Nn,jR as Kn,cV as Yn,u3 as Je,nt as zt,nX as Ue,Qn as Hn,KJ as mt,KI as we,Qo as pt,k6 as Zn,Qp as Wn,Qq as Xn,Qr as ea,Qs as ta,nA as na,nl as ue,n_ as xe,Qt as aa,Qu as oa,Qv as sa,o5 as ca,jV as ia,jM as la,Qw as ra,jU as ht,L_ as da,Qx as ua,Qy as ma,pV as pa,px as ha,nY as le,pw as Le,Qz as ga,QA as Ca,QB as Sa,lp as Ia,bq as fa,lk as gt,l6 as ka,QC as Ea,gU as Ct,fV as ya,lh as ba,vZ as va,QD as Ta,ow as Aa,or as wa,ov as xa,og as Pa,QE as Ra,f7 as Ot,nL as Da,nw as Ua,fl as St,o0 as Fa,QF as Ba,QG as _a,nZ as Mt,QH as Va,QI as za,QJ as Oa,QK as Ma,QL as It,q5 as ja,pn as La,KH as Qa,QM as $a,QN as qa,jT as Ga,QO as Ja,GK as Na,jS as Ka,jH as Ya,f6 as Ha,oX as jt,pf as Za,nW as ft,n$ as Wa,bE as Xa,le as eo,lb as to,QP as no,of as kt,pd as Et,pb as ao,p0 as oo,oH as so,pe as co,QQ as io,QR as lo,oL as ro,QS as uo,oB as mo,oK as po,oI as ho,pi as go}from"./zeni-epic-state-B_XLk_Px.js";import{n as Lt,c as re,d as M,v as W,Y as Qt,_ as $t,cE as Co,z as Be,cF as So,at as Pe,cG as Io,aT as yt,B as qt,cH as fo,aq as Qe,D as ko,cI as Eo,a2 as yo,cJ as bo,W as vo,cK as To,cL as Ao,x as wo,S as xo,aN as Po,b7 as Ro,F as Do,cM as Uo}from"./index-Dccod20C.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{c as bt,C as Fo}from"./TransactionDetailScreen-BGtmtzWU.js";import{w as Bo}from"./withTransactionSidePanel-B8L5PzVM.js";import{h as _o,v as Vo}from"./routePaths-DiDc2DBY.js";import{g as $e}from"./accountMappingHelper-spXTehHl.js";import{D as zo}from"./DrawerScreen-DJHmM0O7.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./decodeURIComponentSafe-C5ifH7fM.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]="0c6714cb-4bc2-4de7-994f-5d6e5b36dc6c",t._sentryDebugIdIdentifier="sentry-dbid-0c6714cb-4bc2-4de7-994f-5d6e5b36dc6c")}catch{}})();const Oo=()=>{const t=de(),l=Pt(),w=qe(),f=A(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=A(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=A(d=>On(d,f.tenantId)),{isAiCfoAccessEnabled:y,onAskAiCfoClick:C}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,U,K=!1)=>{t(ke({tenantId:U,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),b=a.useCallback(d=>{const U=w.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,U??null),t(Mn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=w.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p=W(w.state?.pathnameStackToGoBack,w.pathname),x=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(U=>U.progress<100);if(d!=null)return void l(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview"}});l(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Qt();return $t({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(jn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=w.state?.referrer;M.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Mo,{children:S.jsx(Co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{l(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:b,handleReviewButtonClick:x,onBackClick:()=>{l("../../dashboard")},onReload:_,isAiCfoAccessEnabled:y,onAskAiCfoClick:C})})},Mo=Fe.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
|
+
`,jo=xt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:w,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=de(),u=Be.getSignedInUser(),o=A(e=>Re(e)),y=t.excludedAccountIDs,C=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:b,statementUploadChosen:r}=t,_=m[l],p=_?.accountReconEntity.statementMetaData?.statementUploadId,x=(e,n)=>{g($n(e,n.split(".")[0]))},I=e=>{p!=null&&g(Qn({accountId:l,selectedPeriod:b,fileId:e,statementUploadId:p}))},d=()=>{g(Ut({statementUploadChosen:!1}))},U=e=>{g(Ln({accountId:l,selectedPeriod:b,payload:e}))},K=e=>{g(Ft({accountId:l,selectedPeriod:b,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(Rt({accountId:l}))},[g,l]),V=a.useCallback(()=>{g(Dt({accountId:l}))},[g,l]),F=y.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return _!=null?S.jsx(vt,{children:S.jsx(Tt,{children:S.jsx(So,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:_,monthYearPeriod:b,onDismissClick:w,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:x,onDeleteFile:I,onSelectSourceType:K,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:C,openFilePicker:r,onStatementUploadSuccess:U,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):F!=null?S.jsx(vt,{children:S.jsx(Tt,{children:S.jsx(Io,{excludedAccountReconciliation:F,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:V})})}):null}),vt=Fe.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
`,Tt=Fe.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 Lo({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:w,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=A(u=>qn(u,t,E));return a.useEffect(()=>{f()},[]),S.jsx(S.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(qt,{fetchState:"In-Progress"}):S.jsx(fo,{onCloseClick:l,addCustomerRequest:w,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const Qo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:$o,comma:At,space:qo}},dateFormat:Jt}=ko.getLocalizedStrings(),wt=go,Go=Vn(function(t,l){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:y}=l,C=Be.getSignedInUser(),m=t.tenantState.currentTenantId,b={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m??""},r=fe(t),{selectedTransactionCategorizationTab:_}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:b,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${yo}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:_,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:w,companyId:u,isTransactionActivityEnabled:y}},function(t,l){const{themeState:w,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:y,expenseAutomationViewSelector:C,currentTenant:m,uncategorizedAccounts:b,navigate:r,onClickCustomerRequest:_,handleEditClick:p,setActivityLogTransactionId:x}=l,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:U}}=C,{accountSettingsView:K}=C.jeSchedules,te=zt(I),V=Ue(te.start),F=Ue(te.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{M.trackMissingReceiptAttached(I.month,I.year),t(La(e))},onUploadTransactionReceipt:(e,n,c,i,k,h)=>{t(It(e,n,{fetchState:"In-Progress"}));const v=()=>t(It(e,n,{fetchState:"Error"}));bo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,h,n,c,i,k).then(P=>{P!=null?t(ja(e,P)):v()}).catch(v)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ma(e,n)),m!=null&&t(ke({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(Oa(e,{fetchState:n,error:c})),c!=null&&t(Ct({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?qo+$o+i+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(za(e))},onUpdateMissingReceiptsUIState:e=>{t(Va(e))},onFetchMissingReceiptsList:()=>{F!=null&&V!=null&&t(Mt({start:V,end:F},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(ho(e))},onBulkUploadProgress:e=>{t(po(e))},onBulkUploadSuccess:e=>{t(mo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(uo(e))},onConfirmBulkUploadMatch:(e,n,c,i,k)=>{t(ro(e,n,c,i,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(lo())},onSetBulkUploadResultsTab:e=>{t(io(e))},onSetBulkUploadCompletedSubTab:e=>{t(co(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Et({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(so())},onSearchTransactionsForManualMatch:(e,n)=>{t(wt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(wt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(oo(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(ao())},onResetBulkUploadSort:()=>{t(Et({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(_a())},onSearchTextChanged:e=>{const n=C.currentSelectedView,c=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Le({selectedTab:c,uiState:{searchString:e}})),F!=null&&V!=null&&t(le(c,{start:V,end:F},!0,!1,e,void 0,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(Ba({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(Fa(g))},onClose:()=>{d==="reconciliation"&&U!=null&&t(St({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&U!=null&&t(St({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Ua(e))},onSaveReconciliationReview:e=>{t(Da(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,c=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:C.currentSelectedView}}),t(Ot(e))},handleLogOutClick:()=>{const e=W(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:k}=n,h=$e(K.prepaidExpensesAccountList,c.selectedOptions),v=$e(K.fixedAssetsAccountList,i.selectedOptions),P=$e(K.accruedExpensesAccountList,k.selectedOptions),z={selectedPrepaidExpensesAccountIds:h.map(R=>R.accountId),selectedFixedAssetsAccountIds:v.map(R=>R.accountId),selectedAccruedExpensesAccountIds:P.map(R=>R.accountId)};t(Ra({data:z}))},onSaveJeAccountSettingsClick:()=>{t(Pa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:k,scheduleExpenseCategory:h,vendor:v}=n,{allAccountList:P,allClassList:z,allDepreciationAccountList:R}=C.jeSchedules,L=y.entityAutoCompleteView.vendor.length>0?y.entityAutoCompleteView.vendor.find(Q=>Q.id===v?.selectedOption):void 0,ne={id:L?.zeniId??v?.selectedOption??"",name:L?.name??v?.defaultOptions.find(Q=>Q.value===v?.selectedOption)?.label??"",logo:L?.logo},ae=h?.selectedOption!=null?P.find(Q=>Q.qboId===h.selectedOption):void 0,Ee=k?.selectedOption!=null?z.find(Q=>Q.classId===k.selectedOption):void 0,oe=i?.selectedOption!=null?R.find(Q=>Q.qboId===i.selectedOption):void 0;t(xa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:ae?.accountId,updatedClassId:Ee?.classId,updatedAccumulatedDepreciationCategoryID:oe?.accountId,updatedVendor:{id:ne.id,name:ne.name}}}))},ignoreRecommendedJeSchedule(e,n){t(wa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(mt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Aa({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ta())},handleJeScheduleClick:(e,n,c)=>{t(va({selectedJEScheduleKey:n}));const i=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(ba(e,m.companyId,m.tenantId))},onClickCustomerRequest:_,setActivityLogTransactionId:x,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(ya())},onOpenFileAttachmentSnackBar:()=>{t(Ct({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ea(e))},onUpdateFileAttachment:e=>{t(ka({files:e}))},previewMonthEndReport:(e,n,c,i)=>{m!=null&&t(gt(e,m.companyId,n,!0,c,i,m.tenantId))},saveMonthEndReport:(e,n,c,i)=>{m!=null&&t(gt(e,m.companyId,n,!1,c,i,m.tenantId))},onEditMonthEndInsightsClick:p,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:c,auditSummary:i}=C;m!=null&&i?.auditScorePercentage!=null&&(t(Ia(m.companyId,e,m.tenantId)),M.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,fa().format(Jt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,k,h,v,P,z,R,L,ne,ae)=>{t(Sa(e,n,c,i,b,k,h,v,P,z,R,L,ne,ae))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(pt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),F!=null&&V!=null&&(t(le(e,{start:V,end:F},!1,!1)),t(Ca(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),F!=null&&V!=null&&(t(ga(e)),t(le("autoCategorized",{start:V,end:F},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n})),F!=null&&V!=null&&t(le(e,{start:V,end:F},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,k,h,v)=>{F!=null&&V!=null&&t(le(e,{start:V,end:F},!0,c,n,i,k,h,v))},resetTransactionCategorizationLocalData:(e,n,c,i,k,h,v,P)=>{t(ha(e,n,c,i,P??null,k,h,!1,v))},updateSelectedVendorForTransaction:(e,n,c,i,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:b,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=o.state?.referrer;e==="autoCategorized"?M.trackTransactionsAutoCategorisedPage(I.month,I.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):M.trackTransactionsReviewPage(I.month,I.year,C.transactionView.totalCountByTab.review,n.length,!1,i??null),t(pa(e,n,c,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(ma({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,k,h,v)=>{const{transactionId:P,transaction:z,lineIds:R}=n;h!=null&&t(da({transactionId:P,customerUpdates:h})),t(ua({selectedTab:i,transactionId:P.id,lineId:R[0],selectedTransaction:z,uncategorizedAccounts:b,updatedCustomer:h,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:v})),k!=null&&t(Je({entity:k,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:E,isUncategorizedExpenseCategoryEnabled:v}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,k,h,v)=>{const{transactionId:P,transaction:z,lineIds:R}=n;h!=null&&(t(ia({transactionId:P,vendorUpdates:{name:h.name,id:h.id?h.id:void 0}})),t(la({vendorId:h.id?h.id:void 0,localData:{vendorName:h.name,vendorId:h.id?h.id:void 0}}))),h?.id?(t(ht({selectedTab:i,transactionId:P.id,lineId:R[0],selectedTransaction:z,uncategorizedAccounts:b,updatedVendor:h,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:v})),k!=null&&t(Je({entity:k,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:E,isUncategorizedExpenseCategoryEnabled:v}))):t(ra({selectedTab:i,transactionId:P.id,lineId:R[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(I,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{M.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(ca(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(sa(e))},updateOperatingExpensesIdsForReview:e=>{t(oa({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=Vo(e.id,e.qboId,l.tenantEmailDomain),c=W(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(aa({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(ue(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Bt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=m?.companyId;c!=null&&(t(_t(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Vt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ft({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Ut({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ue(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(na({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(ta({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ea({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(Xn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Zn(i)),t(Wn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ge("bill"));const n=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(pt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(mt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Hn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Rt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Dt({accountId:e}))}}},(t,l,w)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=w;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(y,C,m,b,r)=>{u.onUploadTransactionReceipt(y,C,m,b,r,g.authParams)}}}(t,l,E)})(Eo),Jo=Bo(function(t){const l=t.displayName??t.name??"Component",w=xt.memo(t),f=E=>{const g=de(),u=function(){const x=de(),I=A(d=>fe(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{x(De({selectedDrawerAccountId:d}))},[x]),closePanel:a.useCallback(()=>{x(De({selectedDrawerAccountId:void 0}))},[x])}}(),o=A(x=>fe(x).reconciliation),y=A(x=>Re(x)),C=a.useCallback((x,I)=>{g(Bt("expense_automation_reconcile",x,I))},[g]),m=a.useCallback((x,I)=>{const d=y?.companyId;d!=null&&(g(_t(x,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(Vt({accountId:I,connectionInProgress:!0})))},[g,y?.companyId]),b=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return S.jsx(jo,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,C,m]),r=a.useMemo(()=>({reconPanelContent:b,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[b,u.isOpen,u.closePanel]),_=a.useContext(yt),p=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:_,[u.isOpen,u.closePanel,u.selectedAccountId,_]);return S.jsx(yt.Provider,{value:p,children:S.jsx(w,{...E,...r})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:w,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:y,setIsAiCfoOpen:C}=vo(),m=To(),{isOpen:b}=Ao(),r=Pt(),_=qe(),p=de(),{isAiCfoAccessEnabled:x,onAskAiCfoClick:I}=Gt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:U}=Qt(),K=(()=>{const s=A(N=>fe(N)),O=qe(),{currentSelectedViewFetchState:J,currentSelectedView:$,selectedPeriod:T}=s,Ie=Qe($),ve=Qe(J.fetchState),Z=a.useCallback(N=>{const Y=O.state?.referrer;$==="transaction_categorization"&&(s.selectedTransactionCategorizationTab==="review"?M.trackTransactionsReviewPage(T.month,T.year,s.transactionView.totalCountByTab.review,0,N,Y??null):M.trackTransactionsAutoCategorisedPage(T.month,T.year,s.transactionView.totalCountByTab.autoCategorized,0,N,Y??null)),$==="missing_receipts"&&M.trackMissingReceiptsPage(T.month,T.year,N,s.missingReceipts.transactions.length,Y??null),$==="je_schedules"&&M.trackMonthCloseScheduleListPage(T.month,T.year,N,s.jeSchedules.draftSchedules.length,s.jeSchedules.resolveSchedules.length,Y??null),$==="flux_analysis"&&M.trackFluxAnalysisPage(T.month,T.year,N,Qo(s.fluxAnalysis),Y??null),$==="month_end_insights"&&s.auditSummary?.auditScorePercentage!=null&&M.trackInsightsEmailPage(T.month,T.year,N,"draft",s.auditSummary.auditScorePercentage,null,Y??null)},[T,s]);return a.useEffect(()=>{ve===J.fetchState&&$===Ie||J.fetchState!=="Completed"||Z(!1)},[$,J.fetchState,Ie]),Z})(),te=wo(),[V,F]=a.useState(!1),e=A(s=>ut(s)),n=A(s=>Re(s)),[c,i]=a.useState(!1),[k,h]=a.useState(!1),[v,P]=a.useState([]),[z,R]=a.useState(void 0),L=a.useCallback(s=>{s!=null&&(y&&C(!1),m(),d()),R(s)},[d,y,m,C]),ne=a.useCallback(()=>{m(),R(void 0),d(),I()},[d,I,m]),ae=a.useRef(y);a.useEffect(()=>{y===!0&&ae.current===!1&&(m(),R(void 0),d()),ae.current=y},[d,y,m]);const Ee=a.useRef(b);a.useEffect(()=>{b===!0&&Ee.current===!1&&(y&&C(!1),R(void 0),E===!0&&f!==!0&&t?.()),Ee.current=b},[t,b,y,C,f,E]);const oe=E===!0&&f!==!0,Q=a.useRef(oe);a.useEffect(()=>{oe&&!Q.current&&(y&&C(!1),m(),R(void 0)),Q.current=oe},[y,oe,m,C]);const[Ne,Nt]=a.useState(!1),Ke=a.useRef(!1),{selectedTab:Ye}=dt(),{tenantEmailDomain:Kt}=dt(),[_e,He]=a.useState(_.state?.message==="comingFromTransactionDetail"),Ze=_.state?.message==="comingFromOverview",Yt=xo(),Ve=Be.getSignedInUser(),{useDynamicConfig:Ht,useFeatureGate:me}=Lt(),{configValue:Zt}=Ht(Po.enableUncategorizedExpenseCategory),H=Zt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:We}=me(re.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:pe}=me(re.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=me(re.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=me(re.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Xt}=me(re.isProjectsTransactionsEnabled),en=a.useCallback(s=>{const O=Ge(s.view==="reconciliation"?"bill":"expense");l?.(s.entityId,O)},[l]),tn=A(s=>Qa(s,"common")),j=A(s=>fe(s)),{categoryOptions:nn,paymentAccountNames:an}=A(s=>$a(s.accountState)),on=A(s=>qa(s.classState)),{monthEndCloseChecksView:G,currentSelectedView:D,selectedPeriod:B,selectedTransactionCategorizationTab:se,currentSelectedViewBackgroundRefreshFetchState:sn,currentSelectedViewFetchState:X,jeSchedules:ze,reconciliation:cn}=j;a.useEffect(()=>{D==="transaction_categorization"&&E!==!0||L(void 0)},[D,L,E]);const ye=a.useRef(null);a.useEffect(()=>{ye.current!==null?ye.current!==se&&(ye.current=se,D==="transaction_categorization"&&L(void 0)):ye.current=se},[D,se,L]);const ln=A(s=>z==null?void 0:Ga(s.transactionState,z)),ce=ln?.qboId,rn=A(s=>ce==null?void 0:Ja(s,ce));a.useEffect(()=>{ce!=null&&p(Na(ce))},[p,ce]);const{selectedAccountId:he}=cn,et=Qe(ze.accountSettingsView.saveState.fetchState),dn=A(s=>Ka(s.accountState,s.accountListState,"accountList")),un=A(s=>Ya(s)),ge=Ye!=null?Ha(Ye):D,mn=A(s=>s.entityAutoCompleteState.autoCompleteText.common);if($t({isDataReady:X.fetchState==="Completed"}),Ve==null)throw Error("Can't access expense automation screen without signing in...");const tt=zt(B),Ce=Ue(tt.start),Se=Ue(tt.end);if(Ce==null||Se==null)throw Error(`Invalid start - ${Ce} and end - ${Se} period from given ${B}`);const pn=a.useCallback(()=>{i(!1)},[]),hn=a.useCallback(()=>{h(!0)},[]),gn=a.useCallback(s=>{P(s),h(!1)},[]),Cn=a.useCallback(()=>{P([])},[]),be=j.missingReceipts.bulkUpload.phase,nt=j.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{pe===!0&&D==="missing_receipts"&&be==="matching"&&nt!=null&&p(jt({cacheOverride:!0}))},[pe,D,be,nt,p]);const at=Ve?.userId,Sn=B.month,In=B.year,ot=n?.tenantId;a.useEffect(()=>{D==="missing_receipts"&&pe!==!1&&be==="idle"&&at!=null&&ot!=null&&p(Za())},[D,pe,be,at,ot,Sn,In,p]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?F(!0):F(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{ge!=null&&D!==ge&&p(Ot(ge))},[ge]),a.useEffect(()=>{Ne!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!U||(Nt(!0),p(ft(!1,!1,H)))},[Ne,X,U,H]),a.useEffect(()=>{!Ze&&U&&(p(ft(!1,!1,H)),p(ue(B,he,!1,!1)))},[B.month,B.year,U,H]);const st=a.useCallback((s=!1,O=!1)=>{const J={start:Ce,end:Se};switch(D){case"transaction_categorization":p(le(se,J,s,!_e,void 0,void 0,O,void 0,H)),He(!1);break;case"flux_analysis":p(xe(B,s,O,null));break;case"month_end_insights":if(O===!1){const $=new Date(B.year,B.month,0),T=Xa($.toDateString()).format(Jt.analytics.YYYYDashMMDashDDFormat);p(eo(!0,n.companyId,n.tenantId,T)),p(to(n.companyId,n.tenantId))}break;case"je_schedules":p(Wa(J,O));break;case"missing_receipts":p(Mt(J,{amount:75,currencyCode:"USD",currencySymbol:"$"},s,O));break;default:p(ue(B,he,s,O))}},[D,Ce,Se,n.companyId,n.tenantId,se,B,he,_e,He,H]);a.useEffect(()=>{D===ge&&X.fetchState==="Not-Started"&&U&&st(!0)},[X,Ce,Se,n.companyId,n.tenantId,U]),a.useEffect(()=>{Ze||_e||Ke.current||sn.fetchState==="In-Progress"||X.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),a.useEffect(()=>{G.fetchState!=="In-Progress"&&G.fetchState!=="Completed"&&p(ke({tenantId:n.tenantId,period:B,refreshViewInBackground:!1}))},[G.fetchState,n.tenantId]),a.useEffect(()=>{j.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[j.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{j.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&U&&(p(ke({tenantId:n.tenantId,period:B,refreshViewInBackground:!0})),p(no({companyId:n.companyId})),r("../"))},[j.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,B,n.companyId,U]),a.useEffect(()=>{const s=setInterval(()=>{G.fetchState!=="In-Progress"&&G.fetchState==="Completed"&&p(ke({tenantId:n.tenantId,period:B,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(s)},[G.fetchState,n.tenantId,B,p]),a.useEffect(()=>{const s=setInterval(()=>{D==="reconciliation"&&he==null&&j.reconciliation.fetchStatus.fetchState==="Completed"&&j.reconciliation.refreshStatus.fetchState!=="In-Progress"&&p(ue(B,void 0,!0,!0))},3e5);return()=>clearInterval(s)},[D,p,j.reconciliation.fetchStatus.fetchState,j.reconciliation.refreshStatus.fetchState,ue,he,B]);const fn=bt();a.useEffect(()=>{const s=(G.monthEndCloseChecks?.monthEndCloseCheckList.find(O=>O.id==="month_end_insights")?.isDisabled??!1)&&!We;D!=="month_end_insights"||!s&&G.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[D,G.monthEndCloseChecks]);const kn=u===!0?g:w,En=u===!0||E===!0,yn=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&ze.accountSettingsView.saveState.fetchState==="Completed"&&p(kt())},[et,ze.accountSettingsView.saveState.fetchState,kt]);const{transactionId:ct,onSaveVendor:bn,onSaveSuccess:vn,onCancel:Tn,vendorViewDetails:An}=(({expenseAutomationViewSelector:s,closeDrawerHandler:O,currentSelectedView:J,isUncategorizedExpenseCategoryEnabled:$})=>{const T=de();let Ie,ve,Z;const N=bt(),Y=s.transactionView;let it=()=>{};const{transactions:wn,selectedTransactionId:ie,selectedTransactionLineId:Te,transactionLocalData:xn}=Y;if(J==="transaction_categorization"){const Oe=xn.find(ee=>ee.transactionId===ie),q=wn.find(ee=>ee.id===ie),lt=Te!=null?Oe?.transactionReviewLocalData?.lineItemById[Te]:void 0,rt=lt?.account;ve=lt?.class?.classId,Ie=["Uncategorized Income","Uncategorized Expense"].includes(rt?.accountName??"")?void 0:rt?.accountId;const Rn=_o(ie,q?.typeOfTransaction);q!=null&&Rn&&(Z={id:ie,type:Ge(q.typeOfTransaction)}),it=()=>{if(ie!=null&&Te!=null&&q!=null){const ee=Y.transactionLocalData.find(Ae=>Ae.transactionId===ie)?.transactionReviewLocalData;if(ee!=null&&q.lines!=null&&q.lines.length>0){const Ae=ee.lineItemById[Te];let Me=ee.selectedEntity;if(Yn(q)||(Me=Ae.selectedEntityLine),Me!=null){const Dn=Me,Un={transactionId:{id:q.id,type:q.type},transaction:q,lineIds:q.lines.map(Fn=>Fn.id)??[]};T(Je({entity:Dn,amount:Ae.amount.amount,transactionDetails:Un,flowType:"categorization",selectedTab:s.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Pn=A(Oe=>ut(Oe,void 0,Ie,ve));return{transactionId:Z,onSaveVendor:()=>{T(Kn(Z,void 0,!1,!0))},onSaveSuccess:it,onCancel:()=>{Z!=null&&T(Gn({transactionId:Z})),T(Jn()),T(Nn()),O()},vendorViewDetails:Pn}})({expenseAutomationViewSelector:j,closeDrawerHandler:()=>{F(!1)},currentSelectedView:D,isUncategorizedExpenseCategoryEnabled:H});return Yt?.loggedInUserRoleMap==null?G.fetchState==="Error"?S.jsx(Ro,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(qt,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(zo,{isOpen:k,drawerLeftMargin:new Do(0,0,300,650),onClose:()=>{h(!1)},children:S.jsx(No,{onClick:s=>s.stopPropagation(),children:S.jsx(Lo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>h(!1),addCustomerRequest:gn,resetCustomerRequest:Cn})})}),ct!=null&&V&&S.jsx(Fo,{isOpen:V,transactionId:ct,onSaveVendor:bn,onSaveSuccess:vn,onCancel:Tn,vendorViewDetails:An}),S.jsx(Go,{navigate:r,location:_,themeState:te,categoryOptions:nn,classesForFilters:on,accountsForFilters:an,vendorSearchAutoCompleteData:{autoCompleteText:mn,entityAutoCompleteView:tn},expenseAutomationViewSelector:j,isMissingReceiptsBulkUploadEnabled:pe,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:v,isRealtimeInsightsFeatureEnabled:We,isUncategorizedExpenseCategoryEnabled:H,isAccountingClassesEnabled:un,isProjectsTransactionsEnabled:Xt,isCOTEnabled:fn,currentTenant:n,companyId:n.companyId,signedInUser:Ve,isTransactionActivityEnabled:Xe,activityLogTransactionId:D==="transaction_categorization"?z:void 0,activityLogPanel:D==="transaction_categorization"&&Xe===!0&&z!=null?S.jsx(Uo,{activityLogView:rn,qboId:ce,onClose:()=>L(void 0),selectedTransactionId:z},String(z)):null,uncategorizedAccounts:dn,onClickCustomerRequest:hn,handleEditClick:pn,tenantEmailDomain:Kt,trackExpenseAutomationTabAnalytics:K,setActivityLogTransactionId:L,closeSidePanel:yn,openTransactionPanel:l,sidePanelIsOpen:En,sidePanelIsFullView:u!==!0&&f,panelContent:kn,isAiCfoAccessEnabled:x,onAskAiCfoClick:ne,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:en,sidePanelListPercent:u===!0?66:void 0})]})})),No=Fe(_n)`
|
|
22
|
+
display: flex;
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
`;function Ss(){return S.jsxs(zn,{children:[S.jsx(je,{path:"*",element:S.jsx(Oo,{})}),S.jsx(je,{path:"/:selectedTab/:selectedPeriod/*",element:S.jsx(Jo,{})}),S.jsx(je,{path:"*",element:S.jsx(Bn,{})})]})}export{Ss as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{a3 as l,a4 as p,a5 as d,r as f}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import m from"./NotFoundScreen-DX_llqMh.js";import{h as u,g as b}from"./core-Csep4njy.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]="5300824e-7c2e-424f-a4a9-b633eae03cb4",e._sentryDebugIdIdentifier="sentry-dbid-5300824e-7c2e-424f-a4a9-b633eae03cb4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./sentry-BchnSYMz.js";import{u as l,h as f,g as m}from"./core-Csep4njy.js";import{gB as p,JW as g,JX as b}from"./zeni-epic-state-B_XLk_Px.js";import{u as _,L as h,z as y}from"./index-Dccod20C.js";import"./liveblocks-DAjhbt80.js";import"./recharts-D7BeuhCa.js";import"./mui-BwrnAXoT.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="2b092f06-11bd-4722-8e28-f2ba2dc9e72e",e._sentryDebugIdIdentifier="sentry-dbid-2b092f06-11bd-4722-8e28-f2ba2dc9e72e")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=_(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-DAjhbt80.js";import{i as S,n as x,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-Csep4njy.js";import{JP as k,JQ as v,JR as T,zP as B,zB as G,JS as z,JT as oe,JU as se,zF as ie,eX as $,zM as le,zJ as re}from"./zeni-epic-state-B_XLk_Px.js";import{m as g,o as r,p as de,d as j,i as J,q as ce,r as me,s as pe,v as M,n as ue,c as he,w as xe,x as ge,h as fe,y as be,B as we,A as Se,j as ye,C as ke,E as ve,F as je,G as $e}from"./index-Dccod20C.js";import{n as m}from"./mui-BwrnAXoT.js";import f from"./NotFoundScreen-DX_llqMh.js";import{a as I}from"./sentry-BchnSYMz.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="db2fbff6-24ee-427e-9bbb-29c463006445",e._sentryDebugIdIdentifier="sentry-dbid-db2fbff6-24ee-427e-9bbb-29c463006445")}catch{}})();const Ie=m.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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,ze=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:z(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(ze,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=x(function(e){const a=k(e),n=v(e),o=z(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=x(function(e){const a=k(e),n=v(e),o=z(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},Me=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,He=m.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
|
+
`,Ve=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Je.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,Ke=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.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
|
+
`,Ue=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),H=n.pathname.includes("address"),b=g(),V=ge(),D=fe(),w=be(),K=()=>{V.toggle()},U=E(u=>k(u)),W=E(u=>v(u)),{authParams:_,fetchState:c,billAttachment:Q,billFetchState:A,companyName:R,currencySymbol:X,amount:q}=U,{tenantId:P,userId:L,sessionId:N}=_,{fetchState:O,internationalBankAccountCreateStatus:Y}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(f,{}):O==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",We(n.pathname),X,q))(u)}),t.jsxs(He,{windowSize:b,children:[b!=="small"?t.jsx(Me,{onClick:K}):null,t.jsx(Ke,{windowSize:b,isAddressPage:H,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ue,{file:Q,type:"bill"})}),t.jsx(Ve,{windowSize:b,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(_e,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-DAjhbt80.js";import{a as f}from"./sentry-BchnSYMz.js";import{u as U,g as O,h as _,s as w,j as l,N as T}from"./core-Csep4njy.js";import{z as r,h as J,D as A,e as P,d as V,f as N,X,j as B,g as G}from"./index-Dccod20C.js";import{eQ as K,JA as Q,JK as R,JB as W,eX as $,fo as q,JG as H,fM as Y,cT as Z,JL as ee,JM as te}from"./zeni-epic-state-B_XLk_Px.js";import{n as ne}from"./mui-BwrnAXoT.js";import{u as se}from"./useDeviceId-C6SeJyTl.js";import{f as ae}from"./analyticsHelper-MLU40ae_.js";import{t as ie}from"./getLocaleForTenant-BVJn38ps.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="8b54294e-a203-4384-9c3f-cfd7a95f05bd",t._sentryDebugIdIdentifier="sentry-dbid-8b54294e-a203-4384-9c3f-cfd7a95f05bd")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=O(),m=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>K(e)),b=l(e=>Q(e)),E=r.getSignedInUser(),v=J().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(R(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(W(b.tenantsInOrder),s.zeniSessionId),$(s.userId,s.zeniSessionId,o.tenantId),t(q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=G();e!=null&&P(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.state,t]);const j=f.useCallback(()=>{m("/signin/auth")},[m]),F=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),M=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(X,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:M,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||I==="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??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(B,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{De as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-
|
|
1
|
+
import{j as U}from"./liveblocks-DAjhbt80.js";import{a as c}from"./sentry-BchnSYMz.js";import{u as pe,j as s,i as Qe,g as We,h as qe,l as M}from"./core-Csep4njy.js";import{eQ as he,f0 as Ke,f1 as Se,eU as Xe,bn as ea,eP as aa,f2 as ta,f3 as na,f5 as sa,f8 as oa,fh as ia,f9 as g,fb as ra,fc as ue,ff as da,fd as la,fe as ca,fg as ua,cJ as fa,fj as ma,cO as ba,bt as pa,eT as ha,fo as Sa,fp as ga,fn as Ea}from"./zeni-epic-state-B_XLk_Px.js";import{a7 as ka,a8 as Ca,x as ya,n as Ia,z as k,y as Ta,u as wa,c as r,a9 as Aa,aa as _a,S as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as xa,ag as Ma,ah as be,d as R,$ as Ra,v as A,ai as N,aj as Na}from"./index-Dccod20C.js";import{D as Ua}from"./mui-BwrnAXoT.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="a4a61b74-77b0-4807-8a88-9e6acd51b42f",f._sentryDebugIdIdentifier="sentry-dbid-a4a61b74-77b0-4807-8a88-9e6acd51b42f")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Qe(),a=We(),C=ya(),o=qe(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),P=k.getSignedInUser(),_=ea(P),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,O=s(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,H),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),W=Q||J&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,xe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:xe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,Q,J,w).fetchState),ie=s(e=>ca(e).fetchState),Pe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(Oe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,H,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Je=Ba(Ze);return U.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ga,{signedInUser:P,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Pe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:Je,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=q===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);be(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Ee(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ha=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Ke(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Ha as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-DAjhbt80.js";import{h as n,n as e}from"./core-Csep4njy.js";import{R as i}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import"./sentry-BchnSYMz.js";import"./zeni-epic-state-B_XLk_Px.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}catch{}})();const a=e(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-DAjhbt80.js";import lt from"./NotFoundScreen-DX_llqMh.js";import{a as k}from"./sentry-BchnSYMz.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as H}from"./core-Csep4njy.js";import{cr as St,f2 as K,eQ as Y,fg as bt,f9 as b,Qc as O,fc as d,f1 as y,rb as M,wA as It,Qd as Ct,f0 as Tt,fj as yt,rg as _t,Qe as $,bq as F,gU as x,rk as J,Qf as At,cC as Et,cw as Nt}from"./zeni-epic-state-B_XLk_Px.js";import{Y as Bt,z as wt,n as xt,c as Rt,_ as Ut,cB as vt,v as N,a7 as Dt,cC as Gt,a8 as Pt,r as $t}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="22f540c3-b81a-451a-acef-361e6e09d3a8",t._sentryDebugIdIdentifier="sentry-dbid-22f540c3-b81a-451a-acef-361e6e09d3a8")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Y(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:R}=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(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,R]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Y(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Ut({isDataReady:!0});const X=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),U=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:Q,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{G&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&q===!1&&w!=null&&Q!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=Q.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,W,C,z,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];U==="all"?A.push("read","unread"):U!=="mentions"&&A.push(U),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:X,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(H,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(H,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{u as A,g as j,j as o,N as C}from"./core-Csep4njy.js";import{JZ as P,eQ as x,f8 as z,J_ as D,J$ as M,K0 as R,K1 as J,mX as k,IV as K}from"./zeni-epic-state-B_XLk_Px.js";import{z as h,K as I}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="788647bf-2507-418b-9214-491acb6ea748",n._sentryDebugIdIdentifier="sentry-dbid-788647bf-2507-418b-9214-491acb6ea748")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo(()=>P(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>x(e)),l=o(e=>z(e)),d=o(e=>e.tenantState.fetchState),b=o(D),y=o(M),u=o(R),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(J())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=v??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(K(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-DAjhbt80.js";import{h as Y,u as z,g as Z,i as Q,j as d,n as H,o as J,p as I}from"./core-Csep4njy.js";import{eQ as U,q$ as P,qz as X,Kv as O,qu as S,bt as ee,bn as ae,bT as te,qv as se,Kw as oe,Kh as C,dE as re,ux as ne,Kx as ie,uU as ce,e$ as le,eZ as de}from"./zeni-epic-state-B_XLk_Px.js";import{z as me,Y as fe,_ as pe,S as ue,n as $,c as q,A as he,d as w,ao as ge,v as Fe}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import be from"./NotFoundScreen-DX_llqMh.js";import{F as Ie}from"./FeaturePreviewScreen-BAyL66YE.js";import{a as g}from"./sentry-BchnSYMz.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{u as Se}from"./useInitialThreadRequest-C5nc3ybP.js";import{t as Te}from"./routePaths-DiDc2DBY.js";import{M as ye}from"./MobileAppDrawer-CZdE1-bN.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="bddc45f4-741a-4362-849b-56699dd2039e",s._sentryDebugIdIdentifier="sentry-dbid-bddc45f4-741a-4362-849b-56699dd2039e")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(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 m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function R(){const s=Y(),e=z(),a=Z(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),M=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),k=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,v)=>L!=null?f.forecasts.findIndex(b=>b.id===L):v!=null?f.forecasts.findIndex(b=>b.id===v):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!k(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const D=ue(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=$(),{isFeatureEnabled:E}=G(q.isReportsCommentingEnabled),K=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[V,W]=g.useState(!1),j=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:j}),n.jsx(xe,{firstMonthOfFY:M,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:_,onAskAiCfoClick:B,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:K,onClickMenuIcon:()=>{j(!0)}})]})}function We(){const s=d(i=>U(i)),{useFeatureGate:e}=$(),{isFeatureEnabled:a}=e(q.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{We as PandLWithForecastRoutes,We as default};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{Kq as te,eQ as J,jH as G,e$ as Q,eZ as ne,HS as Y,K4 as oe,tu as Ee,Kr as N,ti as ke,tD as Ie,tx as ie,tm as re,tB as Pe,ty as je,Ks as le,vj as Te,Kt as ve,fC as Le,Ku as K,tr as de,tp as ce,tG as Fe,c2 as Ae}from"./zeni-epic-state-B_XLk_Px.js";import{m as pe,n as X,c as E,z,a9 as ue,H as me,ak as ge,al as Re,F as he,o as R,I as fe,D as Ce,am as Oe,Y as Ve,_ as Ue,A as Be,d as be,f as Ze,v as $e,an as Ke,S as He}from"./index-Dccod20C.js";import{D as ye,n as M,S as we}from"./mui-BwrnAXoT.js";import ae from"./NotFoundScreen-DX_llqMh.js";import{a as r}from"./sentry-BchnSYMz.js";import{u as ee,i as _e,j as m,h as Ge,g as ze,n as Me,o as se,p as $}from"./core-Csep4njy.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{M as qe}from"./MobileAppDrawer-CZdE1-bN.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="9d32be89-5604-47a8-a3a4-fc3368638236",a._sentryDebugIdIdentifier="sentry-dbid-9d32be89-5604-47a8-a3a4-fc3368638236")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=_e(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>G(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),v=ne(u),L=Y(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(L))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Qe=M(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,
|
|
5
|
+
`,Se=M(fe.H6Regular)`
|
|
6
6
|
margin-top: ${R.sp7};
|
|
7
7
|
padding-left: ${R.sp8};
|
|
8
8
|
padding-right: ${R.sp8};
|
|
9
9
|
color: ${a=>a.theme.colors.primary};
|
|
10
10
|
word-break: break-word;
|
|
11
|
-
`,De=
|
|
11
|
+
`,De=M(fe.LargeRegularSp)`
|
|
12
12
|
color: ${a=>a.theme.colors.hero};
|
|
13
13
|
padding-left: ${R.sp8};
|
|
14
14
|
padding-right: ${R.sp8};
|
|
15
15
|
margin-bottom: 30px;
|
|
16
16
|
margin-top: ${R.sp4};
|
|
17
17
|
white-space: pre-line;
|
|
18
|
-
`,
|
|
18
|
+
`,Ye={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>G(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),v=Y(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(we)`
|
|
19
19
|
display: flex;
|
|
20
20
|
min-height: 100%;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,aa=
|
|
22
|
+
`,aa=Me(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!Q(O,h)&&V,w=Y(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,v]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),v(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),v(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(K({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=He();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(q,{})}),s.jsx($,{path:"new",element:s.jsx(q,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(q,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import E from"./NotFoundScreen-DX_llqMh.js";import{a as r}from"./sentry-BchnSYMz.js";import{h as _,g as U,j as p,i as v,u as M,N as P,n as z,o as O,p as h}from"./core-Csep4njy.js";import{eQ as B,Qg as b,bo as F,bn as N,ho as Q,gU as V}from"./zeni-epic-state-B_XLk_Px.js";import{x as $,z as I,_ as q,cD as G}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{M as J}from"./MobileAppDrawer-CZdE1-bN.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="3a68279a-3585-495a-b8e8-0a8b20f0296b",e._sentryDebugIdIdentifier="sentry-dbid-3a68279a-3585-495a-b8e8-0a8b20f0296b")}catch{}})();const K=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=U(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:g}=v(),u=M(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),x=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(d),k=C||x||D,l=r.useCallback((a,i,T)=>{u(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),f=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),k?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:g,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${g}/dashboard`,replace:!0})};function fe(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-BchnSYMz.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-DAjhbt80.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BchnSYMz.js";import{L as dt,bT as Tc,eQ as Ac,JA as Rc,K2 as kl,c2 as Tl,fo as Al,fp as Rl}from"./zeni-epic-state-B_XLk_Px.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-aai5Jslk.js";import{r as un}from"./empty-DUEvEoMc.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-jdfyLvIR.js";import{r as Gl}from"./index-Brq6QGrX.js";import{r as zl}from"./index-CNDQ8F1I.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Csep4njy.js";import{u as Kl,z as Pc,L as Wl,N as Jl,O as Xl,i as Ql,d as tf}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import{d as Pe}from"./decodeURIComponentSafe-C5ifH7fM.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]="a57d4f09-fbc7-4e1f-906f-af26f54edf92",t._sentryDebugIdIdentifier="sentry-dbid-a57d4f09-fbc7-4e1f-906f-af26f54edf92")}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
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as o}from"./sentry-BchnSYMz.js";import{j as f,h as H,u as L,g as M,n as W}from"./core-Csep4njy.js";import{h as F,m as _,z as R,b9 as N,F as U,Y as $,_ as z,A as Q,d as l,f as X,a7 as Y,ba as q}from"./index-Dccod20C.js";import{f3 as G,eQ as J,MV as P,MW as K,un as Z,ud as g,f5 as ee,bO as ae,ui as re,MX as ne}from"./zeni-epic-state-B_XLk_Px.js";import{D as te,e as se,n as oe,S as ie}from"./mui-BwrnAXoT.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{M as de}from"./MobileAppDrawer-CZdE1-bN.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]="20a037b2-6aa8-484d-8394-cb838e30e83a",e._sentryDebugIdIdentifier="sentry-dbid-20a037b2-6aa8-484d-8394-cb838e30e83a")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=_();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>G(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(N,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,I="refer-and-earn-status-update",we=W(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([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(ne({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(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Y(q));function ve({isReferralDrawerOpen:e}){const a=H(),r=L(),n=M(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>J(t)),m=f(t=>P(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=K([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),r(g(!0)))},[b,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[p,r,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,V)=>{V.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(Q,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{ve as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-DAjhbt80.js";import x from"./NotFoundScreen-DX_llqMh.js";import{a as p}from"./sentry-BchnSYMz.js";import{h as D,g as I,u as C,j as u,N as A,n as E,o as k,p as c}from"./core-Csep4njy.js";import{eQ as T,NP as g,O3 as S,Dk as V,Ct as O,Dj as m,Da as U,Oj as _}from"./zeni-epic-state-B_XLk_Px.js";import{h as N,z as $,B,a7 as P,bQ as Q,af as W}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-Dyn7RSI8.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]="7eac3186-4608-46cf-bba3-7eea1996d184",e._sentryDebugIdIdentifier="sentry-dbid-7eac3186-4608-46cf-bba3-7eea1996d184")}catch{}})();const d="reimbursement-approval-rule-update",z=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{W(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(P(Q)),q=()=>{const e=D(),r=I(),a=C(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),j=N(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(O(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const w={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,F,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:j.colors.grey5}}):t.jsx(z,{currentTenant:o,location:r,navigate:e,...w})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(q,{})}),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 g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-DAjhbt80.js";import{a as y}from"./sentry-BchnSYMz.js";import{h as w,u as A,g as T,i as U,j as b,n as E}from"./core-Csep4njy.js";import{O3 as D,NP as C,Dd as x,Dm as _,Dk as S,Dl as h,O4 as B}from"./zeni-epic-state-B_XLk_Px.js";import{z as k,h as O,B as V,bH as j,af as F}from"./index-Dccod20C.js";import"./mui-BwrnAXoT.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]="fe0edc45-c983-4755-8467-b040758559c5",e._sentryDebugIdIdentifier="sentry-dbid-fe0edc45-c983-4755-8467-b040758559c5")}catch{}})();function N(e){return B(e)==null}const P=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const R=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!N(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function J(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=O(),r=b(p=>D(p)),i=b(p=>C(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(P,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{J as R,N as i};
|