@zeniai/web-app-ui 5.0.57-dev → 5.0.58-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-iktKiOhD.js +1 -0
- package/dist/assets/AddressScreen-os7s-uiT.js +9 -0
- package/dist/assets/{AiCfoScreen-CzXeITwY.js → AiCfoScreen-CiYPWCVr.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CiWD3mPm.js → BillPayApprovalRoutes-K4xOOEzq.js} +1 -1
- package/dist/assets/BillPayRoutes-BytXyhSB.js +119 -0
- package/dist/assets/{BusinessVerificationPageScreen-CPbmBL7J.js → BusinessVerificationPageScreen-Dal2f-Uv.js} +2 -2
- package/dist/assets/ChargeCardRoutes-zRV8UFbn.js +71 -0
- package/dist/assets/{CompanyPassportScreen-7bEBCgDZ.js → CompanyPassportScreen-eTu2N5ou.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Drw16O1C.js → ConnectionAuthScreen-C88mbtCI.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DebNOlsz.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CsQUOi23.js → CustomerOnboardingRoutes-BeqeM6IL.js} +4 -4
- package/dist/assets/DashboardRoutes-AKaMuMVs.js +20 -0
- package/dist/assets/{DefaultTenantHome-BxEBIEMW.js → DefaultTenantHome-Cu5P4Sn1.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-YdN2GJI3.js → DomesticWireDetailScreen-KV5NNCFM.js} +3 -3
- package/dist/assets/{DrawerScreen-D376zeqM.js → DrawerScreen-BFutabWS.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BhxpLYjU.js → EntityDetailRoutes-VcANsUNX.js} +1 -1
- package/dist/assets/ExpenseAutomationRoutes-D-9-oIcb.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BuBTcjDh.js +1 -0
- package/dist/assets/{MagicLinkRoutes-DYFaWJEB.js → MagicLinkRoutes-DdEylAIX.js} +2 -2
- package/dist/assets/MagicLinkSignInScreen-DnvY5pqK.js +12 -0
- package/dist/assets/{MobileAppDrawer-BqatZNBg.js → MobileAppDrawer-5sNXp07W.js} +1 -1
- package/dist/assets/NotFoundScreen-Cnik-4Tp.js +1 -0
- package/dist/assets/NotificationRoutes-tqQSu60v.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-1gRPIcIq.js +1 -0
- package/dist/assets/PeopleRoutes-CPI0fbZW.js +22 -0
- package/dist/assets/PerformanceRoutes-C33-d1nc.js +1 -0
- package/dist/assets/{Preview-v6ufh9Up.js → Preview-05bfVbnc.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Cnhg87ad.js → QBOConnectionScreen-DoOIAuYl.js} +1 -1
- package/dist/assets/ReferralListScreen-BJR29HoY.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-B1d_Lqhs.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DQiQsDBw.js → ReimbursementApprovalRuleDetailScreen-BdNpYu0c.js} +1 -1
- package/dist/assets/ReimbursementRoutes-CW9LafIu.js +68 -0
- package/dist/assets/{ReportsRoutes-IJfcYi5_.js → ReportsRoutes-CCsYE4n3.js} +1 -1
- package/dist/assets/RewardsRoutes-CqxP4lG6.js +1 -0
- package/dist/assets/{ScreenRoutes-CyuhXplX.js → ScreenRoutes-B-bgqGJQ.js} +2 -2
- package/dist/assets/{SettingsRoutes-BG6iE30t.js → SettingsRoutes-B0ij4yMA.js} +6 -6
- package/dist/assets/{SetupPagesScreen-8DP-INVh.js → SetupPagesScreen-C1jk8HrE.js} +5 -5
- package/dist/assets/{SignInScreen-CJfDbzv1.js → SignInScreen-B69a22-5.js} +1 -1
- package/dist/assets/SignOutScreen-BSs0hpm6.js +9 -0
- package/dist/assets/TaskListScreen-Cp9DDLp-.js +9 -0
- package/dist/assets/{TaskRoutes-D26BUK4U.js → TaskRoutes-Bgs0Xxnf.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-CS_eEYM9.js +1 -0
- package/dist/assets/TransactionDetailScreen-Dz7DZRp5.js +5 -0
- package/dist/assets/{TransactionListRoutes-DG9rPkBC.js → TransactionListRoutes-DS6T8JLy.js} +1 -1
- package/dist/assets/TreasuryRoutes-BOm-E3TJ.js +37 -0
- package/dist/assets/VendorsRoutes-hbju6FRN.js +112 -0
- package/dist/assets/WiseConfirmationScreen-jSXtIgS8.js +12 -0
- package/dist/assets/ZeniAccountRoutes-D9r_rhX5.js +66 -0
- package/dist/assets/ZeniAccountStatementScreen-E17TuKVT.js +9 -0
- package/dist/assets/{accountMappingHelper-C1yTeNF1.js → accountMappingHelper-LldtSzRP.js} +1 -1
- package/dist/assets/{analytics-xb_2pDDq.js → analytics-CzwmoVrF.js} +1 -1
- package/dist/assets/{analyticsHelper-CNwzWBf_.js → analyticsHelper-F53zjyKi.js} +1 -1
- package/dist/assets/{core-DGD8k-EU.js → core-CLmgx9uP.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DKUmHyeo.js → decodeURIComponentSafe-BjDSD7yS.js} +1 -1
- package/dist/assets/{dnd-s5MAPZ_4.js → dnd-R2rZEcNT.js} +1 -1
- package/dist/assets/{empty-Dt0wGXhX.js → empty-BBOCee_A.js} +1 -1
- package/dist/assets/{empty-C-OX54ey.js → empty-jZbJbRpc.js} +1 -1
- package/dist/assets/{emptyVideoElement-19CW_zr_.js → emptyVideoElement-YbhJgQ1i.js} +1 -1
- package/dist/assets/{epic-BWgHIe0E.js → epic-Bgtbkyuw.js} +1 -1
- package/dist/assets/getLocaleForTenant-CUY8YnU0.js +1 -0
- package/dist/assets/{index-BD5JP2X1.js → index-188ZUS3r.js} +1 -1
- package/dist/assets/{index-CTLIpLfK.js → index-B1rvNDog.js} +1 -1
- package/dist/assets/{index-DFm7CUCx.js → index-CS5Bb0Mp.js} +1 -1
- package/dist/assets/{index-BIyxkQfN.js → index-CZ5oQo_7.js} +2 -2
- package/dist/assets/{index-BE1Y8qVe.js → index-D3efLFWM.js} +1 -1
- package/dist/assets/{index-CNT4WvUT.js → index-DdGDyXDY.js} +2503 -2475
- package/dist/assets/{index-vWYcYgGc.js → index-pJ9h5Zh-.js} +1 -1
- package/dist/assets/{lexical-D9fe9vQ7.js → lexical-ddm1cLhy.js} +1 -1
- package/dist/assets/{liveblocks-Cxvop2w5.js → liveblocks-Dp_hlTHA.js} +1 -1
- package/dist/assets/{lottie-rysS_6yg.js → lottie-DGedj-o1.js} +1 -1
- package/dist/assets/{mui-Cdh_ZgIg.js → mui-DLIHyll5.js} +1 -1
- package/dist/assets/{pathToGoBack-79-68hCi.js → pathToGoBack-yg0mVXjY.js} +1 -1
- package/dist/assets/{pdf-B7Btpc50.js → pdf-CWMDmn01.js} +3 -3
- package/dist/assets/{pdf-lib-o7tH0fyZ.js → pdf-lib-CYrojizo.js} +1 -1
- package/dist/assets/{plaid-BVGCfCA1.js → plaid-LR0hu1bT.js} +1 -1
- package/dist/assets/{pusher-yXRrAcLQ.js → pusher-DsOO7zZr.js} +1 -1
- package/dist/assets/{react-DXDp-y6T.js → react-B_DXXD3z.js} +1 -1
- package/dist/assets/{react-CniPiXF0.js → react-BsL1ocJ8.js} +1 -1
- package/dist/assets/{react-DbAaKnkZ.js → react-D7QZbWZh.js} +1 -1
- package/dist/assets/{react-D_nAXUQt.js → react-DCx--K3p.js} +1 -1
- package/dist/assets/{react-C5Y1Z7Ny.js → react-DuT44cmP.js} +1 -1
- package/dist/assets/{react-Bu0vc7Mq.js → react-ZBjrfALO.js} +1 -1
- package/dist/assets/{recharts-oolJNF1J.js → recharts-By7---KY.js} +1 -1
- package/dist/assets/{routePaths-CKa13qEa.js → routePaths-BrPQ6Dmq.js} +1 -1
- package/dist/assets/{sentry-Bel9R1P0.js → sentry-CICosfun.js} +1 -1
- package/dist/assets/{url-CXvkkYyM.js → url-BT1ZbVV2.js} +1 -1
- package/dist/assets/{url-CKAhPnIv.js → url-DR5H-CL7.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BBBAFUGd.js +1 -0
- package/dist/assets/{useDeviceId-C-LBnIzp.js → useDeviceId-DBXOvj0k.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-CPF3IiNN.js +1 -0
- package/dist/assets/{useInitialThreadRequest-KZIIx-jA.js → useInitialThreadRequest-DUZNt5RE.js} +1 -1
- package/dist/assets/{utils-y7cfvjBg.js → utils-2uvHiDNZ.js} +1 -1
- package/dist/assets/withTransactionSidePanel-B0dRvTs-.js +21 -0
- package/dist/assets/{zeni-epic-state-CjARY91O.js → zeni-epic-state-CQPLPmPS.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-C1bL1yEL.js +0 -1
- package/dist/assets/AddressScreen-C6IvqCLW.js +0 -9
- package/dist/assets/BillPayRoutes-DYqCDQKr.js +0 -119
- package/dist/assets/ChargeCardRoutes-CAQ18GHz.js +0 -71
- package/dist/assets/CustomerOnboardingAuthScreen-DbhhpyIu.js +0 -1
- package/dist/assets/DashboardRoutes-FjJ49qIi.js +0 -20
- package/dist/assets/ExpenseAutomationRoutes-DMIgQeGn.js +0 -25
- package/dist/assets/FeaturePreviewScreen-BBBv1uMR.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BYKmWE-B.js +0 -12
- package/dist/assets/NotFoundScreen-BrmwEoGP.js +0 -1
- package/dist/assets/NotificationRoutes-BhWmeNUp.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-D2gaV3KQ.js +0 -1
- package/dist/assets/PeopleRoutes-C49twcDs.js +0 -22
- package/dist/assets/PerformanceRoutes-8TzRyboc.js +0 -1
- package/dist/assets/ReferralListScreen-Czxg_tCU.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-CSGZqgWn.js +0 -1
- package/dist/assets/ReimbursementRoutes-pEKPc1LV.js +0 -68
- package/dist/assets/RewardsRoutes-DAxVBnQa.js +0 -1
- package/dist/assets/SignOutScreen-B8SOTK5f.js +0 -9
- package/dist/assets/TaskListScreen-DYKkvt2-.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BZNOCcmc.js +0 -1
- package/dist/assets/TransactionDetailScreen-B3KLkUFa.js +0 -5
- package/dist/assets/TreasuryRoutes-ZGFkV4TM.js +0 -37
- package/dist/assets/VendorsRoutes-B8LMPpiX.js +0 -112
- package/dist/assets/WiseConfirmationScreen-btVOEfVh.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CPNfHI8n.js +0 -66
- package/dist/assets/ZeniAccountStatementScreen-B4A5SVx8.js +0 -9
- package/dist/assets/getLocaleForTenant-BrCCfdIO.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CwXdaO7x.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js +0 -1
- package/dist/assets/withTransactionSidePanel-Bmv6ar-S.js +0 -21
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Cxvop2w5.js";import{l as K,g as k,u as z,h as G,j as q,k as H,s as $a,n as nt,o as D}from"./core-DGD8k-EU.js";import{eN as L,Jv as Me,bC as Yt,bq as de,KI as za,hS as qa,KJ as wt,KK as Za,hV as ot,KL as Re,KM as Ha,h_ as Ja,KN as xt,KO as Qa,i2 as st,KP as je,KQ as Xa,cj as it,KR as Wa,KS as en,JP as tn,iY as an,KT as nn,bn as ye,KU as Vt,Jj as W,bc as Nt,ja as Gt,mt as Kt,iV as $t,Jl as ee,Jk as Z,f2 as on,fk as sn,KV as rn,KW as cn,KX as zt,KY as ge,tA as ve,tB as Ie,tY as ue,tS as te,tF as Ae,KZ as ln,K_ as dn,K$ as un,L0 as qt,L1 as be,L2 as mn,dB as Ue,qc as Zt,L3 as pn,L4 as hn,L5 as fn,L6 as ct,IH as lt,jq as me,u4 as dt,qk as gn,L7 as bn,tC as Dt,qf as ce,qb as Ht,L8 as oe,L9 as Cn,La as ut,IF as mt,sc as Jt,Lb as _n,Lc as kn,Ld as Sn,Le as pt,sp as yn,Lf as vn,tE as Ot,sb as Qt,Lg as se,Lh as In,bv as Xt,u8 as Wt,Li as An,Lj as En,Lk as Tn,Ll as ht,u3 as wn,Lm as xn,tD as Ft,u7 as ea,Ln as re,Lo as Dn,Lp as On,Lq as ta,jf as aa,mq as na,jk as oa,mo as sa,mn as ra,mm as ia,rA as Fn,fa as Pn,cM as Bn,cN as Rn,mj as jn,f6 as Ln,mA as Mn,Lr as Un,Dc as Yn,Ls as Vn,Lt as Nn,Lu as Gn,b5 as ft,eZ as Kn,gA as $n,fB as zn,mu as qn,iO as Zn,mr as Hn,mp as Jn,eT as Qn,eR as Xn}from"./zeni-epic-state-CjARY91O.js";import{z as j,O as J,x as O,d as A,D as $,aQ as Wn,J as Ee,A as Te,aR as ca,f as V,aS as eo,j as we,aT as la,a as Ye,p as M,h as to,aU as ao,aV as no,q as oo,c as da,_ as so,aW as ro,aJ as ua,aX as io,aY as co,N as lo,aZ as xe,a_ as uo,am as mo,v as po,K as ho,a$ as fo,b0 as _e}from"./index-CNT4WvUT.js";import{n as gt}from"./mui-Cdh_ZgIg.js";import{a as _}from"./sentry-Bel9R1P0.js";import{w as ma}from"./withTransactionSidePanel-Bmv6ar-S.js";import{b as pa,t as pe,e as ae,a as bt,v as go}from"./routePaths-CKa13qEa.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as De,b as bo}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import Se from"./NotFoundScreen-BrmwEoGP.js";import{t as ha}from"./analyticsHelper-CNwzWBf_.js";import{C as Co}from"./CompanyPassportScreen-7bEBCgDZ.js";import{F as _o}from"./FeaturePreviewScreen-BBBv1uMR.js";import{R as ko}from"./ReferralListScreen-Czxg_tCU.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";import"./TransactionDetailScreen-B3KLkUFa.js";import"./decodeURIComponentSafe-DKUmHyeo.js";import"./MobileAppDrawer-BqatZNBg.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]="d774842e-15f3-4fb1-bff2-54658f78ee5c",e._sentryDebugIdIdentifier="sentry-dbid-d774842e-15f3-4fb1-bff2-54658f78ee5c")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(T=>T.tenantState.currentTenantId),u=k(T=>L(T)),{tenantEmailDomain:f}=K(),g=z(),b=u?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:b,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),m=_.useMemo(()=>r!=null?Yt(r):de(),[r]),C=G(),d=q(),h=k(T=>za(T,m,o)),S=_.useCallback(()=>{o!=null&&h.fetchState!=="In-Progress"&&h.fetchState!=="Completed"&&C(qa(o,m))},[m]),y=_.useCallback(()=>{d("../../",{relative:"path"})},[]),F=_.useCallback((T,B)=>{C(wt({sortKey:T,sortOrder:B}))},[]),E=_.useCallback(T=>{C(wt({downloadState:T}))},[]),v=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(f!=null){const B=pa({id:T.transactionId,type:T.transactionType},f);d(B);const he=O(g.state?.pathnameStackToGoBack,g.pathname);d(B,{state:{pathnameStackToGoBack:he}})}},[f,e]),w=_.useCallback(()=>{h.vendor!=null&&A.trackApAgingDetail("AP Aging",m.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),h.vendor.id,h.vendor.name)},[h.vendor,m]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{h.fetchState==="Completed"&&w()},[w,h.fetchState]),l.jsx(Wn,{apAgingDetail:h,downloadParams:c,reportDate:m,analytics:A,onTransactionClick:v,onReload:S,onBackClick:y,onColumnSortConfigChanged:F,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ee(),t=G(),n=q(),o=k(v=>Za(v)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ve({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});De({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),u=k(v=>v.tenantState.currentTenantId),f=k(v=>L(v)),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:u??""},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),c=o.apAgingUIState.selectedDate??de(),m=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(c))},[]);_.useEffect(()=>{m()},[]);const C=_.useCallback(()=>{n("../",{relative:"path"})},[]),d=_.useCallback(v=>{t(Re({searchString:v}))},[]),h=_.useCallback((v,w)=>{t(Re({sortKey:w,sortOrder:v}))},[]),S=_.useCallback(v=>{n(`./${v}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),y=_.useCallback(v=>{t(Re({downloadState:v}))},[]),F=_.useCallback((v,w)=>{},[]),E=_.useCallback((v,w)=>{t(Re({selectedDate:v,agingDateSelectionType:w})),t(ot(v))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Te,{analytics:A,onLoad:v=>v.trackPageLoaded(V.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:A,onReloadReport:m,onBackClick:C,onSearchTextChange:d,onSortOrderChange:h,onEntityNameClick:S,updateDownloadStateHandler:y,onSelectedDateChanged:E,onNodeCollapseToggled:F,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(w=>L(w)),{tenantEmailDomain:u}=K(),f=z(),g=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),m=G(),C=q(),d=k(w=>Ha(w,c,o)),h=_.useCallback(()=>{o!=null&&d.fetchState!=="In-Progress"&&d.fetchState!=="Completed"&&m(Ja(o,c))},[c]),S=_.useCallback(()=>{C("../../",{relative:"path"})},[]),y=_.useCallback((w,T)=>{m(xt({sortKey:w,sortOrder:T}))},[]),F=_.useCallback(w=>{m(xt({downloadState:w}))},[]),E=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(u!=null){const T=pa({id:w.transactionId,type:w.transactionType},u);C(T);const B=O(f.state?.pathnameStackToGoBack,f.pathname);C(T,{state:{pathnameStackToGoBack:B}})}},[u,e]),v=_.useCallback(()=>{d.customer!=null&&A.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),d.customer.id,d.customer.name)},[d.customer,c]);return _.useEffect(()=>{h()},[]),_.useEffect(()=>{d.fetchState==="Completed"&&v()},[d.fetchState,v]),l.jsx(eo,{arAgingDetail:d,downloadParams:p,reportDate:c,analytics:A,onTransactionClick:E,onReload:h,onBackClick:S,onColumnSortConfigChanged:y,updateDownloadStateHandler:F,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ee(),t=G(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ve({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});De({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),u=k(E=>L(E)),f=u.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:u.tenantId},b=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(st(p))},[]);_.useEffect(()=>{c()},[]);const m=_.useCallback(()=>{n("../",{relative:"path"})},[]),C=_.useCallback(E=>{t(je({searchString:E}))},[]),d=_.useCallback((E,v)=>{t(je({sortKey:v,sortOrder:E}))},[]),h=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(je({downloadState:E}))},[]),y=_.useCallback((E,v)=>{t(je({selectedDate:E,agingDateSelectionType:v})),t(st(E))},[]),F=_.useCallback((E,v)=>{t(Xa({nodeId:E,isCollapsed:v}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Te,{analytics:A,onLoad:E=>E.trackPageLoaded(V.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:A,onReloadReport:c,onBackClick:m,onSearchTextChange:C,onSortOrderChange:d,onEntityNameClick:h,updateDownloadStateHandler:S,onSelectedDateChanged:y,onNodeCollapseToggled:F,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?A.trackZeniAccountsCashBalancePromoClicked("Move Money"):(A.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else A.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Ao=H(function(e){const a=Wa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:A}},ga)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=ye(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:A}},ga)(la);function To(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=we(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=it(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(Se,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=we(),o=it(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(Se,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
min-height: 100%;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Do=gt.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`;function Oo({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=q(),i=G(),u=z(),{tenantEmailDomain:f}=K(),g=to();return l.jsxs(xo,{children:[l.jsx(ao,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:g.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:b=>{b.trim().length>=2?i(ee({searchString:b,searchOrigin:"navbar"})):b.trim().length===0&&i(Z("navbar"))},onAutoCompleteEntity:b=>{n!=null&&A?.trackSearch(V.Event.search,Fo(a),b.type,b.name,n);const p=ae(b,f),c=O(u.state?.pathnameStackToGoBack,u.pathname);s(p,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:o===!0&&r!=null?l.jsx(no,{onClick:r}):null}),l.jsx(Do,{children:a==="cash_balance"?l.jsx(To,{}):l.jsx(wo,{})})]})}function Pt(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ee(),t=z(),n=G(),{useFeatureGate:o}=Ye(),{isFeatureEnabled:r}=o(M.isDepositAccountsFeatureEnabled),s=k(h=>h.cashBalanceState.fetchState),i=k(h=>h.cardBalanceState.fetchState),u=j.getSignedInUser();if(u==null)throw Error("Can't access dashboard detail without signing in...");const f=Vt((h=>{const S=Nt(h,"/").split("/");return S[S.length-1]})(t.pathname));let g="Not-Started",b="";const p=$.getLocalizedStrings();switch(f){case"cash_balance":g=s,b=p.reportTitleById.cash_balance;break;case"card_balance":g=i,b=p.reportTitleById.card_balance;break;default:console.error(`${f} is not supported!`)}const{isAiCfoAccessEnabled:c,onAskAiCfoClick:m}=Ve({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:f==="card_balance"?"Card Balance":"Cash Balance"});De({isDataReady:g==="Completed"});const C=k(h=>h.entityAutoCompleteState.autoCompleteText.navbar),d=k(h=>W(h,"navbar"));return _.useEffect(()=>{g==="Not-Started"&&function(h,S,y){switch(S){case"card_balance":h($t());break;case"cash_balance":h(Gt()),y===!0&&h(Kt());break;default:throw new Error(`balance report type ${S} is not yet supported`)}}(n,f,r)},[u,n,g]),l.jsxs(l.Fragment,{children:[g==="Completed"?l.jsx(Te,{analytics:A,onLoad:h=>((S,y)=>{switch(y){case"card_balance":S.trackPageLoaded(V.Event.cardBalance);break;case"cash_balance":S.trackPageLoaded(V.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${y}!`)}})(h,f)}):null,l.jsx(Oo,{title:b,reportId:f,autoCompleteText:C,entityAutoCompleteView:d,isAiCfoAccessEnabled:c,onAskAiCfoClick:m})]})}const Fo=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Po=[];function Oe(e){const{mobileExploreReferrer:a}=e,t=G(),n=q(),o=z(),{tenantEmailDomain:r}=K(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Ee(),u=oo(),f=lo(u),g=$a(),b=k(B=>on(B)),p=b.uiState?.currentChatSessionId,c=b.allSessionsWithOrderedQuestionAnswers??Po,m=j.getSignedInUser()?.userId,C=da(),d=bo()&&C&&r!=null,h=so(),S=ro(h),{useDynamicConfig:y}=Ye(),{configValue:F}=y(ua.aiCfoMessageDynamicConfig),E=_.useMemo(()=>Array.isArray(F.default_message_list)?F.default_message_list:[],[F.default_message_list]),v=_.useMemo(()=>(S!=null&&S.length>0?S:E).slice(0,2),[E,S]),w=_.useCallback((B,he)=>{if(m==null||B.trim()==="")return;const fe=io(g.getState());if(f){const Fe=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Fe,referrer:a,aiCfoInitialQuestion:B,aiCfoShouldSubmit:!fe}})}else{if(fe)return t(sn(B)),void s(!0);i(B),s(!0),co(t,B,"insights_section",p,c,m,he,void 0)}},[c,p,t,f,o.pathname,o.state,a,n,s,i,g,r,m]),T=_.useCallback(()=>{if(f){const B=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:B,referrer:a}})}else s(!0)},[f,o.pathname,o.state,a,n,s,r]);return _.useMemo(()=>{if(d)return{onAskSomethingElseClick:T,onSuggestedQuestionClick:w,suggestedQuestions:v}},[d,T,w,v])}const Bo=H(function(e){const a=rn(e),t=cn(e),n=zt(e),{scrollPosition:o,...r}=n,s=$.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=j.getSignedInUser(),u=e.tenantState.currentTenantId,f=L(e),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:u??""},p=e.entityAutoCompleteState.autoCompleteText.navbar,c=W(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${J}/statement`,authParams:b},analytics:A,autoCompleteData:{autoCompleteText:p,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(ln(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Ae(t,n)),e(ge({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue("month")),e(te(a.firstMonthOfFY,t)),e(ge({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ve(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Ie(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(ge({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(ge({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(ge({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(xe),Ro=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Oe({mobileExploreReferrer:"DashboardCashInCashOut"}),r=k(s=>zt(s)).mode==="compare_mode";return l.jsx(Bo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:r,navigate:n,insightsSectionAiCfoInfo:o})},jo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ue(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Lo=H(function(e){const a=dn(e),t=un(e),n=qt(e),{scrollPosition:o,...r}=n,s=$.getLocalizedStrings().reportTitleById.cash_position,i=j.getSignedInUser(),u=e.tenantState.currentTenantId,f=L(e),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:u??""},p=e.entityAutoCompleteState.autoCompleteText.navbar,c=W(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${J}/statement`,authParams:b},analytics:A,autoCompleteData:{autoCompleteText:p,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(mn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(be({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ae(t,n)),e(be({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(be({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ve(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Ie(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(be({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=jo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:u,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(be({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(xe),Mo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Oe({mobileExploreReferrer:"DashboardCashPosition"}),r=k(s=>qt(s)).mode==="compare_mode";return l.jsx(Lo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:r,navigate:n,insightsSectionAiCfoInfo:o})},N=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!=t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))};function Qe(){return l.jsxs(nt,{children:[l.jsx(D,{path:"/",element:l.jsx(Q,{})}),l.jsx(D,{path:"/:forecastId",element:l.jsx(Q,{})}),l.jsx(D,{path:"/:forecastId/*",element:l.jsx(Se,{})})]})}const Uo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ue(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Yo=H(function(e){const a=Zt(e),t=pn(e),n=hn(e),o=fn(e),r=ct(e),{scrollPosition:s,...i}=r,u=t.reportTitle,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,C=W(e,"navbar"),d=lt(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:A,isZeniUser:ye(f),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:C},isZeniCOAUsed:d,isAccountingClassesEnabled:me(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Cn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ae(t,n)),e(oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ve(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Ie(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Uo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:u,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t==="forecast_mode"?(e(Dt({viewMode:"account_group"})),e(Ht(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(oe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(Dt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(bn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(gn())},onResyncReports:()=>{e(dt("net_burn_or_income_by_classes"))}}})(xe),Vo=e=>{const a=G(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Oe({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),i=k(h=>ct(h)),u=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(h=>ut(h.forecastState,g??"")),p=k(h=>Zt(h)),c=k(h=>mt(h)),m=k(h=>me(h)),C=i.mode==="compare_mode",d=p.dataAvailable;return _.useEffect(()=>{if(g!=null&&u===!0&&(N(u,r,g,o),b!=null)){const h=b?.forecastPeriod,S=d!=null&&h.endDate.isAfter(d?.endDate)===!0?d:h;a(te(e.firstMonthOfFY,{startDate:S.endDate.startOf(f),endDate:S?.endDate}))}},[g]),l.jsx(Yo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:m,isCompareModeOn:C,navigate:o,analytics:A,reportsResyncFetchState:c.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},No=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ue(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Go=H(function(e){const a=Jt(e),t=_n(e),n=kn(e),o=Sn(e),r=pt(e),{scrollPosition:s,...i}=r,u=$.getLocalizedStrings().reportTitleById.operating_expenses,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,C=W(e,"navbar"),d=lt(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:A,isZeniUser:ye(f),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:C},isZeniCOAUsed:d,isAccountingClassesEnabled:me(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(In(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ae(t,n)),e(se({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(se({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ve(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Ie(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=No(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:u,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(se({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(se({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t=="forecast_mode"?(e(Ot({viewMode:"account_group"})),e(Qt(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(se({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Ot({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(vn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(yn())},onResyncReports:()=>{e(dt("operating_expenses_by_classes"))}}})(xe),Ko=e=>{const a=G(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Oe({mobileExploreReferrer:"DashboardOpEx"}),i=k(y=>pt(y)),u=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(y=>ut(y.forecastState,g??"")),p=k(y=>Jt(y)),c=k(y=>mt(y)),m=k(y=>me(y)),C=i.mode==="compare_mode",d=p.dataAvailable;_.useEffect(()=>{if(g!=null&&u===!0&&(N(u,r,g,o),b!=null)){const y=b?.forecastPeriod,F=d!=null&&y.endDate.isAfter(d?.endDate)===!0?d:y;a(te(e.firstMonthOfFY,{startDate:F.endDate.startOf(f),endDate:F?.endDate}))}},[g]);const h=we(),S=h?.loggedInUserRole!=null&&Xt(h?.loggedInUserRole)!==!0;return l.jsx(Go,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:m,isCompareModeOn:C,navigate:o,forecastIdFromUrlPath:r,analytics:A,hasTransactionAccess:S,reportsResyncFetchState:c.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},$o=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Ue(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},zo=H(function(e){const a=Wt(e),t=An(e),n=En(e),o=Tn(e),r=ht(e),{scrollPosition:s,...i}=r,u=$.getLocalizedStrings().reportTitleById.revenue,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},m=e.entityAutoCompleteState.autoCompleteText.navbar,C=W(e,"navbar"),d=lt(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:u},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:A,isZeniUser:ye(f),autoCompleteData:{autoCompleteText:m,entityAutoCompleteView:C},isZeniCOAUsed:d,isAccountingClassesEnabled:me(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Dn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ae(t,n)),e(re({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(re({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ve(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Ie(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&N(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=$o(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:u,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(re({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(re({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t==="forecast_mode"?(e(Ft({viewMode:"account_group"})),e(ea(!1,n?.id)),n!=null&&N(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):N(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(re({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Ft({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(xn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(wn())},onResyncReports:()=>{e(dt("revenue_by_classes"))}}})(xe),qo=e=>{const a=G(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Oe({mobileExploreReferrer:"DashboardRevenue"}),i=k(d=>ht(d)),u=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(d=>ut(d.forecastState,g??"")),p=k(d=>Wt(d)).dataAvailable,c=i.mode==="compare_mode",m=k(d=>me(d)),C=k(d=>mt(d));return _.useEffect(()=>{if(g!=null&&u===!0&&(N(u,r,g,o),b!=null)){const d=b?.forecastPeriod,h=p!=null&&d.endDate.isAfter(p?.endDate)===!0?p:d;a(te(e.firstMonthOfFY,{startDate:h.endDate.startOf(f),endDate:h?.endDate}))}},[g]),l.jsx(zo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:m,isCompareModeOn:c,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:A,reportsResyncFetchState:C.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},Zo=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},Ho=H(function(e){const a=On(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=W(e,"navbar");return{report:a,analytics:A,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{A.trackTimeframeSwitch(ha(t),"Top Expenses"),e(ta(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Zo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=pe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),u=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:u,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(uo),Jo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return l.jsx(Ho,{tenantEmailDomain:a,location:t,navigate:n})},Qo=gt.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex: 1 1 auto;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
-
align-items: center;
|
|
20
|
-
`,le=3,Ct=1;function Xo({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=q(),r=z(),{tenantEmailDomain:s}=K();let i;De({isDataReady:!0});const u={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=l.jsx(Ko,{...u});break;case"revenue":i=l.jsx(qo,{...u});break;case"net_burn_or_income":i=l.jsx(Vo,{...u});break;case"cash_position":i=l.jsx(Mo,{...u});break;case"top_expenses":i=l.jsx(Jo,{...u});break;case"cash_in_cash_out":i=l.jsx(Ro,{...u});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?l.jsx(Qo,{children:i}):null}function Q(){const e=z(),a=G(),{forecastId:t}=K();let n="Not-Started";const o=k(c=>pt(c).fetchState),r=k(c=>ht(c).fetchState),s=k(c=>ct(c).fetchState),i=k(c=>c.cashPositionState.fetchState),u=k(c=>c.topExState.fetchState),f=k(c=>c.cashInCashOutState.fetchState);if(j.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const g=k(c=>L(c)),b=g?.company?.companyInfo?.firstMonthOfFY??1,p=Vt((c=>{const m=Nt(c,"/").split("/");return t!=null?m[m.length-3]:m[m.length-1]})(e.pathname));switch(p){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=u;break;case"cash_in_cash_out":n=f;break;default:console.error(`${p} is not supported!`)}return _.useEffect(()=>{n==="Not-Started"&&function(c,m,C,d){switch(m){case"operating_expenses":c(ia(!0)),d!=null&&(c(ce(C,!0,le,{id:d,index:0})),c(Qt(!1,d)));break;case"revenue":c(ra(!0)),d!=null&&(c(ce(C,!0,le,{id:d,index:0})),c(ea(!1,d)));break;case"net_burn_or_income":c(sa(!0)),d!=null&&(c(ce(C,!0,le,{id:d,index:0})),c(Ht(!1,d)));break;case"cash_position":c(oa(!0));break;case"top_expenses":c(na());break;case"cash_in_cash_out":c(aa());break;default:throw new Error(`report type ${m} is not yet supported`)}}(a,p,b,t)},[t]),l.jsxs(l.Fragment,{children:[n==="Completed"?l.jsx(Te,{analytics:A,onLoad:c=>((m,C)=>{const d=e.state?.referrer;switch(C){case"operating_expenses":m.trackPageLoaded(V.Event.operatingExpenses,d);break;case"revenue":m.trackPageLoaded(V.Event.revenues,d);break;case"net_burn_or_income":m.trackPageLoaded(V.Event.burnRate,d);break;case"cash_position":m.trackPageLoaded(V.Event.cashPosition,d);break;case"top_expenses":m.trackPageLoaded(V.Event.topExpenses,d);break;case"cash_in_cash_out":m.trackPageLoaded(V.Event.cashInCashOut,d);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,p)}):null,l.jsx(Xo,{firstMonthOfFY:b,fetchState:n,reportId:p,forecastId:t})]})}var Xe=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function We(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function ba(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function Ca(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var _t={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Xe?173:189,"=":Xe?61:187,";":Xe?59:186,"'":222,"[":219,"]":221,"\\":220},X={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},rt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},R={16:!1,18:!1,17:!1,91:!1},P={},Le=1;Le<20;Le++)_t["f".concat(Le)]=111+Le;var x=[],Bt=!1,_a="all",Rt=[],Ne=function(e){return _t[e.toLowerCase()]||X[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function jt(e){_a=e||"all"}function ke(){return _a||"all"}var et=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;Ca(a).forEach(function(s){var i=s.split(r),u=i.length,f=i[u-1],g=f==="*"?"*":Ne(f);if(P[g]){t||(t=ke());var b=u>1?ba(X,i):[];P[g]=P[g].filter(function(p){return!((!n||p.method===n)&&p.scope===t&&function(c,m){for(var C=c.length>=m.length?c:m,d=c.length>=m.length?m:c,h=!0,S=0;S<C.length;S++)d.indexOf(C[S])===-1&&(h=!1);return h}(p.mods,b))})}})};function Lt(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,R)Object.prototype.hasOwnProperty.call(R,r)&&(!R[r]&&a.mods.indexOf(+r)>-1||R[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||R[16]||R[18]||R[17]||R[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Mt(e,a){var t=P["*"],n=e.keyCode||e.which||e.charCode;if(U.filter.call(this,e)){if(n!==93&&n!==224||(n=91),x.indexOf(n)===-1&&n!==229&&x.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(m){var C=rt[m];e[m]&&x.indexOf(C)===-1?x.push(C):!e[m]&&x.indexOf(C)>-1?x.splice(x.indexOf(C),1):m==="metaKey"&&e[m]&&x.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(x=x.slice(x.indexOf(C))))}),n in R){for(var o in R[n]=!0,X)X[o]===n&&(U[o]=!0);if(!t)return}for(var r in R)Object.prototype.hasOwnProperty.call(R,r)&&(R[r]=e[rt[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(x.indexOf(17)===-1&&x.push(17),x.indexOf(18)===-1&&x.push(18),R[17]=!0,R[18]=!0);var s=ke();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&Lt(e,t[i],s,a);if(n in P){for(var u=0;u<P[n].length;u++)if((e.type==="keydown"&&P[n][u].keydown||e.type==="keyup"&&P[n][u].keyup)&&P[n][u].key){for(var f=P[n][u],g=f.splitKey,b=f.key.split(g),p=[],c=0;c<b.length;c++)p.push(Ne(b[c]));p.sort().join("")===x.sort().join("")&&Lt(e,f,s,a)}}}}function U(e,a,t){x=[];var n=Ca(e),o=[],r="all",s=document,i=0,u=!1,f=!0,g="+",b=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(u=a.keyup),a.keydown!==void 0&&(f=a.keydown),a.capture!==void 0&&(b=a.capture),typeof a.splitKey=="string"&&(g=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(g)).length>1&&(o=ba(X,e)),(e=(e=e[e.length-1])==="*"?"*":Ne(e))in P||(P[e]=[]),P[e].push({keyup:u,keydown:f,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:g,element:s});s!==void 0&&!function(p){return Rt.indexOf(p)>-1}(s)&&window&&(Rt.push(s),We(s,"keydown",function(p){Mt(p,s)},b),Bt||(Bt=!0,We(window,"focus",function(){x=[]},b)),We(s,"keyup",function(p){Mt(p,s),function(c){var m=c.keyCode||c.which||c.charCode,C=x.indexOf(m);if(C>=0&&x.splice(C,1),c.key&&c.key.toLowerCase()==="meta"&&x.splice(0,x.length),m!==93&&m!==224||(m=91),m in R)for(var d in R[m]=!1,X)X[d]===m&&(U[d]=!1)}(p)},b))}var tt={setScope:jt,getScope:ke,deleteScope:function(e,a){var t,n;for(var o in e||(e=ke()),P)if(Object.prototype.hasOwnProperty.call(P,o))for(t=P[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;ke()===e&&jt(a||"all")},getPressedKeyCodes:function(){return x.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=Ne(e)),x.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(P).forEach(function(t){var n=P[t].find(function(o){return o.scope===a&&o.shortcut===e});n&&n.method&&n.method()})},unbind:function(e){if(e===void 0)Object.keys(P).forEach(function(s){return delete P[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&et(s)});else if(typeof e=="object")e.key&&et(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),et({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:_t,modifier:X,modifierMap:rt};for(var at in tt)Object.prototype.hasOwnProperty.call(tt,at)&&(U[at]=tt[at]);if(typeof window<"u"){var Wo=window.hotkeys;U.noConflict=function(e){return e&&window.hotkeys===U&&(window.hotkeys=Wo),U},window.hotkeys=U}U.filter=function(){return!0};var Ut=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function es(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,u=o.keydown,f=o.filterPreventDefault,g=f===void 0||f,b=o.enabled,p=b===void 0||b,c=o.enableOnContentEditable,m=c!==void 0&&c,C=_.useRef(null),d=_.useCallback(function(h,S){var y,F;return s&&!s(h)?!g:!!(Ut(h,["INPUT","TEXTAREA","SELECT"])&&!Ut(h,r)||(y=h.target)!=null&&y.isContentEditable&&!m)||!!(C.current===null||document.activeElement===C.current||(F=C.current)!=null&&F.contains(document.activeElement))&&(a(h,S),!0)},n?[C,r,s].concat(n):[C,r,s]);return _.useEffect(function(){if(p)return i&&u!==!0&&(t.keydown=!1),U(e,t||{},d),function(){return U.unbind(e,d)};U.unbind(e,d)},[d,e,p]),C}U.isPressed;const ts=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","zeni_accounts_promo_card","rewards_card","treasury_promo_card"],as=(e,a,t,n,o)=>({card:{dimension:ft(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),Ce=(e,a,t,n,o)=>({card:{dimension:ft(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e}),ns=(e,a,t,n)=>Ce(void 0,e,_e,a,t),os=(e,a,t,n,o)=>({card:{dimension:ft(_e),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),ss=H(function(e,a){const t=cs(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i,treasuryFundDetails:u,hasUserSeenTreasuryVideo:f,treasuryFetchState:g}=a;let b=n.map((p,c)=>{if(p==="reimbursement_promo_card"||p==="bill_pay_promo_card")return ns(t,p,c);if(p==="zeni_promo_card")return Ce({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,_e,p,c);if(p==="treasury_promo_card")return os(g,p,c,u,f);if(p==="information_card")return Ce(void 0,"Completed",_e,p,c);{const m=o.find(C=>C?.reportId===p);return m?function(C,d,h,S){const y=C.reportId;switch(y){case"card_balance":case"cash_balance":return[as(C,d,h,y,S)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"zeni_accounts_promo_card":case"rewards_card":return[Ce(C,d,h,y,S)];case"net_burn_or_income_story_card":return[Ce(C,d,h,"net_burn_or_income_story_card",S)];default:return console.error(`card type ${y} not yet supported!`),[]}}(m,m.fetchState,_e,c):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(b=b.filter(p=>ts.includes(p.card.cardType)==0).filter(p=>{const c=p.data?.availableNumberOfPeriods;return c!=null?c>0:p.card.cardType!="top_expenses"||p.data==null||function(m){if(m==null||m.length===0)return!0;let C=!0;for(const d of m)if(d.balance.available.amount!==0){C=!1;break}return C}(p.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:b,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:W(e,"navbar")},analytics:A,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=j.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)A.trackDashboardCardClicked("cards promo",2),A.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&A.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(A.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isZeniAccountEnabled===!1&&s.push("zeni_accounts_promo_card"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),function(i,u,f,g){switch(u){case"card_balance":i($t());break;case"cash_balance":i(Gt());break;case"operating_expenses":i(ia(!0));break;case"revenue":i(ra(!0));break;case"net_burn_or_income":i(sa(!0));break;case"net_burn_or_income_story_card":i(Jn(!0));break;case"cash_position":i(oa(!0));break;case"top_expenses":i(na());break;case"cash_in_cash_out":i(aa());break;case"insights_dashboard":i(Hn());break;case"bill_pay_card":i(Zn());break;case"reimbursement_card":i(qn());break;case"company_details":i(zn(f));break;case"task_card":i($n());break;case"accounts_payable_aging":g.includes("accounts_payable_aging")===!1&&i(ot(de()));break;case"accounts_receivable_aging":i(st(de()));break;case"zeni_accounts_promo_card":g.includes("zeni_accounts_promo_card")===!1&&i(Kt());break;case"rewards_card":g.includes("rewards_card")===!1&&i(Kn(!0));break;default:throw new Error(`report type ${u} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{A.trackTimeframeSwitch(ha(r),is(o),"Dashboard"),function(s,i,u){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(ue(u));break;case"top_expenses":s(ta(u));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(Gn(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:(o,r)=>{if(o==="bill_pay_promo_card"){const s="../bills",i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){j.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(A.trackUpdateBurnRateCalculatorSettings(r,s,Vn(s)),e(Nn(t,r,s)))},onVideoPlay:()=>{e(Yn())},onVideoClose:()=>{e(Un())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ee({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(Z("navbar"))},onCancelAutoComplete:()=>{e(Z("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?ae(o,a.tenantEmailDomain):go(o.zeniId,o.qboId,a.tenantEmailDomain);const s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(fo);function rs(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ee(),t=q(),n=G(),o=z(),r=j.getSignedInUser(),{useFeatureGate:s,useDynamicConfig:i}=Ye(),u=ye(r),[f,g]=_.useState(!1),[b,p]=_.useState(!1),c=da(),{tenantEmailDomain:m}=K(),{isAiCfoAccessEnabled:C,onAskAiCfoClick:d}=Ve({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"Dashboard"}),h=k(I=>I.tenantState.fetchState==="Completed"||I.tenantState.activeTenantFetchState.fetchState==="Completed"?L(I):void 0),S=h??j.getSignedInUserTenant(m),y=S.tenantId,F=S.companyId;_.useEffect(()=>{f===!1&&o.state?.message==="activation"&&(n(Fn(F)),g(!0))},[o.state,f,F,n]),_.useEffect(()=>{c&&!b&&o.state?.message==="open_ai_cfo_drawer"&&(a(!0),p(!0),t(o.pathname,{replace:!0,state:{...o.state,message:void 0}}))},[o.state,b,c,a,t,o.pathname]);const{isFeatureEnabled:E}=s(M.isApAgingFeatureEnabled),{isFeatureEnabled:v}=s(M.isExpenseAutomationEnabled),{isFeatureEnabled:w}=s(M.isExpenseAutomationEnabledV2),T=w||v&&u,{isFeatureEnabled:B}=s(M.isTreasuryEnabled),he=mo(T),{isFeatureEnabled:fe}=s(M.isArAgingFeatureEnabled),{isFeatureEnabled:Fe}=s(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:kt}=s(M.isReferralFeatureEnabled),{isFeatureEnabled:ka}=s(M.isChargeCardFeatureEnabled),{isFeatureEnabled:Sa}=s(M.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:ya}=s(M.isDashboardSidebarNewYearAnimationEnabled),{configValue:St}=i(ua.zeniCardsConfig),va=St.charge_card_cashback_rate_per_transaction==null?.0175:St.charge_card_cashback_rate_per_transaction;if(o.state?.message==="activation"){const I=po(o.state?.pathnameStackToGoBack);t(o.pathname,{state:{...o.state,message:void 0,pathnameStackToGoBack:I.newStack}})}const[yt,Ia]=_.useState(!1),[Ge,Aa]=_.useState(!1);es("command+p, Control+p",I=>{Aa(!Ge),I.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[Ge]);const vt=h?.externalConnections?.accounting[0]?.isValid;if(r==null)throw Error("Can't access dashboard without signing in...");const ne=k(I=>L(I)?.excludedResources),Ea=k(I=>I.expenseAutomationViewState.selectedPeriodByTenantId),Ta=!!h?.companyReimbursementInfo?.info?.isReimbursementEnabled,wa=!!h?.companyBillPayInfo?.info?.isBillPayEnabled,xa=k(I=>I.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Da=h?.company!=null&&Pn(h.company),Ke=B&&Da,$e=we(),Oa=it($e?.loggedInUserRoleMap),Y=[],It=ne?.resources?.find(I=>I.resource==="/reports/top_expenses")==null,Fa=ne?.resources?.find(I=>I.resource==="/reports/task_card")==null,ze=h?.userRole!=null&&Xt(h?.userRole),Pa=ne?.resources?.find(I=>I.resource==="/bills")==null&&!ze,Ba=ne?.resources?.find(I=>I.resource==="/reimbursements")==null,Ra=Bn($e?.loggedInUserRoleMap),ja=Rn($e?.loggedInUserRoleMap),La=h?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,Ma=h?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,Ua=k(I=>I.treasurySetupViewState.treasuryFundsDetails).fundsDetails;It===!1&&Y.push("top_expenses"),Fa===!1&&Y.push("task_card"),Pa===!1&&Y.push("bill_pay_card","bill_pay_promo_card"),E===!1&&Y.push("accounts_payable_aging"),fe===!1&&Y.push("accounts_receivable_aging"),(T===!1||ze)&&Y.push("expense_automation_card"),Ba===!1&&Y.push("reimbursement_card","reimbursement_promo_card"),Fe===!1&&Y.push("zeni_accounts_promo_card"),kt===!1&&Y.push("rewards_card"),Ke===!1&&Y.push("treasury_promo_card");const{areTenantIdsInSync:At}=ho();_.useLayoutEffect(()=>{yt&&he===T||vt!==!0||!At||ne?.fetchState!=="Completed"&&ne?.fetchState!=="Error"||(Ia(!0),n(jn(r.userId,F,y,!0,!1,Y)))},[yt,r,y,n,It,vt,ne?.fetchState,At]);const Ya=k(I=>I.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Va=k(I=>I.revenueState.uiState.selectedForecast?.id),Na=k(I=>I.cardBalanceState.fetchState),ie=k(I=>Ln(I,Y,r,w,v,Ke)),Ga=ie.fetchState;De({isDataReady:!0});const Et=h?.isTreasuryVideoViewed===!0||ie.isTreasuryVideoClosed===!0;return l.jsxs(l.Fragment,{children:[Ga==="Completed"?l.jsx(Te,{analytics:A,onLoad:I=>{I.trackPageLoaded(V.Event.dashboard),Ke&&!Et&&I.trackTreasuryPromoView("Dashboard Promo Video")}}):null,l.jsx(ss,{maxColumns:e?2:void 0,isAiCfoAccessEnabled:C,onAskAiCfoClick:d,onDragAndDropCard:(I,Ka)=>{const Tt=function(Pe,qe,Be){const Ze=Be.indexOf(Pe),He=Be.indexOf(qe);if(Ze===-1||He===-1||Ze===He)return Be;const Je=[...Be];return Je.splice(Ze,1),Je.splice(He,0,Pe),Je}(I,Ka,ie.cardsOrdered);Tt.some((Pe,qe)=>Pe!==ie.cardsOrdered[qe])&&n(Mn(Tt))},dashboardReport:ie,passedCardsOrdered:ie.cardsForDashboardUI,tenantId:y,companyId:F,tenantEmailDomain:m,location:o,navigate:t,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:fe,isBillPayEnabled:wa,isReimbursementEnabled:Ta,isSummaryCardsFiltered:Ge,isForecastOn:Ya,selectedForecastOnDashboard:Va,isVisitingFirstTime:f,isZeniAccountEnabled:Fe,isRewardsFeatureEnabled:kt,hasZeniAccountsAdminAccess:Oa,isExpenseAutomationEnabledForUser:T&&ze===!1,selectedPeriod:Ea[y],isChargeCardFeatureEnabled:ka,isUserHasCardsAccess:Ra,isUserHasTreasuryAccess:ja,cardsCreditLimit:La,cashbackRate:va,isInterestedInChargeCard:Ma,cardBalanceFetchState:Na,christmasAnimationEnabled:Sa,newYearAnimationEnabled:ya,treasuryFundDetails:Ua,hasUserSeenTreasuryVideo:Et,treasuryFetchState:xa})]})}const is=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},cs=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function js(){const e=we(),a=e?.excludedResources?.find(f=>f.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=Ye(),{isFeatureEnabled:n}=t(M.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(M.isArAgingFeatureEnabled),r=k(f=>L(f)),{isFeatureEnabled:s}=t(M.isDebitCardFeatureEnabled),i=Qn(s,r),u=Xn(r);return i===!0||u===!0?l.jsx(nt,{children:l.jsx(D,{path:"/*",element:l.jsx(_o,{})})}):l.jsxs(nt,{children:[l.jsx(D,{path:"/",element:l.jsx(rs,{})}),l.jsx(D,{path:"cash_balance/*",element:l.jsx(Pt,{})}),l.jsx(D,{path:"card_balance/*",element:l.jsx(Pt,{})}),l.jsx(D,{path:"operating_expenses/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"operating_expenses/forecast/*",element:l.jsx(Qe,{})}),l.jsx(D,{path:"revenue/forecast/*",element:l.jsx(Qe,{})}),l.jsx(D,{path:"revenue/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"net_burn_or_income/forecast/*",element:l.jsx(Qe,{})}),l.jsx(D,{path:"net_burn_or_income/*",element:l.jsx(Q,{})}),n===!0&&l.jsxs(l.Fragment,{children:[l.jsx(D,{path:"accounts_payable_aging/*",element:l.jsx(yo,{})}),l.jsx(D,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:l.jsx(So,{})})]}),o&&l.jsxs(l.Fragment,{children:[l.jsx(D,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:l.jsx(vo,{})}),l.jsx(D,{path:"accounts_receivable_aging/*",element:l.jsx(Io,{})})]}),l.jsx(D,{path:"cash_position/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"top_expenses/*",element:a===!0?l.jsx(Q,{}):l.jsx(Se,{})}),l.jsx(D,{path:"cash_in_cash_out/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"company_details",element:l.jsx(Co,{})}),l.jsx(D,{path:"referrals/*",element:l.jsx(ko,{})}),l.jsx(D,{path:"*",element:l.jsx(Se,{})})]})}export{js as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-Cxvop2w5.js";import xn from"./NotFoundScreen-BrmwEoGP.js";import{a as s,b as Pt}from"./sentry-Bel9R1P0.js";import{n as De,S as Rn}from"./mui-Cdh_ZgIg.js";import{h as se,j as wt,u as qe,g as F,k as Dn,l as rt,n as On,o as je}from"./core-DGD8k-EU.js";import{eN as we,OK as Un,mv as Ce,fd as Fn,q6 as Bn,mN as xt,n6 as Rt,OL as Dt,ng as _n,OM as Ot,mG as Vn,pE as Mn,eY as he,ON as xe,s5 as Ut,Bg as Ft,OO as Bt,OP as jn,pj as Ge,Ks as dt,Ku as zn,jt as Ln,Kv as $n,jA as qn,cU as Gn,t8 as Je,jq as Jn,mT as _t,nl as Re,OQ as Nn,Jl as ut,Jk as Ae,OR as mt,jR as Yn,OS as Kn,OT as Wn,OU as Zn,OV as Hn,m_ as Qn,mL as ce,no as Te,OW as Xn,OX as ea,OY as ta,nv as na,jE as aa,jv as oa,OZ as sa,jD as ht,KC as ca,O_ as ia,O$ as la,pf as ra,oW as da,nm as pe,oV as ze,P0 as ua,P1 as ma,l8 as ha,bq as pa,l3 as pt,kR as ga,P2 as Ca,gC as gt,fP as Sa,l0 as Ia,v1 as fa,P3 as ka,nW as Ea,nR as va,nV as ya,nG as ba,P4 as Aa,e$ as Vt,n9 as Ta,mW as Pa,fe as Ct,nq as wa,P5 as xa,nn as Mt,P6 as Ra,P7 as Da,P8 as Oa,P9 as Ua,Pa as St,pr as Fa,oM as Ba,Jj as _a,jC as Va,Pb as Ma,FA as ja,jB as za,e_ as La,ol as jt,oE as $a,nk as It,np as qa,bC as Ga,kZ as Ja,kW as Na,Pc as Ya,nF as ft,oC as kt,oA as Ka,oq as Wa,o5 as Za,oD as Ha,Pd as Qa,Pe as Xa,o9 as eo,Pf as to,n$ as no,o8 as ao,o6 as oo,oH as so}from"./zeni-epic-state-CjARY91O.js";import{J as zt,a as Lt,p as ge,d as L,x as H,K as $t,cu as co,z as Oe,cv as io,ap as Pe,cw as lo,aP as Et,B as qt,cx as ro,am as Le,D as uo,cy as mo,O as ho,cz as po,cA as go,cB as Co,$ as So,j as Io,aJ as fo,b1 as ko,C as Eo,cC as vo}from"./index-CNT4WvUT.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{c as vt,C as yo}from"./TransactionDetailScreen-B3KLkUFa.js";import{w as bo}from"./withTransactionSidePanel-Bmv6ar-S.js";import{h as Ao,v as To}from"./routePaths-CKa13qEa.js";import{g as $e}from"./accountMappingHelper-C1yTeNF1.js";import{D as Po}from"./DrawerScreen-D376zeqM.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";import"./decodeURIComponentSafe-DKUmHyeo.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="15b47f60-5b09-4345-a70c-ed05c6ce78cc",t._sentryDebugIdIdentifier="sentry-dbid-15b47f60-5b09-4345-a70c-ed05c6ce78cc")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),O=se(),E=wt(),S=qe(),u=F(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:B}=c(ge.isRealtimeInsightsFeatureEnabled),m=F(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=F(g=>Un(g,u.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:f}=Gt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),y=s.useCallback((g,T,_=!1)=>{O(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),V=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),O(Fn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),y(i,u.tenantId,!0)},[y,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=H(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&y(i,u.tenantId)},[y,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&O(Bn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:B,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:V,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:v,onAskAiCfoClick:f})})},xo=De.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Ro=Pt.memo(({reconciliation:t,selectedDrawerAccountId:d,onClose:O,onFetchLinkTokenClick:E,onEstablishConnectionClick:S})=>{const u=se(),c=Oe.getSignedInUser(),B=F(n=>we(n)),m=t.excludedAccountIDs,o=s.useMemo(()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:B?.tenantId??""}),[c?.userId,c?.zeniSessionId,B?.tenantId]),{accountReconciliationsByAccountID:v,monthYearPeriod:f,statementUploadChosen:y}=t,V=v[d],i=V?.accountReconEntity.statementMetaData?.statementUploadId,h=(n,a)=>{u(Mn(n,a.split(".")[0]))},w=n=>{i!=null&&u(Vn({accountId:d,selectedPeriod:f,fileId:n,statementUploadId:i}))},A=()=>{u(Dt({statementUploadChosen:!1}))},x=n=>{u(_n({accountId:d,selectedPeriod:f,payload:n}))},g=n=>{u(Ot({accountId:d,selectedPeriod:f,localData:{accountSource:n}}))},T=s.useCallback(()=>{u(xt({accountId:d}))},[u,d]),_=s.useCallback(()=>{u(Rt({accountId:d}))},[u,d]),e=m.includes(d)?t.excludedAccountReconciliationByAccountID[d]:void 0;return V!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:V,monthYearPeriod:f,onDismissClick:O,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:S,onEditFileName:h,onDeleteFile:w,onSelectSourceType:g,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:o,openFilePicker:y,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:T})})}):e!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(lo,{excludedAccountReconciliation:e,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:_})})}):null}),yt=De.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,bt=De.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
`;function Do({companyId:t,closeCustomerRequestDrawer:d,addCustomerRequest:O,resetCustomerRequest:E}){const S=Oe.getSignedInUser();if(S==null)throw Error("Can't access Customer Request page without signing in...");const u=F(c=>jn(c,t,S));return s.useEffect(()=>{E()},[]),p.jsx(p.Fragment,{children:u.fetchState==="In-Progress"||u.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?p.jsx(qt,{fetchState:"In-Progress"}):p.jsx(ro,{onCloseClick:d,addCustomerRequest:O,snippets:u.companyMonthEndReportTemplatesData,bulletPoints:u.zeniRequestsData??[]})})}const Oo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Uo,comma:At,space:Fo}},dateFormat:Nt}=uo.getLocalizedStrings(),Tt=so,Bo=Dn(function(t,d){const{uncategorizedAccounts:O,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,companyId:c,isMissingReceiptsBulkUploadEnabled:B,isTransactionActivityEnabled:m}=d,o=Oe.getSignedInUser(),v=t.tenantState.currentTenantId,f={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:v??""},y=he(t),{selectedTransactionCategorizationTab:V}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:B===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:f,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:B===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:V,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:o,uncategorizedAccounts:O,companyId:c,isTransactionActivityEnabled:m,isAccountingClassesEnabled:Jn(t)}},function(t,d){const{themeState:O,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:u,location:c,vendorSearchAutoCompleteData:B,expenseAutomationViewSelector:m,currentTenant:o,uncategorizedAccounts:v,navigate:f,onClickCustomerRequest:y,handleEditClick:V,setActivityLogTransactionId:i}=d,{selectedPeriod:h,currentSelectedView:w,reconciliation:{selectedAccountId:A}}=m,{accountSettingsView:x}=m.jeSchedules,g=_t(h),T=Re(g.start),_=Re(g.end);return{onZeniLogoClick:()=>{O.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(h.month,h.year),t(Ba(e))},onUploadTransactionReceipt:(e,n,a,r,I,C)=>{t(St(e,n,{fetchState:"In-Progress"}));const k=()=>t(St(e,n,{fetchState:"Error"}));po(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,a,r,I).then(R=>{R!=null?t(Fa(e,R)):k()}).catch(k)},onMissingReceiptsRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=H(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ua(e,n)),o!=null&&t(Ce({tenantId:o.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,a,r)=>{t(Oa(e,{fetchState:n,error:a})),a!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:r!=null?Fo+Uo+r+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&T!=null&&t(Mt({start:T,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,a,r,I)=>{t(eo(e,n,a,r,I))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Qa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Ha(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Za())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=m.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Wa(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=m.currentSelectedView,a=m.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:a,uiState:{searchString:e}})),_!=null&&T!=null&&t(pe(a,{start:T,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{d.trackExpenseAutomationTabAnalytics(!0),t(wa(S))},onClose:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0})),f("../")},onBack:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=m,a=H(c.state?.pathnameStackToGoBack,c.pathname);f(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:a,referrer:m.currentSelectedView}}),t(Vt(e))},handleLogOutClick:()=>{const e=H(c.state?.pathnameStackToGoBack,c.pathname);f("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:a,fixedAssetsAccount:r,accruedExpensesAccount:I}=n,C=$e(x.prepaidExpensesAccountList,a.selectedOptions),k=$e(x.fixedAssetsAccountList,r.selectedOptions),R=$e(x.accruedExpensesAccountList,I.selectedOptions),q={selectedPrepaidExpensesAccountIds:C.map(b=>b.accountId),selectedFixedAssetsAccountIds:k.map(b=>b.accountId),selectedAccruedExpensesAccountIds:R.map(b=>b.accountId)};t(Aa({data:q}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:a,accumulatedDepreciationCategory:r,scheduleClass:I,scheduleExpenseCategory:C,vendor:k}=n,{allAccountList:R,allClassList:q,allDepreciationAccountList:b}=m.jeSchedules,G=B.entityAutoCompleteView.vendor.length>0?B.entityAutoCompleteView.vendor.find(j=>j.id===k?.selectedOption):void 0,W={id:G?.zeniId??k?.selectedOption??"",name:G?.name??k?.defaultOptions.find(j=>j.value===k?.selectedOption)?.label??"",logo:G?.logo},Ue=C?.selectedOption!=null?R.find(j=>j.qboId===C.selectedOption):void 0,Se=I?.selectedOption!=null?q.find(j=>j.classId===I.selectedOption):void 0,Ie=r?.selectedOption!=null?b.find(j=>j.qboId===r.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:a,scheduledJournalEntryID:e,updatedCategoryId:Ue?.accountId,updatedClassId:Se?.classId,updatedAccumulatedDepreciationCategoryID:Ie?.accountId,updatedVendor:{id:W.id,name:W.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(Ae("common"))},onCancelAutoComplete:()=>{t(Ae("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,a)=>{t(fa({selectedJEScheduleKey:n}));const r=H(c.state?.pathnameStackToGoBack,c.pathname);f(`../../vendors/schedules/${a}/details/${e}`,{state:{pathnameStackToGoBack:r,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{o!=null&&t(Ia(e,o.companyId,o.tenantId))},onClickCustomerRequest:y,setActivityLogTransactionId:i,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Sa())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ca(e))},onUpdateFileAttachment:e=>{t(ga({files:e}))},previewMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!0,a,r,o.tenantId))},saveMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!1,a,r,o.tenantId))},onEditMonthEndInsightsClick:V,sendMonthEndReport:e=>{const n=c.state?.referrer,{selectedPeriod:a,auditSummary:r}=m;o!=null&&r?.auditScorePercentage!=null&&(t(ha(o.companyId,e,o.tenantId)),L.trackInsightsEmailPage(a.month,a.year,!1,"draft",r.auditScorePercentage,pa().format(Nt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=H(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,a,r,I,C,k,R,q,b,G)=>{t(ma(e,n,a,r,v,I,C,k,R,q,b,G))},onCancelAutoComplete:()=>{t(Ae("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{d.closeSidePanel?.(),_!=null&&T!=null&&(t(pe(e,{start:T,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&T!=null&&t(pe(e,{start:T,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,a,r,I,C,k)=>{_!=null&&T!=null&&t(pe(e,{start:T,end:_},!0,a,n,r,I,C,k))},resetTransactionCategorizationLocalData:(e,n,a,r,I,C,k,R)=>{t(da(e,n,a,r,R??null,I,C,!1,k))},updateSelectedVendorForTransaction:(e,n,a,r,I)=>{t(ht({selectedTab:e,transactionId:n,lineId:a,selectedTransaction:r,uncategorizedAccounts:v,updatedVendor:I}))},onSaveUpdateTransactionCategorization:(e,n,a)=>{const r=c.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(h.month,h.year,m.transactionView.totalCountByTab.autoCategorized,n.length,!1,r??null):L.trackTransactionsReviewPage(h.month,h.year,m.transactionView.totalCountByTab.review,n.length,!1,r??null),t(ra(e,n,a,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:q,lineIds:b}=n;C!=null&&t(ca({transactionId:R,customerUpdates:C})),t(ia({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:q,uncategorizedAccounts:v,updatedCustomer:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))},onFetchRecommendationsForEntityCategorization:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:q,lineIds:b}=n;C!=null&&(t(aa({transactionId:R,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(oa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(ht({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:q,uncategorizedAccounts:v,updatedVendor:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))):t(sa({selectedTab:r,transactionId:R.id,lineId:b[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Te(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Te(h,!0,!1,null,!1,!1))},markAsReview:(e,n,a,r)=>{L.trackFluxAnalysisReviewed(a.month,a.year,r??!1,e),t(na(n,e,a,r??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(d.tenantEmailDomain!=null){const n=To(e.id,e.qboId,d.tenantEmailDomain),a=H(d.location.state?.pathnameStackToGoBack,d.location.pathname);d.navigate(n,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,n,a)=>{t(Te(e,!0,!1,n,!0,a))},onReviewClicked:e=>{t(ce(h,e))},setOpenDrawerClicked:e=>{t(xe({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ut("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const a=o?.companyId;a!=null&&(t(Ft(e,a,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Bt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(xe({selectedDrawerAccountId:e})),t(Ot({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ce(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Qn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Zn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{d.closeSidePanel?.(),t(Wn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,a)=>{const r=e.vendor?.id;a&&r!=null&&t(Yn(r)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,Ge("bill"));const n=H(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{f(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Nn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,d,O)=>{const{isMissingReceiptsBulkUploadEnabled:E,...S}=O;return function(u,c,B){return{...u,...c,...B,onUploadTransactionReceipt:(m,o,v,f,y)=>{c.onUploadTransactionReceipt(m,o,v,f,y,u.authParams)}}}(t,d,S)})(mo),_o=bo(function(t){const d=t.displayName??t.name??"Component",O=Pt.memo(t),E=S=>{const u=se(),c=function(){const h=se(),w=F(A=>he(A).reconciliation.selectedDrawerAccountId);return{isOpen:w!=null,selectedAccountId:w,openPanel:s.useCallback(A=>{h(xe({selectedDrawerAccountId:A}))},[h]),closePanel:s.useCallback(()=>{h(xe({selectedDrawerAccountId:void 0}))},[h])}}(),B=F(h=>he(h).reconciliation),m=F(h=>we(h)),o=s.useCallback((h,w)=>{u(Ut("expense_automation_reconcile",h,w))},[u]),v=s.useCallback((h,w)=>{const A=m?.companyId;A!=null&&(u(Ft(h,A,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",w)),u(Bt({accountId:w,connectionInProgress:!0})))},[u,m?.companyId]),f=s.useMemo(()=>{if(c.isOpen&&c.selectedAccountId!=null)return p.jsx(Ro,{reconciliation:B,selectedDrawerAccountId:c.selectedAccountId,onClose:c.closePanel,onFetchLinkTokenClick:o,onEstablishConnectionClick:v})},[c.isOpen,c.selectedAccountId,c.closePanel,B,o,v]),y=s.useMemo(()=>({reconPanelContent:f,reconSidePanelIsOpen:c.isOpen,closeReconSidePanel:c.closePanel}),[f,c.isOpen,c.closePanel]),V=s.useContext(Et),i=s.useMemo(()=>c.isOpen?{closePanel:c.closePanel,selectedItemId:c.selectedAccountId}:V,[c.isOpen,c.closePanel,c.selectedAccountId,V]);return p.jsx(Et.Provider,{value:i,children:p.jsx(O,{...S,...y})})};return E.displayName=`withReconSidePanel(${d})`,E}(({closeSidePanel:t,openTransactionPanel:d,panelContent:O,sidePanelIsFullView:E,sidePanelIsOpen:S,reconPanelContent:u,reconSidePanelIsOpen:c,closeReconSidePanel:B})=>{const{isAiCfoOpen:m,setIsAiCfoOpen:o}=zt(),v=go(),{isOpen:f}=Co(),y=wt(),V=qe(),i=se(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:w}=Gt({isAiCfoOpen:m,setIsAiCfoOpen:o,mobileExploreReferrer:"Transaction categorization"}),A=s.useCallback(()=>{S===!0&&E!==!0&&t?.()},[t,S,E]),{areTenantIdsInSync:x}=$t(),g=(()=>{const l=F(J=>he(J)),z=qe(),{currentSelectedViewFetchState:K,currentSelectedView:M,selectedPeriod:U}=l,me=Le(M),ee=Le(K.fetchState),ve=s.useCallback(J=>{const Z=z.state?.referrer;M==="transaction_categorization"&&(l.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(U.month,U.year,l.transactionView.totalCountByTab.review,0,J,Z??null):L.trackTransactionsAutoCategorisedPage(U.month,U.year,l.transactionView.totalCountByTab.autoCategorized,0,J,Z??null)),M==="missing_receipts"&&L.trackMissingReceiptsPage(U.month,U.year,J,l.missingReceipts.transactions.length,Z??null),M==="je_schedules"&&L.trackMonthCloseScheduleListPage(U.month,U.year,J,l.jeSchedules.draftSchedules.length,l.jeSchedules.resolveSchedules.length,Z??null),M==="flux_analysis"&&L.trackFluxAnalysisPage(U.month,U.year,J,Oo(l.fluxAnalysis),Z??null),M==="month_end_insights"&&l.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(U.month,U.year,J,"draft",l.auditSummary.auditScorePercentage,null,Z??null)},[U,l]);return s.useEffect(()=>{ee===K.fetchState&&M===me||K.fetchState!=="Completed"||ve(!1)},[M,K.fetchState,me]),ve})(),T=So(),[_,e]=s.useState(!1),n=F(l=>dt(l)),a=F(l=>we(l)),[r,I]=s.useState(!1),[C,k]=s.useState(!1),[R,q]=s.useState([]),[b,G]=s.useState(void 0),W=s.useCallback(l=>{l!=null&&(m&&o(!1),v(),A()),G(l)},[A,m,v,o]),Ue=s.useCallback(()=>{v(),G(void 0),A(),w()},[A,w,v]),Se=s.useRef(m);s.useEffect(()=>{m===!0&&Se.current===!1&&(v(),G(void 0),A()),Se.current=m},[A,m,v]);const Ie=s.useRef(f);s.useEffect(()=>{f===!0&&Ie.current===!1&&(m&&o(!1),G(void 0),S===!0&&E!==!0&&t?.()),Ie.current=f},[t,f,m,o,E,S]);const j=S===!0&&E!==!0,Ne=s.useRef(j);s.useEffect(()=>{j&&!Ne.current&&(m&&o(!1),v(),G(void 0)),Ne.current=j},[m,j,v,o]);const[Ye,Yt]=s.useState(!1),Ke=s.useRef(!1),{selectedTab:We}=rt(),{tenantEmailDomain:Kt}=rt(),[Fe,Ze]=s.useState(V.state?.message==="comingFromTransactionDetail"),He=V.state?.message==="comingFromOverview",Wt=Io(),Be=Oe.getSignedInUser(),{useDynamicConfig:Zt,useFeatureGate:fe}=Lt(),{configValue:Ht}=Zt(fo.enableUncategorizedExpenseCategory),Q=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Qe}=fe(ge.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:ie}=fe(ge.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=fe(ge.isTransactionActivityEnabled),{isFeatureEnabled:Qt}=fe(ge.isExpenseAutomationCommentingEnabled),Xt=s.useCallback(l=>{const z=Ge(l.view==="reconciliation"?"bill":"expense");d?.(l.entityId,z)},[d]),en=F(l=>_a(l,"common")),$=F(l=>he(l)),{monthEndCloseChecksView:Y,currentSelectedView:P,selectedPeriod:D,selectedTransactionCategorizationTab:ne,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:X,jeSchedules:_e,reconciliation:nn}=$;s.useEffect(()=>{P==="transaction_categorization"&&S!==!0||W(void 0)},[P,W,S]);const ke=s.useRef(null);s.useEffect(()=>{ke.current!==null?ke.current!==ne&&(ke.current=ne,P==="transaction_categorization"&&W(void 0)):ke.current=ne},[P,ne,W]);const an=F(l=>b==null?void 0:Va(l.transactionState,b)),ae=an?.qboId,on=F(l=>ae==null?void 0:Ma(l,ae));s.useEffect(()=>{ae!=null&&i(ja(ae))},[i,ae]);const{selectedAccountId:le}=nn,et=Le(_e.accountSettingsView.saveState.fetchState),sn=F(l=>za(l.accountState,l.accountListState,"accountList")),re=We!=null?La(We):P,cn=F(l=>l.entityAutoCompleteState.autoCompleteText.common);if(Jt({isDataReady:X.fetchState==="Completed"}),Be==null)throw Error("Can't access expense automation screen without signing in...");const tt=_t(D),de=Re(tt.start),ue=Re(tt.end);if(de==null||ue==null)throw Error(`Invalid start - ${de} and end - ${ue} period from given ${D}`);const ln=s.useCallback(()=>{I(!1)},[]),rn=s.useCallback(()=>{k(!0)},[]),dn=s.useCallback(l=>{q(l),k(!1)},[]),un=s.useCallback(()=>{q([])},[]),Ee=$.missingReceipts.bulkUpload.phase,nt=$.missingReceipts.bulkUpload.currentBatchId;s.useEffect(()=>{ie===!0&&P==="missing_receipts"&&Ee==="matching"&&nt!=null&&i(jt({cacheOverride:!0}))},[ie,P,Ee,nt,i]);const at=Be?.userId,mn=D.month,hn=D.year,ot=a?.tenantId;s.useEffect(()=>{P==="missing_receipts"&&ie!==!1&&Ee==="idle"&&at!=null&&ot!=null&&i($a())},[P,ie,Ee,at,ot,mn,hn,i]),s.useEffect(()=>{n.newVendorState?.vendorDetailLocalData?.vendorName!=null?e(!0):e(!1)},[n.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect(()=>{re!=null&&P!==re&&i(Vt(re))},[re]),s.useEffect(()=>{Ye!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!x||(Yt(!0),i(It(!1,!1,Q)))},[Ye,X,x,Q]),s.useEffect(()=>{!He&&x&&(i(It(!1,!1,Q)),i(ce(D,le,!1,!1)))},[D.month,D.year,x,Q]);const st=s.useCallback((l=!1,z=!1)=>{const K={start:de,end:ue};switch(P){case"transaction_categorization":i(pe(ne,K,l,!Fe,void 0,void 0,z,void 0,Q)),Ze(!1);break;case"flux_analysis":i(Te(D,l,z,null));break;case"month_end_insights":if(z===!1){const M=new Date(D.year,D.month,0),U=Ga(M.toDateString()).format(Nt.analytics.YYYYDashMMDashDDFormat);i(Ja(!0,a.companyId,a.tenantId,U)),i(Na(a.companyId,a.tenantId))}break;case"je_schedules":i(qa(K,z));break;case"missing_receipts":i(Mt(K,{amount:75,currencyCode:"USD",currencySymbol:"$"},l,z));break;default:i(ce(D,le,l,z))}},[P,de,ue,a.companyId,a.tenantId,ne,D,le,Fe,Ze,Q]);s.useEffect(()=>{P===re&&X.fetchState==="Not-Started"&&x&&st(!0)},[X,de,ue,a.companyId,a.tenantId,x]),s.useEffect(()=>{He||Fe||Ke.current||tn.fetchState==="In-Progress"||X.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),s.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!1}))},[Y.fetchState,a.tenantId]),s.useEffect(()=>{$.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?I(!0):I(!1)},[$.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect(()=>{$.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&x&&(i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0})),i(Ya({companyId:a.companyId})),y("../"))},[$.monthEndInsights?.sendMonthEndReportStatus?.fetchState,a.tenantId,D,a.companyId,x]),s.useEffect(()=>{const l=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(l)},[Y.fetchState,a.tenantId,D,i]),s.useEffect(()=>{const l=setInterval(()=>{P==="reconciliation"&&le==null&&$.reconciliation.fetchStatus.fetchState==="Completed"&&$.reconciliation.refreshStatus.fetchState!=="In-Progress"&&i(ce(D,void 0,!0,!0))},3e5);return()=>clearInterval(l)},[P,i,$.reconciliation.fetchStatus.fetchState,$.reconciliation.refreshStatus.fetchState,ce,le,D]);const pn=vt();s.useEffect(()=>{const l=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(z=>z.id==="month_end_insights")?.isDisabled??!1)&&!Qe;P!=="month_end_insights"||!l&&Y.monthEndCloseChecks?.reportEmailSentDate==null||y("../")},[P,Y.monthEndCloseChecks]);const gn=c===!0?u:O,Cn=c===!0||S===!0,Sn=c===!0?B:t;s.useEffect(()=>{et==="In-Progress"&&_e.accountSettingsView.saveState.fetchState==="Completed"&&i(ft())},[et,_e.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:l,closeDrawerHandler:z,currentSelectedView:K})=>{const M=se();let U,me,ee;const ve=vt(),J=l.transactionView;let Z=()=>{};const{transactions:vn,selectedTransactionId:oe,selectedTransactionLineId:ye,transactionLocalData:yn}=J;if(K==="transaction_categorization"){const Ve=yn.find(te=>te.transactionId===oe),N=vn.find(te=>te.id===oe),it=ye!=null?Ve?.transactionReviewLocalData?.lineItemById[ye]:void 0,lt=it?.account;me=it?.class?.classId,U=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const An=Ao(oe,N?.typeOfTransaction);N!=null&&An&&(ee={id:oe,type:Ge(N.typeOfTransaction)}),Z=()=>{if(oe!=null&&ye!=null&&N!=null){const te=J.transactionLocalData.find(be=>be.transactionId===oe)?.transactionReviewLocalData;if(te!=null&&N.lines!=null&&N.lines.length>0){const be=te.lineItemById[ye];let Me=te.selectedEntity;if(Gn(N)||(Me=be.selectedEntityLine),Me!=null){const Tn=Me,Pn={transactionId:{id:N.id,type:N.type},transaction:N,lineIds:N.lines.map(wn=>wn.id)??[]};M(Je(Tn,be.amount.amount,Pn,!1,!0,ve))}}}}}const bn=F(Ve=>dt(Ve,void 0,U,me));return{transactionId:ee,onSaveVendor:()=>{M(qn(ee,void 0,!1,!0))},onSaveSuccess:Z,onCancel:()=>{ee!=null&&M(zn({transactionId:ee})),M(Ln()),M($n()),z()},vendorViewDetails:bn}})({expenseAutomationViewSelector:$,closeDrawerHandler:()=>{e(!1)},currentSelectedView:P});return Wt?.loggedInUserRoleMap==null?Y.fetchState==="Error"?p.jsx(ko,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):p.jsx(qt,{fetchState:"In-Progress"}):p.jsxs(p.Fragment,{children:[p.jsx(Po,{isOpen:C,drawerLeftMargin:new Eo(0,0,300,650),onClose:()=>{k(!1)},children:p.jsx(Vo,{onClick:l=>l.stopPropagation(),children:p.jsx(Do,{companyId:a.companyId,closeCustomerRequestDrawer:()=>k(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&_&&p.jsx(yo,{isOpen:_,transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}),p.jsx(Bo,{navigate:y,location:V,themeState:T,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:en},expenseAutomationViewSelector:$,isMissingReceiptsBulkUploadEnabled:ie,monthEndInsightsPreviewMode:r,monthEndInsightsCustomerRequestData:R,isRealtimeInsightsFeatureEnabled:Qe,isUncategorizedExpenseCategoryEnabled:Q,isCOTEnabled:pn,currentTenant:a,companyId:a.companyId,signedInUser:Be,isTransactionActivityEnabled:Xe,activityLogTransactionId:P==="transaction_categorization"?b:void 0,activityLogPanel:P==="transaction_categorization"&&Xe===!0&&b!=null?p.jsx(vo,{activityLogView:on,qboId:ae,onClose:()=>W(void 0),selectedTransactionId:b},String(b)):null,uncategorizedAccounts:sn,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Kt,trackExpenseAutomationTabAnalytics:g,setActivityLogTransactionId:W,closeSidePanel:Sn,openTransactionPanel:d,sidePanelIsOpen:Cn,sidePanelIsFullView:c!==!0&&E,panelContent:gn,isAiCfoAccessEnabled:h,onAskAiCfoClick:Ue,isExpenseAutomationCommentingEnabled:Qt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:c===!0?66:void 0})]})})),Vo=De(Rn)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function ls(){return p.jsxs(On,{children:[p.jsx(je,{path:"*",element:p.jsx(wo,{})}),p.jsx(je,{path:"/:selectedTab/:selectedPeriod/*",element:p.jsx(_o,{})}),p.jsx(je,{path:"*",element:p.jsx(xn,{})})]})}export{ls as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cxvop2w5.js";import{a as r}from"./sentry-Bel9R1P0.js";import{V as f,W as c,Z as l,v as p}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import m from"./NotFoundScreen-BrmwEoGP.js";import{j as u,u as b}from"./core-DGD8k-EU.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]="96d5797f-734e-4ad4-b5fc-3c3d6908652b",e._sentryDebugIdIdentifier="sentry-dbid-96d5797f-734e-4ad4-b5fc-3c3d6908652b")}catch{}})();const D=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=p(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(t.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:a,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{D as F};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Cxvop2w5.js";import{a as f}from"./sentry-Bel9R1P0.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-DGD8k-EU.js";import{z as r,h as P,D as V,e as A,d as N,f as q,m as G,I as R,i as W}from"./index-CNT4WvUT.js";import{eN as $,Ii as B,Is as H,Ij as J,eO as K,fh as Q,Io as X,fG as Y,cS as Z,It as ee,Iu as te}from"./zeni-epic-state-CjARY91O.js";import{n as ne}from"./mui-Cdh_ZgIg.js";import{u as se}from"./useDeviceId-C-LBnIzp.js";import{f as ae}from"./analyticsHelper-CNwzWBf_.js";import{t as ie}from"./getLocaleForTenant-BrCCfdIO.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.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]="6ba40242-f98b-4d08-8dd9-6b44afc96181",t._sentryDebugIdIdentifier="sentry-dbid-6ba40242-f98b-4d08-8dd9-6b44afc96181")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const j=f.useCallback(()=>{m("/signin/auth")},[m]),U=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Cxvop2w5.js";import{j as r,k as i}from"./core-DGD8k-EU.js";import{U as n}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import"./sentry-Bel9R1P0.js";import"./zeni-epic-state-CjARY91O.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.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]="9eddbf1e-8177-43b2-add6-c91ac38fa63c",o._sentryDebugIdIdentifier="sentry-dbid-9eddbf1e-8177-43b2-add6-c91ac38fa63c")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-Cxvop2w5.js";import ut from"./NotFoundScreen-BrmwEoGP.js";import{a as k}from"./sentry-Bel9R1P0.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as L}from"./core-DGD8k-EU.js";import{cp as It,eW as K,eN as Q,f9 as Ct,f1 as b,OF as X,f5 as d,eV as A,qq as M,vE as Tt,OG as At,eU as yt,fc as Et,qv as _t,OH as F,bq as $,gC as w,qz as H,OI as Nt,cA as xt,cu as Bt}from"./zeni-epic-state-CjARY91O.js";import{K as wt,z as vt,a as Rt,p as Ut,J as Dt,cr as Gt,x as N,a1 as Pt,cs as Ft,a2 as $t,v as Mt}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="442732e2-ea7e-471d-a52c-d0f155b45c11",t._sentryDebugIdIdentifier="sentry-dbid-442732e2-ea7e-471d-a52c-d0f155b45c11")}catch{}})();const qt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Vt=St(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!xt(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(X(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Mt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ft)),zt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=wt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[x,v]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Q(e)),{useFeatureGate:m}=Rt(),{isFeatureEnabled:c}=m(Ut.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Dt(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:B,isLoading:y,hasFetchedAll:C,isFetchingMore:D,fetchMore:nt}=dt(),{threads:q,isLoading:V,fetchMore:z,isFetchingMore:W,hasFetchedAll:J}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(X(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||D===!0||C!==!0||y||D===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&V===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=q.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||J===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,D,W,C,J,V,B?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if($t(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(Vt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(L,{path:"/:selectedTab",element:_.jsx(zt,{})}),_.jsx(L,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Cxvop2w5.js";import{j as K,h as Z,u as H,l as Q,g as d,k as X,n as ee,o as C}from"./core-DGD8k-EU.js";import{eN as M,qe as U,pO as ae,J7 as w,pJ as A,bv as te,bn as se,bR as oe,pK as re,J8 as ne,IU as T,dB as ie,tB as ce,J9 as le,tY as de,eT as fe,eR as me}from"./zeni-epic-state-CjARY91O.js";import{J as pe,z as ue,K as he,j as ge,a as B,p as $,A as Fe,d as N,ak as be,x as Ie}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import Ce from"./NotFoundScreen-BrmwEoGP.js";import{F as Te}from"./FeaturePreviewScreen-BBBv1uMR.js";import{a as h}from"./sentry-Bel9R1P0.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as Se}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{u as ye}from"./useInitialThreadRequest-KZIIx-jA.js";import{t as ke}from"./routePaths-CKa13qEa.js";import{M as xe}from"./MobileAppDrawer-BqatZNBg.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="0ae904fe-f0ed-4171-9af3-d856525876bb",s._sentryDebugIdIdentifier="sentry-dbid-0ae904fe-f0ed-4171-9af3-d856525876bb")}catch{}})();const S=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:N}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s(w(e,o)),a.isPandLReportFetched(e)||s(A(e)),S(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const g=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=ke(a.tenantEmailDomain,e.accountId,e.accountType,g,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(m,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(T({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(be);function v(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=K(),o=Z(),r=H(),{forecastId:i,tenantEmailDomain:g}=Q(),[m,p]=h.useState(!1),[F,y]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),q=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>x.pandLByForecastID[t]!=null&&re(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=he();Se({isDataReady:l});const{isAiCfoAccessEnabled:J,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!m&&b)p(!0),l||o(ae());else if(l&&!F){y(!0);const t=((f,R,P)=>R!=null?f.forecasts.findIndex(I=>I.id===R):P!=null?f.forecasts.findIndex(I=>I.id===P):f.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o(w(c.forecasts[t].id,t)),S(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&S(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&b&&o(A(c.forecasts[t].id))}},[m,p,o,l,c,F,y,U,A,b]);const O=ge(),G=O?.loggedInUserRole!=null&&te(O.loggedInUserRole),{useFeatureGate:V}=B(),{isFeatureEnabled:E}=V($.isReportsCommentingEnabled),W=ye(E?k?.companyId:void 0,{clearParams:l&&F}),[Y,z]=h.useState(!1),L=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:N,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(xe,{isAppContentDrawerOpen:Y,handleDrawerToggle:L}),n.jsx(De,{firstMonthOfFY:q,tenantEmailDomain:g,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:G,isAiCfoAccessEnabled:J,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:se(u),initialOpenThreadRequest:W,onClickMenuIcon:()=>{L(!0)}})]})}function Ze(){const s=d(i=>M(i)),{useFeatureGate:a}=B(),{isFeatureEnabled:e}=a($.isDebitCardFeatureEnabled),o=fe(e,s),r=me(s);return o===!0||r===!0?n.jsx(Te,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cxvop2w5.js";import{J2 as oe,eN as q,jq as K,eT as X,eR as ie,GD as Y,IH as re,sJ as ke,J3 as Q,sx as Pe,sS as je,sM as le,sB as de,sQ as Te,sN as Le,J4 as ce,un as ve,J5 as Ae,fw as Fe,J6 as G,sG as pe,sE as ue,sV as Oe,c0 as Re}from"./zeni-epic-state-CjARY91O.js";import{q as me,a as ee,p as E,z as W,a5 as ge,E as he,ag as fe,ah as Ve,C as Ce,o as F,F as be,D as ye,ai as Ue,K as Be,J as Ze,A as $e,d as we,f as Je,x as Ge,aj as ze,j as He}from"./index-CNT4WvUT.js";import{D as De,n as _,S as Se}from"./mui-Cdh_ZgIg.js";import te from"./NotFoundScreen-BrmwEoGP.js";import{a as l}from"./sentry-Bel9R1P0.js";import{h as se,l as Ke,g,j as We,u as _e,k as Me,n as ne,o as J}from"./core-DGD8k-EU.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{M as qe}from"./MobileAppDrawer-BqatZNBg.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.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]="d3d2e219-4358-4d08-8d16-7f6a1932359b",e._sentryDebugIdIdentifier="sentry-dbid-d3d2e219-4358-4d08-8d16-7f6a1932359b")}catch{}})();const Xe={overlayWidth:new Ce(100,100,48)},z=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:D}=Ke(),c=g(t=>oe(t)),m=g(t=>q(t)),S=g(t=>K(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=X(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&S&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(Q()),y()},A=()=>{O===!0?w(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:v,isAccountingClassesEnabled:S,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:A,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&D!=null&&u(ke(D))},[x,D]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:z.discardTitle}),descriptionComponent:s.jsx(Ee,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=_(Se)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,xe=_(be.H6Regular)`
|
|
6
|
-
margin-top: ${F.sp7};
|
|
7
|
-
padding-left: ${F.sp8};
|
|
8
|
-
padding-right: ${F.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=_(be.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${F.sp8};
|
|
14
|
-
padding-right: ${F.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${F.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,ss={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),D=g(r=>oe(r)),c=g(r=>q(r)),m=g(r=>K(r)),{useFeatureGate:S}=ee(),{isFeatureEnabled:C}=S(E.isDebitCardFeatureEnabled),I=X(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(Q())},b=()=>{O===!0?w(!0):x()},A={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:Z}=S(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=S(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=S(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:D,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{D.invitePersonState.fetchState==="Completed"&&(y(),u(Q()))},[D.invitePersonState.fetchState]),s.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:A}):null,s.jsx(Ue,{...T})]})})},ts=_(Se)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,ns=Me(function(e,n){const d=ce(e),o=W.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:K(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}})(ze);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=We(),o=se(),h=_e(),{areTenantIdsInSync:i}=Be(),y=W.getSignedInUser(),f=g(a=>q(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>K(a)),k=!X(O,f)&&R,w=Y(f),D=f?.tenantId,{tenantEmailDomain:c}=f,[m,S]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:A,setIsAiCfoOpen:B}=Ze(),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:$}=Ne({isAiCfoOpen:A,setIsAiCfoOpen:B,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Qe({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Ae(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Fe(a)),t=f?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),S(!0),o(pe()))},[m,y,D,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:we,onLoad:a=>a.trackPageLoaded(Je.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,M)=>{o(G({sortKey:a,sortOrder:M}))},onRowClick:a=>{const M=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Ge(h.state?.pathnameStackToGoBack,h.pathname);d(M,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:Z,onAskAiCfoClick:$})]})}function Es(){const e=He();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(J,{path:"/",element:s.jsx(N,{})}),s.jsx(J,{path:"new",element:s.jsx(N,{isInvitePeopleDrawerOpen:!0})}),s.jsx(J,{path:":userId/edit",element:s.jsx(N,{isEditPeopleDrawerOpen:!0})}),s.jsx(J,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(J,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Cxvop2w5.js";import _ from"./NotFoundScreen-BrmwEoGP.js";import{a as o}from"./sentry-Bel9R1P0.js";import{j as v,u as M,g,l as U,h as P,N as z,k as J,n as N,o as h}from"./core-DGD8k-EU.js";import{eN as V,OJ as b,bo as $,bn as B,h6 as F,gC as q}from"./zeni-epic-state-CjARY91O.js";import{$ as G,z as C,J as H,ct as K}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{M as W}from"./MobileAppDrawer-BqatZNBg.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.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]="45707a9b-c6ec-4fee-920d-e49637f2346a",e._sentryDebugIdIdentifier="sentry-dbid-45707a9b-c6ec-4fee-920d-e49637f2346a")}catch{}})();const X=J(function(e){const t=C.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:r,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(K),Y=()=>{const e=v(),t=M(),c=G(),r=g(s=>V(s)),{aggregatedReportViewState:n}=g(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),d=C.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=o.useRef(!1),[I,S]=o.useState(!1),k=$(r?.userRole??[]),w=r?.userRole?.includes("bookkeeping_admin")??!1,A=B(d),D=k||w||A,l=o.useCallback((s,i,O)=>{p(F({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);o.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const x=o.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(s,i,!0),f.current=!0},[n?.fetchState,l]),y=o.useCallback((s,i)=>{l(s,i,!1)},[l]),u=s=>{S(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=H(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),D?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:I,handleDrawerToggle:u}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:r,signedInUser:d,tenantEmailDomain:m,onReload:x,onTimeRangeSelect:y,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ce(){return a.jsxs(N,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ce as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cxvop2w5.js";import{a as o}from"./sentry-Bel9R1P0.js";import{g as f,j as N,h as V,u as W,k as M}from"./core-DGD8k-EU.js";import{h as _,q as z,z as R,b3 as U,C as $,K as q,J,A as K,d as l,f as X,a1 as Z,b4 as Q}from"./index-CNT4WvUT.js";import{eX as G,eN as Y,Lx as I,Ly as ee,tr as ae,th as g,eZ as re,bM as ne,tm as te,Lz as se}from"./zeni-epic-state-CjARY91O.js";import{D as oe,e as ie,n as le,S as de}from"./mui-Cdh_ZgIg.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{M as ue}from"./MobileAppDrawer-BqatZNBg.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]="f66524e2-dff3-4b67-a572-7f0abdeab6e0",e._sentryDebugIdIdentifier="sentry-dbid-f66524e2-dff3-4b67-a572-7f0abdeab6e0")}catch{}})();const pe={overlayWidth:new $(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=z();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>G(d));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",ke=M(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(Z(Q));function Pe({isReferralDrawerOpen:e}){const a=N(),r=V(),n=W(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(t=>Y(t)),m=f(t=>I(t)),b=m.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=ee([m,w]),{areTenantIdsInSync:c}=q();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),r(g(!0)))},[b,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(re(!0)))},[w,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),v=t=>{j(t)},{isAiCfoOpen:O,setIsAiCfoOpen:L}=J(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:O,setIsAiCfoOpen:L,mobileExploreReferrer:"Rewards"});fe({isDataReady:y===!0});const F={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(K,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:v}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...F})]})}export{Pe as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Cxvop2w5.js";import R from"./NotFoundScreen-BrmwEoGP.js";import{a as p}from"./sentry-Bel9R1P0.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as m}from"./core-DGD8k-EU.js";import{eN as T,Mr as g,MH as S,Co as V,Bx as U,Cn as c,Ce as _,MW as B}from"./zeni-epic-state-CjARY91O.js";import{h as M,z as N,B as W,a1 as $,bJ as O,ab as z}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DQiQsDBw.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]="1f9eb911-6547-46a8-a97e-ee26388f2160",e._sentryDebugIdIdentifier="sentry-dbid-1f9eb911-6547-46a8-a97e-ee26388f2160")}catch{}})();const f="reimbursement-approval-rule-update",H=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(_(s))},onEditRuleClick:s=>{s!=null?(e(c(s)),a(`./${s}/edit`)):(e(c()),a("./new"))}}})($(O)),J=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=M(),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(U(!0)))},[l,b,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(c())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(n,P,x)=>{n.endsWith(f)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(m,{path:"/",element:t.jsx(J,{})}),t.jsx(m,{path:"/new",element:t.jsx(v,{})}),t.jsx(m,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(m,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cxvop2w5.js";import{j as J,h as me,u as W,l as X,g as B,N as O,k as K,i as ut,n as pt,o as E}from"./core-DGD8k-EU.js";import{eN as q,MX as ce,c0 as de,Bs as De,jB as bt,BF as se,BE as ie,MY as gt,bn as ue,fH as Fe,MZ as ht,Jj as ft,jq as Ue,Jk as ye,Jl as St,ik as It,Md as At,iA as yt,Bg as Rt,s5 as Ct,is as kt,C0 as Le,M_ as Ne,M$ as vt,N0 as Et,N1 as Bt,N2 as wt,N3 as xt,BM as Re,iG as Tt,Mm as jt,BG as Dt,Bq as Ft,N4 as Ut,Bp as Lt,N5 as Nt,By as Ce,BQ as Mt,BP as Pt,BL as $t,N6 as Me,GD as Ot,bo as _t,BB as Gt,Ci as zt,N7 as Ht,N8 as Zt,BY as Vt,BV as ke,LI as Wt,Bn as qt,N9 as Pe,CH as ve,CP as Jt,Na as Kt,Nb as Z,Nc as Yt,Nd as $e,Ne as Qt,Nf as Oe,Ng as _e,C8 as oe,bt as Xt,bE as pe,cA as be,eT as Ge,eR as ze,Nh as en,gC as tn,LV as nn,Ni as an,Nj as He,LZ as sn,MH as on,Nk as rn,MW as ln,CM as Ee,CL as mn,Nl as cn,Nm as dn,Nn as un,No as pn,Np as bn,Ms as gn,CC as hn,CG as fn,bv as Sn,bD as In,cv as An,cj as yn,bs as Rn,Ik as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-CjARY91O.js";import{$ as Ze,q as Ve,a as ee,p as k,J as ge,z as P,bK as We,A as te,d as v,aD as Be,o as F,ap as Q,E as wn,D as qe,bL as xn,x as V,bM as Tn,j as ne,bN as jn,K as Dn,C as Fn,B as he,f as Je,a1 as Un,bb as Ln,O as Nn,h as Ke,bO as Mn,a5 as Pn}from"./index-CNT4WvUT.js";import{n as _,S as $n}from"./mui-Cdh_ZgIg.js";import re from"./NotFoundScreen-BrmwEoGP.js";import{S as we}from"./SetupPagesScreen-8DP-INVh.js";import{F as Ye}from"./FeaturePreviewScreen-BBBv1uMR.js";import{a as h}from"./sentry-Bel9R1P0.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import{u as Qe}from"./useInitialThreadRequest-KZIIx-jA.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import{D as On}from"./DrawerScreen-D376zeqM.js";import{M as et}from"./MobileAppDrawer-BqatZNBg.js";import{R as _n}from"./ReimbursementApprovalRoutes-CSGZqgWn.js";import{FallBackRoute as Gn}from"./ScreenRoutes-CyuhXplX.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";import"./analyticsHelper-CNwzWBf_.js";import"./routePaths-CKa13qEa.js";import"./BusinessVerificationPageScreen-CPbmBL7J.js";import"./ReimbursementApprovalRuleDetailScreen-DQiQsDBw.js";import"./getLocaleForTenant-BrCCfdIO.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]="2f0afb42-8fa1-4b4f-8cf5-4a59777e58e6",e._sentryDebugIdIdentifier="sentry-dbid-2f0afb42-8fa1-4b4f-8cf5-4a59777e58e6")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let A=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(A=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,y=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:y},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:A,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(vt());const i=tt(o),l=V(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(At())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(ye("common"))},onCancelAutoComplete:()=>{e(ye("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=W(),{reimbursementId:r}=X(),c=Ze(),d=Ve(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:y}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:y,mobileExploreReferrer:"Reimbursement Details"}),C=W().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Qe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,A,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(O,{to:R}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Vn=_.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${wn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Wn=_.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,qn=_.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Jn=_.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${F.sp2} ${F.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${F.sp4};
|
|
49
|
-
height: ${F.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Kn=_.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Yn=K(function(e,t){const n=Me(e,t.reimbursementId),r=P.getSignedInUser(),c=ue(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Ne());const a=tt(o),i=V(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(qt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Wt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ke(n,a.type,"")):e(ke(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=V(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Vt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Qn(){const e=J(),t=me(),n=W(),r=n.hash.substring(1),c=Ze(),{reimbursementId:d}=X(),m=P.getSignedInUser(),o=B(R=>q(R)),a=B(R=>Me(R,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:u,setIsAiCfoOpen:A}=ge(),{isAiCfoAccessEnabled:I,onAskAiCfoClick:x}=fe({isAiCfoOpen:u,setIsAiCfoOpen:A,mobileExploreReferrer:"Reimbursement Details"});Xe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:y}=ee(),{isFeatureEnabled:T}=y(k.isLimitedCategoryForReimbursement),[p,C]=h.useState(!1),[D,N]=h.useState(!1),[G,j]=h.useState(!1),{isFeatureEnabled:w}=y(k.isReimbursementCommentingEnabled),{isFeatureEnabled:S}=y(k.isShowDeletedReimbursementsFeatureEnabled),b=B(R=>ce(R,d??"")),M=Ot(o),U=_t(o.userRole),$=a.fetchState;if(h.useEffect(()=>{p||d==null?p==1&&$==="Error"&&e("page-not-found",{replace:!0}):(C(!0),t(Gt(d,!1,S)))},[p,d,t,$]),h.useEffect(()=>{S&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&M===!1?j(!1):j(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(R=>R.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,M,m]),h.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||b.fetchState=="Completed"||b.fetchState=="In-Progress"||(N(!0),t(De(!1,T,S,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(zt(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(O,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(We,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:R=>(g=>{d!=null&&g.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(Yn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:w,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:G,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:I,onAskAiCfoClick:x})]})}const Xn=K(function(e,t){return{remisReviewView:Pe(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(Z())},onCloseReviewItem:n=>{e(Kt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Jt());break;case"approve":e(ve("approved",r??""));break;case"reject":e(ve("rejected",r??""))}}}})(jn);function ea(){const e=J(),t=B(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=B(d=>Pe(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return h.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Xn,{navigate:e,analytics:v,isAdmin:c})}const H=sn(),nt="bulk-operation-update",le="reimbursement-approval-rule-update",{spendManagement:ta,common:Te}=qe.getLocalizedStrings(),je=ta.reimbursement.bulkActions,na=_.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=K(function(e,t){const n=_e(e,H,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=ue(c),m=e.tenantState.currentTenantId,o=q(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(I=>I!=="deleted"));const u=n.fetchState,A=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(I=>I.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:u,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:H,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:A.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e($e(o))},onSubtabChange:o=>{e(Z()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=V(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=V(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=V(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ee("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ee("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(ln(!1))},onEventReceived:o=>{o===nt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=ge(),n=J(),r=me(),c=W(),d=c.state,m=Ve(),[o,a]=h.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const f=Yt(d.tab.toString());f!=null?r($e(f)):console.log("Warning:Not a valid remiListTab");const z=Qt(d.subTab.toString());z!=null?r(Oe(z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(Z())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(k.isReimbursementCommentingEnabled),{isFeatureEnabled:y}=l(k.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),p=B(f=>q(f)),[C,D]=h.useState(!1),[N,G]=h.useState(!1),j=ne(),w=j?.loggedInUserRole?.includes("admin")===!0,S=B(f=>_e(f,H,y)),{areTenantIdsInSync:b}=Dn(),M=S.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=fe({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Xe({isDataReady:M==="Completed"}),h.useEffect(()=>{!N&&b&&(G(!0),r(oe(H,!0,A,!1,!0)))},[N,H,r,b]),T==null)throw Error("Can't access address page without signing in...");const R=!!p?.userRole&&Xt(p),g=pe(j?.loggedInUserRoleMap),ae=be(j?.loggedInUserRoleMap),at=!!p.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!p.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=B(f=>Fe(f.companyState,p.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,Se=f=>{D(f)},{isFeatureEnabled:lt}=l(k.isDebitCardFeatureEnabled),mt=Ge(lt,p),ct=ze(p),{remisProcessed:Y,remisProcessing:Ie}=B(f=>en(f));h.useEffect(()=>{Y===Ie&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Y>1?je.reports:je.report},{variableName:"_has_",variableValue:Y>1?Te.texts.have:Te.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(oe(H,!0,A,!1,!0,!0))},3e3),a(null))},[Y,Ie]);const dt={events:p.companyId!=null?[`private-${p.companyId}.${nt}`,`private-${p.companyId}.${le}`]:[],eventCallback:(f,z,Ae)=>{f.endsWith(le)?Ae.onReimbursementApprovalRulesEventReceived?.(f):z.entity_type==="reimbursement"&&(a(z.operation_type),Ae.onEventReceived(f))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(Ye,{}):st&&(!R||g)||ae&&at?s.jsxs(s.Fragment,{children:[M==="Completed"?s.jsx(te,{analytics:v,onLoad:f=>(z=>z.trackPageLoaded(Je.Event.reimbursementHome))(f)}):null,s.jsx(et,{isAppContentDrawerOpen:C,handleDrawerToggle:Se}),s.jsxs(na,{windowSize:m,children:[s.jsx(On,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(Z())},children:s.jsx(ra,{onClick:f=>f.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:u,isShowDeletedReimbursementEnabled:A,isBillPayCommentingEnabled:I,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:p,period:H,isAdmin:w,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{Se(!0)},createdByUserList:S.createdByUserList,createdByUserListFetchState:S.createdByUserListFetchState,isDownloadEnabled:S.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:y,bulkSubmissionLimit:S.remiBulkSubmissionLimit,bulkSubmissionFetchState:S.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...dt})]})]}):it&&g?s.jsx(O,{to:"../setup"}):j!=null&&He(p,j.loggedInUserRoleMap)?s.jsx(O,{to:"../promo"}):s.jsx(he,{fetchState:"In-Progress"}):s.jsx(re,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=_($n)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=W(),{tenantEmailDomain:n}=X(),r=Ke(),[c,d]=h.useState(!1),m=B(C=>q(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),u=ne(),A=pe(u?.loggedInUserRoleMap),I=be(u?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,y=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,p=C=>{d(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return y&&I&&x?s.jsx(O,{to:"../../../reimbursements"}):T&&A?s.jsx(O,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!T||m.userReimbursementInfo&&I&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:C=>(D=>D.trackPageLoaded(Je.Event.reimbursementPromoPage))(C)}),s.jsx(et,{isAppContentDrawerOpen:c,handleDrawerToggle:p}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{p(!0)}})]}):s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Oa(){const e=B(R=>q(R)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=Ge(a,e),l=ze(e),u=e?.userRole!=null&&Sn(e?.userRole),A=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!u)&&In(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!u,y=pe(t?.loggedInUserRoleMap),T=x&&y,{isFeatureEnabled:p}=m(k.isDepositAccountsFeatureEnabled),C=p&&!u&&yn(t?.loggedInUserRoleMap),D=Pn(e,o,a)&&!u&&Rn(t?.loggedInUserRoleMap),N=Cn(t?.loggedInUserRoleMap),G=kn(t?.loggedInUserRoleMap),j=vn(t?.loggedInUserRoleMap),w=En(t?.loggedInUserRoleMap),S=Bn(t?.loggedInUserRoleMap),b=be(t?.loggedInUserRoleMap),{tenantEmailDomain:M}=X(),U=W(),$=n===!0&&(y||b&&d);return s.jsxs(pt,{children:[U.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(we,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(we,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ma,{})}),s.jsx(E,{path:"approval-rules/*",element:T?s.jsx(_n,{}):s.jsx(Gn,{isUserHasZeniAccountsAccess:G,isUserHasChargeCardAccess:w,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:b,isUserHasTreasuryAccess:j,isTenantBankingOnly:i,tenantEmailDomain:M??""})}),$&&s.jsx(E,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Ye,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(O,{to:"../promo"})}),c&&y&&s.jsx(E,{path:"*",element:s.jsx(O,{to:"../setup"})})]}):U.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(xe,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Qn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(xe,{})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]}):s.jsx(E,{path:"*",element:s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]})}export{Oa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Cxvop2w5.js";import{a as j,z as w,aJ as y,A as I,d,f as F,cD as P,p as L}from"./index-CNT4WvUT.js";import"./mui-Cdh_ZgIg.js";import l from"./NotFoundScreen-BrmwEoGP.js";import{a as f}from"./sentry-Bel9R1P0.js";import{h as A,g as b,j as T,u as V,k as R,n as U,o as u}from"./core-DGD8k-EU.js";import{eN as z,Pg as C,M6 as Y,Ph as D,tr as G,eZ as J,Pi as M,tp as O}from"./zeni-epic-state-CjARY91O.js";import{R as x}from"./ReferralListScreen-Czxg_tCU.js";import"./recharts-oolJNF1J.js";import"./analytics-xb_2pDDq.js";import"./plaid-BVGCfCA1.js";import"./dnd-s5MAPZ_4.js";import"./stripe-DMRn4zHo.js";import"./lottie-rysS_6yg.js";import"./lexical-D9fe9vQ7.js";import"./pdf-B7Btpc50.js";import"./utils-y7cfvjBg.js";import"./useAskAiCfoHostNavButtonProps-CwXdaO7x.js";import"./useFetchSuggestedQuestionsWhenReady-7gmq8HnL.js";import"./MobileAppDrawer-BqatZNBg.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]="afb9ce67-f642-4fa2-ace0-b3a366f06844",e._sentryDebugIdIdentifier="sentry-dbid-afb9ce67-f642-4fa2-ace0-b3a366f06844")}catch{}})();const Z=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=w.getSignedInUser();return{onDismissClick:()=>{e(D()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),d.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&d.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=A(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=T(),k=V(),{useDynamicConfig:g}=j(),p=w.getSignedInUser();if(p==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),v=p?.firstName!=null?p.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:_}=g(y.zeniAccountsConfig),N=Y(_);f.useEffect(()=>{e(D()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(J(!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:d,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:k,currentTenant:r,companyName:S,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function pe(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{pe as default};
|