@zeniai/web-app-ui 5.1.23-qa → 5.1.24-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DocR07FY.js +1 -0
- package/dist/assets/AddressScreen-Csre8zO2.js +9 -0
- package/dist/assets/{AiCfoScreen-C8ndg8-S.js → AiCfoScreen-C5oCZlS4.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-DSWHaCLJ.js → BillPayApprovalRoutes-DcGG_cef.js} +1 -1
- package/dist/assets/{BillPayRoutes-BRXMbech.js → BillPayRoutes-DjcCRuED.js} +17 -17
- package/dist/assets/{BusinessVerificationPageScreen-hINsL07T.js → BusinessVerificationPageScreen-e2XdUw9z.js} +2 -2
- package/dist/assets/ChargeCardRoutes-Jy5HjNAq.js +71 -0
- package/dist/assets/{CompanyPassportScreen-BLTK97lt.js → CompanyPassportScreen-D8V0b6yZ.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-B37X59g8.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C_QbqgZM.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CmcaDbTa.js +23 -0
- package/dist/assets/{DashboardRoutes-K8aUT5py.js → DashboardRoutes-Crdrh0ru.js} +3 -3
- package/dist/assets/{DefaultTenantHome-jsk_DYtf.js → DefaultTenantHome-CrS-vGpL.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DuxbN0zG.js +18 -0
- package/dist/assets/DrawerScreen-k4ejNFVF.js +1 -0
- package/dist/assets/EntityDetailRoutes-Cz3bqJps.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DUQvgVgE.js +25 -0
- package/dist/assets/{FeaturePreviewScreen-Dr_POgT4.js → FeaturePreviewScreen-DX8d8ftd.js} +1 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-xn6NQAqC.js +1 -0
- package/dist/assets/{MagicLinkRoutes-BPB-P1Fg.js → MagicLinkRoutes-DQ4uoRpD.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-DrGW2O8V.js +12 -0
- package/dist/assets/{MobileAppDrawer-CgOzDlQ4.js → MobileAppDrawer-ztL55BFc.js} +1 -1
- package/dist/assets/NotFoundScreen-CbugOr9O.js +1 -0
- package/dist/assets/{NotificationRoutes-C592T722.js → NotificationRoutes-CKq0wqeI.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CEU5OZgL.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-BNnQK1XQ.js → PandLWithForecastRoutes-B-40q3h2.js} +1 -1
- package/dist/assets/PeopleRoutes-CLPVeXV_.js +22 -0
- package/dist/assets/PerformanceRoutes-BRxTGeZG.js +1 -0
- package/dist/assets/{Preview-g8Mu_WcJ.js → Preview-DvwNtgYT.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DSdk-FjT.js → QBOConnectionScreen-B4aVoacL.js} +1 -1
- package/dist/assets/ReferralListScreen-wo-BFaOS.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CwwWIVRR.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DJP2HUMn.js → ReimbursementApprovalRuleDetailScreen-B6hhKpnv.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cafrc4t3.js → ReimbursementRoutes-DqOur3Qw.js} +10 -10
- package/dist/assets/{ReportsRoutes-Bt9Jtrte.js → ReportsRoutes-DhxXl2sZ.js} +1 -1
- package/dist/assets/RewardsRoutes-U6P7PAVH.js +1 -0
- package/dist/assets/{ScreenRoutes-BgL7Kr9c.js → ScreenRoutes-_YOcQOAn.js} +2 -2
- package/dist/assets/{SettingsRoutes-DlKNq4j6.js → SettingsRoutes-Txvmet51.js} +8 -8
- package/dist/assets/{SetupPagesScreen-DqRd-zIf.js → SetupPagesScreen-CW4TDHQ1.js} +5 -5
- package/dist/assets/SignInScreen-LFx-lhED.js +1 -0
- package/dist/assets/SignOutScreen-Cj8XXvng.js +9 -0
- package/dist/assets/{TaskListScreen-D_uVCQuz.js → TaskListScreen-gDLwnqUy.js} +2 -2
- package/dist/assets/{TaskRoutes-rC7qMYpS.js → TaskRoutes-DSsGgBGN.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-DAibqHVt.js → TransactionDetailRoutes-3fJlcVH_.js} +1 -1
- package/dist/assets/TransactionDetailScreen-C05AQBgs.js +5 -0
- package/dist/assets/{TransactionListRoutes-DItTlRN-.js → TransactionListRoutes-B7M8rc9_.js} +1 -1
- package/dist/assets/TreasuryRoutes-DRGM_rOp.js +37 -0
- package/dist/assets/{VendorsRoutes-Dv4EQPgs.js → VendorsRoutes-C3bYBpA7.js} +22 -22
- package/dist/assets/WiseConfirmationScreen-CCLyRCEQ.js +12 -0
- package/dist/assets/ZeniAccountRoutes-Q8kxFpOw.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-CeoDjC-C.js +9 -0
- package/dist/assets/{accountMappingHelper-CzAH_5Yf.js → accountMappingHelper-BeLxsEhj.js} +1 -1
- package/dist/assets/{analytics-Dw_3pmCn.js → analytics-Dcb_7Yrn.js} +1 -1
- package/dist/assets/analyticsHelper-Bgdq7lAB.js +1 -0
- package/dist/assets/{core-CDhowsfU.js → core-B01_r_a6.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CMBlsFn_.js → decodeURIComponentSafe-BOkChgPc.js} +1 -1
- package/dist/assets/{dnd-DKS9GO8i.js → dnd-aIvu8cuo.js} +1 -1
- package/dist/assets/{empty-47sW8Qmr.js → empty-DLWGhBLz.js} +1 -1
- package/dist/assets/{empty-CjcsWRgM.js → empty-DP7Qtv_6.js} +1 -1
- package/dist/assets/{emptyVideoElement-CbbMmzSE.js → emptyVideoElement-mC3LqJrg.js} +1 -1
- package/dist/assets/epic-U_1X8d7m.js +2 -0
- package/dist/assets/getLocaleForTenant-BIDDVgBq.js +1 -0
- package/dist/assets/{index-C6BQnWIY.js → index-B9Boa_Td.js} +2 -2
- package/dist/assets/{index-25aMAChY.js → index-BAIA3LT3.js} +1 -1
- package/dist/assets/{index-DwrCO4Lg.js → index-C7ZZYs3m.js} +1 -1
- package/dist/assets/{index-CHgzupK4.js → index-CKvoU8sU.js} +1 -1
- package/dist/assets/{index-CkTyvDhP.js → index-DEwFeJzq.js} +1 -1
- package/dist/assets/{index-C4tlyCWl.js → index-HFOJdDTm.js} +1 -1
- package/dist/assets/{index-BQ0X6_Da.js → index-b9cGMwNO.js} +12632 -12576
- package/dist/assets/{index-Do2WOEvN.js → index-fiqC8vZO.js} +1 -1
- package/dist/assets/{lexical-CS8ufcYk.js → lexical-CSRsdQQS.js} +1 -1
- package/dist/assets/{liveblocks-K3nGB-yf.js → liveblocks-CnWjJuBt.js} +1 -1
- package/dist/assets/{lottie-B8G5pAXB.js → lottie-DUONjUug.js} +1 -1
- package/dist/assets/{mui-BgLeJX1Z.js → mui-DRaG-BlK.js} +1 -1
- package/dist/assets/{pathToGoBack-ChUDZjum.js → pathToGoBack-3jAhRKQN.js} +1 -1
- package/dist/assets/{pdf-VHmgvQMs.js → pdf-UaypZdKm.js} +3 -3
- package/dist/assets/{pdf-lib-BRk0Ou4i.js → pdf-lib-t9AAxY-T.js} +1 -1
- package/dist/assets/{plaid-Bj5Nu549.js → plaid-VN7yDnB4.js} +1 -1
- package/dist/assets/{pusher-DTEzYJPb.js → pusher-UqFP2KpO.js} +1 -1
- package/dist/assets/{react-BI-9_O9h.js → react-B_Uab5TB.js} +1 -1
- package/dist/assets/{react-DwESlt3T.js → react-CFhlJXGh.js} +1 -1
- package/dist/assets/{react-ZvfMsETv.js → react-CqO-0SNq.js} +1 -1
- package/dist/assets/{react-De6TcqG-.js → react-DNgryaI2.js} +1 -1
- package/dist/assets/{react-84CnfRO8.js → react-YISROtP4.js} +1 -1
- package/dist/assets/{react-DKw0KcCw.js → react-r8LsJVdm.js} +1 -1
- package/dist/assets/{recharts-BvcujEC0.js → recharts-q0doAU-l.js} +1 -1
- package/dist/assets/{routePaths-CzDX4I74.js → routePaths-Sv0e7DY5.js} +1 -1
- package/dist/assets/{sentry-CNaiRXAC.js → sentry-1cGDtjwd.js} +1 -1
- package/dist/assets/{url-DJ1DXduo.js → url-C9c3hZCp.js} +1 -1
- package/dist/assets/{url-CyiW2uSO.js → url-C_w1-pX_.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Bf82IQCL.js → useAiCfoDashboardSuggestedQuestionsChips-BtVPWNXS.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C1fOlGC9.js +1 -0
- package/dist/assets/{useDeviceId-d6RNZdGO.js → useDeviceId-DJ_jocMS.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-B02Fb6K3.js → useInitialThreadRequest-C9kyf2mS.js} +1 -1
- package/dist/assets/{utils-DmT_9hpG.js → utils-Y2cylN27.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BvJD8iA0.js → withTransactionSidePanel-Oei_yMio.js} +3 -3
- package/dist/assets/{zeni-epic-state-4LEhOJ6C.js → zeni-epic-state-BFnJgXOA.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +11 -6
- package/dist/assets/AddressRoutes-KxRpQETs.js +0 -1
- package/dist/assets/AddressScreen-D9jTpiRi.js +0 -9
- package/dist/assets/ChargeCardRoutes-5E0W2S5Q.js +0 -71
- package/dist/assets/ConnectionAuthScreen-DVxj9yqw.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DQpo1S5_.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-BxSP759G.js +0 -23
- package/dist/assets/DomesticWireDetailScreen-D4FTqRPl.js +0 -18
- package/dist/assets/DrawerScreen-D6xY9V_J.js +0 -1
- package/dist/assets/EntityDetailRoutes-DJM6fnLo.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-KFGjDoe1.js +0 -25
- package/dist/assets/HubSpotOAuthCallbackScreen-hXbthMay.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-p4iQbwz_.js +0 -12
- package/dist/assets/NotFoundScreen-BckDe5FR.js +0 -1
- package/dist/assets/OAuthConsentScreen-BQGl_mQs.js +0 -1
- package/dist/assets/PeopleRoutes-DDjEMAEG.js +0 -22
- package/dist/assets/PerformanceRoutes-Bx-h_Fpb.js +0 -1
- package/dist/assets/ReferralListScreen-DVpzJ3_G.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-B3TkLLBO.js +0 -1
- package/dist/assets/RewardsRoutes-WBYd4-6Q.js +0 -1
- package/dist/assets/SignInScreen-Dlg-ENeE.js +0 -1
- package/dist/assets/SignOutScreen-Ce_YYlY2.js +0 -9
- package/dist/assets/TransactionDetailScreen-mDva30Hd.js +0 -5
- package/dist/assets/TreasuryRoutes-Dr_HFldS.js +0 -37
- package/dist/assets/WiseConfirmationScreen-wmamE3zr.js +0 -12
- package/dist/assets/ZeniAccountRoutes-EQa4-H6u.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-CKZz34Iw.js +0 -9
- package/dist/assets/analyticsHelper-Csyv2zhr.js +0 -1
- package/dist/assets/epic-Do067CG9.js +0 -2
- package/dist/assets/getLocaleForTenant-BVeXTxkD.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-4ypqOwMf.js +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-K3nGB-yf.js";import Rn from"./NotFoundScreen-BckDe5FR.js";import{a,b as Pt}from"./sentry-CNaiRXAC.js";import{n as Fe,S as Dn}from"./mui-BgLeJX1Z.js";import{u as re,h as wt,g as qe,j as U,n as Un,i as rt,o as Fn,p as Le}from"./core-CDhowsfU.js";import{eP as Re,PZ as Bn,n4 as ke,fj as _n,qJ as Vn,nm as xt,nH as Rt,P_ as Dt,nR as jn,P$ as Ut,nf as On,qf as Mn,f3 as Ie,Q0 as De,sP as Ft,C0 as Bt,Q1 as _t,Q2 as Ln,pW as Ge,LE as dt,LG as zn,jJ as Qn,LH as $n,jQ as qn,cV as Gn,tU as Je,ns as Vt,nW as Ue,Q3 as Jn,Kx as ut,Kw as Pe,Q4 as mt,k5 as Nn,Q5 as Kn,Q6 as Yn,Q7 as Hn,Q8 as Wn,nz as Zn,nk as de,nZ as we,Q9 as Xn,Qa as ea,Qb as ta,o4 as na,jU as aa,jL as oa,Qc as sa,jT as ht,LO as ca,Qd as ia,Qe as la,pS as ra,pv as da,nX as fe,pu as ze,Qf as ua,Qg as ma,lo as ha,bq as pa,lj as pt,l5 as ga,Qh as Ca,gT as gt,fU as Sa,lg as Ia,vN as fa,Qi as ka,ov as Ea,oq as va,ou as ya,of as ba,Qj as Aa,f6 as jt,nK as Ta,nv as Pa,fk as Ct,n$ as wa,Qk as xa,nY as Ot,Ql as Ra,Qm as Da,Qn as Ua,Qo as Fa,Qp as St,q2 as Ba,pl as _a,Kv as Va,jS as ja,Qq as Oa,Gy as Ma,jR as La,jG as za,f5 as Qa,oW as Mt,pd as $a,nV as It,n_ as qa,bE as Ga,ld as Ja,la as Na,Qr as Ka,oe as ft,pb as kt,p9 as Ya,o$ as Ha,oG as Wa,pc as Za,Qs as Xa,Qt as eo,oK as to,Qu as no,oA as ao,oJ as oo,oH as so,pg as co}from"./zeni-epic-state-4LEhOJ6C.js";import{v as Lt,T as le,c as L,q as H,X as zt,_ as Qt,cC as io,z as Be,cD as lo,at as xe,cE as ro,aT as Et,B as $t,cF as uo,aq as Qe,D as mo,cG as ho,a2 as po,cH as go,U as Co,cI as So,cJ as Io,F as fo,k as ko,aN as Eo,b7 as vo,w as yo,cK as bo}from"./index-BQ0X6_Da.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{c as vt,C as Ao}from"./TransactionDetailScreen-mDva30Hd.js";import{w as To}from"./withTransactionSidePanel-BvJD8iA0.js";import{h as Po,v as wo}from"./routePaths-CzDX4I74.js";import{g as $e}from"./accountMappingHelper-CzAH_5Yf.js";import{D as xo}from"./DrawerScreen-D6xY9V_J.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.js";import"./decodeURIComponentSafe-CMBlsFn_.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="4174b8a2-0267-490d-869c-0a5e7993d48a",t._sentryDebugIdIdentifier="sentry-dbid-4174b8a2-0267-490d-869c-0a5e7993d48a")}catch{}})();const Ro=()=>{const t=re(),i=wt(),A=qe(),f=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(le.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=zt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Do,{children:C.jsx(io,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Do=Fe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Uo=Pt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:A,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=re(),u=Be.getSignedInUser(),o=U(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:y,statementUploadChosen:r}=t,B=m[i],h=B?.accountReconEntity.statementMetaData?.statementUploadId,T=(e,n)=>{g(Mn(e,n.split(".")[0]))},I=e=>{h!=null&&g(On({accountId:i,selectedPeriod:y,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(jn({accountId:i,selectedPeriod:y,payload:e}))},K=e=>{g(Ut({accountId:i,selectedPeriod:y,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),O=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),_=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return B!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(lo,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:y,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:T,onDeleteFile:I,onSelectSourceType:K,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):_!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(ro,{excludedAccountReconciliation:_,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:O})})}):null}),yt=Fe.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,bt=Fe.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
`;function Fo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:A,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=U(u=>Ln(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(uo,{onCloseClick:i,addCustomerRequest:A,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const Bo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:_o,comma:At,space:Vo}},dateFormat:Gt}=mo.getLocalizedStrings(),Tt=co,jo=Un(function(t,i){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,y={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=Ie(t),{selectedTransactionCategorizationTab:B}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${po}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:B,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:A,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:A,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:y,navigate:r,onClickCustomerRequest:B,handleEditClick:h,setActivityLogTransactionId:T}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:K}=S.jeSchedules,te=Vt(I),O=Ue(te.start),_=Ue(te.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(I.month,I.year),t(_a(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const b=()=>t(St(e,n,{fetchState:"Error"}));go(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(P=>{P!=null?t(Ba(e,P)):b()}).catch(b)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Fa(e,n)),m!=null&&t(ke({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Ua(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?Vo+_o+l+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&O!=null&&t(Ot({start:O,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(so(e))},onBulkUploadProgress:e=>{t(oo(e))},onBulkUploadSuccess:e=>{t(ao({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(no(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(to(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(eo())},onSetBulkUploadResultsTab:e=>{t(Xa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Za(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Wa())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ha(e,n))},onFetchBulkUploadBatches:e=>{t(Mt(e))},onFetchMoreBatchDetails:()=>{t(Ya())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:s,uiState:{searchString:e}})),_!=null&&O!=null&&t(fe(s,{start:O,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(wa(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(jt(e))},handleLogOutClick:()=>{const e=H(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=$e(K.prepaidExpensesAccountList,s.selectedOptions),b=$e(K.fixedAssetsAccountList,l.selectedOptions),P=$e(K.accruedExpensesAccountList,k.selectedOptions),V={selectedPrepaidExpensesAccountIds:p.map(w=>w.accountId),selectedFixedAssetsAccountIds:b.map(w=>w.accountId),selectedAccruedExpensesAccountIds:P.map(w=>w.accountId)};t(Aa({data:V}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:b}=n,{allAccountList:P,allClassList:V,allDepreciationAccountList:w}=S.jeSchedules,Q=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find($=>$.id===b?.selectedOption):void 0,ne={id:Q?.zeniId??b?.selectedOption??"",name:Q?.name??b?.defaultOptions.find($=>$.value===b?.selectedOption)?.label??"",logo:Q?.logo},ae=p?.selectedOption!=null?P.find($=>$.qboId===p.selectedOption):void 0,Ee=k?.selectedOption!=null?V.find($=>$.classId===k.selectedOption):void 0,oe=l?.selectedOption!=null?w.find($=>$.qboId===l.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:ae?.accountId,updatedClassId:Ee?.classId,updatedAccumulatedDepreciationCategoryID:oe?.accountId,updatedVendor:{id:ne.id,name:ne.name}}}))},ignoreRecommendedJeSchedule(e,n){t(va(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Pe("common"))},onCancelAutoComplete:()=>{t(Pe("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,s)=>{t(fa({selectedJEScheduleKey:n}));const l=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(Ia(e,m.companyId,m.tenantId))},onClickCustomerRequest:B,setActivityLogTransactionId:T,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Sa())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ca(e))},onUpdateFileAttachment:e=>{t(ga({files:e}))},previewMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(ha(m.companyId,e,m.tenantId)),L.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,pa().format(Gt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,b,P,V,w,Q,ne,ae)=>{t(ma(e,n,s,l,y,k,p,b,P,V,w,Q,ne,ae))},onCancelAutoComplete:()=>{t(Pe("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),_!=null&&O!=null&&(t(fe(e,{start:O,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&O!=null&&t(fe(e,{start:O,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,b)=>{_!=null&&O!=null&&t(fe(e,{start:O,end:_},!0,s,n,l,k,p,b))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,b,P)=>{t(da(e,n,s,l,P??null,k,p,!1,b))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:y,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):L.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(ra(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:V,lineIds:w}=n;p!=null&&t(ca({transactionId:P,customerUpdates:p})),t(ia({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:V,uncategorizedAccounts:y,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Je(k,e,n,s,!0,E,b))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:V,lineIds:w}=n;p!=null&&(t(aa({transactionId:P,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(oa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:V,uncategorizedAccounts:y,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Je(k,e,n,s,!0,E,b))):t(sa({selectedTab:l,transactionId:P.id,lineId:w[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{L.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(na(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=wo(e.id,e.qboId,i.tenantEmailDomain),s=H(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(we(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(de(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Zn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Wn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Yn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Nn(l)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,Ge("bill"));const n=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Pe("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Jn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,A)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=A;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,y,r)=>{u.onUploadTransactionReceipt(v,S,m,y,r,g.authParams)}}}(t,i,E)})(ho),Oo=To(function(t){const i=t.displayName??t.name??"Component",A=Pt.memo(t),f=E=>{const g=re(),u=function(){const T=re(),I=U(d=>Ie(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{T(De({selectedDrawerAccountId:d}))},[T]),closePanel:a.useCallback(()=>{T(De({selectedDrawerAccountId:void 0}))},[T])}}(),o=U(T=>Ie(T).reconciliation),v=U(T=>Re(T)),S=a.useCallback((T,I)=>{g(Ft("expense_automation_reconcile",T,I))},[g]),m=a.useCallback((T,I)=>{const d=v?.companyId;d!=null&&(g(Bt(T,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),y=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Uo,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[y,u.isOpen,u.closePanel]),B=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:B,[u.isOpen,u.closePanel,u.selectedAccountId,B]);return C.jsx(Et.Provider,{value:h,children:C.jsx(A,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:A,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=Co(),m=So(),{isOpen:y}=Io(),r=wt(),B=qe(),h=re(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:I}=qt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=zt(),K=(()=>{const c=U(q=>Ie(q)),M=qe(),{currentSelectedViewFetchState:N,currentSelectedView:j,selectedPeriod:F}=c,Se=Qe(j),X=Qe(N.fetchState),be=a.useCallback(q=>{const Y=M.state?.referrer;j==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(F.month,F.year,c.transactionView.totalCountByTab.review,0,q,Y??null):L.trackTransactionsAutoCategorisedPage(F.month,F.year,c.transactionView.totalCountByTab.autoCategorized,0,q,Y??null)),j==="missing_receipts"&&L.trackMissingReceiptsPage(F.month,F.year,q,c.missingReceipts.transactions.length,Y??null),j==="je_schedules"&&L.trackMonthCloseScheduleListPage(F.month,F.year,q,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,Y??null),j==="flux_analysis"&&L.trackFluxAnalysisPage(F.month,F.year,q,Bo(c.fluxAnalysis),Y??null),j==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(F.month,F.year,q,"draft",c.auditSummary.auditScorePercentage,null,Y??null)},[F,c]);return a.useEffect(()=>{X===N.fetchState&&j===Se||N.fetchState!=="Completed"||be(!1)},[j,N.fetchState,Se]),be})(),te=fo(),[O,_]=a.useState(!1),e=U(c=>dt(c)),n=U(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[b,P]=a.useState([]),[V,w]=a.useState(void 0),Q=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),w(c)},[d,v,m,S]),ne=a.useCallback(()=>{m(),w(void 0),d(),I()},[d,I,m]),ae=a.useRef(v);a.useEffect(()=>{v===!0&&ae.current===!1&&(m(),w(void 0),d()),ae.current=v},[d,v,m]);const Ee=a.useRef(y);a.useEffect(()=>{y===!0&&Ee.current===!1&&(v&&S(!1),w(void 0),E===!0&&f!==!0&&t?.()),Ee.current=y},[t,y,v,S,f,E]);const oe=E===!0&&f!==!0,$=a.useRef(oe);a.useEffect(()=>{oe&&!$.current&&(v&&S(!1),m(),w(void 0)),$.current=oe},[v,oe,m,S]);const[Ne,Jt]=a.useState(!1),Ke=a.useRef(!1),{selectedTab:Ye}=rt(),{tenantEmailDomain:Nt}=rt(),[_e,He]=a.useState(B.state?.message==="comingFromTransactionDetail"),We=B.state?.message==="comingFromOverview",Kt=ko(),Ve=Be.getSignedInUser(),{useDynamicConfig:Yt,useFeatureGate:ue}=Lt(),{configValue:Ht}=Yt(Eo.enableUncategorizedExpenseCategory),W=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=ue(le.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:me}=ue(le.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=ue(le.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=ue(le.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Zt}=ue(le.isProjectsTransactionsEnabled),Xt=a.useCallback(c=>{const M=Ge(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,M)},[i]),en=U(c=>Va(c,"common")),z=U(c=>Ie(c)),{monthEndCloseChecksView:J,currentSelectedView:x,selectedPeriod:D,selectedTransactionCategorizationTab:se,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:Z,jeSchedules:je,reconciliation:nn}=z;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||Q(void 0)},[x,Q,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==se&&(ve.current=se,x==="transaction_categorization"&&Q(void 0)):ve.current=se},[x,se,Q]);const an=U(c=>V==null?void 0:ja(c.transactionState,V)),ce=an?.qboId,on=U(c=>ce==null?void 0:Oa(c,ce));a.useEffect(()=>{ce!=null&&h(Ma(ce))},[h,ce]);const{selectedAccountId:he}=nn,et=Qe(je.accountSettingsView.saveState.fetchState),sn=U(c=>La(c.accountState,c.accountListState,"accountList")),cn=U(c=>za(c)),pe=Ye!=null?Qa(Ye):x,ln=U(c=>c.entityAutoCompleteState.autoCompleteText.common);if(Qt({isDataReady:Z.fetchState==="Completed"}),Ve==null)throw Error("Can't access expense automation screen without signing in...");const tt=Vt(D),ge=Ue(tt.start),Ce=Ue(tt.end);if(ge==null||Ce==null)throw Error(`Invalid start - ${ge} and end - ${Ce} period from given ${D}`);const rn=a.useCallback(()=>{l(!1)},[]),dn=a.useCallback(()=>{p(!0)},[]),un=a.useCallback(c=>{P(c),p(!1)},[]),mn=a.useCallback(()=>{P([])},[]),ye=z.missingReceipts.bulkUpload.phase,nt=z.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{me===!0&&x==="missing_receipts"&&ye==="matching"&&nt!=null&&h(Mt({cacheOverride:!0}))},[me,x,ye,nt,h]);const at=Ve?.userId,hn=D.month,pn=D.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&me!==!1&&ye==="idle"&&at!=null&&ot!=null&&h($a())},[x,me,ye,at,ot,hn,pn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?_(!0):_(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{pe!=null&&x!==pe&&h(jt(pe))},[pe]),a.useEffect(()=>{Ne!==!1||Z.fetchState!=="Completed"&&Z.fetchState!=="Error"||!R||(Jt(!0),h(It(!1,!1,W)))},[Ne,Z,R,W]),a.useEffect(()=>{!We&&R&&(h(It(!1,!1,W)),h(de(D,he,!1,!1)))},[D.month,D.year,R,W]);const st=a.useCallback((c=!1,M=!1)=>{const N={start:ge,end:Ce};switch(x){case"transaction_categorization":h(fe(se,N,c,!_e,void 0,void 0,M,void 0,W)),He(!1);break;case"flux_analysis":h(we(D,c,M,null));break;case"month_end_insights":if(M===!1){const j=new Date(D.year,D.month,0),F=Ga(j.toDateString()).format(Gt.analytics.YYYYDashMMDashDDFormat);h(Ja(!0,n.companyId,n.tenantId,F)),h(Na(n.companyId,n.tenantId))}break;case"je_schedules":h(qa(N,M));break;case"missing_receipts":h(Ot(N,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,M));break;default:h(de(D,he,c,M))}},[x,ge,Ce,n.companyId,n.tenantId,se,D,he,_e,He,W]);a.useEffect(()=>{x===pe&&Z.fetchState==="Not-Started"&&R&&st(!0)},[Z,ge,Ce,n.companyId,n.tenantId,R]),a.useEffect(()=>{We||_e||Ke.current||tn.fetchState==="In-Progress"||Z.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),a.useEffect(()=>{J.fetchState!=="In-Progress"&&J.fetchState!=="Completed"&&h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!1}))},[J.fetchState,n.tenantId]),a.useEffect(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!0})),h(Ka({companyId:n.companyId})),r("../"))},[z.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,D,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{J.fetchState!=="In-Progress"&&J.fetchState==="Completed"&&h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[J.fetchState,n.tenantId,D,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&he==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(de(D,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,de,he,D]);const gn=vt();a.useEffect(()=>{const c=(J.monthEndCloseChecks?.monthEndCloseCheckList.find(M=>M.id==="month_end_insights")?.isDisabled??!1)&&!Ze;x!=="month_end_insights"||!c&&J.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,J.monthEndCloseChecks]);const Cn=u===!0?g:A,Sn=u===!0||E===!0,In=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&je.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,je.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:M,currentSelectedView:N})=>{const j=re();let F,Se,X;const be=vt(),q=c.transactionView;let Y=()=>{};const{transactions:yn,selectedTransactionId:ie,selectedTransactionLineId:Ae,transactionLocalData:bn}=q;if(N==="transaction_categorization"){const Oe=bn.find(ee=>ee.transactionId===ie),G=yn.find(ee=>ee.id===ie),it=Ae!=null?Oe?.transactionReviewLocalData?.lineItemById[Ae]:void 0,lt=it?.account;Se=it?.class?.classId,F=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const Tn=Po(ie,G?.typeOfTransaction);G!=null&&Tn&&(X={id:ie,type:Ge(G.typeOfTransaction)}),Y=()=>{if(ie!=null&&Ae!=null&&G!=null){const ee=q.transactionLocalData.find(Te=>Te.transactionId===ie)?.transactionReviewLocalData;if(ee!=null&&G.lines!=null&&G.lines.length>0){const Te=ee.lineItemById[Ae];let Me=ee.selectedEntity;if(Gn(G)||(Me=Te.selectedEntityLine),Me!=null){const Pn=Me,wn={transactionId:{id:G.id,type:G.type},transaction:G,lineIds:G.lines.map(xn=>xn.id)??[]};j(Je(Pn,Te.amount.amount,wn,!1,!0,be))}}}}}const An=U(Oe=>dt(Oe,void 0,F,Se));return{transactionId:X,onSaveVendor:()=>{j(qn(X,void 0,!1,!0))},onSaveSuccess:Y,onCancel:()=>{X!=null&&j(zn({transactionId:X})),j(Qn()),j($n()),M()},vendorViewDetails:An}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{_(!1)},currentSelectedView:x});return Kt?.loggedInUserRoleMap==null?J.fetchState==="Error"?C.jsx(vo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(xo,{isOpen:k,drawerLeftMargin:new yo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(Mo,{onClick:c=>c.stopPropagation(),children:C.jsx(Fo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:un,resetCustomerRequest:mn})})}),ct!=null&&O&&C.jsx(Ao,{isOpen:O,transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}),C.jsx(jo,{navigate:r,location:B,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:ln,entityAutoCompleteView:en},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:me,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:b,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:W,isAccountingClassesEnabled:cn,isProjectsTransactionsEnabled:Zt,isCOTEnabled:gn,currentTenant:n,companyId:n.companyId,signedInUser:Ve,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?V:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&V!=null?C.jsx(bo,{activityLogView:on,qboId:ce,onClose:()=>Q(void 0),selectedTransactionId:V},String(V)):null,uncategorizedAccounts:sn,onClickCustomerRequest:dn,handleEditClick:rn,tenantEmailDomain:Nt,trackExpenseAutomationTabAnalytics:K,setActivityLogTransactionId:Q,closeSidePanel:In,openTransactionPanel:i,sidePanelIsOpen:Sn,sidePanelIsFullView:u!==!0&&f,panelContent:Cn,isAiCfoAccessEnabled:T,onAskAiCfoClick:ne,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:u===!0?66:void 0})]})})),Mo=Fe(Dn)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function rs(){return C.jsxs(Fn,{children:[C.jsx(Le,{path:"*",element:C.jsx(Ro,{})}),C.jsx(Le,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Oo,{})}),C.jsx(Le,{path:"*",element:C.jsx(Rn,{})})]})}export{rs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-CNaiRXAC.js";import{u as l,h as f,g as m}from"./core-CDhowsfU.js";import{gA as p,JK as g,JL as _}from"./zeni-epic-state-4LEhOJ6C.js";import{u as b,L as h,z as y}from"./index-BQ0X6_Da.js";import"./liveblocks-K3nGB-yf.js";import"./recharts-BvcujEC0.js";import"./mui-BgLeJX1Z.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="2e2261c3-368d-4035-9d6b-fd93dac48db4",e._sentryDebugIdIdentifier="sentry-dbid-2e2261c3-368d-4035-9d6b-fd93dac48db4")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-K3nGB-yf.js";import{a as g}from"./sentry-CNaiRXAC.js";import{u as U,g as _,h as w,s as J,j as l,N as T}from"./core-CDhowsfU.js";import{z as r,h as P,D as A,d as M,c as V,e as N,m as R,R as W,g as $}from"./index-BQ0X6_Da.js";import{eP as q,Jo as B,Jy as G,Jp as H,eW as K,fn as Q,Ju as X,fL as Y,cT as Z,Jz as ee,JA as te}from"./zeni-epic-state-4LEhOJ6C.js";import{n as ne}from"./mui-BgLeJX1Z.js";import{u as se}from"./useDeviceId-d6RNZdGO.js";import{f as ae}from"./analyticsHelper-Csyv2zhr.js";import{t as ie}from"./getLocaleForTenant-BVeXTxkD.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="a1e5eb1e-01c3-4882-9151-2eac257c7ef5",t._sentryDebugIdIdentifier="sentry-dbid-a1e5eb1e-01c3-4882-9151-2eac257c7ef5")}catch{}})();const z=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function ze(){const t=U(),a=_(),f=w(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:c,twoFAPhoneNumber:D,magicLinkEmail:d,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>q(e)),y=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(y.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,y,v,a.state,t]);const j=g.useCallback(()=>{f("/signin/auth")},[f]),F=g.useCallback(()=>{i!=null&&c!=null&&d!=null&&t(ee(i,d,c))},[i,c,t,d]),O=g.useCallback(e=>{i!=null&&n!=null&&d!=null&&c!=null&&t(te(e,i,d,c))},[i,n,t,d,c]);if(I==="Completed"&&c!=null)return u.jsx(R,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!z(n,p)||m==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-K3nGB-yf.js";import{h as r,n}from"./core-CDhowsfU.js";import{I as i}from"./index-BQ0X6_Da.js";import"./mui-BgLeJX1Z.js";import"./sentry-CNaiRXAC.js";import"./zeni-epic-state-4LEhOJ6C.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="a91be54e-6c13-4a77-b876-d2a39d3636be",o._sentryDebugIdIdentifier="sentry-dbid-a91be54e-6c13-4a77-b876-d2a39d3636be")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-K3nGB-yf.js";import{a as r}from"./sentry-CNaiRXAC.js";import{u as P,g as T,j as o,N as J}from"./core-CDhowsfU.js";import{JN as j,eP as C,f7 as R,JO as x,JP as z,JQ as D,JR as M,mW as N,IJ as L}from"./zeni-epic-state-4LEhOJ6C.js";import{z as h,A as I}from"./index-BQ0X6_Da.js";import"./mui-BgLeJX1Z.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="ae8600c1-c704-4c04-be98-c84d3b39f452",n._sentryDebugIdIdentifier="sentry-dbid-ae8600c1-c704-4c04-be98-c84d3b39f452")}catch{}})();function ee(){const n=P(),s=T(),{params:t,error:i}=r.useMemo(()=>j(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>C(e)),l=o(e=>R(e)),c=o(e=>e.tenantState.fetchState),y=o(x),b=o(z),d=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(M())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))},[p,a,c,n]),r.useEffect(()=>{d!=null&&d!==""&&(window.location.href=d)},[d]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(A=>A.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:a?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(L(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-K3nGB-yf.js";import{Ke as te,eP as Y,jG as H,e_ as J,eY as ne,HG as X,JU as oe,tr as Ee,Kf as N,tf as ke,tA as Pe,tu as ie,tj as re,ty as Ie,tv as je,Kg as le,v7 as ve,Kh as Te,fB as Le,Ki as K,to as de,tm as ce,tD as Fe,c2 as Ae}from"./zeni-epic-state-4LEhOJ6C.js";import{n as pe,v as Q,T as E,z,a9 as ue,x as me,ak as ge,al as Re,w as he,o as R,y as fe,D as Ce,am as Oe,X as Ve,_ as Ue,Z as Be,c as be,e as Ze,q as $e,an as Ke,k as _e}from"./index-BQ0X6_Da.js";import{D as ye,n as M,S as we}from"./mui-BgLeJX1Z.js";import ae from"./NotFoundScreen-BckDe5FR.js";import{a as r}from"./sentry-CNaiRXAC.js";import{u as ee,i as Ge,j as m,h as He,g as ze,n as Me,o as se,p as $}from"./core-CDhowsfU.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{M as qe}from"./MobileAppDrawer-CgOzDlQ4.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="1e12ad70-6ede-4057-91af-cbc46c0f713a",a._sentryDebugIdIdentifier="sentry-dbid-1e12ad70-6ede-4057-91af-cbc46c0f713a")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[P,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>H(e)),{useFeatureGate:f}=Q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),I=J(k,u),T=ne(u),L=X(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!I&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:T,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):Pe(L))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[P===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=M(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=M(fe.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=M(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Xe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[P,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Y(i)),u=m(i=>H(i)),{useFeatureGate:D}=Q(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),I=ne(d),T=X(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Ie(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:I,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[P===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>Y(e)),{useFeatureGate:p}=Q(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),P=!J(O,h)&&V,w=X(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[I,T]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,P))},[b,P,o]),r.useEffect(()=>{k(a!=null&&a===!0),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,I===!0?s.jsx(Ye,{closeDrawerHandler:i,isEditPeopleDrawerOpen:I,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:P,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(K({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(q,{})}),s.jsx($,{path:"new",element:s.jsx(q,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(q,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-K3nGB-yf.js";import E from"./NotFoundScreen-BckDe5FR.js";import{a as r}from"./sentry-CNaiRXAC.js";import{h as _,g as P,j as p,i as v,u as M,N as U,n as z,o as B,p as h}from"./core-CDhowsfU.js";import{eP as F,PY as b,bo as O,bn as N,hn as V,gT as Y}from"./zeni-epic-state-4LEhOJ6C.js";import{F as $,z as I,_ as q,cB as G}from"./index-BQ0X6_Da.js";import"./mui-BgLeJX1Z.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{M as J}from"./MobileAppDrawer-CgOzDlQ4.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="a3212273-bea1-4115-ab17-2f9d4417613e",e._sentryDebugIdIdentifier="sentry-dbid-a3212273-bea1-4115-ab17-2f9d4417613e")}catch{}})();const K=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=P(),c=$(),o=p(a=>F(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=v(),f=M(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=O(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(Y({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]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-K3nGB-yf.js";import{a as o}from"./sentry-CNaiRXAC.js";import{j as f,h as H,u as M,g as V,n as _}from"./core-CDhowsfU.js";import{h as F,n as N,z as R,b9 as W,w as U,X as $,_ as z,Z as J,c as l,e as K,a7 as X,ba as Z}from"./index-BQ0X6_Da.js";import{f2 as q,eP as G,MJ as P,MK as Q,ub as Y,u1 as g,f4 as ee,bO as ae,u6 as re,ML as ne}from"./zeni-epic-state-4LEhOJ6C.js";import{D as te,e as se,n as oe,S as ie}from"./mui-BgLeJX1Z.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{M as ce}from"./MobileAppDrawer-CgOzDlQ4.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]="ed7ab100-5302-47ae-810e-ebcc8cfd6674",e._sentryDebugIdIdentifier="sentry-dbid-ed7ab100-5302-47ae-810e-ebcc8cfd6674")}catch{}})();const de={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>q(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=_(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(X(Z));function ve({isReferralDrawerOpen:e}){const a=H(),r=M(),n=V(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>G(t)),b=f(t=>P(t)),m=b.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=Q([b,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Y()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const B={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,L)=>{L.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(J,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(K.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...B})]})}export{ve as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-K3nGB-yf.js";import x from"./NotFoundScreen-BckDe5FR.js";import{a as p}from"./sentry-CNaiRXAC.js";import{h as C,g as I,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-CDhowsfU.js";import{eP as T,ND as g,NT as S,D8 as V,Ch as _,D7 as m,C_ as N,O7 as U}from"./zeni-epic-state-4LEhOJ6C.js";import{h as O,z as $,B,a7 as P,bQ as W,af as z}from"./index-BQ0X6_Da.js";import"./mui-BgLeJX1Z.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DJP2HUMn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b2f855a3-5abe-40c7-8e44-051b5112cd58",e._sentryDebugIdIdentifier="sentry-dbid-b2f855a3-5abe-40c7-8e44-051b5112cd58")}catch{}})();const d="reimbursement-approval-rule-update",Q=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(N(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(P(W)),q=()=>{const e=C(),r=I(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=O(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(_(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,F,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(Q,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(q,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-K3nGB-yf.js";import{v as w,z as j,aN as y,Z as I,c as p,e as F,cL as L,T as P}from"./index-BQ0X6_Da.js";import"./mui-BgLeJX1Z.js";import l from"./NotFoundScreen-BckDe5FR.js";import{a as u}from"./sentry-CNaiRXAC.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as d}from"./core-CDhowsfU.js";import{eP as z,Qv as C,Ni as Q,Qw as v,ub as Y,f4 as G,Qx as O,u9 as Z}from"./zeni-epic-state-4LEhOJ6C.js";import{R as x}from"./ReferralListScreen-DVpzJ3_G.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.js";import"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import"./MobileAppDrawer-CgOzDlQ4.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]="f412d129-68e6-4495-941a-6c10a69d338b",e._sentryDebugIdIdentifier="sentry-dbid-f412d129-68e6-4495-941a-6c10a69d338b")}catch{}})();const q=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=j.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(Z())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=T(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=b(i=>z(i)),c=V(),_=A(),{useDynamicConfig:g}=w(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),N=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=Q(k);u.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(q,{navigate:c,location:_,currentTenant:r,companyName:S,userName:N,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-K3nGB-yf.js";import{a as u,b as T,q as A}from"./sentry-CNaiRXAC.js";import{u as D,h as z,j as l,g as J,N as j,n as M}from"./core-CDhowsfU.js";import{u as O,z as s,h as P,c as E,D as F,d as _,e as B,j as N,g as V,f as W,i as v}from"./index-BQ0X6_Da.js";import{eP as $,Jo as q,Jp as G,eW as H,fn as K,Ju as Q,fL as R,cT as X,Jv as y,Jw as Y,Jx as Z,bT as b}from"./zeni-epic-state-4LEhOJ6C.js";import"./mui-BgLeJX1Z.js";import{u as ee}from"./useDeviceId-d6RNZdGO.js";import{f as te}from"./analyticsHelper-Csyv2zhr.js";import{t as ne}from"./getLocaleForTenant-BVeXTxkD.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="ad30b153-6c4a-4fae-a66f-66621b0a2eb7",t._sentryDebugIdIdentifier="sentry-dbid-ad30b153-6c4a-4fae-a66f-66621b0a2eb7")}catch{}})();const ae=M(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{A({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const c=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:i,appType:"web",redirectUri:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(Y(n,i)))},clearSignInError:()=>{t(y())}}})(W),ie=T.memo(ae);function ve({setTenantEmailDomain:t}){const a=D(),d=z(),{clearAllLoading:g}=O(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const i=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:x,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>$(e)),I=l(e=>q(e)),m=J(),w=P().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),a(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),R().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ie,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),x===!0&&k!=null?f.jsx(N,{onClose:()=>a(y()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-K3nGB-yf.js";import{a as n}from"./sentry-CNaiRXAC.js";import{u,g as m,h as p,N as g}from"./core-CDhowsfU.js";import{z as c,B as b,t as y,c as d,e as h}from"./index-BQ0X6_Da.js";import{fQ as x,fR as I,JM as w}from"./zeni-epic-state-4LEhOJ6C.js";import{n as j}from"./mui-BgLeJX1Z.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="be319cca-04a4-4d96-bcb2-d163451bc7b8",e._sentryDebugIdIdentifier="sentry-dbid-be319cca-04a4-4d96-bcb2-d163451bc7b8")}catch{}})();function Q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),y.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
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
|
-
`;export{Q as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-K3nGB-yf.js";import{a as d}from"./sentry-CNaiRXAC.js";import{u as G,j as S,g as re,h as le,i as de,N as Ge,n as je}from"./core-CDhowsfU.js";import{bn as $e,eP as K,cP as ue,bt as me,pW as Y,KC as B,LD as pe,LE as Q,L0 as he,jR as fe,LF as ge,L5 as J,L6 as X,kG as Se,HC as Z,Kw as x,jL as Te,jJ as ve,jV as He,LG as Me,LH as We,tU as z,jQ as ye,GU as Ee,cU as qe,cV as Ke,LI as Ye,Kv as Qe,LJ as Je,tY as Xe,LK as Ze,LL as ea,LM as aa,LN as ta,LO as na,jU as oa,LP as sa,LQ as ia,Kx as ca,LR as ra,LS as la,LT as da,GO as ua,GC as ma,H4 as pa,jW as ha,HD as ie,GL as fa}from"./zeni-epic-state-4LEhOJ6C.js";import{z as De,v as ee,T as L,aN as be,h as ga,n as Sa,aO as Ta,w as va,p as W,k as ya,aP as Ea,q,_ as Da,c as Ce,aQ as ba,at as Ca,a2 as M}from"./index-BQ0X6_Da.js";import{n as Ia,S as ka,D as La}from"./mui-BgLeJX1Z.js";import{u as Ua}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{d as Ie}from"./decodeURIComponentSafe-CMBlsFn_.js";import{h as ke,g as Aa,e as xa,c as _a}from"./routePaths-CzDX4I74.js";import{t as Va}from"./utils-DmT_9hpG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b266cca4-cd41-4bc9-9a18-53f2115bc6da",a._sentryDebugIdIdentifier="sentry-dbid-b266cca4-cd41-4bc9-9a18-53f2115bc6da")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Qa(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,U=ae(),v=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,v)),b=S(u=>{const R=B(u,v)?.transactionDetailLocalData.vendorUpdates?.id;return R==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[R]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),y=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[O,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const H=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),w=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?O||y==null||(P(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:w??y}))):(s(J()),s(X()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,O,y,w]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:U,selectedTransaction:v,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:y,vendorViewDetails:A,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:H,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new va(100,100,58)},wa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ve()),l(He("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(La,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(Ba,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...C})})})},Ba=Ia(ka)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Fa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=G(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,C=s??Ie(l??"");let h;ke(T,C)&&(h={id:T,type:Y(C)});const f=h!=null?S(v=>B(v,h)):void 0,U=()=>{const v=W(t.state?.pathnameStackToGoBack),m=v.poppedPathname??((b=2)=>{let p="../";for(let y=0;y<b;y++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:v.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ye(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const v=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:v?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},b={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(z(m,f?.transaction?.amount.amount,b,!1,!1,i))}U()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ve()),o(We()),a(!0),U()}}},Oa=je(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Ca.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ce,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=W(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(fa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(J()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(_a(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ye(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(pa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ma(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ua({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(da(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(la(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ra({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=W(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Va(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${xa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ca({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(z(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ia(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(sa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(oa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(z(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(na({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(z(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ta({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Ze({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Xe(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(ba);function Ja(){const a=le(),e=G(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=ya(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(L.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),U=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:v,transactionTypeEncoded:m,transactionId:b}=de(),[p,y]=d.useState(!1),A=Ie(m??""),_=ke(b,A),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:F}=t(L.isTransactionCommentingEnabled),{isFeatureEnabled:V}=t(L.isProjectsTransactionsEnabled),O=o?.currentTenant?.companyId,P=o?.currentTenant?.companyName;let E;_&&(E={id:b,type:Y(A)});const c=E!=null?S(r=>B(r,E)):void 0,H=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,I=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),w=S(r=>Q(r)),u=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),R=i.company?.companyInfo.firstMonthOfFY??1,Ae=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,Pe]=d.useState(!1),oe=()=>{te(!1),ne(!1)},we=Ea();d.useEffect(()=>{if(E!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(E)),oe();else if(E!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),N={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};we&&(N.message="expenseAutomation",N.origin="transaction_categorization",N.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:N})}},[E]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Pe(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(xe?_e||I==null||(ne(!0),e(Z(D,"TransactionDetail",{timeframe:"month",timePeriod:u?.selectedPeriod?.timePeriod??I}))):(e(J()),e(X()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,I,l]),d.useEffect(()=>{w.newVendorState?.vendorDetailLocalData?.vendorName!=null?y(!0):y(!1)},[w.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const Be=[m,b].filter(r=>r!=null),{transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:Re}=Fa({closeDrawerHandler:r=>{y(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Ne,onAskAiCfoClick:ze}=Ua({mobileExploreReferrer:"Transaction Details"});return Da({isDataReady:c?.fetchState==="Completed"}),_?k.jsxs(k.Fragment,{children:[se!=null&&p&&k.jsx(wa,{isOpen:p,transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:Re}),k.jsx(Oa,{hideDeleteAttachment:!0,firstMonthOfFY:R,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:v,location:s,navigate:a,selectedTransaction:E,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:I,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:Ae,vendorSaveStatus:H,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:U,isAiCfoAccessEnabled:Ne,onAskAiCfoClick:ze,isTransactionCommentingEnabled:F,isProjectsTransactionsEnabled:V,companyId:O,companyName:P})]}):k.jsx(Ge,{to:Ue(Be.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Ra(a),t=Na(a);Ce.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Ra=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Na=a=>qe(a)===!0?a.customer?.name??"":Ke(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{wa as C,Ja as T,Fa as a,Oa as b,ae as c,Qa as u};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-K3nGB-yf.js";import{h as B,g as U,u as P,i as M,j as f,N as L,n as N,o as Te,p as k}from"./core-CDhowsfU.js";import{cm as V,eP as D,NM as R,DS as ae,fh as Z,DA as ne,NO as we,DV as Ce,NK as Ie,NL as se,O1 as ke,C0 as be,sP as je,NQ as Ae,E4 as Ee,NN as re,cO as H,wX as oe,eY as ve,e_ as De,OX as Fe,OY as Le,DB as Be,OZ as Ue,DC as Pe,DL as Re,bt as Oe,bF as Me,cx as Ne,bG as Ve,cl as _e,fg as ze,bs as Ge,Jq as $e,ck as qe}from"./zeni-epic-state-4LEhOJ6C.js";import{k as _,aq as Ze,z as A,Z as z,c as b,c5 as He,c6 as Xe,c7 as q,n as X,h as Je,X as Ke,_ as We,v as ie,T as v,w as Ye,B as Qe,c8 as et,at as J,q as tt,c9 as at,p as K,ca as nt,R as Y,cb as st,a9 as rt}from"./index-BQ0X6_Da.js";import{D as ot,n as O,S as it}from"./mui-BgLeJX1Z.js";import ct from"./NotFoundScreen-BckDe5FR.js";import{S as Q}from"./SetupPagesScreen-DqRd-zIf.js";import{a as d}from"./sentry-CNaiRXAC.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{u as ut}from"./useInitialThreadRequest-B02Fb6K3.js";import{M as ce}from"./MobileAppDrawer-CgOzDlQ4.js";import{F as dt}from"./FeaturePreviewScreen-Dr_POgT4.js";import{a as ee}from"./analyticsHelper-Csyv2zhr.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.js";import"./routePaths-CzDX4I74.js";import"./BusinessVerificationPageScreen-hINsL07T.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]="ab9bc4cf-2215-4736-93e9-aa21bd4a5fb1",t._sentryDebugIdIdentifier="sentry-dbid-ab9bc4cf-2215-4736-93e9-aa21bd4a5fb1")}catch{}})();const pt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ce(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function mt(){const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=M(),p=_(),r=f(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,C]=d.useState(!1),[u,c]=d.useState(!1),h=f(I=>D(I)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(I=>R(I,y)),w=f(I=>I.treasurySetupViewState.fetchState),x=f(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(Z()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(C(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const ft=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(be(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Xe),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=M(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,C]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ie(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(Z()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(C(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=O.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,ht={overlayWidth:new Ye(100,100,48)},St=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=Ct(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),o=B(),p=P(),r=X(),m=Je(),s=f(j=>D(j)),{tenantEmailDomain:l}=M(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,C]=d.useState(!1),u=f(j=>re(j)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=H(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ke();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(C(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const I=()=>{o("..")},[le,ue]=d.useState(!1),W=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const j=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(ot,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(It,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:ye,handleDrawerToggle:W,initialOpenThreadRequest:ge,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Ct=t=>`/${t}/treasury/setup`,It=O(it)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,kt=O.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function bt(){const t=B(),a=P(),n=X(),o=U(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:C,statementListView:s,isLoading:u,onBackClick:()=>{const c=K(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const jt=O.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function At(){const t=B(),a=X(),n=U(),o=P(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:C,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=K(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=N(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=M(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(Z()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,C=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(C==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=V(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:b,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=O.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function ea(){const t=U(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=H(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),i=Ne(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),{isFeatureEnabled:C}=n(v.isDepositAccountsFeatureEnabled),u=C&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&Ge(r?.loggedInUserRoleMap),w=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(bt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-K3nGB-yf.js";import{a as f}from"./sentry-CNaiRXAC.js";import{s as u,u as h,j as y,N as I}from"./core-CDhowsfU.js";import{JJ as b,eW as w,zI as x}from"./zeni-epic-state-4LEhOJ6C.js";import{z as l,B as j,x as S,y as D}from"./index-BQ0X6_Da.js";import{n as p}from"./mui-BgLeJX1Z.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.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]="d89a40f2-0a7a-44ff-894b-757e2ed1c306",e._sentryDebugIdIdentifier="sentry-dbid-d89a40f2-0a7a-44ff-894b-757e2ed1c306")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(x(t,c,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=p.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=p(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-K3nGB-yf.js";import{h as ne,g as W,u as M,i as q,j as k,n as K,N as Q,o as Ve,p as w}from"./core-CDhowsfU.js";import{eP as U,OD as Ce,OE as $e,cl as ee,cm as Ne,fg as Ze,wV as we,B6 as He,wP as Tn,OF as On,OG as Bn,wS as Fn,wZ as fe,wM as Rn,wJ as Ln,Np as le,OH as Un,Eq as _n,Kv as zn,Es as Mn,kn as Oe,OI as Vn,qf as Ge,q3 as We,ke as qe,kh as Be,Kw as Fe,Kx as $n,OJ as Nn,kg as Zn,kD as Hn,k5 as Gn,iE as Wn,iD as qn,OK as Kn,OL as ye,E7 as Yn,OM as Jn,ON as Xn,Ni as ke,OO as Re,OP as Qn,ED as ea,O1 as na,C0 as Ke,sP as Ye,OQ as aa,EA as ta,OR as Je,cM as Ae,EH as Xe,fh as oa,eY as Qe,e_ as De,EF as sa,BW as ra,Ex as ia,OS as en,OT as nn,E9 as an,Ej as Le,OU as ca,NR as la,EI as da,bt as ua,bF as pa,cx as ma,bG as ha,bs as ga,Jq as fa}from"./zeni-epic-state-4LEhOJ6C.js";import{k as ae,v as N,z as S,T as F,h as _,B as de,bW as ya,a2 as Ie,n as V,w as Y,p as tn,aq as xa,af as Ue,c as R,bX as Ca,at as Se,bY as wa,Z as ue,bZ as ka,e as be,aN as G,b_ as Aa,X as Da,_ as on,ac as Ia,b$ as _e,c0 as Sa,q as ce,c1 as ba,c2 as Ea,c3 as va,a9 as Pa,o as ja}from"./index-BQ0X6_Da.js";import{n as z,D as J,S as X}from"./mui-BgLeJX1Z.js";import ie from"./NotFoundScreen-BckDe5FR.js";import{S as ze}from"./SetupPagesScreen-DqRd-zIf.js";import{F as sn}from"./FeaturePreviewScreen-Dr_POgT4.js";import{a as d}from"./sentry-CNaiRXAC.js";import{M as pe}from"./MobileAppDrawer-CgOzDlQ4.js";import{A as Ta,D as Oa,V as Ba}from"./DomesticWireDetailScreen-D4FTqRPl.js";import{A as Fa}from"./AddressScreen-D9jTpiRi.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-4ypqOwMf.js";import{Z as Ra}from"./ZeniAccountStatementScreen-CKZz34Iw.js";import"./recharts-BvcujEC0.js";import"./analytics-Dw_3pmCn.js";import"./plaid-Bj5Nu549.js";import"./dnd-DKS9GO8i.js";import"./stripe-DMRn4zHo.js";import"./lottie-B8G5pAXB.js";import"./lexical-CS8ufcYk.js";import"./pdf-VHmgvQMs.js";import"./utils-DmT_9hpG.js";import"./analyticsHelper-Csyv2zhr.js";import"./routePaths-CzDX4I74.js";import"./BusinessVerificationPageScreen-hINsL07T.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]="cbced637-d50b-42e4-b8b9-f8669e454caa",e._sentryDebugIdIdentifier="sentry-dbid-cbced637-d50b-42e4-b8b9-f8669e454caa")}catch{}})();const La=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-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
|
-
`,Ua=K(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(we(t))},onCreateRule:()=>{e(Ln())},onUpdateRule:t=>{e(fe(t))},onDeleteClick:t=>{e(Rn(t))},onPauseClick:t=>{e(fe(t,!0,!1))},onResumeClick:t=>{e(fe(t,!1,!0))},onActivityClick:(t,r)=>{e(Fn(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(On())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function Me({isEditDrawerOpen:e}){const a=ne(),s=W(),o=M(),t=ae(),{ruleId:r,tenantEmailDomain:u}=q(),{useFeatureGate:l}=N(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=k(y=>U(y)),m=k(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=k(y=>$e(y)),g=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ne(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(F.isTreasuryEnabled),f=c?.company!=null&&Ze(c.company),I=D&&f,O=S.getSignedInUser(),L=c.tenantId,j={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:L??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(we(!0)))},[x,C,g,o]);const E=y=>{h(y)},T=_(),P=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(La,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const _a={overlayWidth:new Y(100,100,58)},za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:_a.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ma,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},Ma=z(X)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Va={overlayWidth:new Y(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=M(),o=_(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(J,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Na,{onClick:r=>r.stopPropagation(),children:n.jsx(Fa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Na=z(X)`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
`,Za={overlayWidth:new Y(100,100,58)},Ha=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Za.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Oa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=z(X)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,Wa=z.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,qa=K(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Hn(o))},initializeVendorAddress:()=>{e(Zn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=q(),h=ae(),x=k(y=>y.expressPayState.fetchState),i=k(y=>U(y)),c=k(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,g]=d.useState(!1),[A,D]=d.useState(!1),[f,I]=d.useState(!1),O=tn(t.state?.pathnameStackToGoBack),{poppedPathname:L}=O,j=L?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const E=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{E==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},P=()=>{g(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(za,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Ha,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx($a,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(qa,{navigate:o,location:t,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Ka={overlayWidth:new Y(100,100,58)},Ya=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=_(),u=V(),l=k(i=>$e(i)),p=k(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{t(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(J,{anchor:"right",open:s,PaperProps:{style:{width:Ka.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Ja,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})},Ja=z(X)`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`,Xa={overlayWidth:new Y(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=V(),t=M(),r=k(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=k(i=>Kn(i)),x={analytics:R,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(Jn(i))},updateFilesEntity:i=>{t(qe({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(Yn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(J,{anchor:"right",open:e,PaperProps:{style:{width:Xa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Qa,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})]})},Qa=z(X)`
|
|
34
|
-
display: flex;
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
`,et={overlayWidth:new Y(100,100,58)},nt=K(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(Ye("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=k(f=>Xn(f)),u=k(f=>U(f)),l=_(),p=V(),h=M(),{accountId:x}=q(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=N(),{configValue:g}=b(G.zeniAccountsConfig),A=ke(g),D=()=>{o(!0),h(Re())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(J,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:f=>f.stopPropagation(),children:n.jsx(nt,{analytics:R,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:f=>{h(Qn(f))},onAnotherTransferClick:()=>{C(!1),h(Re())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=z(X)`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
`,tt=z.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ot=K(function(e,a){return{zeniAccountListView:Je(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Xe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(Ye("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=M(),r=V(),{tenantEmailDomain:u}=q(),{useDynamicConfig:l,useFeatureGate:p}=N(),h=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(F.isTreasuryEnabled),{isFeatureEnabled:c}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(F.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(F.isCheckingCommentingEnabled),b=ke(x),g=k(B=>U(B)),A=g.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),f=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(g.tenantId),[I,O]=d.useState(!1),[L,j]=d.useState(!1),[v,E]=d.useState(!1),[T,P]=d.useState(!1),y=k(B=>Je(B)),$=y.fetchState,te=k(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Z=ae(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=ee(Z?.loggedInUserRoleMap),fn=Ae(Z?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=S.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Da();d.useEffect(()=>{!I&&ve&&(O(!0),t(Xe(!1)))},[I,t,$,ve]),d.useEffect(()=>{!L&&oe==="Not-Started"&&A&&(j(!0),t(we(!0)))},[L,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{P(a!=null&&a===!0)},[a]);const Pe=()=>{E(!1),o("..")},[wn,kn]=d.useState(!1),je=B=>{kn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=g.company!=null&&Ze(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),ge=k(B=>B.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=Ia(En);d.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[ge.fetchStatus,t]);const Pn=Qe(g),jn=De(c,g);return Pn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:wn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&gn?n.jsx(Q,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(Q,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=z.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
width: 100%;
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center;
|
|
55
|
-
min-height: 100vh;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,it=K(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(h=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Le(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=q(),{useDynamicConfig:h}=N(),{useFeatureGate:x}=N(),{isFeatureEnabled:i}=x(F.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(F.isCheckingCommentingEnabled),m=k(H=>U(H)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),g=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[O,L]=d.useState(!1),[j,v]=d.useState(!1),[E,T]=d.useState(!1),[P,y]=d.useState(!1),$=k(H=>nn(H,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{O||(r(an(p??"",!1)),L(!0))},[O,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const Z=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[P===!0&&$.accountDetail!=null?n.jsx(Ya,{authParams:f,downloadAccountDetailEndPoint:I,closeDrawerHandler:Z,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:Z,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:I}):null,E===!0?n.jsx(cn,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:E}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=K(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(va),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=q(),{useDynamicConfig:o}=N(),t=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=k(f=>U(f)),{configValue:x}=o(G.zeniAccountsConfig),i=ke(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{u(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=ee(g?.loggedInUserRoleMap),D=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(Q,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const f=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ea,{showConfetti:l}),n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:R,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function zt(){const e=W(),a=k(P=>U(P)),s=_(),{useFeatureGate:o,useDynamicConfig:t}=N(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(F.isDebitCardFeatureEnabled),c=Qe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),g=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ha(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(F.isDepositAccountsFeatureEnabled),f=D&&!C,{configValue:I}=t(G.expressPayConfig),O=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:L}=o(F.isAutoTransferRuleEnabled),j=Pa(a,x,i)&&!C&&ga(r?.loggedInUserRoleMap),v=fa(r?.loggedInUserRoleMap),E=f&&ee(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(w,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(w,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),L?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(w,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(w,{path:"auto-transfer",element:n.jsx(ie,{})}),O&&u?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(w,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(w,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(w,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(w,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"/",element:n.jsx(xe,{})}),n.jsx(w,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../promo",state:e.state})}):n.jsx(w,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(w,{path:"/",element:n.jsx(re,{})}),n.jsx(w,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(w,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:"statements",element:n.jsx(Ra,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]})}export{zt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-K3nGB-yf.js";import{a as u}from"./sentry-CNaiRXAC.js";import{h as x,u as j,g as B,i as $,j as p}from"./core-CDhowsfU.js";import{IG as s,IF as v,OV as C,eP as P,OW as T}from"./zeni-epic-state-4LEhOJ6C.js";import{n as z,at as g,h as D,z as E,B as L,c4 as G,p as N}from"./index-BQ0X6_Da.js";import{n as _}from"./mui-BgLeJX1Z.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]="d6a75f49-54f7-48fd-be40-43f88518e728",e._sentryDebugIdIdentifier="sentry-dbid-d6a75f49-54f7-48fd-be40-43f88518e728")}catch{}})();const U=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
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
|
-
`;function Z(){const e=x(),n=j(),d=z(),f=B();let{accountId:a}=$(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=D();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=N(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),i=p(t=>P(t)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(U,{windowSize:d,children:c.jsx(G,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cH as m,cI as l,JB as _,JC as d}from"./zeni-epic-state-4LEhOJ6C.js";import{c as u}from"./index-BQ0X6_Da.js";import"./sentry-CNaiRXAC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="6a86137a-f870-4a19-ab5f-fcda0b1a9ea5",a._sentryDebugIdIdentifier="sentry-dbid-6a86137a-f870-4a19-ab5f-fcda0b1a9ea5")}catch{}})();const b=a=>{switch(a){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return a;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(a,e,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(a.userId,{tenant_id:e.tenantId,tenant_email_domain:e.tenantEmailDomain,company_id:e.companyId,company_name:e.companyName,user_role:e.userRole,chargebee_customer_id:i,$email:a.userEmail,user_email_domain:a.userEmailDomain,$first_name:a.firstName,$last_name:a.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(a,e)=>m(a,e)?"bill_pay":l(a,e)?"reimbursement":_(a,e)?"zeni_accounts":d(a,e)?"charge_cards":"bill_pay",I=a=>Object.values(a.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
|