@zeniai/web-app-ui 5.1.64-qa → 5.1.65-next
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-BdQLWfvH.js +1 -0
- package/dist/assets/{AddressScreen-ay95AjyT.js → AddressScreen-BozK15yt.js} +2 -2
- package/dist/assets/{AiCfoScreen-CNSskoeK.js → AiCfoScreen-DZrwMjo0.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DkRTzCH3.js → BillPayApprovalRoutes-CcXvE_6P.js} +1 -1
- package/dist/assets/{BillPayRoutes-AaRkKbnn.js → BillPayRoutes-Dq9jowgs.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BK-kRDjQ.js → BusinessVerificationPageScreen-BUrnSmpk.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-CNTdAWSK.js → ChargeCardRoutes-C5QNfb-k.js} +10 -10
- package/dist/assets/CompanyPassportScreen-BdPIC_-w.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-Ctz5ySya.js → ConnectionAuthScreen-DOMyC7mj.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-COsHB2W6.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-2jxeCtoH.js → CustomerOnboardingRoutes-BmkElBNt.js} +4 -4
- package/dist/assets/{DashboardRoutes-DKnI8ITO.js → DashboardRoutes-DfUGy9-8.js} +3 -3
- package/dist/assets/{DefaultTenantHome-DrzRK_A3.js → DefaultTenantHome-iEOFpSQn.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BpjCiEQT.js → DomesticWireDetailScreen-BPH8Jtu6.js} +3 -3
- package/dist/assets/DrawerScreen-CMWMoYEc.js +1 -0
- package/dist/assets/{EntityDetailRoutes-Ck3_JPiA.js → EntityDetailRoutes-So-0aZP_.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Bk7qpJQq.js → ExpenseAutomationRoutes-DMZc9KyA.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-S50T6GyD.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DlLZNfdx.js → HubSpotOAuthCallbackScreen-CptuMzhQ.js} +1 -1
- package/dist/assets/MagicLinkRoutes-DTBdj4Zk.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CW5hkUZb.js +12 -0
- package/dist/assets/{MobileAppDrawer-KB2L4yYh.js → MobileAppDrawer-DldLO-6R.js} +1 -1
- package/dist/assets/NotFoundScreen-CZOkBwPV.js +1 -0
- package/dist/assets/{NotificationRoutes-CUoWsLW6.js → NotificationRoutes-BKhbS8k6.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BPQmGtpr.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Czgtcgms.js +1 -0
- package/dist/assets/PeopleRoutes-CUNBrNW0.js +22 -0
- package/dist/assets/PerformanceRoutes-B0qLRBXn.js +1 -0
- package/dist/assets/{Preview-BGhmLxMi.js → Preview-DJ19A4g8.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BjBRgjPW.js → QBOConnectionScreen-C3UvKgvz.js} +1 -1
- package/dist/assets/ReferralListScreen-DnY4P7kZ.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-Dd6B4kce.js → ReimbursementApprovalRoutes-DQkq6CAm.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BLwUi-7g.js → ReimbursementApprovalRuleDetailScreen-BF8DQVP8.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BtesSDuB.js → ReimbursementRoutes-DqNFhRKw.js} +4 -4
- package/dist/assets/{ReportsRoutes-Ypov_XRg.js → ReportsRoutes-MymtFR4X.js} +1 -1
- package/dist/assets/RewardsRoutes-_tFm8OrJ.js +1 -0
- package/dist/assets/{ScreenRoutes-Bt5RxjsW.js → ScreenRoutes-rjnhZ90m.js} +2 -2
- package/dist/assets/{SettingsRoutes-d9SQJouF.js → SettingsRoutes-DH03Y1LE.js} +4 -4
- package/dist/assets/{SetupPagesScreen-UbKhsOme.js → SetupPagesScreen-CMUrA-9O.js} +1 -1
- package/dist/assets/SignInScreen-lTHQUPsf.js +1 -0
- package/dist/assets/SignOutScreen-Cjfsp_hG.js +9 -0
- package/dist/assets/{TaskListScreen-yP29eLKe.js → TaskListScreen-Du6U3Bqq.js} +2 -2
- package/dist/assets/TaskRoutes-B1BV3Yjl.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-DIIsxXoI.js → TransactionDetailRoutes-BcuU3I7Y.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DbVp_oOR.js → TransactionDetailScreen-BnKXBgyf.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BFm1xRNi.js → TransactionListRoutes-CIc-OAXw.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BQeFHsY5.js → TreasuryRoutes-VC40Nlfa.js} +5 -5
- package/dist/assets/{VendorsRoutes-BCP9sJSY.js → VendorsRoutes-ijSFUGkQ.js} +16 -16
- package/dist/assets/WiseConfirmationScreen-B1nYKBGZ.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-OW53QlAG.js → ZeniAccountRoutes-Yu3PGeHR.js} +7 -7
- package/dist/assets/{ZeniAccountStatementScreen-DStzdW01.js → ZeniAccountStatementScreen-rIx_ZwAx.js} +2 -2
- package/dist/assets/{accountMappingHelper-BY9t_bFx.js → accountMappingHelper-C0dAV06i.js} +1 -1
- package/dist/assets/{analytics-DW163hO6.js → analytics-D3aHsKWZ.js} +1 -1
- package/dist/assets/{analyticsHelper-C1JBjAI6.js → analyticsHelper-BkIvphjN.js} +1 -1
- package/dist/assets/{core-BYU75o8V.js → core-BUAuxzwZ.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-3IGQd7Vl.js → decodeURIComponentSafe-CxpsMKOn.js} +1 -1
- package/dist/assets/{dnd-BzfEm7I9.js → dnd-BMK4pBgf.js} +1 -1
- package/dist/assets/{empty-CVodrPUR.js → empty-BUiHKEcW.js} +1 -1
- package/dist/assets/{empty-YJQb3-X2.js → empty-DVnzMSU5.js} +1 -1
- package/dist/assets/{emptyVideoElement-CCQQOb7A.js → emptyVideoElement-Cer-m5J0.js} +1 -1
- package/dist/assets/{epic-Nyy58_dJ.js → epic-CCdGSjlK.js} +1 -1
- package/dist/assets/getLocaleForTenant-B6mgwDIb.js +1 -0
- package/dist/assets/{index-etDo2Eg5.js → index-BVdxKjjO.js} +1 -1
- package/dist/assets/{index-CT-SvzqM.js → index-CDID1VUD.js} +1 -1
- package/dist/assets/{index-DTeE9HW6.js → index-CTk86Gt2.js} +1 -1
- package/dist/assets/{index-BpRPgE_1.js → index-CmaFBJeL.js} +1 -1
- package/dist/assets/{index-Dx7rMgzH.js → index-D47uMLVF.js} +1 -1
- package/dist/assets/{index-CTd0IcDC.js → index-DYzN1z_e.js} +11072 -11076
- package/dist/assets/{index-9RSiem2N.js → index-FiCoVnm6.js} +1 -1
- package/dist/assets/{index-X9jJEgSP.js → index-gpV7iPA6.js} +2 -2
- package/dist/assets/{lexical-a4Oisgnk.js → lexical-CO-dwuMV.js} +1 -1
- package/dist/assets/{liveblocks-DpbFof4_.js → liveblocks-Bb1kgpY0.js} +1 -1
- package/dist/assets/{lottie-DkmqGRq5.js → lottie-BbNCnhvv.js} +1 -1
- package/dist/assets/{mui-CaUmS2In.js → mui-qr3DHRrK.js} +1 -1
- package/dist/assets/{pathToGoBack-TOnIZxyK.js → pathToGoBack-oZiNNQAo.js} +1 -1
- package/dist/assets/{pdf-Bp96SSrk.js → pdf-CzWN9HeX.js} +3 -3
- package/dist/assets/{pdf-lib-C5R5lVxX.js → pdf-lib-C03FlfNI.js} +1 -1
- package/dist/assets/{plaid-EPzkqVUX.js → plaid-EcM8CvHn.js} +1 -1
- package/dist/assets/{pusher-DFce9zoz.js → pusher-da1iuQnX.js} +1 -1
- package/dist/assets/{react-BaW6LEQr.js → react-ClZg_VQI.js} +1 -1
- package/dist/assets/{react-CbOWaQLc.js → react-DHV-3ZQq.js} +1 -1
- package/dist/assets/{react-BrbrBbbh.js → react-W8wUH-qH.js} +1 -1
- package/dist/assets/{react-Cg2u8AqZ.js → react-ZrJSCSxh.js} +1 -1
- package/dist/assets/{react-bKgyDTt8.js → react-adNZtkun.js} +1 -1
- package/dist/assets/{react-DaYEBWeP.js → react-yE1I12UI.js} +1 -1
- package/dist/assets/{recharts-eaz7OFOH.js → recharts-DpT5D_n2.js} +1 -1
- package/dist/assets/{routePaths-DtPkVCZ8.js → routePaths-CJjdcbm_.js} +1 -1
- package/dist/assets/{sentry-B2BY3pFv.js → sentry-CKqw5wqt.js} +1 -1
- package/dist/assets/{url-Bzmb-SBW.js → url-DaUg13v3.js} +1 -1
- package/dist/assets/{url-BeLBCtjP.js → url-tov37-EQ.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BYrJCl-g.js → useAiCfoDashboardSuggestedQuestionsChips-Cf9cdWJS.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-_2U3D7cn.js +1 -0
- package/dist/assets/{useDeviceId-CWQ4jMCH.js → useDeviceId-DUQ3fUCA.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-jFDMxuZj.js → useInitialThreadRequest-BCEE6rBO.js} +1 -1
- package/dist/assets/{utils-w1fZp2Am.js → utils-CVDKY2CT.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CDwmH7-e.js → withTransactionSidePanel-Cu15OM3U.js} +2 -2
- package/dist/assets/{zeni-epic-state-De2ZE3v5.js → zeni-epic-state-DFvwbAO4.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-CfeuS_Ag.js +0 -1
- package/dist/assets/CompanyPassportScreen-CAEa8inv.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CdyKCXfZ.js +0 -1
- package/dist/assets/DrawerScreen-TcF0aKWR.js +0 -1
- package/dist/assets/FeaturePreviewScreen-FqmwbgK1.js +0 -1
- package/dist/assets/MagicLinkRoutes-Bjfp8zDK.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-sO4caWMt.js +0 -12
- package/dist/assets/NotFoundScreen-DTlzuW8g.js +0 -1
- package/dist/assets/OAuthConsentScreen-LyQVO638.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DuUVhGFv.js +0 -1
- package/dist/assets/PeopleRoutes-Cve6HQco.js +0 -22
- package/dist/assets/PerformanceRoutes-Dc2aDfOC.js +0 -1
- package/dist/assets/ReferralListScreen-DY3Jq79H.js +0 -5
- package/dist/assets/RewardsRoutes-BE91uGyY.js +0 -1
- package/dist/assets/SignInScreen-CCSmRNKI.js +0 -1
- package/dist/assets/SignOutScreen-04tDb2m_.js +0 -9
- package/dist/assets/TaskRoutes-UAlOA4bQ.js +0 -9
- package/dist/assets/WiseConfirmationScreen-ufjg25Ux.js +0 -12
- package/dist/assets/getLocaleForTenant-BKUl3rU_.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Cu0cLXsh.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-Bb1kgpY0.js";import{a as d}from"./sentry-CKqw5wqt.js";import{h as A,u as B,g as L,i as q,j as c,N as F,n as M,o as N,p as O}from"./core-BUAuxzwZ.js";import{Mb as _,eR as R,LA as W,kI as Y,Ia as I,Mg as $,L3 as z,jI as V,Ib as P,LF as H,LG as J,L5 as K,L4 as Q}from"./zeni-epic-state-DFvwbAO4.js";import{aS as U,d as X,p as Z,q as tt}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import{d as S}from"./decodeURIComponentSafe-CxpsMKOn.js";import{w as et}from"./withTransactionSidePanel-Cu15OM3U.js";import{f as at,c as nt}from"./routePaths-CJjdcbm_.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.js";import"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import"./TransactionDetailScreen-BnKXBgyf.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]="46fb9796-fcb9-4c4b-b2c2-7b4f0495620d",a._sentryDebugIdIdentifier="sentry-dbid-46fb9796-fcb9-4c4b-b2c2-7b4f0495620d")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=L(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=q(),r=S(j??""),p=S(w??""),f=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=c(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>R(n).company?.companyInfo.firstMonthOfFY??1),u=c(n=>W(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))},[m,f,i]);const b=c(n=>n.trendState.fetchState),E=u?.selectedPeriod?.timePeriod??D,G=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&b==="Completed"&&(g(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,b]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:G,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(F,{to:k(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-Bk7qpJQq.js → ExpenseAutomationRoutes-DMZc9KyA.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-Bb1kgpY0.js";import aa from"./NotFoundScreen-CZOkBwPV.js";import{a as o,b as Nt}from"./sentry-CKqw5wqt.js";import{n as Fe,S as oa}from"./mui-qr3DHRrK.js";import{u as pe,h as Jt,g as Ye,j as w,n as sa,i as wt,o as ca,p as qe}from"./core-BUAuxzwZ.js";import{eR as xe,QF as ia,nq as ye,fl as la,rd as ra,nI as Yt,o1 as Kt,QG as Wt,ob as da,QH as Ht,nB as ua,qL as ma,f5 as Ie,QI as De,tc as Zt,Cx as Xt,QJ as en,QK as pa,qj as Ke,Mc as Pt,Me as ha,jL as ga,Mf as Ca,jS as Sa,cU as fa,up as We,nO as tn,og as Ue,nG as le,QL as Ia,L5 as xt,L4 as Re,QM as Dt,k7 as ya,QN as Ea,QO as ka,QP as ba,QQ as Ta,nV as va,oj as we,QR as Aa,QS as Ra,QT as wa,oq as Pa,jW as xa,jN as Da,QU as Ua,jV as Ut,Mm as Fa,QV as Ba,QW as Va,qf as Oa,pT as _a,oh as me,pS as Ge,QX as Ma,QY as za,QZ as ja,lq as La,bo as $a,ll as Ft,l7 as Qa,Q_ as qa,gV as Bt,fW as Ga,li as Na,wi as Ja,Q$ as Ya,oR as Ka,oM as Wa,oQ as Ha,oB as Za,R0 as Xa,f8 as nn,o4 as eo,nR as to,fm as Vt,ol as no,R1 as ao,R2 as oo,oi as an,R3 as so,R4 as co,R5 as io,R6 as lo,R7 as Ot,qr as ro,pK as uo,L3 as mo,R8 as po,R9 as ho,jU as go,Ra as Co,Hb as So,jT as fo,jI as Io,f7 as yo,ph as on,pC as Eo,of as _t,ok as ko,bE as bo,lf as To,lc as vo,Rb as Ao,oA as Mt,py as zt,pw as Ro,Rc as wo,p2 as Po,p0 as xo,pz as Do,Rd as Uo,Re as Fo,p6 as Bo,Rf as Vo,oW as Oo,p5 as _o,p3 as Mo,pF as zo}from"./zeni-epic-state-DFvwbAO4.js";import{a as sn,G as ne,d as Q,q as te,U as cn,W as ln,cG as jo,z as Be,cH as Lo,at as Pe,cI as $o,aU as jt,B as rn,cJ as Qo,aq as Ne,D as qo,a7 as Go,cK as No,a2 as Jo,cL as Yo,N as Ko,cM as Wo,cN as Ho,Q as Zo,k as Xo,aN as es,cO as ts,cP as ns,b9 as as,y as os,aQ as ss}from"./index-DYzN1z_e.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import{f as Lt,a as cs,b as is,g as ls,C as rs}from"./TransactionDetailScreen-BnKXBgyf.js";import{w as ds}from"./withTransactionSidePanel-Cu15OM3U.js";import{h as us,v as ms}from"./routePaths-CJjdcbm_.js";import{g as Je}from"./accountMappingHelper-C0dAV06i.js";import{D as ps}from"./DrawerScreen-CMWMoYEc.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.js";import"./decodeURIComponentSafe-CxpsMKOn.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]="e7dea5ee-fef6-4aab-a05d-24d45b57846d",t._sentryDebugIdIdentifier="sentry-dbid-e7dea5ee-fef6-4aab-a05d-24d45b57846d")}catch{}})();const hs=()=>{const t=pe(),l=Jt(),B=Ye(),f=w(d=>xe(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:S}=T(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(ne.aiAuditScorePercentage),I=w(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=w(d=>ia(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,q,X=!1)=>{t(ye({tenantId:q,period:{month:d.month,year:d.year},refreshViewInBackground:X}))},[]),v=o.useCallback(d=>{const q=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,q??null),t(la(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=te(B.state?.pathnameStackToGoBack,B.pathname),y=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(q=>q.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:k}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&k&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,k]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&k&&t(ra(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,k]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;Q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:y,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
5
5
|
flex: 1 1 auto;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Cs=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:T})=>{const S=pe(),r=Be.getSignedInUser(),I=w(e=>xe(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:
|
|
8
|
+
`,Cs=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:T})=>{const S=pe(),r=Be.getSignedInUser(),I=w(e=>xe(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:E,statementUploadChosen:v}=t,g=u[l],m=g?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{S(ma(e,n.split(".")[0]))},y=e=>{m!=null&&S(ua({accountId:l,selectedPeriod:E,fileId:e,statementUploadId:m}))},k=()=>{S(Wt({statementUploadChosen:!1}))},d=e=>{S(da({accountId:l,selectedPeriod:E,payload:e}))},q=e=>{S(Ht({accountId:l,selectedPeriod:E,localData:{accountSource:e}}))},X=o.useCallback(()=>{S(Yt({accountId:l}))},[S,l]),M=o.useCallback(()=>{S(Kt({accountId:l}))},[S,l]),O=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return g!=null?h.jsx($t,{children:h.jsx(Qt,{children:h.jsx(Lo,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:g,monthYearPeriod:E,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:T,onEditFileName:P,onDeleteFile:y,onSelectSourceType:q,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:v,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:k,onExcludeFromReconciliation:X})})}):O!=null?h.jsx($t,{children:h.jsx(Qt,{children:h.jsx($o,{excludedAccountReconciliation:O,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:M})})}):null}),$t=Fe.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
height: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as h}from"./liveblocks-DpbFof4_.js";import aa from"./NotFoundScreen-DTl
|
|
|
18
18
|
min-width: 0;
|
|
19
19
|
overflow-x: hidden;
|
|
20
20
|
overflow-y: auto;
|
|
21
|
-
`;function Ss({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const T=Be.getSignedInUser();if(T==null)throw Error("Can't access Customer Request page without signing in...");const S=w(r=>pa(r,t,T));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Qo,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const fs=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Is,comma:qt,space:Es}},dateFormat:pn}=qo.getLocalizedStrings(),Gt=zo,ys=sa(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,y={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Jo}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:T,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:y,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:E,currentSelectedView:k,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:q}=p.jeSchedules,X=tn(E),M=Ue(X.start),O=Ue(X.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{Q.trackMissingReceiptAttached(E.month,E.year),t(uo(e))},onUploadTransactionReceipt:(e,n,c,i,b,C)=>{t(Ot(e,n,{fetchState:"In-Progress"}));const A=()=>t(Ot(e,n,{fetchState:"Error"}));Yo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,b).then(V=>{V!=null?t(ro(e,V)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(lo(e,n)),u!=null&&t(Ee({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(io(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?Es+Is+i+qt:qt}]}))},onUpdateJESchedulesUIState:e=>{t(co(e))},onUpdateMissingReceiptsUIState:e=>{t(so(e))},onFetchMissingReceiptsList:()=>{O!=null&&M!=null&&t(an({start:M,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(_o(e))},onBulkUploadSuccess:e=>{t(Oo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,b)=>{t(Bo(e,n,c,i,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Do(e))},onSetBulkUploadSortConfig:(e,n)=>{t(zt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(xo())},onSearchTransactionsForManualMatch:(e,n)=>{t(Gt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Gt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Po(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(wo())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(Ro())},onResetBulkUploadSort:()=>{t(zt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(oo())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ge({selectedTab:c,uiState:{searchString:e}})),O!=null&&M!=null&&t(me(c,{start:M,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(ao({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(no(S))},onClose:()=>{k==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0})),v("../")},onBack:()=>{k==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(to(e))},onSaveReconciliationReview:e=>{t(eo(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=te(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:b}=n,C=Je(q.prepaidExpensesAccountList,c.selectedOptions),A=Je(q.fixedAssetsAccountList,i.selectedOptions),V=Je(q.accruedExpensesAccountList,b.selectedOptions),x={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:V.map(D=>D.accountId)};t(Xa({data:x}))},onSaveJeAccountSettingsClick:()=>{t(Za())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:b,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:V,allClassList:x,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,ae={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},oe=C?.selectedOption!=null?V.find(N=>N.qboId===C.selectedOption):void 0,Ve=b?.selectedOption!=null?x.find(N=>N.classId===b.selectedOption):void 0,Oe=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Ha({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:Ve?.classId,updatedAccumulatedDepreciationCategoryID:Oe?.accountId,updatedVendor:{id:ae.id,name:ae.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Wa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(xt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onCancelAutoComplete:()=>{t(Re("common"))}},onPostJESchedule(e,n){t(Ka({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ya())},handleJeScheduleClick:(e,n,c)=>{t(Ja({selectedJEScheduleKey:n}));const i=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Na(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ga())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(qa(e))},onUpdateFileAttachment:e=>{t(Qa({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t(La(u.companyId,e,u.tenantId)),Q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,$a().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,b,C,A,V,x,D,j,ae,oe)=>{t(ja(e,n,c,i,y,b,C,A,V,x,D,j,ae,oe))},onCancelAutoComplete:()=>{t(Re("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(me(e,{start:M,end:O},!1,!1)),t(za(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(Ma(e)),t(me("autoCategorized",{start:M,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n})),O!=null&&M!=null&&t(me(e,{start:M,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,b,C,A)=>{O!=null&&M!=null&&t(me(e,{start:M,end:O},!0,c,n,i,b,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,b,C,A,V)=>{t(_a(e,n,c,i,V??null,b,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,b)=>{t(Ut({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:y,updatedVendor:b,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?Q.trackTransactionsAutoCategorisedPage(E.month,E.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):Q.trackTransactionsReviewPage(E.month,E.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(Oa(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&t(Fa({transactionId:V,customerUpdates:C})),t(Ba({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:y,updatedCustomer:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(We({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&(t(xa({transactionId:V,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Da({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ut({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:y,updatedVendor:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(We({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:V.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(E,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{Q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Pa(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(wa(e))},updateOperatingExpensesIdsForReview:e=>{t(Ra({operatingExpenseIds:e,selectedPeriod:E}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ms(e.id,e.qboId,l.tenantEmailDomain),c=te(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:E}))},onFetchReimbursementView:(e,n,c)=>{t(we(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(le(E,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Zt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ht({accountId:e,selectedPeriod:E,localData:{accountSource:"bank_statement"}})),t(Wt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(le(E,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(va({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ta({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ka({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Ea(i)),t(ya({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ke("bill"));const n=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(xt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ia({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Yt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Kt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||k!=="reconciliation"||t(le(E,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...T}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,y,v)=>{r.onUploadTransactionReceipt(s,p,u,y,v,S.authParams)}}}(t,l,T)})(Go(No)),ks=ds(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=T=>{const S=pe(),r=function(){const P=pe(),E=w(k=>Ie(k).reconciliation.selectedDrawerAccountId);return{isOpen:E!=null,selectedAccountId:E,openPanel:o.useCallback(k=>{P(De({selectedDrawerAccountId:k}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=w(P=>Ie(P).reconciliation),s=w(P=>xe(P)),p=o.useCallback((P,E)=>{S(Zt("expense_automation_reconcile",P,E))},[S]),u=o.useCallback((P,E)=>{const k=s?.companyId;k!=null&&(S(Xt(P,k,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",E)),S(en({accountId:E,connectionInProgress:!0})))},[S,s?.companyId]),y=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Cs,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[y,r.isOpen,r.closePanel]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...T,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:T,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ko(),u=Wo(),{isOpen:y}=Ho(),v=Jt(),g=Ye(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:E}=dn({mobileExploreReferrer:"Transaction categorization"}),k=o.useCallback(()=>{T===!0&&f!==!0&&t?.()},[t,T,f]),{areTenantIdsInSync:d}=cn(),q=(()=>{const a=w(G=>Ie(G)),F=Ye(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:R}=a,H=Ne($),J=Ne(L.fetchState),W=o.useCallback(G=>{const Z=F.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?Q.trackTransactionsReviewPage(R.month,R.year,a.transactionView.totalCountByTab.review,0,G,Z??null):Q.trackTransactionsAutoCategorisedPage(R.month,R.year,a.transactionView.totalCountByTab.autoCategorized,0,G,Z??null)),$==="missing_receipts"&&Q.trackMissingReceiptsPage(R.month,R.year,G,a.missingReceipts.transactions.length,Z??null),$==="je_schedules"&&Q.trackMonthCloseScheduleListPage(R.month,R.year,G,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,Z??null),$==="flux_analysis"&&Q.trackFluxAnalysisPage(R.month,R.year,G,fs(a.fluxAnalysis),Z??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&Q.trackInsightsEmailPage(R.month,R.year,G,"draft",a.auditSummary.auditScorePercentage,null,Z??null)},[R,a]);return o.useEffect(()=>{J===L.fetchState&&$===H||L.fetchState!=="Completed"||W(!1)},[$,L.fetchState,H]),W})(),X=Zo(),[M,O]=o.useState(!1),e=w(a=>Pt(a)),n=w(a=>xe(a)),[c,i]=o.useState(!1),[b,C]=o.useState(!1),[A,V]=o.useState([]),[x,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),ae=x?.contentType==="activity"?x.detail.transactionId:void 0,oe=o.useCallback(a=>{a!=null?(s&&p(!1),u(),k(),D({contentType:"activity",detail:{transactionId:a}})):D(F=>F?.contentType==="activity"?null:F)},[k,s,u,p]),Ve=o.useCallback(a=>{s&&p(!1),u(),k(),D({contentType:"transfer",detail:a})},[k,s,u,p]),Oe=o.useCallback(()=>{u(),j(),k(),E()},[k,j,E,u]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),k()),N.current=s},[k,j,s,u]);const He=o.useRef(y);o.useEffect(()=>{y===!0&&He.current===!1&&(s&&p(!1),j(),T===!0&&f!==!0&&t?.()),He.current=y},[j,t,y,s,p,f,T]);const ye=T===!0&&f!==!0,Ze=o.useRef(ye);o.useEffect(()=>{ye&&!Ze.current&&(s&&p(!1),u(),j()),Ze.current=ye},[j,s,ye,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=wt(),{tenantEmailDomain:gn}=wt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=Xo(),Me=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:re}=sn(),{configValue:fn}=Sn(es.enableUncategorizedExpenseCategory),ee=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=re(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=re(ne.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:ze}=re(ne.isTransactionActivityEnabled),{isFeatureEnabled:st}=re(ne.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=re(ne.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:En}=re(ne.isProjectsTransactionsEnabled),yn=o.useCallback(a=>{const F=Ke(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,F)},[l]),kn=w(a=>mo(a,"common")),z=w(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:Tn}=w(a=>po(a.accountState)),vn=w(a=>ho(a.classState)),{monthEndCloseChecksView:K,currentSelectedView:U,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:An,currentSelectedViewFetchState:se,jeSchedules:Le,reconciliation:Rn}=z;cs(U==="transaction_categorization");const wn=z.transactionView.saveStatus.fetchState,ct=z.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=w(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=w(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const de=is(wn,()=>{const a=[],F=ut.current,L=dt.current,$=L!=null&&F!=null?L[F]:void 0;if($?.transactionReviewLocalDataById!=null)for(const H of Object.values($.transactionReviewLocalDataById)){const J=H?.transactionReviewLocalData?.lineItemById;if(J!=null)for(const W of Object.values(J)){const G=W?.account;G?.accountId!=null&&a.push(G.accountId)}}const R=it.current;for(const H of R)for(const J of H.lines??[])"account"in J&&J.account?.accountId!=null&&a.push(J.account.accountId);return a});o.useEffect(()=>{U==="transaction_categorization"&&T!==!0||oe(void 0)},[U,oe,T]);const Pn=z.transactionView.selectedTransactionCategorizationCompletedSubTab,ke=`${je}|${Pn}`,be=o.useRef(null);o.useEffect(()=>{be.current!==null?be.current!==ke&&(be.current=ke,U==="transaction_categorization"&&j()):be.current=ke},[j,U,ke]);const xn=w(a=>ae==null?void 0:go(a.transactionState,ae)),ce=xn?.qboId,mt=w(a=>ce==null?void 0:Co(a,ce));o.useEffect(()=>{ce!=null&&m(So(ce))},[m,ce]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=z.transactionView,Ct=o.useCallback(a=>ls(m,a),[m]),St=o.useMemo(()=>U!=="transaction_categorization"||x==null?null:x.contentType==="activity"?ze===!0?h.jsx(ts,{activityLogView:mt,qboId:ce,onClose:()=>D(null),selectedTransactionId:x.detail.transactionId,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null:x.contentType==="transfer"?h.jsx(ns,{createTransferEntryStatus:pt,transaction:x.detail,transferAccounts:x.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null,[U,x,ze,mt,ce,pt,ht,gt,Ct]),Dn=St!=null,{selectedAccountId:ge}=Rn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=w(a=>fo(a.accountState,a.accountListState,"accountList")),Fn=w(a=>Io(a)),Ce=tt!=null?Eo(tt):U,Bn=w(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:se.fetchState==="Completed"}),Me==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Ue(It.start),fe=Ue(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),On=o.useCallback(()=>{C(!0)},[]),_n=o.useCallback(a=>{V(a),C(!1)},[]),Mn=o.useCallback(()=>{V([])},[]),Te=z.missingReceipts.bulkUpload.phase,Et=z.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&U==="missing_receipts"&&Te==="matching"&&Et!=null&&m(on({cacheOverride:!0}))},[he,U,Te,Et,m]);const yt=Me?.userId,zn=_.month,jn=_.year,kt=n?.tenantId;o.useEffect(()=>{U==="missing_receipts"&&he!==!1&&Te==="idle"&&yt!=null&&kt!=null&&m(yo())},[U,he,Te,yt,kt,zn,jn,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&U!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||se.fetchState!=="Completed"&&se.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,ee)))},[Xe,se,d,ee]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,ee)),m(le(_,ge,!1,!1)))},[_.month,_.year,d,ee]);const bt=o.useCallback((a=!1,F=!1)=>{const L={start:Se,end:fe};switch(U){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,F,void 0,ee)),nt(!1);break;case"flux_analysis":m(we(_,a,F,null));break;case"month_end_insights":if(F===!1){const $=new Date(_.year,_.month,0),R=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(To(!0,n.companyId,n.tenantId,R)),m(vo(n.companyId,n.tenantId))}break;case"je_schedules":m(ko(L,F));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,F));break;default:m(le(_,ge,a,F))}},[U,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,ee]);o.useEffect(()=>{U===Ce&&se.fetchState==="Not-Started"&&d&&bt(!0)},[se,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||An.fetchState==="In-Progress"||se.fetchState!=="Completed"||(et.current=!0,bt(!0,!0))},[]),o.useEffect(()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[K.fetchState,n.tenantId]),o.useEffect(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(Ao({companyId:n.companyId})),v("../"))},[z.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[K.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{U==="reconciliation"&&ge==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(le(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[U,m,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,le,ge,_]);const Ln=Lt();o.useEffect(()=>{const a=(K.monthEndCloseChecks?.monthEndCloseCheckList.find(F=>F.id==="month_end_insights")?.isDisabled??!1)&&!ot;U!=="month_end_insights"||!a&&K.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[U,K.monthEndCloseChecks]);const $n=r===!0?S:B,Qn=r===!0||T===!0,qn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(Mt())},[ft,Le.accountSettingsView.saveState.fetchState,Mt]);const{transactionId:Tt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:F,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const R=pe();let H,J,W;const G=Lt(),Z=a.transactionView;let vt=()=>{};const{transactions:Wn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Hn}=Z;if(L==="transaction_categorization"){const $e=Hn.find(ie=>ie.transactionId===ue),Y=Wn.find(ie=>ie.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,Rt=At?.account;J=At?.class?.classId,H=["Uncategorized Income","Uncategorized Expense"].includes(Rt?.accountName??"")?void 0:Rt?.accountId;const Xn=us(ue,Y?.typeOfTransaction);Y!=null&&Xn&&(W={id:ue,type:Ke(Y.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&Y!=null){const ie=Z.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(ie!=null&&Y.lines!=null&&Y.lines.length>0){const Ae=ie.lineItemById[ve];let Qe=ie.selectedEntity;if(fa(Y)||(Qe=Ae.selectedEntityLine),Qe!=null){const ea=Qe,ta={transactionId:{id:Y.id,type:Y.type},transaction:Y,lineIds:Y.lines.map(na=>na.id)??[]};R(We({entity:ea,amount:Ae.amount.amount,transactionDetails:ta,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:G,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Zn=w($e=>Pt($e,void 0,H,J));return{transactionId:W,onSaveVendor:()=>{R(Sa(W,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{W!=null&&R(ha({transactionId:W})),R(ga()),R(Ca()),F()},vendorViewDetails:Zn}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{O(!1)},currentSelectedView:U,isUncategorizedExpenseCategoryEnabled:ee}),Kn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,F,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?K.fetchState==="Error"?h.jsx(as,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(ps,{isOpen:b,drawerLeftMargin:new os(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(Ss,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:_n,resetCustomerRequest:Mn})})}),Tt!=null&&M&&h.jsx(rs,{isOpen:M,transactionId:Tt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}),h.jsx(ys,{...Kn,navigate:v,location:g,themeState:X,categoryOptions:bn,classesForFilters:vn,accountsForFilters:Tn,vendorSearchAutoCompleteData:{autoCompleteText:Bn,entityAutoCompleteView:kn},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:ee,isAccountingClassesEnabled:Fn,isProjectsTransactionsEnabled:En,isCOTEnabled:Ln,currentTenant:n,companyId:n.companyId,signedInUser:Me,isTransactionActivityEnabled:ze,isRightPanelOpen:Dn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Ve:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:On,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:q,setActivityLogTransactionId:oe,closeSidePanel:qn,openTransactionPanel:l,sidePanelIsOpen:Qn,sidePanelIsFullView:r!==!0&&f,panelContent:$n,isAiCfoAccessEnabled:P,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:yn,sidePanelListPercent:r===!0?66:void 0}),de.showPopup&&de.popupType!=null&&h.jsx(ss,{popupType:de.popupType,currencySymbol:de.currencySymbol,onSubmit:de.handleSubmit,onDismiss:de.handleDismiss})]})})),bs=Fe(oa)`
|
|
21
|
+
`;function Ss({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const T=Be.getSignedInUser();if(T==null)throw Error("Can't access Customer Request page without signing in...");const S=w(r=>pa(r,t,T));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Qo,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const fs=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Is,comma:qt,space:ys}},dateFormat:pn}=qo.getLocalizedStrings(),Gt=zo,Es=sa(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,E={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:E,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Jo}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:T,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:E,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:y,currentSelectedView:k,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:q}=p.jeSchedules,X=tn(y),M=Ue(X.start),O=Ue(X.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{Q.trackMissingReceiptAttached(y.month,y.year),t(uo(e))},onUploadTransactionReceipt:(e,n,c,i,b,C)=>{t(Ot(e,n,{fetchState:"In-Progress"}));const A=()=>t(Ot(e,n,{fetchState:"Error"}));Yo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,b).then(V=>{V!=null?t(ro(e,V)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(lo(e,n)),u!=null&&t(ye({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(io(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?ys+Is+i+qt:qt}]}))},onUpdateJESchedulesUIState:e=>{t(co(e))},onUpdateMissingReceiptsUIState:e=>{t(so(e))},onFetchMissingReceiptsList:()=>{O!=null&&M!=null&&t(an({start:M,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(_o(e))},onBulkUploadSuccess:e=>{t(Oo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,b)=>{t(Bo(e,n,c,i,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Do(e))},onSetBulkUploadSortConfig:(e,n)=>{t(zt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(xo())},onSearchTransactionsForManualMatch:(e,n)=>{t(Gt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Gt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Po(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(wo())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(Ro())},onResetBulkUploadSort:()=>{t(zt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(oo())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ge({selectedTab:c,uiState:{searchString:e}})),O!=null&&M!=null&&t(me(c,{start:M,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(ao({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(no(S))},onClose:()=>{k==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0})),v("../")},onBack:()=>{k==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(to(e))},onSaveReconciliationReview:e=>{t(eo(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=te(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:b}=n,C=Je(q.prepaidExpensesAccountList,c.selectedOptions),A=Je(q.fixedAssetsAccountList,i.selectedOptions),V=Je(q.accruedExpensesAccountList,b.selectedOptions),x={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:V.map(D=>D.accountId)};t(Xa({data:x}))},onSaveJeAccountSettingsClick:()=>{t(Za())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:b,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:V,allClassList:x,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,ae={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},oe=C?.selectedOption!=null?V.find(N=>N.qboId===C.selectedOption):void 0,Ve=b?.selectedOption!=null?x.find(N=>N.classId===b.selectedOption):void 0,Oe=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Ha({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:Ve?.classId,updatedAccumulatedDepreciationCategoryID:Oe?.accountId,updatedVendor:{id:ae.id,name:ae.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Wa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(xt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onCancelAutoComplete:()=>{t(Re("common"))}},onPostJESchedule(e,n){t(Ka({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ya())},handleJeScheduleClick:(e,n,c)=>{t(Ja({selectedJEScheduleKey:n}));const i=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Na(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ga())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(qa(e))},onUpdateFileAttachment:e=>{t(Qa({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t(La(u.companyId,e,u.tenantId)),Q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,$a().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,b,C,A,V,x,D,j,ae,oe)=>{t(ja(e,n,c,i,E,b,C,A,V,x,D,j,ae,oe))},onCancelAutoComplete:()=>{t(Re("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(me(e,{start:M,end:O},!1,!1)),t(za(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(Ma(e)),t(me("autoCategorized",{start:M,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n})),O!=null&&M!=null&&t(me(e,{start:M,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,b,C,A)=>{O!=null&&M!=null&&t(me(e,{start:M,end:O},!0,c,n,i,b,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,b,C,A,V)=>{t(_a(e,n,c,i,V??null,b,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,b)=>{t(Ut({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:E,updatedVendor:b,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?Q.trackTransactionsAutoCategorisedPage(y.month,y.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):Q.trackTransactionsReviewPage(y.month,y.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(Oa(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&t(Fa({transactionId:V,customerUpdates:C})),t(Ba({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:E,updatedCustomer:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(We({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&(t(xa({transactionId:V,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Da({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ut({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:E,updatedVendor:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(We({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:V.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(y,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{Q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Pa(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(wa(e))},updateOperatingExpensesIdsForReview:e=>{t(Ra({operatingExpenseIds:e,selectedPeriod:y}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ms(e.id,e.qboId,l.tenantEmailDomain),c=te(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:y}))},onFetchReimbursementView:(e,n,c)=>{t(we(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(le(y,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Zt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ht({accountId:e,selectedPeriod:y,localData:{accountSource:"bank_statement"}})),t(Wt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(le(y,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(va({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ta({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ka({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(ya(i)),t(Ea({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ke("bill"));const n=te(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(xt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ia({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Yt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Kt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||k!=="reconciliation"||t(le(y,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...T}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,E,v)=>{r.onUploadTransactionReceipt(s,p,u,E,v,S.authParams)}}}(t,l,T)})(Go(No)),ks=ds(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=T=>{const S=pe(),r=function(){const P=pe(),y=w(k=>Ie(k).reconciliation.selectedDrawerAccountId);return{isOpen:y!=null,selectedAccountId:y,openPanel:o.useCallback(k=>{P(De({selectedDrawerAccountId:k}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=w(P=>Ie(P).reconciliation),s=w(P=>xe(P)),p=o.useCallback((P,y)=>{S(Zt("expense_automation_reconcile",P,y))},[S]),u=o.useCallback((P,y)=>{const k=s?.companyId;k!=null&&(S(Xt(P,k,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",y)),S(en({accountId:y,connectionInProgress:!0})))},[S,s?.companyId]),E=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Cs,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:E,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[E,r.isOpen,r.closePanel]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...T,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:T,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ko(),u=Wo(),{isOpen:E}=Ho(),v=Jt(),g=Ye(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:y}=dn({mobileExploreReferrer:"Transaction categorization"}),k=o.useCallback(()=>{T===!0&&f!==!0&&t?.()},[t,T,f]),{areTenantIdsInSync:d}=cn(),q=(()=>{const a=w(G=>Ie(G)),F=Ye(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:R}=a,H=Ne($),J=Ne(L.fetchState),W=o.useCallback(G=>{const Z=F.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?Q.trackTransactionsReviewPage(R.month,R.year,a.transactionView.totalCountByTab.review,0,G,Z??null):Q.trackTransactionsAutoCategorisedPage(R.month,R.year,a.transactionView.totalCountByTab.autoCategorized,0,G,Z??null)),$==="missing_receipts"&&Q.trackMissingReceiptsPage(R.month,R.year,G,a.missingReceipts.transactions.length,Z??null),$==="je_schedules"&&Q.trackMonthCloseScheduleListPage(R.month,R.year,G,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,Z??null),$==="flux_analysis"&&Q.trackFluxAnalysisPage(R.month,R.year,G,fs(a.fluxAnalysis),Z??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&Q.trackInsightsEmailPage(R.month,R.year,G,"draft",a.auditSummary.auditScorePercentage,null,Z??null)},[R,a]);return o.useEffect(()=>{J===L.fetchState&&$===H||L.fetchState!=="Completed"||W(!1)},[$,L.fetchState,H]),W})(),X=Zo(),[M,O]=o.useState(!1),e=w(a=>Pt(a)),n=w(a=>xe(a)),[c,i]=o.useState(!1),[b,C]=o.useState(!1),[A,V]=o.useState([]),[x,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),ae=x?.contentType==="activity"?x.detail.transactionId:void 0,oe=o.useCallback(a=>{a!=null?(s&&p(!1),u(),k(),D({contentType:"activity",detail:{transactionId:a}})):D(F=>F?.contentType==="activity"?null:F)},[k,s,u,p]),Ve=o.useCallback(a=>{s&&p(!1),u(),k(),D({contentType:"transfer",detail:a})},[k,s,u,p]),Oe=o.useCallback(()=>{u(),j(),k(),y()},[k,j,y,u]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),k()),N.current=s},[k,j,s,u]);const He=o.useRef(E);o.useEffect(()=>{E===!0&&He.current===!1&&(s&&p(!1),j(),T===!0&&f!==!0&&t?.()),He.current=E},[j,t,E,s,p,f,T]);const Ee=T===!0&&f!==!0,Ze=o.useRef(Ee);o.useEffect(()=>{Ee&&!Ze.current&&(s&&p(!1),u(),j()),Ze.current=Ee},[j,s,Ee,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=wt(),{tenantEmailDomain:gn}=wt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=Xo(),Me=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:re}=sn(),{configValue:fn}=Sn(es.enableUncategorizedExpenseCategory),ee=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=re(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=re(ne.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:ze}=re(ne.isTransactionActivityEnabled),{isFeatureEnabled:st}=re(ne.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=re(ne.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:yn}=re(ne.isProjectsTransactionsEnabled),En=o.useCallback(a=>{const F=Ke(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,F)},[l]),kn=w(a=>mo(a,"common")),z=w(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:Tn}=w(a=>po(a.accountState)),vn=w(a=>ho(a.classState)),{monthEndCloseChecksView:K,currentSelectedView:U,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:An,currentSelectedViewFetchState:se,jeSchedules:Le,reconciliation:Rn}=z;cs(U==="transaction_categorization");const wn=z.transactionView.saveStatus.fetchState,ct=z.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=w(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=w(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const de=is(wn,()=>{const a=[],F=ut.current,L=dt.current,$=L!=null&&F!=null?L[F]:void 0;if($?.transactionReviewLocalDataById!=null)for(const H of Object.values($.transactionReviewLocalDataById)){const J=H?.transactionReviewLocalData?.lineItemById;if(J!=null)for(const W of Object.values(J)){const G=W?.account;G?.accountId!=null&&a.push(G.accountId)}}const R=it.current;for(const H of R)for(const J of H.lines??[])"account"in J&&J.account?.accountId!=null&&a.push(J.account.accountId);return a});o.useEffect(()=>{U==="transaction_categorization"&&T!==!0||oe(void 0)},[U,oe,T]);const Pn=z.transactionView.selectedTransactionCategorizationCompletedSubTab,ke=`${je}|${Pn}`,be=o.useRef(null);o.useEffect(()=>{be.current!==null?be.current!==ke&&(be.current=ke,U==="transaction_categorization"&&j()):be.current=ke},[j,U,ke]);const xn=w(a=>ae==null?void 0:go(a.transactionState,ae)),ce=xn?.qboId,mt=w(a=>ce==null?void 0:Co(a,ce));o.useEffect(()=>{ce!=null&&m(So(ce))},[m,ce]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=z.transactionView,Ct=o.useCallback(a=>ls(m,a),[m]),St=o.useMemo(()=>U!=="transaction_categorization"||x==null?null:x.contentType==="activity"?ze===!0?h.jsx(ts,{activityLogView:mt,qboId:ce,onClose:()=>D(null),selectedTransactionId:x.detail.transactionId,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null:x.contentType==="transfer"?h.jsx(ns,{createTransferEntryStatus:pt,transaction:x.detail,transferAccounts:x.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null,[U,x,ze,mt,ce,pt,ht,gt,Ct]),Dn=St!=null,{selectedAccountId:ge}=Rn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=w(a=>fo(a.accountState,a.accountListState,"accountList")),Fn=w(a=>Io(a)),Ce=tt!=null?yo(tt):U,Bn=w(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:se.fetchState==="Completed"}),Me==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Ue(It.start),fe=Ue(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),On=o.useCallback(()=>{C(!0)},[]),_n=o.useCallback(a=>{V(a),C(!1)},[]),Mn=o.useCallback(()=>{V([])},[]),Te=z.missingReceipts.bulkUpload.phase,yt=z.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&U==="missing_receipts"&&Te==="matching"&&yt!=null&&m(on({cacheOverride:!0}))},[he,U,Te,yt,m]);const Et=Me?.userId,zn=_.month,jn=_.year,kt=n?.tenantId;o.useEffect(()=>{U==="missing_receipts"&&he!==!1&&Te==="idle"&&Et!=null&&kt!=null&&m(Eo())},[U,he,Te,Et,kt,zn,jn,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&U!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||se.fetchState!=="Completed"&&se.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,ee)))},[Xe,se,d,ee]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,ee)),m(le(_,ge,!1,!1)))},[_.month,_.year,d,ee]);const bt=o.useCallback((a=!1,F=!1)=>{const L={start:Se,end:fe};switch(U){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,F,void 0,ee)),nt(!1);break;case"flux_analysis":m(we(_,a,F,null));break;case"month_end_insights":if(F===!1){const $=new Date(_.year,_.month,0),R=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(To(!0,n.companyId,n.tenantId,R)),m(vo(n.companyId,n.tenantId))}break;case"je_schedules":m(ko(L,F));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,F));break;default:m(le(_,ge,a,F))}},[U,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,ee]);o.useEffect(()=>{U===Ce&&se.fetchState==="Not-Started"&&d&&bt(!0)},[se,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||An.fetchState==="In-Progress"||se.fetchState!=="Completed"||(et.current=!0,bt(!0,!0))},[]),o.useEffect(()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&m(ye({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[K.fetchState,n.tenantId]),o.useEffect(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(ye({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(Ao({companyId:n.companyId})),v("../"))},[z.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&m(ye({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[K.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{U==="reconciliation"&&ge==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(le(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[U,m,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,le,ge,_]);const Ln=Lt();o.useEffect(()=>{const a=(K.monthEndCloseChecks?.monthEndCloseCheckList.find(F=>F.id==="month_end_insights")?.isDisabled??!1)&&!ot;U!=="month_end_insights"||!a&&K.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[U,K.monthEndCloseChecks]);const $n=r===!0?S:B,Qn=r===!0||T===!0,qn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(Mt())},[ft,Le.accountSettingsView.saveState.fetchState,Mt]);const{transactionId:Tt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:F,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const R=pe();let H,J,W;const G=Lt(),Z=a.transactionView;let vt=()=>{};const{transactions:Wn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Hn}=Z;if(L==="transaction_categorization"){const $e=Hn.find(ie=>ie.transactionId===ue),Y=Wn.find(ie=>ie.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,Rt=At?.account;J=At?.class?.classId,H=["Uncategorized Income","Uncategorized Expense"].includes(Rt?.accountName??"")?void 0:Rt?.accountId;const Xn=us(ue,Y?.typeOfTransaction);Y!=null&&Xn&&(W={id:ue,type:Ke(Y.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&Y!=null){const ie=Z.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(ie!=null&&Y.lines!=null&&Y.lines.length>0){const Ae=ie.lineItemById[ve];let Qe=ie.selectedEntity;if(fa(Y)||(Qe=Ae.selectedEntityLine),Qe!=null){const ea=Qe,ta={transactionId:{id:Y.id,type:Y.type},transaction:Y,lineIds:Y.lines.map(na=>na.id)??[]};R(We({entity:ea,amount:Ae.amount.amount,transactionDetails:ta,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:G,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Zn=w($e=>Pt($e,void 0,H,J));return{transactionId:W,onSaveVendor:()=>{R(Sa(W,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{W!=null&&R(ha({transactionId:W})),R(ga()),R(Ca()),F()},vendorViewDetails:Zn}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{O(!1)},currentSelectedView:U,isUncategorizedExpenseCategoryEnabled:ee}),Kn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,F,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?K.fetchState==="Error"?h.jsx(as,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(ps,{isOpen:b,drawerLeftMargin:new os(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(Ss,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:_n,resetCustomerRequest:Mn})})}),Tt!=null&&M&&h.jsx(rs,{isOpen:M,transactionId:Tt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}),h.jsx(Es,{...Kn,navigate:v,location:g,themeState:X,categoryOptions:bn,classesForFilters:vn,accountsForFilters:Tn,vendorSearchAutoCompleteData:{autoCompleteText:Bn,entityAutoCompleteView:kn},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:ee,isAccountingClassesEnabled:Fn,isProjectsTransactionsEnabled:yn,isCOTEnabled:Ln,currentTenant:n,companyId:n.companyId,signedInUser:Me,isTransactionActivityEnabled:ze,isRightPanelOpen:Dn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Ve:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:On,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:q,setActivityLogTransactionId:oe,closeSidePanel:qn,openTransactionPanel:l,sidePanelIsOpen:Qn,sidePanelIsFullView:r!==!0&&f,panelContent:$n,isAiCfoAccessEnabled:P,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:En,sidePanelListPercent:r===!0?66:void 0}),de.showPopup&&de.popupType!=null&&h.jsx(ss,{popupType:de.popupType,currencySymbol:de.currencySymbol,onSubmit:de.handleSubmit,onDismiss:de.handleDismiss})]})})),bs=Fe(oa)`
|
|
22
22
|
display: flex;
|
|
23
23
|
min-height: 100%;
|
|
24
24
|
flex-direction: column;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-Bb1kgpY0.js";import{a as r}from"./sentry-CKqw5wqt.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import c from"./NotFoundScreen-CZOkBwPV.js";import{h as u,g as b}from"./core-BUAuxzwZ.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]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./sentry-
|
|
1
|
+
import{a as i}from"./sentry-CKqw5wqt.js";import{u as d,h as l,g as m}from"./core-BUAuxzwZ.js";import{gC as p,Ki as g,Kj as b}from"./zeni-epic-state-DFvwbAO4.js";import{u as _,L as h,z as y}from"./index-DYzN1z_e.js";import"./liveblocks-Bb1kgpY0.js";import"./recharts-DpT5D_n2.js";import"./mui-qr3DHRrK.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="0974b3ee-928b-4ffb-8e8e-f6fe1b69009e",e._sentryDebugIdIdentifier="sentry-dbid-0974b3ee-928b-4ffb-8e8e-f6fe1b69009e")}catch{}})();function K(){const e=d(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=_(),s=i.useRef(!1);return i.useLayoutEffect(()=>{o(h.CONNECTION_AUTH)},[o]),i.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);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 f=y.getActiveTenantForUser();n(f?.tenantEmailDomain!=null?`/${f.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{K as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-Bb1kgpY0.js";import{i as S,n as g,h as C,g as y,u as ee,s as ae,j as E,N as te,o as ne,p}from"./core-BUAuxzwZ.js";import{Kb as k,Kc as v,Kd as K,A8 as A,zW as T,Ke as B,Kf as oe,Kg as se,z_ as ie,eY as $,A5 as le,A2 as re}from"./zeni-epic-state-DFvwbAO4.js";import{J as x,o as r,Z as de,d as j,h as G,E as ce,p as me,K as pe,q as _,a as ue,G as he,r as ge,Q as xe,m as fe,s as we,B as be,v as Se,j as ye,S as ke,w as ve,y as je,X as $e}from"./index-DYzN1z_e.js";import{n as m}from"./mui-qr3DHRrK.js";import f from"./NotFoundScreen-CZOkBwPV.js";import{a as I}from"./sentry-CKqw5wqt.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="111b8afc-f12a-4108-a059-50c6dc58c181",e._sentryDebugIdIdentifier="sentry-dbid-111b8afc-f12a-4108-a059-50c6dc58c181")}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=g(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(K({data:l}))}}})(de);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=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
|
+
`,Be=g(function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??ze();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 t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const ze=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},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=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(K({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,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
|
+
`,Ke=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(ge);function Te(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Ke,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},_e=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
|
+
`,Me=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Ge.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
|
+
`,Ve=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
|
+
`,We=g(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),H=n.pathname.includes("address"),w=x(),M=xe(),D=fe(),b=we(),V=()=>{M.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:O,billFetchState:z,companyName:Q,currencySymbol:X,amount:q}=W,{tenantId:P,userId:L,sessionId:N}=J,{fetchState:Y,internationalBankAccountCreateStatus:Z}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))},[b,c,s,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,P),l!=null&&t(re(l)))},[c,b,L,N,P,l,t]),c==="Error"?a.jsx(f,{}):Y==="Completed"||Z.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&z==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(R=>R.trackBillPayMagicLinkPageLoad(o??"",s??"",Q,l??"",Ue(n.pathname),X,q))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(_e,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:H,children:z==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:O,type:"bill"})}),a.jsx(Me,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Je,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-Bb1kgpY0.js";import{a as f}from"./sentry-CKqw5wqt.js";import{u as U,g as _,h as w,s as M,j as l,N as D}from"./core-BUAuxzwZ.js";import{z as r,m as P,D as V,e as A,d as K,f as N,i as J,j as R,g as Y}from"./index-DYzN1z_e.js";import{eR as W,JY as Z,K6 as $,JZ as q,eY as B,fp as G,K2 as H,fN as Q,cS as X,K7 as ee,K8 as te}from"./zeni-epic-state-DFvwbAO4.js";import{n as ne}from"./mui-qr3DHRrK.js";import{u as se}from"./useDeviceId-DUQ3fUCA.js";import{f as ae}from"./analyticsHelper-BkIvphjN.js";import{t as ie}from"./getLocaleForTenant-B6mgwDIb.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="f3136a9d-a9e7-4f2c-9dc3-46cccab30318",t._sentryDebugIdIdentifier="sentry-dbid-f3136a9d-a9e7-4f2c-9dc3-46cccab30318")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=U(),a=_(),m=w(),[y]=M(),n=y.get("token"),p=y.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),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>W(e)),k=l(e=>Z(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(q(k.tenantsInOrder),s.zeniSessionId),B(s.userId,s.zeniSessionId,o.tenantId),t(G(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Q().then(()=>{const e=Y();e!=null&&A(e)}),setTimeout(()=>{K.trackLogin(N.Event.loginSuccess,"email",X(o.productSettings))},2e3))},[I,S,b,s,o,k,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]),O=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(J,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(D,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{Te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-
|
|
1
|
+
import{j as N}from"./liveblocks-Bb1kgpY0.js";import{a as c}from"./sentry-CKqw5wqt.js";import{u as me,j as n,i as Ze,g as We,h as Je,l as M}from"./core-BUAuxzwZ.js";import{eR as pe,f1 as Ke,f2 as be,eV as Xe,bn as ea,eQ as aa,f3 as ta,f4 as na,f6 as sa,f9 as oa,fi as ia,fa as g,fc as ra,fd as le,fg as da,fe as la,ff as ca,fh as ua,cI as fa,fk as ma,cN as pa,eU as ba,fp as ha,fq as Sa,fo as ga}from"./zeni-epic-state-DFvwbAO4.js";import{a7 as Ea,a8 as ka,Q as Ca,a as ya,z as k,s as Ia,u as Ta,G as r,a9 as wa,_ as _a,aa as Aa,k as Fa,c as Da,ab as va,a3 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ma,ag as Pa,ah as fe,d as P,$ as Ra,q as _,ai as R,aj as Na}from"./index-DYzN1z_e.js";import{D as Ua}from"./mui-qr3DHRrK.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]="cff17424-ff68-482e-8992-5fe22d429d27",f._sentryDebugIdIdentifier="sentry-dbid-cff17424-ff68-482e-8992-5fe22d429d27")}catch{}})();const Va=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=We(),C=Ca(),o=Je(),U=Xe(),m=me(),{useFeatureGate:i}=ya(),V=k.getSignedInUser(),G=ea(V),s=n(e=>pe(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[A,L]=c.useState(void 0),F=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:q}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,q),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=k.getSignedInUser(),v=n(e=>e.tenantState),Ce=n(e=>v.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Q=_a(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=G||!G&&$e,xe=s.company!=null&&ia(s.company),w=ve&&xe,Me=n(e=>g(e).totalUnreadCount),Pe=n(e=>g(e).reducedFetchCountState),Z=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:J,isLoading:K,isFetchingMore:X,hasFetchedAll:ee,fetchMore:Ne}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&X===!1&&ee===!0)if(s?.companyId!=null&&J!=null){const e=`dashboard_${s.companyId}`;L(J.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,X,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))},[A,$.fetchState]);const Ue={fetchStatus:Pe,count:Me},ae=t!=null?k.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const Ve=Fa(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),Ge=F&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!F&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),je=fa(Oe),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,q,s),oe=Da(),Ye=oe&&va(a),ie=pa(Ve?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!k.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[qe,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const He=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Qe=Ba(He);return N.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:N.jsx(xa,{signedInUser:V,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ce:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:Ge,isSettings:ue(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:Qe,isTreasuryPopupVisible:qe,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:Q,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=Z===0&&W>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=Z===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(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(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!he)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);fe(e.type)?(j!=null&&m(ga()),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=>{Se(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let p=`/${encodeURIComponent(u)}/`;const x=R(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":fe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:F,updateCurrentChatSessionId:e=>{m(ba({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),qa=f=>{const d=me(),t=n(C=>pe(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Ke(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Va,{...f,...a})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-Bb1kgpY0.js";import{h as n,n as i}from"./core-BUAuxzwZ.js";import{O as e}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import"./sentry-CKqw5wqt.js";import"./zeni-epic-state-DFvwbAO4.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-Bb1kgpY0.js";import lt from"./NotFoundScreen-CZOkBwPV.js";import{a as k}from"./sentry-CKqw5wqt.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-BUAuxzwZ.js";import{cq as St,f3 as O,eR as J,fh as bt,fa as b,QA as X,fd as d,f2 as y,rx as M,wV as It,QB as Ct,f1 as Tt,fk as yt,rC as At,QC as $,bo as F,gV as w,rG as K,QD as Et,cB as _t,cv as Bt}from"./zeni-epic-state-DFvwbAO4.js";import{U as Nt,z as xt,a as wt,G as Dt,W as Rt,cD as Gt,q as B,a7 as vt,cE as Ut,a8 as Pt,p as $t}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="f73aded9-4980-4e86-b5fa-a5a72e16476e",t._sentryDebugIdIdentifier="sentry-dbid-f73aded9-4980-4e86-b5fa-a5a72e16476e")}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=O(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=J(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:N,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(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(X(a,o));const m=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(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 D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(N(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(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,N).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Nt(),i=St(u??""),s=pt(),h=xt.getSignedInUser(),[N,D]=k.useState(!1),a=S(e=>O(e)),o=S(e=>J(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),G=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=Gt().allUsers,{inboxNotifications:x,isLoading:A,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:Q,isLoading:q,fetchMore:W,isFetchingMore:z,hasFetchedAll:L}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(X(i)),i==null){const e=`../${V}`,p=B(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(A===!1&&C===!0&&o?.companyId!=null&&x!=null){const e=`dashboard_${o.companyId}`,p=x.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,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 U=A||v===!0||C!==!0||A||v===!0||C!==!0;k.useEffect(()=>{U&&G!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||G!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,G]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(D(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&q===!1&&x!=null&&Q!=null){const e=`dashboard_${o.companyId}`,p=x.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const P=Q.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||L===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,v,z,C,L,q,x?.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 E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return _.jsxs(gt,{children:[_.jsx(H,{path:"/:selectedTab",element:_.jsx(Vt,{})}),_.jsx(H,{path:"*",element:_.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-Bb1kgpY0.js";import{a as r}from"./sentry-CKqw5wqt.js";import{u as A,g as j,j as o,N as C}from"./core-BUAuxzwZ.js";import{Kl as K,eR as P,f9 as R,Km as x,Kn as z,Ko as D,Kp as M,ng as k,Jh as L}from"./zeni-epic-state-DFvwbAO4.js";import{z as h,Y as I}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="4a2c245b-760d-45be-93da-4fc226a6a287",n._sentryDebugIdIdentifier="sentry-dbid-4a2c245b-760d-45be-93da-4fc226a6a287")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo(()=>K(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>R(e)),d=o(e=>e.tenantState.fetchState),y=o(x),b=o(z),c=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(M())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);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]),u=v??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-Bb1kgpY0.js";import{h as Y,u as z,g as Q,i as Z,j as d,n as H,o as J,p as I}from"./core-BUAuxzwZ.js";import{eR as v,rl as U,qV as X,KT as O,qQ as T,bs as ee,bn as ae,bT as te,qR as se,KU as oe,KF as C,dE as re,uS as ne,KV as ce,vd as ie,f0 as le,e_ as de}from"./zeni-epic-state-DFvwbAO4.js";import{z as me,U as fe,W as pe,k as ue,a as q,G as M,v as he,d as $,ao as Fe,q as ge}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import be from"./NotFoundScreen-CZOkBwPV.js";import{F as Ie}from"./FeaturePreviewScreen-S50T6GyD.js";import{a as F}from"./sentry-CKqw5wqt.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import{u as Te}from"./useInitialThreadRequest-BCEE6rBO.js";import{t as Se}from"./routePaths-CJjdcbm_.js";import{M as ye}from"./MobileAppDrawer-DldLO-6R.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="6c20ed3f-adc1-4554-a2ce-529bb7a5ec4d",s._sentryDebugIdIdentifier="sentry-dbid-6c20ed3f-adc1-4554-a2ce-529bb7a5ec4d")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(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("../../")}}})(Fe);function P(){const s=Y(),e=z(),a=Q(),{forecastId:o,tenantEmailDomain:r}=Z(),[c,p]=F.useState(!1),[m,u]=F.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!c&&g)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&g&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,U,T,g]);const D=ue(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:B}=q(),{isFeatureEnabled:E}=B(M.isReportsCommentingEnabled),N=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[V,K]=F.useState(!1),j=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:_,isAiCfoAccessEnabled:G,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:N,onClickMenuIcon:()=>{j(!0)}})]})}function Ke(){const s=d(c=>v(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.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(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-Bb1kgpY0.js";import{KO as te,eR as J,jI as G,f0 as q,e_ as ne,Ie as X,Ks as oe,tQ as Ee,KP as N,tE as ke,tZ as Ie,tT as ie,tI as re,tX as Pe,tU as je,KQ as le,vE as Te,KR as Le,fD as ve,KS as $,tN as de,tL as ce,u0 as Fe,c1 as Re}from"./zeni-epic-state-DFvwbAO4.js";import{J as pe,a as Y,G as E,z as H,a9 as ue,A as me,ak as ge,al as Ae,y as fe,o as A,T as he,D as Ce,am as Oe,U as Ve,W as Ue,v as Ze,d as be,f as Be,q as Ke,an as $e,k as _e}from"./index-DYzN1z_e.js";import{D as ye,n as W,S as Se}from"./mui-qr3DHRrK.js";import ae from"./NotFoundScreen-CZOkBwPV.js";import{a as r}from"./sentry-CKqw5wqt.js";import{u as ee,i as ze,j as m,h as Ge,g as He,n as We,o as se,p as K}from"./core-BUAuxzwZ.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import{M as Me}from"./MobileAppDrawer-DldLO-6R.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="138fd7b0-ac40-4e9e-a5ef-6f662274bf08",a._sentryDebugIdIdentifier="sentry-dbid-138fd7b0-ac40-4e9e-a5ef-6f662274bf08")}catch{}})();const Ne={overlayWidth:new fe(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),{userId:w}=ze(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>G(e)),{useFeatureGate:h}=Y(),{isFeatureEnabled:k}=h(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),v=X(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?S(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=h(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=h(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=h(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(f),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(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},qe=W(Se)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,we=W(he.H6Regular)`
|
|
6
|
+
margin-top: ${A.sp7};
|
|
7
|
+
padding-left: ${A.sp8};
|
|
8
|
+
padding-right: ${A.sp8};
|
|
9
|
+
color: ${a=>a.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,De=W(he.LargeRegularSp)`
|
|
12
|
+
color: ${a=>a.theme.colors.hero};
|
|
13
|
+
padding-left: ${A.sp8};
|
|
14
|
+
padding-right: ${A.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${A.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,Xe={overlayWidth:new fe(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>G(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:h}=D(E.isDebitCardFeatureEnabled),k=q(h,d),P=ne(d),L=X(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,h),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[w.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(f),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(we,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(Se)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,aa=We(function(a,t){const l=le(a),n=H.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($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})($e);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),f=m(e=>J(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,f)&&V,S=X(f),w=f?.tenantId,{tenantEmailDomain:d}=f,[u,D]=r.useState(!1),[h,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=Qe({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=f?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ze,{analytics:be,onLoad:e=>e.trackPageLoaded(Be.Event.members)}):null,h===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:h,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Q)=>{n($({sortKey:e,sortOrder:Q}))},onRowClick:e=>{const Q=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ke(g.state?.pathnameStackToGoBack,g.pathname);l(Q,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Sa(){const a=_e();return Re(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(K,{path:"/",element:s.jsx(M,{})}),s.jsx(K,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx(K,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx(K,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(K,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-Bb1kgpY0.js";import T from"./NotFoundScreen-CZOkBwPV.js";import{a as r}from"./sentry-CKqw5wqt.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as V,o as z,p as h}from"./core-BUAuxzwZ.js";import{eR as F,QE as b,bq as B,bn as N,hp as O,gV as Q}from"./zeni-epic-state-DFvwbAO4.js";import{Q as q,z as I,W,cF as $}from"./index-DYzN1z_e.js";import"./mui-qr3DHRrK.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-_2U3D7cn.js";import{M as H}from"./MobileAppDrawer-DldLO-6R.js";import"./recharts-DpT5D_n2.js";import"./analytics-D3aHsKWZ.js";import"./plaid-EcM8CvHn.js";import"./dnd-BMK4pBgf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BbNCnhvv.js";import"./lexical-CO-dwuMV.js";import"./pdf-CzWN9HeX.js";import"./utils-CVDKY2CT.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]="297f2582-2186-4661-9166-ce1e81e0d133",e._sentryDebugIdIdentifier="sentry-dbid-297f2582-2186-4661-9166-ce1e81e0d133")}catch{}})();const J=V(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),K=()=>{const e=_(),t=v(),c=q(),o=p(a=>F(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=U(),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=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,E)=>{f(O({fromMonth:a,toMonth:i,cacheOverride:E}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),R=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return W({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-CKqw5wqt.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};
|