@zeniai/web-app-ui 5.3.67-dev → 5.3.68-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/{AccountMappingScreen-NREHTMQ1.js → AccountMappingScreen-DSZj_uCQ.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-ZfOyWL5F.js → ActualMatchingMatchDetailScreen-BQRgUBiV.js} +1 -1
- package/dist/assets/AddressRoutes-BC4juuf4.js +1 -0
- package/dist/assets/{AddressScreen-CB5BRM9y.js → AddressScreen-BQYkT2m3.js} +2 -2
- package/dist/assets/{AiCfoScreen-HyI4GQCb.js → AiCfoScreen-DNMX1_2h.js} +1 -1
- package/dist/assets/{AppDrawer-BasRiDQ4.js → AppDrawer-BpkkZZ__.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-XdVdW0PG.js → BillPayApprovalRoutes-DJXolFor.js} +1 -1
- package/dist/assets/{BillPayRoutes-BbZifdx_.js → BillPayRoutes-Bwj63a_R.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-D3H22Ycs.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-Csz8lSCn.js → CardsAiCfoScreen-_x1fFH7I.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-D2v71o2S.js → ChargeCardRoutes-Dd0GuLnx.js} +1 -1
- package/dist/assets/CompanyPassportScreen-lZWEIVDl.js +1 -0
- package/dist/assets/ConnectionAuthScreen-ue9LJgbU.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-6IBywESu.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DYEVoKvU.js → CustomerOnboardingRoutes-C5hH9_2G.js} +3 -3
- package/dist/assets/{DashboardRoutes-bD-NpO4n.js → DashboardRoutes-DEtQqaVs.js} +3 -3
- package/dist/assets/{DefaultTenantHome-CqzOdGZK.js → DefaultTenantHome-CCyE91GO.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C5k3DT9m.js → DomesticWireDetailScreen-B2C3yRyz.js} +4 -4
- package/dist/assets/{DrawerScreen-Dvp_bzzQ.js → DrawerScreen-CVgBvegK.js} +1 -1
- package/dist/assets/EntityDetailRoutes-BxIXjZHN.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-IJIfqkj-.js → ExpenseAutomationRoutes-Kn5gQkyW.js} +7 -7
- package/dist/assets/FeaturePreviewScreen-CsKi-5Np.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CSdvQVKy.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-CxBkh6GM.js → InboxNotificationsProvider-BLd671md.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BDyr12_i.js → InvoicingRoutes-BkO_wRtc.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-qLSg0r1Z.js → MagicLinkRoutes-BFQMSIdk.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-DNABK1wd.js +12 -0
- package/dist/assets/{MobileAppDrawer-C8UsE0YH.js → MobileAppDrawer-CUkRGmov.js} +1 -1
- package/dist/assets/NotFoundScreen-DcIIEjdb.js +1 -0
- package/dist/assets/{NotificationRoutes-D4O9EUNW.js → NotificationRoutes-BDrKKRmf.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BfqQ59Hm.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-BM_Kx0Gi.js +1 -0
- package/dist/assets/{PaymentLinkScreen-CS1xqYIt.js → PaymentLinkScreen-oDUUM_rp.js} +9 -9
- package/dist/assets/PeopleRoutes-CLcQG2z8.js +22 -0
- package/dist/assets/PerformanceRoutes-ZkTu6xdk.js +1 -0
- package/dist/assets/{Preview-C0e56SfV.js → Preview-DjryQabZ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-6U4C9EuT.js → QBOConnectionScreen-CC1mgdSE.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DqdHGUab.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-ZM1Aw-_i.js → ReimbursementApprovalRuleDetailScreen-DGkJ20Az.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DPiReCXE.js → ReimbursementRoutes-CwIONxFo.js} +7 -7
- package/dist/assets/{ReportsRoutes-Cf01mfIk.js → ReportsRoutes-DVA33cfE.js} +1 -1
- package/dist/assets/RewardsRoutes-wgZH1oXi.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CuO3_SI4.js → ScheduleDetailsPrepaidExpensesScreen-BVhDF7k2.js} +5 -5
- package/dist/assets/ScreenRoutes-BIW4o9AI.js +2 -0
- package/dist/assets/{SettingsRoutes-D4kzb4To.js → SettingsRoutes-B2D7KOAB.js} +6 -6
- package/dist/assets/SetupPagesScreen-BVuXxhDx.js +29 -0
- package/dist/assets/SignInScreen-CmC92pbo.js +1 -0
- package/dist/assets/SignOutScreen-CyRRVOip.js +9 -0
- package/dist/assets/{TaskListScreen-DhMAwdLm.js → TaskListScreen-BbBcN7pH.js} +2 -2
- package/dist/assets/TaskRoutes-YYUAqa-i.js +9 -0
- package/dist/assets/TransactionDetailRoutes-45rDqVHh.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CCYZhbpM.js → TransactionDetailScreen-Cqrtgoki.js} +2 -2
- package/dist/assets/TransactionListRoutes-BfvppQmn.js +1 -0
- package/dist/assets/{TreasuryRoutes-BjdfZTjc.js → TreasuryRoutes-DJXblfti.js} +5 -5
- package/dist/assets/{VendorsRoutes-X9IFemZr.js → VendorsRoutes-iqjJ6KwN.js} +11 -11
- package/dist/assets/WiseConfirmationScreen-CdA1V-kW.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-Cwkn0zT6.js → ZeniAccountRoutes-CRqmMO-M.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-Ds7h68QG.js +9 -0
- package/dist/assets/{accountMappingHelper-42mDzLtR.js → accountMappingHelper-DDpt4thU.js} +1 -1
- package/dist/assets/{analytics-CmKkcxmz.js → analytics-HUGlc_YA.js} +1 -1
- package/dist/assets/analyticsHelper-C858uUp8.js +1 -0
- package/dist/assets/{core-pDUZcPB0.js → core-BAlzhg_1.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DBYvBfqM.js → decodeURIComponentSafe-BlS7R_TX.js} +1 -1
- package/dist/assets/{dnd-Bslfq-ku.js → dnd-CtBfGkHE.js} +1 -1
- package/dist/assets/{empty-COUJOkyp.js → empty-BRHFv2sW.js} +1 -1
- package/dist/assets/{empty-ChYivft5.js → empty-Bi7Yf941.js} +1 -1
- package/dist/assets/{emptyVideoElement-DkcKVFUD.js → emptyVideoElement-63TR5aDR.js} +1 -1
- package/dist/assets/epic-ucHpX8wh.js +2 -0
- package/dist/assets/expenseAutomationHelper-D89gAMsk.js +1 -0
- package/dist/assets/{getLocaleForTenant-0mV5x3GU.js → getLocaleForTenant-D_cnKwPq.js} +1 -1
- package/dist/assets/{index-DElaqJ7F.js → index-1u2aDJ3l.js} +17658 -17581
- package/dist/assets/{index-C7P994Rq.js → index-BvIRHYdj.js} +1 -1
- package/dist/assets/{index-DCm9kFzB.js → index-C3vxNQm5.js} +1 -1
- package/dist/assets/{index-BsYuRUyP.js → index-CGTcDwKM.js} +1 -1
- package/dist/assets/{index-DDEprezU.js → index-CWRZ55RL.js} +1 -1
- package/dist/assets/{index-DF1xpOd3.js → index-DGpWyM9Y.js} +1 -1
- package/dist/assets/{index-BqEm26lC.js → index-Df4gn8fh.js} +2 -2
- package/dist/assets/{index-BL3wAHTU.js → index-DuPam2hY.js} +1 -1
- package/dist/assets/{lexical-BMD9Skdu.js → lexical-CpUvnOjl.js} +1 -1
- package/dist/assets/{liveblocks-BLPKVqHo.js → liveblocks-Cmn0IneY.js} +1 -1
- package/dist/assets/{lottie-DWJdupW0.js → lottie-CqVjxmYG.js} +1 -1
- package/dist/assets/{mui-BiqpQr6x.js → mui-BP68m4Fu.js} +1 -1
- package/dist/assets/{pathToGoBack-Bl5vJY_-.js → pathToGoBack-WCSQSILz.js} +1 -1
- package/dist/assets/{pdf-B3souC9z.js → pdf-DVoBxypI.js} +3 -3
- package/dist/assets/{pdf-lib-qMo5mrxo.js → pdf-lib-CfwiSXQl.js} +1 -1
- package/dist/assets/{plaid-BXFY-KIk.js → plaid-D_c1UYI3.js} +1 -1
- package/dist/assets/{pusher-DEaV-Zmd.js → pusher-HOxR7Sbp.js} +1 -1
- package/dist/assets/{react-B88SuQgy.js → react-AUOblSvr.js} +1 -1
- package/dist/assets/{react-DnL-jdtH.js → react-C7Adach0.js} +1 -1
- package/dist/assets/{react-0LIbF3KH.js → react-CAp25EsP.js} +1 -1
- package/dist/assets/{react-CJK0LLCw.js → react-Deo915rj.js} +1 -1
- package/dist/assets/{react--S1-ZiQC.js → react-DxMuJXc7.js} +1 -1
- package/dist/assets/{react-B1Ev53Dd.js → react-S7mn4-ov.js} +1 -1
- package/dist/assets/{recharts-Dg9FaaKY.js → recharts-BDERfoBp.js} +1 -1
- package/dist/assets/{routePaths-KJ0Mf_VR.js → routePaths-DSGBDygY.js} +1 -1
- package/dist/assets/{sentry-BYwRJ99F.js → sentry-D-L93P51.js} +1 -1
- package/dist/assets/{stripSplatSuffix-5xMPsJCi.js → stripSplatSuffix--MOgwIwN.js} +1 -1
- package/dist/assets/{url-BHkvYei3.js → url-BDV8gAHg.js} +1 -1
- package/dist/assets/{url-BlXMXHHv.js → url-D0vuH2sS.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-BbZiVOuy.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DtXjJJR9.js → useAiCfoDashboardSuggestedQuestionsChips-CLtV2UPA.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-bvl6a2jc.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-B8oEFskx.js → useChargeCardPusherEvents-00JeET2P.js} +1 -1
- package/dist/assets/{useDeviceId-D1mK-mWi.js → useDeviceId-BjLcJw5r.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BfM5did4.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BWnJWIOJ.js → useInitialThreadRequest-BujZmxW_.js} +1 -1
- package/dist/assets/useTaskManagerAccess-EuL6L5n0.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-P3ZIbHSQ.js → useTaskManagerPusherEvents-C8CQ-n2I.js} +1 -1
- package/dist/assets/{utils-CJY4ogMD.js → utils-DrMX637r.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-EmB6Lhe6.js → withTransactionSidePanel-B22s9Gp7.js} +5 -5
- package/dist/assets/{zeni-epic-state-Bke7DGFg.js → zeni-epic-state-CGi26_dN.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-D8ARdNLG.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-gGCsmsgi.js +0 -9
- package/dist/assets/CompanyPassportScreen-CwpDDfL0.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BRB9fe2c.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-B-5iE_q3.js +0 -1
- package/dist/assets/EntityDetailRoutes-DTAUvz4h.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Y3cKkUSF.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Jq8q5AT8.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-_gduvnj0.js +0 -12
- package/dist/assets/NotFoundScreen-rNNJF3rA.js +0 -1
- package/dist/assets/OAuthConsentScreen-DyVkStLe.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Cij2SWS4.js +0 -1
- package/dist/assets/PeopleRoutes-DjY-_8xS.js +0 -22
- package/dist/assets/PerformanceRoutes-BGY0_n-J.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DY5FrgK2.js +0 -1
- package/dist/assets/RewardsRoutes-cPzFd3Pi.js +0 -1
- package/dist/assets/ScreenRoutes-BbEWtCht.js +0 -2
- package/dist/assets/SetupPagesScreen-DJ1w7kWs.js +0 -29
- package/dist/assets/SignInScreen-CCevyTCf.js +0 -1
- package/dist/assets/SignOutScreen-D7saoktq.js +0 -9
- package/dist/assets/TaskRoutes-CgC8VN7O.js +0 -9
- package/dist/assets/TransactionDetailRoutes-B6e8aJoM.js +0 -1
- package/dist/assets/TransactionListRoutes-BmQiF0V2.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Bw63j9Jj.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Bm0CaqwY.js +0 -9
- package/dist/assets/analyticsHelper-CT62vOeP.js +0 -1
- package/dist/assets/epic-YDmGQkJ8.js +0 -2
- package/dist/assets/expenseAutomationHelper-pbEk9tHa.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-Bs6gwQjf.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BEEGOqdG.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-C0yzwvmf.js +0 -1
- package/dist/assets/useTaskManagerAccess-BpKEGOBZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-BLPKVqHo.js";import{g as Q,h as Ve,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-pDUZcPB0.js";import{fI as q,Eh as R,UW as Ee,m2 as ne,ug as re,v5 as D,lJ as Pe,lS as A,lK as E,kN as P,kE as L,kD as Le,Dp as le,va as Me,bq as Be,UX as ve,bn as Ue,EE as xe,UY as ze,UZ as Ge,cj as g,Di as Ye,U_ as X,U$ as He,V0 as Ne,V1 as qe,V2 as $e,V3 as Ze,V4 as Je,V5 as Ke,V6 as Qe,V7 as We,V8 as Xe,V9 as ea,Va as aa,Vb as j,Vc as M,Vd as B,Ve as v,Vf as U,Vg as x,Vh as z,Vi as G,Vj as Y,Vk as H,ek as sa,Ei as ta,E5 as ee,E6 as ae,Eo as oa,Ea as se,Eu as na,Vl as ra,Vm as la,Vn as ca,Vo as ia,Vp as da,Vq as pa,Vr as _a,Vs as fa,Vt as ma,Vu as ua,e0 as ba,d$ as ha}from"./zeni-epic-state-Bke7DGFg.js";import{an as ya,ao as wa,ap as Ca,a as Sa,a1 as ga,c as ce,m as ie,z as de,aq as Ia,_ as Ra,e as Ta,ar as ja,as as ka,a8 as Va,j as N,T as Fa,C as Oa,p as pe,at as Da,au as Aa,av as Ea}from"./index-DElaqJ7F.js";import"./mui-BiqpQr6x.js";import Pa from"./NotFoundScreen-rNNJF3rA.js";import{F as La}from"./FeaturePreviewScreen-Y3cKkUSF.js";import{a as u}from"./sentry-BYwRJ99F.js";import{u as Ma}from"./useInitialThreadRequest-BWnJWIOJ.js";import{t as te,a as oe,b as Ba}from"./routePaths-KJ0Mf_VR.js";import{M as va}from"./MobileAppDrawer-C8UsE0YH.js";import"./recharts-Dg9FaaKY.js";import"./analytics-CmKkcxmz.js";import"./plaid-BXFY-KIk.js";import"./dnd-Bslfq-ku.js";import"./stripe-cKAAJElX.js";import"./lottie-DWJdupW0.js";import"./lexical-BMD9Skdu.js";import"./pdf-B3souC9z.js";import"./utils-CJY4ogMD.js";import"./InboxNotificationsProvider-CxBkh6GM.js";import"./useTaskManagerAccess-BpKEGOBZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="45e768d3-51dd-4251-aa1a-a08ca5a4b97e",e._sentryDebugIdIdentifier="sentry-dbid-45e768d3-51dd-4251-aa1a-a08ca5a4b97e")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(Ke({viewMode:a})),e(Qe({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e($e({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(He({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?E():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?P():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):E(!0):P(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=Ve(),s=Fe(),t=Q(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[$,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const V=d((n=>q(n))),fe=V.masterTOSInfo?.isMasterTOSAccepted??!1,me=V.company?.companyInfo.firstMonthOfFY??1,ue=Ma(V?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!$&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(P());break;case"cash_flow_by_classes":T&&s(E());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Pe(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&Be(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),J=n=>{Se(n)},ge=Ta(),Ie=ja();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=Q(),K=ya(Te??"")==="reports",je=wa(Re),ke=u.useMemo((()=>K?Ua:void 0),[K]);Ca({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Va,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Ce,handleDrawerToggle:J}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Pa,{})})]})}export{ps as default};
|
|
1
|
+
import{j as p}from"./liveblocks-Cmn0IneY.js";import{g as J,h as je,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-BAlzhg_1.js";import{fI as q,Eh as R,UZ as Ee,m2 as ne,ug as re,v5 as D,lJ as Pe,lS as A,lK as E,kN as P,kE as L,kD as Le,Dp as le,va as Me,bq as ve,U_ as Be,bn as Ue,EE as xe,U$ as ze,V0 as Ge,cj as g,Di as He,V1 as X,V2 as Ne,V3 as Ye,V4 as qe,V5 as $e,V6 as Ze,V7 as Ke,V8 as Qe,V9 as Je,Va as We,Vb as Xe,Vc as ea,Vd as aa,Ve as V,Vf as M,Vg as v,Vh as B,Vi as U,Vj as x,Vk as z,Vl as G,Vm as H,Vn as N,ek as sa,Ei as ta,E5 as ee,E6 as ae,Eo as oa,Ea as se,Eu as na,Vo as ra,Vp as la,Vq as ca,Vr as ia,Vs as da,Vt as pa,Vu as _a,Vv as fa,Vw as ma,Vx as ua,e0 as ba,d$ as ha}from"./zeni-epic-state-CGi26_dN.js";import{an as ya,ao as wa,ap as Ca,a as Sa,a1 as ga,N as ce,m as ie,z as de,aq as Ia,K as Ra,e as Ta,ar as Va,as as ka,a8 as ja,k as Y,Q as Fa,y as Oa,p as pe,at as Da,au as Aa,av as Ea}from"./index-1u2aDJ3l.js";import"./mui-BP68m4Fu.js";import Pa from"./NotFoundScreen-DcIIEjdb.js";import{F as La}from"./FeaturePreviewScreen-CsKi-5Np.js";import{a as u}from"./sentry-D-L93P51.js";import{u as Ma}from"./useInitialThreadRequest-BujZmxW_.js";import{t as te,a as oe,b as va}from"./routePaths-DSGBDygY.js";import{M as Ba}from"./MobileAppDrawer-CUkRGmov.js";import"./recharts-BDERfoBp.js";import"./analytics-HUGlc_YA.js";import"./plaid-D_c1UYI3.js";import"./dnd-CtBfGkHE.js";import"./stripe-cKAAJElX.js";import"./lottie-CqVjxmYG.js";import"./lexical-CpUvnOjl.js";import"./pdf-DVoBxypI.js";import"./utils-DrMX637r.js";import"./InboxNotificationsProvider-BLd671md.js";import"./useTaskManagerAccess-EuL6L5n0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="682399fb-8699-48df-a545-bc52d4f3d096",e._sentryDebugIdIdentifier="sentry-dbid-682399fb-8699-48df-a545-bc52d4f3d096")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(v({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Be(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:Y,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(V(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(N({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(v({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(Qe({viewMode:a})),e(Je({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(V(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(V(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(V(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e($e({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Ke({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ye({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?E():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?P():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):E(!0):P(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=je(),s=Fe(),t=J(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[$,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const j=d((n=>q(n))),fe=j.masterTOSInfo?.isMasterTOSAccepted??!1,me=j.company?.companyInfo.firstMonthOfFY??1,ue=Ma(j?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!$&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(P());break;case"cash_flow_by_classes":T&&s(E());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Pe(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&ve(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),K=n=>{Se(n)},ge=Ta(),Ie=Va();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=J(),Q=ya(Te??"")==="reports",Ve=wa(Re),ke=u.useMemo((()=>Q?Ua:void 0),[Q]);Ca({canFetchSuggestedQuestions:Ve,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ja,{analytics:Y,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Ba,{isAppContentDrawerOpen:Ce,handleDrawerToggle:K}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:Y,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:K,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Pa,{})})]})}export{ps as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-Cmn0IneY.js";import{z as w,a8 as v,k as u,Q as S,e2 as k,N as E,m as I}from"./index-1u2aDJ3l.js";import"./mui-BP68m4Fu.js";import g from"./NotFoundScreen-DcIIEjdb.js";import{a as l}from"./sentry-D-L93P51.js";import{u as C,j as h,h as F,g as L,l as T,n as U,o as d,N as y}from"./core-BAlzhg_1.js";import{fI as _,a2c as j,a2d as p,DY as P,q2 as V,a2e as q,DW as z}from"./zeni-epic-state-CGi26_dN.js";import"./recharts-BDERfoBp.js";import"./analytics-HUGlc_YA.js";import"./plaid-D_c1UYI3.js";import"./dnd-CtBfGkHE.js";import"./stripe-cKAAJElX.js";import"./lottie-CqVjxmYG.js";import"./lexical-CpUvnOjl.js";import"./pdf-DVoBxypI.js";import"./utils-DrMX637r.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]="2881ef8c-7c2a-4df0-ad2c-2452631259b4",e._sentryDebugIdIdentifier="sentry-dbid-2881ef8c-7c2a-4df0-ad2c-2452631259b4")}catch{}})();const G=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),Q=()=>{const e=C(),[t,n]=l.useState(!1),[i,s]=l.useState(!1),r=h((o=>_(o))),c=F(),x=L(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),b=f?.firstName!=null?f.firstName:"User";l.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),l.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(v,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:D,userName:b,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=E(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Q,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as y}from"./liveblocks-Cmn0IneY.js";import{a as A}from"./sentry-D-L93P51.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-BAlzhg_1.js";import{WX as Fe,WY as Ve,m2 as ae,sA as Me,sM as Ge,t0 as $e,s_ as Re,t1 as Ke,t3 as Ue,WZ as Ye,fI as K,VW as pe,W_ as Se,h1 as ne,cC as se,cD as le,Fm as ve,W$ as Ce,Fq as qe,gR as ce,sD as ze,tc as We,dE as Xe,dD as Ze,Ti as fe,Fk as He,Fe as Qe,X0 as De,F6 as et,F5 as tt,F0 as at,Fb as nt,Fr as st,X1 as Y,X2 as ge,F7 as lt,VX as oe,FH as Ae,FA as Ie,X3 as xe,sG as Te,Fu as Be,Fs as Le,X4 as we,FO as Je,FL as be,Fv as je,FN as _e}from"./zeni-epic-state-CGi26_dN.js";import{a4 as de,aY as ie,aZ as ct,z as ot,j as dt,a7 as it,a8 as ue,k as N,av as ut,a_ as rt,p as V,G as ke,c as ye,a$ as ht,b0 as mt,b1 as pt}from"./index-1u2aDJ3l.js";import{n as re}from"./mui-BP68m4Fu.js";import{p as St}from"./pathToGoBack-WCSQSILz.js";import Z from"./NotFoundScreen-DcIIEjdb.js";import{c as M}from"./routePaths-DSGBDygY.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]="cd89f936-a7fa-45ee-95d6-affb4cf65f86",e._sentryDebugIdIdentifier="sentry-dbid-cd89f936-a7fa-45ee-95d6-affb4cf65f86")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(Z,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(Z,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as k}from"./liveblocks-BLPKVqHo.js";import{a as A}from"./sentry-BYwRJ99
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Dt=
|
|
9
|
+
`,Dt=ke.getLocalizedStrings(),gt=te((function(e,t){const c=Se(e,t.scheduleTab),s=e.tenantState.currentTenantId;return{authParams:{userId:t.signedInUser.userId??"",sessionId:t.signedInUser.zeniSessionId??"",tenantId:s??""},linkBillExpenseView:c.linkBillExpenseView,transactions:c.linkBillExpenseView.transactions}}),(function(e,t){const{navigate:c,location:s}=t;return{onTransactionSelect(l){e(Ce({selectedTransaction:l}))},onBackClick:()=>{c("..",{relative:"path"})},onCancel(){e(Ce({selectedTransaction:void 0})),e(qe()),c("..",{relative:"path"})},onTransactionClick:l=>{const n=`${M(l,t.tenantEmailDomain)}`,i=V(s.state?.pathnameStackToGoBack,s.pathname);c(n,{state:{pathnameStackToGoBack:i}})},onLinkSave(){t.setShouldNavigateBack(!1),e(ve(t.scheduleTab,t.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(rt),Kt=({setShouldNavigateBack:e})=>{const t=Q(),c=ee(),{scheduleDetailId:s,tenantEmailDomain:l}=G(),{scheduleType:n}=G();if(l==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const i=h((g=>K(g))),a=pe(n)??"accrued_expenses",d=ot.getSignedInUser();if(d==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(s==null)throw Error("Invalid Schedule Detail Id");const o=h((g=>Se(g,a))),m=o.selectedJELinkRowIndex,I=h((g=>ne(g,i.companyId))),p=dt(o.updateStatus.fetchState);A.useEffect((()=>{p==="In-Progress"&&o.updateStatus.fetchState==="Completed"&&t("..",{relative:"path"})}),[p,o.updateStatus.fetchState]),A.useEffect((()=>{o.fetchState==="Not-Started"&&t("..",{relative:"path"})}),[]),A.useEffect((()=>{o.selectedJEAccruedSchedule!=null&&o.selectedJELinkRowIndex!=null||t("..",{relative:"path"})}),[o.selectedJEAccruedSchedule,o.selectedJELinkRowIndex]);const C=o.linkBillExpenseView.fetchState==="Completed";return y.jsx(y.Fragment,{children:o.linkBillExpenseView.fetchState==="In-Progress"?y.jsx(it,{fetchState:o.linkBillExpenseView.fetchState}):o.selectedJEAccruedSchedule!=null&&m!=null?y.jsxs(y.Fragment,{children:[C===!0?y.jsx(ue,{analytics:N,onLoad:()=>{kt(o,a,I)}}):null,y.jsx(gt,{signedInUser:d,attachmentEndPoint:`${ut}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:o.selectedJEAccruedSchedule.vendor.id??"",location:c,tenantEmailDomain:l,scheduleAccruedDetailsView:o,saveFetchState:o.updateStatus.fetchState,scheduleTab:a,navigate:t,analytics:N,controllerUserDetails:I,saveStatus:o.updateStatus.fetchState,jeAccruedSchedule:o.selectedJEAccruedSchedule,localData:o.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},Ne=e=>{const t=Dt.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(t)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(t)??null,endMonth:e.endDate?.format(t)??null}},kt=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=e.selectedJELinkRowIndex;let n;l!=null&&s!=null&&(n=s.scheduledJournalEntry[l]);const{transactions:i}=e.linkBillExpenseView,a=i.some((m=>m.isRecommendedTransaction===!0)),d=se(c.controllers),o=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:t,schedule:{...Ne(s)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:a,journalEntryPostingStatus:n?.status.label??""},vendorName:s.vendor.name??null,controllerEmails:d,controllerUserIds:o})};function Ee({jeScheduleId:e,scheduleKey:t,scheduleType:c,onDecided:s}){const l=H(),{ignoreStatusById:n,revertStatusById:i}=h((I=>ce(I).jeSchedules)),a=A.useRef(void 0),d=t==null||a.current==null?void 0:a.current==="ignore"?n[t]?.fetchState:i[t]?.fetchState,o=A.useRef(!1),m=A.useRef(s);return m.current=s,A.useEffect((()=>{o.current&&d==="Completed"&&(o.current=!1,m.current())}),[d]),{onScheduleDecision:A.useCallback(((I,p,C)=>{if(t!=null){if(I==="ignore")return(function(g){return Xe.includes(g)})(p)?(o.current=!0,a.current="ignore",void l(ze(t,c,p,C))):void 0;e!=null&&(function(g){return Ze.includes(g)})(p)&&(o.current=!0,a.current="revert",l(We(e,t,c,p,C)))}}),[l,e,t,c]),scheduleDecisionStatus:d}}const yt=re.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as k}from"./liveblocks-BLPKVqHo.js";import{a as A}from"./sentry-BYwRJ99
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,Et=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,s=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:s}}}),(function(e,t){const{navigate:c,location:s}=t,l="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(s.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(l,n))},onDelete:n=>{e(lt(l,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onEditAmount:(n,i)=>{e(st(l,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,
|
|
17
|
+
`,Et=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,s=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:s}}}),(function(e,t){const{navigate:c,location:s}=t,l="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(s.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(l,n))},onDelete:n=>{e(lt(l,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onEditAmount:(n,i)=>{e(st(l,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,w=I?.selectedOption;e(et({scheduleType:l,localData:i,selectedJeScheduleDetailId:t.scheduleDetailId})),a!==!1||t.scheduleDetailId!=null||v?.accountId==null||t.isAccountingClassesEnabled!==!1&&r?.classId==null||D==null||u.selectedOption==null||m==null||o==null&&o==0||f==null||w==null||e(tt({scheduleType:l}))}}}))(ht),Ut=({shouldNavigateBack:e,setShouldNavigateBack:t,isRenderedInPanel:c=!1,scheduleDetailIdOverride:s,onPanelCloseAfterDecision:l,onPanelNavigateBack:n}={})=>{const[i,a]=A.useState(!1),d=e??i,o=t??a,m=Q(),I=ee(),p=H(),C=ye(),{tenantEmailDomain:g}=G(),[f,u]=A.useState(!1);if(g==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:r}=G(),v=s??r;let D;v!=="new"&&(D=v);const w=Ct(v),B=h((L=>L.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),J="accrued_expenses",E=h((L=>Se(L,"accrued_expenses"))),b=h((L=>fe(L))),j=h((L=>L.classListState.fetchState)),x=h((L=>ae(L))),_=b!=="Completed"||j!=="Completed";A.useEffect((()=>{f===!1&&_?(p(He(J,D)),u(!0)):_===!1&&f===!1&&v!=="new"&&(p(Qe(J,v)),u(!0))}),[f]);const P=h((L=>K(L))),T=h((L=>ne(L,P.companyId))),O=I.state?.message==="expenseAutomation",q=h((L=>ce(L).selectedPeriod)),U=c||O,{onScheduleDecision:z,scheduleDecisionStatus:W}=Ee({jeScheduleId:E.selectedJEAccruedSchedule?.jeScheduleId,scheduleKey:E.selectedJEAccruedSchedule?.jeAccruedScheduleKey,scheduleType:J,onDecided:()=>{if(l==null)if(O!==!0)m("../schedules/accrued_expenses");else{const{month:L,year:Pe}=q;m(`../../month_end_close_checks/review/je_schedules/${L}-${Pe}`)}else l()}}),F=E.fetchState,$=E.allAccountList,X=E.allClassList,k=E.allAccruedAccountList,S=E.scheduleAccruedDetailsLocalData;if(w!==!0||E.fetchState==="Error")return y.jsx(Z,{});const R=F==="Completed"&&f===!0,Oe=E.selectedJEAccruedSchedule!=null;return F==="Completed"||F==="Not-Started"||c===!0&&Oe?y.jsxs(yt,{children:[R===!0?y.jsx(ue,{analytics:N,onLoad:()=>{vt(E,J,T)}}):null,y.jsx(Et,{onScheduleDecision:U?z:void 0,scheduleDecisionStatus:W,isRenderedInPanel:c,onPanelNavigateBack:n,setShouldNavigateBack:o,scheduleAccruedDetailsView:E,location:I,navigate:m,classList:X,accountList:$,shouldNavigateBack:d,accruedAccountList:k,scheduleLocalData:S,selectedJEScheduleKey:B,scheduleDetailId:D,selectedScheduledJournalEntries:E.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:C,tenantEmailDomain:g,analytics:N,controllerUserDetails:T,isAccountingClassesEnabled:x,status:E.selectedJEAccruedSchedule?.status.code})]}):y.jsx(ie,{})},Ct=e=>e!=null,vt=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=se(c.controllers),n=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsLoaded({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},schedule:{...Ne(s)},vendorName:s.vendor.name??null,controllerEmails:l,controllerUserIds:n})},At=re.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as k}from"./liveblocks-BLPKVqHo.js";import{a as A}from"./sentry-BYwRJ99
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,he=
|
|
25
|
+
`,he=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,It=te((function(e){const t=K(e),c=oe(e,"fixed_assets");return{tenantName:t.companyName,scheduleDetailsView:c}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i="fixed_assets",a=n.flatMap((d=>d.error)).filter((d=>!!d))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const d=de(t.location.state?.pathnameStackToGoBack);d.poppedPathname==null?c("../schedules/fixed_assets"):t.navigate(d.poppedPathname,{state:{pathnameStackToGoBack:d.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:d=>{e(_e(i,d,a.length>0))},onDelete:d=>{e(je(i,d))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(i,t.selectedJEScheduleKey))},onEditAmount:(d,o)=>{e(Je(i,d,o))},onJELinkClick:d=>{e(we({selectedJELinkRowIndex:d})),c("./edit_link")},onTransactionClick:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(d,o)=>{d.trim().length>=2?e(ge({searchString:d,entityType:o,searchOrigin:"common"})):d.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(d,o)=>{const{scheduleDetailsFixedAssetsSection:m,scheduleDetailsListSection:I}=d,{scheduleClass:p,scheduleExpenseCategory:C,accumulatedDepreciationCategory:g,assetId:f,months:u,startDate:r,postingDate:v,vendor:D}=m,w=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((T=>T.id===D?.selectedOption)):void 0,B={id:w?.zeniId??D?.selectedOption??"",name:w?.name??D?.defaultOptions.find((T=>T.value===D?.selectedOption))?.label??"",logo:w?.logo},J=p.selectedOption!=null?t.classList.find((T=>T.classId===p.selectedOption)):void 0,E=C.selectedOption!=null?t.accountList.find((T=>T.qboId===C.selectedOption)):void 0,b=g.selectedOption!=null?t.depAccountList.find((T=>T.qboId===g.selectedOption)):void 0,j=u?.selectedOption,x=I.map(((T,O)=>({...t.scheduleLocalData.jeScheduleDetails[O],amount:{...t.scheduleLocalData.jeScheduleDetails[O].amount,amount:T.amount}}))),_=v.type==="day"?v.dayOfMonth?v.dayOfMonth:1:void 0,P=v.type==="lastDayOfMonth"||void 0;e(Be({scheduleType:i,localData:{selectedAccount:E?.accountId,selectedClass:J?.classId,selectedAccumulatedDepreciationCategory:b?.accountId,selectedDate:r,selectedMonths:j,assetId:f,jeScheduleDetails:x,lastDayOfMonth:P,selectedDayOfMonth:_,selectedVendor:B},selectedJeScheduleDetailId:t.scheduleDetailId})),o!==!1||b?.accountId==null||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||E?.accountId==null||t.isAccountingClassesEnabled!==!1&&J?.classId==null||r==null||j==null||P!==!0&&_==null||e(Le({scheduleType:i}))}}}))(mt),Yt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,onPanelCloseAfterDecision:c,onPanelNavigateBack:s}={})=>{const l=Q(),n=ee(),i=H(),a=ye(),{tenantEmailDomain:d}=G(),[o,m]=A.useState(!1),{scheduleDetailId:I}=G(),p=t??I,C=n.state?.message==="expenseAutomation",g=xt(p),f=h((k=>k.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{f!=null&&f.length!==0||p!=="new"||l("../schedules/fixed_assets")}),[f,p]);const u="fixed_assets",r=h((k=>oe(k,u))),v=h((k=>k.entityAutoCompleteState.autoCompleteText.common)),D=h((k=>De(k,"common"))),w=h((k=>fe(k))),B=h((k=>k.classListState.fetchState)),J=h((k=>ae(k))),E=h((k=>ce(k).selectedPeriod)),b=w!=="Completed"||B!=="Completed";A.useEffect((()=>{o===!1&&b?(i(Ae(u,F,!0)),m(!0)):b===!1&&o===!1&&(i(Ie(u,p==="new"?void 0:p,!0)),m(!0))}),[o]),A.useEffect((()=>{if(r.markAsCompleteStatus.fetchState==="Completed")if(i(xe()),C===!0){const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else l("../schedules/fixed_assets")}),[r.markAsCompleteStatus.fetchState]);const j=h((k=>K(k))),x=h((k=>ne(k,j.companyId))),_=e||C,{onScheduleDecision:P,scheduleDecisionStatus:T}=Ee({jeScheduleId:r.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:r.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:u,onDecided:()=>{if(c==null)if(C!==!0)l("../schedules/fixed_assets");else{const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else c()}}),O=r.fetchState,q=r.allAccountList,U=r.allClassList,z=r.allDepreciationAccountList,W=r.scheduleDetailsLocalData.fixed_assets;let F;if(p!=="new"&&(F=p),g!==!0||r.fetchState==="Error")return y.jsx(Z,{});const $=O==="Completed"&&o===!0,X=r.selectedJEScheduleTransaction!=null;return O==="Completed"||e===!0&&X?y.jsxs(At,{children:[$===!0?y.jsx(ue,{analytics:N,onLoad:()=>{Bt(r,u,x)}}):null,y.jsx(It,{onScheduleDecision:_?P:void 0,scheduleDecisionStatus:T,isRenderedInPanel:e,onPanelNavigateBack:s,location:n,navigate:l,classList:U,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:v,entityAutoCompleteView:D},expenseAutomationSelectedPeriod:E,usedInExpenseAutomation:C,removeJeScheduleTransactionKey:(k,S)=>{i(Te(k,S))},accountList:q,depAccountList:z,scheduleLocalData:W,selectedJEScheduleKey:f,scheduleDetailId:F,selectedScheduledJournalEntries:r.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:a,tenantEmailDomain:d,analytics:N,controllerUserDetails:x,isAccountingClassesEnabled:J,status:r.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},xt=e=>e!=null,Tt=e=>({transactionDate:e.date.format(he),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Bt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Tt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(he)??null,endMonth:a.endDate?.format(he)??null})},vendorName:l.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:l.jeCredit.account?.accountName??null,assetId:l.otherAttributes.assetId??null},controllerEmails:n,controllerUserIds:i})},Lt=re.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
min-height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -30,4 +30,4 @@ import{j as k}from"./liveblocks-BLPKVqHo.js";import{a as A}from"./sentry-BYwRJ99
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,me=
|
|
33
|
+
`,me=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,wt=te((function(e,t){const c=K(e),s=oe(e,t.scheduleTab);return{tenantName:c.companyName,scheduleDetailsView:s}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i=n.flatMap((a=>a.error)).filter((a=>!!a))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const a=de(t.location.state?.pathnameStackToGoBack);a.poppedPathname==null?c("../schedules/prepaid_expenses"):t.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:a=>{e(_e(t.scheduleTab,a,i.length>0))},onDelete:a=>{e(je(t.scheduleTab,a))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(t.scheduleTab,t.selectedJEScheduleKey))},onEditAmount:(a,d)=>{e(Je(t.scheduleTab,a,d))},onJELinkClick:a=>{e(we({selectedJELinkRowIndex:a})),c("./edit_link")},onTransactionClick:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o,message:"comingFromScheduleDetails"}})},onViewLinkedJE:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,d)=>{a.trim().length>=2?e(ge({searchString:a,entityType:d,searchOrigin:"common"})):a.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(a,d)=>{const{scheduleDetailsSection:o,scheduleDetailsListSection:m}=a,{scheduleClass:I,scheduleExpenseCategory:p,months:C,startDate:g,postingDate:f,vendor:u}=o,r=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((x=>x.id===u?.selectedOption)):void 0,v={id:r?.zeniId??u?.selectedOption??"",name:r?.name??u?.defaultOptions.find((x=>x.value===u?.selectedOption))?.label??"",logo:r?.logo},D=I.selectedOption!=null?t.classList.find((x=>x.classId===I.selectedOption)):void 0,w=p.selectedOption!=null?t.accountList.find((x=>x.qboId===p.selectedOption)):void 0,B=C?.selectedOption,J=m.map(((x,_)=>({...t.scheduleLocalData.jeScheduleDetails[_],amount:{...t.scheduleLocalData.jeScheduleDetails[_].amount,amount:x.amount}}))),E=f.type==="day"?f.dayOfMonth?f.dayOfMonth:1:void 0,b=f.type==="lastDayOfMonth"||void 0,j={selectedAccount:w?.accountId,selectedClass:D?.classId,selectedDate:g,selectedMonths:B,jeScheduleDetails:J,lastDayOfMonth:b,selectedVendor:v,selectedDayOfMonth:E};e(Be({scheduleType:t.scheduleTab,localData:j,selectedJeScheduleDetailId:t.scheduleDetailId})),d!==!1||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||w?.accountId==null||t.isAccountingClassesEnabled!==!1&&D?.classId==null||g==null||B==null||b!==!0&&E==null||e(Le({scheduleType:t.scheduleTab}))}}}))(pt),qt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,scheduleTypeOverride:c,onPanelCloseAfterDecision:s,onPanelNavigateBack:l}={})=>{const n=Q(),i=ee(),a=H(),d=ye(),{tenantEmailDomain:o}=G(),[m,I]=A.useState(!1),p=i.state?.message==="expenseAutomation",{scheduleType:C,scheduleDetailId:g}=G(),f=t??g,u=Jt(c??C,f),r=h((S=>S.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{r!=null&&r.length!==0||f!=="new"||n("../schedules/prepaid_expenses")}),[r,f]);const v=c??pe(C)??"prepaid_expenses",D=h((S=>oe(S,v))),w=h((S=>S.entityAutoCompleteState.autoCompleteText.common)),B=h((S=>De(S,"common"))),J=h((S=>fe(S))),E=h((S=>S.classListState.fetchState)),b=h((S=>ae(S))),j=h((S=>ce(S).selectedPeriod)),x=J!=="Completed"||E!=="Completed";A.useEffect((()=>{m===!1&&x?(a(Ae(v,$,!0)),I(!0)):x===!1&&m===!1&&(a(Ie(v,f==="new"?void 0:f,!0)),I(!0))}),[m]),A.useEffect((()=>{if(D.markAsCompleteStatus.fetchState==="Completed")if(a(xe()),p===!0){const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else n("../schedules/prepaid_expenses")}),[D.markAsCompleteStatus.fetchState]);const _=h((S=>K(S))),P=h((S=>ne(S,_.companyId))),T=e||p,{onScheduleDecision:O,scheduleDecisionStatus:q}=Ee({jeScheduleId:D.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:D.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:v,onDecided:()=>{if(s==null)if(p!==!0)n("../schedules/prepaid_expenses");else{const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else s()}}),U=D.fetchState,z=D.allAccountList,W=D.allClassList,F=D.scheduleDetailsLocalData;let $;if(f!=="new"&&($=f),u!==!0||D.fetchState==="Error")return y.jsx(Z,{});const X=U==="Completed"&&m===!0,k=D.selectedJEScheduleTransaction!=null;return U==="Completed"||e===!0&&k?y.jsxs(Lt,{children:[X===!0?y.jsx(ue,{analytics:N,onLoad:()=>{jt(D,v,P)}}):null,y.jsx(wt,{onScheduleDecision:T?O:void 0,scheduleDecisionStatus:q,isRenderedInPanel:e,onPanelNavigateBack:l,location:i,vendorSearchEntityAutoCompleteView:B,vendorSearchAutoCompleteData:{autoCompleteText:w,entityAutoCompleteView:B},usedInExpenseAutomation:p,removeJeScheduleTransactionKey:(S,R)=>{a(Te(S,R))},expenseAutomationSelectedPeriod:j,navigate:n,classList:W,accountList:z,scheduleLocalData:F[v],selectedJEScheduleKey:r,scheduleDetailId:$,selectedScheduledJournalEntries:D.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:d,tenantEmailDomain:o,scheduleTab:v,analytics:N,controllerUserDetails:P,isAccountingClassesEnabled:b,status:D.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},Jt=(e,t)=>pe(e)!=null&&t!=null,bt=e=>({transactionDate:e.date.format(me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),jt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...bt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(me)??null,endMonth:a.endDate?.format(me)??null})},vendorName:l.vendor.name??null,controllerEmails:n,controllerUserIds:i})};export{Rt as J,Yt as S,Ut as a,qt as b,Kt as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DcIIEjdb.js","assets/sentry-D-L93P51.js","assets/core-BAlzhg_1.js","assets/zeni-epic-state-CGi26_dN.js","assets/index-1u2aDJ3l.js","assets/mui-BP68m4Fu.js","assets/analytics-HUGlc_YA.js","assets/utils-DrMX637r.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-DEtQqaVs.js","assets/withTransactionSidePanel-B22s9Gp7.js","assets/useAskAiCfoHostNavButtonProps-bvl6a2jc.js","assets/TransactionDetailScreen-Cqrtgoki.js","assets/decodeURIComponentSafe-BlS7R_TX.js","assets/useInitialThreadRequest-BujZmxW_.js","assets/routePaths-DSGBDygY.js","assets/expenseAutomationHelper-D89gAMsk.js","assets/stripSplatSuffix--MOgwIwN.js","assets/analyticsHelper-C858uUp8.js","assets/CompanyPassportScreen-lZWEIVDl.js","assets/MobileAppDrawer-CUkRGmov.js","assets/InboxNotificationsProvider-BLd671md.js","assets/useTaskManagerAccess-EuL6L5n0.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CLtV2UPA.js","assets/FeaturePreviewScreen-CsKi-5Np.js","assets/BillPayRoutes-Bwj63a_R.js","assets/AddressScreen-BQYkT2m3.js","assets/DomesticWireDetailScreen-B2C3yRyz.js","assets/BusinessVerificationPageScreen-D3H22Ycs.js","assets/DrawerScreen-CVgBvegK.js","assets/SetupPagesScreen-BVuXxhDx.js","assets/BillPayApprovalRoutes-DJXolFor.js","assets/ReimbursementApprovalRuleDetailScreen-DGkJ20Az.js","assets/getLocaleForTenant-D_cnKwPq.js","assets/ReimbursementRoutes-CwIONxFo.js","assets/ReimbursementApprovalRoutes-DqdHGUab.js","assets/TransactionListRoutes-BfvppQmn.js","assets/ZeniAccountStatementScreen-Ds7h68QG.js","assets/SettingsRoutes-B2D7KOAB.js","assets/AccountMappingScreen-DSZj_uCQ.js","assets/QBOConnectionScreen-CC1mgdSE.js","assets/empty-Bi7Yf941.js","assets/index-CWRZ55RL.js","assets/url-D0vuH2sS.js","assets/index-BvIRHYdj.js","assets/accountMappingHelper-DDpt4thU.js","assets/useEmailConnectResultRefresh-BfM5did4.js","assets/ReportsRoutes-DVA33cfE.js","assets/ChargeCardRoutes-Dd0GuLnx.js","assets/useChargeCardPusherEvents-00JeET2P.js","assets/PeopleRoutes-CLcQG2z8.js","assets/ExpenseAutomationRoutes-Kn5gQkyW.js","assets/useActualMatchingMatchDetail-BbZiVOuy.js","assets/ScheduleDetailsPrepaidExpensesScreen-BVhDF7k2.js","assets/pathToGoBack-WCSQSILz.js","assets/TreasuryRoutes-DJXblfti.js","assets/VendorsRoutes-iqjJ6KwN.js","assets/ZeniAccountRoutes-CRqmMO-M.js","assets/AddressRoutes-BC4juuf4.js","assets/PandLWithForecastRoutes-BM_Kx0Gi.js","assets/CustomerOnboardingRoutes-C5hH9_2G.js","assets/TransactionDetailRoutes-45rDqVHh.js","assets/EntityDetailRoutes-BxIXjZHN.js","assets/InvoicingRoutes-BkO_wRtc.js","assets/NotificationRoutes-BDrKKRmf.js","assets/PerformanceRoutes-ZkTu6xdk.js","assets/ActualMatchingMatchDetailScreen-BQRgUBiV.js","assets/RewardsRoutes-wgZH1oXi.js","assets/TaskRoutes-YYUAqa-i.js","assets/TaskListScreen-BbBcN7pH.js","assets/useTaskManagerPusherEvents-C8CQ-n2I.js","assets/AiCfoScreen-DNMX1_2h.js","assets/CardsAiCfoScreen-_x1fFH7I.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as xs,B7 as gs,dj as Rs,c9 as js,gM as Is,gc as Ts,dg as pe,cH as As,gq as bs,cz as fs,bF as Ds,br as ys,Un as vs,v as Cs,Uq as Os,bq as Us,Ur as Ps,bL as ws,bK as Fs,bu as Ls,cv as Vs,Us as ks,Ut as Hs,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pV as xe,gl as ge,g$ as $s,gn as Re,gO as je,gP as Ie,go as zs}from"./zeni-epic-state-CGi26_dN.js";import{j as e}from"./liveblocks-Cmn0IneY.js";import{a as P}from"./sentry-D-L93P51.js";import{N as u,u as Gs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Ks,o as n}from"./core-BAlzhg_1.js";import{J as l,E as Js,u as Qs,z as y,N as Xs,e as et,f as st,m as S,h as tt,W as nt,K as at,L as F,G as Ae,t as _,P as ot,M as rt,k as ne}from"./index-1u2aDJ3l.js";import"./mui-BP68m4Fu.js";import{f as be}from"./analyticsHelper-C858uUp8.js";import{t as it}from"./getLocaleForTenant-D_cnKwPq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="104f86b2-7e3a-4ca7-9742-9d25f8373387",o._sentryDebugIdIdentifier="sentry-dbid-104f86b2-7e3a-4ca7-9742-9d25f8373387")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-DcIIEjdb.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(V===!0){if(o)return e.jsx(De,{tenantEmailDomain:C});if(i)return e.jsx(fe,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(De,{tenantEmailDomain:C}):i?e.jsx(fe,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):f?e.jsx(dt,{tenantEmailDomain:C}):N?e.jsx(ut,{tenantEmailDomain:C}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-DEtQqaVs.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-Bwj63a_R.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-CwIONxFo.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-BfvppQmn.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-B2D7KOAB.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-DVA33cfE.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Dd0GuLnx.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CLcQG2z8.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Kn5gQkyW.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DJXblfti.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-iqjJ6KwN.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CRqmMO-M.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-DVA33cfE.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-BC4juuf4.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-CLcQG2z8.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-BM_Kx0Gi.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-C5hH9_2G.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-iqjJ6KwN.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-45rDqVHh.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-BxIXjZHN.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-DEtQqaVs.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-Bwj63a_R.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),It=l((()=>s((()=>import("./SettingsRoutes-B2D7KOAB.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-BkO_wRtc.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-CwIONxFo.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-CRqmMO-M.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-DJXblfti.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),ft=l((()=>s((()=>import("./TransactionListRoutes-BfvppQmn.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Dt=l((()=>s((()=>import("./ChargeCardRoutes-Dd0GuLnx.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-BDrKKRmf.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),vt=l((()=>s((()=>import("./PerformanceRoutes-ZkTu6xdk.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ct=l((()=>s((()=>import("./ExpenseAutomationRoutes-Kn5gQkyW.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BQRgUBiV.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-wgZH1oXi.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-YYUAqa-i.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-DNMX1_2h.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-_x1fFH7I.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-DcIIEjdb.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-BbBcN7pH.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(O===!0){if(f)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):f?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=Gs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=Js().mode,{setLoading:O,clearAllLoading:C,clearLoading:k}=Qs(),D=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),K=Es(I),z=Ys(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:H}=Xs(),M=et(),J=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,ke=tt(r,Ve,oe),{isCardsHidden:He}=nt(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),G=$((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,V)}const Z={tenantId:D,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=Ds(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?f(vs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,f,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,f,qe))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(zs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,I,O,f))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,G.tenantsBaseInOrder))}),[G,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(C(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:We}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=H(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&f(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(jt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Je?e.jsx(Rt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(ft,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&U===!1?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&U===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Ut,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,$t as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-Cmn0IneY.js";import{a as d}from"./sentry-D-L93P51.js";import{h as F,g as K,u as M,i as O,j as C,l as H,n as z,o as k}from"./core-BAlzhg_1.js";import{fI as w,ZC as je,NP as ve,Z9 as we,Zi as Ae,c9 as X,cU as De,cV as Ue,bq as Me,df as Re,G5 as _e,ZD as Te,Pg as Be,MG as Ze,Mx as de,Mu as Ve,G9 as ue,MA as pe,MD as ge,MJ as Y,Cj as ee,G8 as Ne,lx as $,lA as me,ZE as Fe,mK as Oe,Gq as Le,VQ as Ge,VR as $e,lv as Ke,ZF as He,ly as qe,uK as Qe,VL as Je,VM as ze,uO as We,hY as Xe,UK as J,hQ as ae,hN as Ye,hV as en,UL as nn,Gn as tn,ZG as an,ZH as on,MX as sn,m2 as rn,d$ as fe,e0 as he,ZI as ln,gF as cn,U_ as dn,Gm as oe,gK as se,gJ as un,Gl as pn,gI as gn,gH as mn,ZJ as fn,Ua as Ce,ZK as hn,ZL as Cn,ZM as yn,ZN as Sn,ZO as bn,ZP as In,Gt as xn,ZQ as En,Gk as ie,Ge as G,ZR as kn,ZS as Pn,ZT as re,ZU as jn,dU as vn,ZV as wn,ZW as An,ZX as Dn,Um as Un,c1 as Mn,c8 as Rn,c7 as _n,c2 as Tn,ZY as Bn,c5 as Zn,c4 as Vn,c6 as Nn,c3 as Fn}from"./zeni-epic-state-CGi26_dN.js";import{bT as On,z as v,K as L,a7 as ne,c3 as Ln,k as q,N as te,m as V,h as ye,W as Se,c4 as Gn,j as $n,T as be,c5 as Kn,ai as Hn,c6 as qn,c7 as Qn,aq as Jn,c8 as zn,p as Wn,d as Ie,c9 as Xn}from"./index-1u2aDJ3l.js";import{n as B}from"./mui-BP68m4Fu.js";import{u as xe}from"./useTaskManagerAccess-EuL6L5n0.js";import{U as Yn}from"./AccountMappingScreen-DSZj_uCQ.js";import{t as et,A as nt}from"./AddressScreen-BQYkT2m3.js";import N from"./NotFoundScreen-DcIIEjdb.js";import{g as tt}from"./analyticsHelper-C858uUp8.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-D3H22Ycs.js";import{C as st}from"./CompanyPassportScreen-lZWEIVDl.js";import{M as _}from"./MobileAppDrawer-CUkRGmov.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BfM5did4.js";import{q as le}from"./QBOConnectionScreen-CC1mgdSE.js";import{B as lt}from"./BillPayApprovalRoutes-DJXolFor.js";import{R as ct}from"./ReimbursementApprovalRoutes-DqdHGUab.js";import"./recharts-BDERfoBp.js";import"./analytics-HUGlc_YA.js";import"./plaid-D_c1UYI3.js";import"./dnd-CtBfGkHE.js";import"./stripe-cKAAJElX.js";import"./lottie-CqVjxmYG.js";import"./lexical-CpUvnOjl.js";import"./pdf-DVoBxypI.js";import"./utils-DrMX637r.js";import"./accountMappingHelper-DDpt4thU.js";import"./routePaths-DSGBDygY.js";import"./InboxNotificationsProvider-BLd671md.js";import"./empty-Bi7Yf941.js";import"./pdf-lib-CfwiSXQl.js";import"./index-CWRZ55RL.js";import"./url-D0vuH2sS.js";import"./index-BvIRHYdj.js";import"./decodeURIComponentSafe-BlS7R_TX.js";import"./ReimbursementApprovalRuleDetailScreen-DGkJ20Az.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="9d6eb4c0-f347-4efe-b586-3df0a8fc1097",e._sentryDebugIdIdentifier="sentry-dbid-9d6eb4c0-f347-4efe-b586-3df0a8fc1097")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as a}from"./liveblocks-BLPKVqHo.js";import{a as d}from"./sentry-BYwRJ99
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ut=
|
|
9
|
+
`,ut=H((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(X(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Ln),pt=()=>{const e=F(),l=K(),o=M(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>je(g))),{isApprovalRulesV3Enabled:S,isLoading:m}=On(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const b=L();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,S)))}),[t,u,m,S,c?.tenantId,o]);const E=g=>{n(g)};return b?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:b.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as a}from"./liveblocks-BLPKVqHo.js";import{a as d}from"./sentry-BYwRJ99
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,mt=
|
|
17
|
+
`,mt=H((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Te(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(Y(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Ve(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Ze(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Gn),ft=()=>{const e=F(),l=K(),o=M(),{tenantEmailDomain:i}=O(),r=L(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(V.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(V.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,S]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),b=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&Me(m.userRole),j=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,P=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,R=ye(m,t,s),D=Re(m,r?.loggedInUserRoleMap)&&R,{isCardsHidden:I}=Se(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(S(!0),o(_e(!1)))}),[h,o,p]);const T=A=>{u(A)};return b||j||E||D?a.jsxs(gt,{children:[a.jsx(_,{isAppContentDrawerOpen:c,handleDrawerToggle:T}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:E,isZeniAccountEnabled:j,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:P,onClickMenuIcon:()=>{T(!0)}})]}):a.jsx(N,{})},ht=B.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as a}from"./liveblocks-BLPKVqHo.js";import{a as d}from"./sentry-BYwRJ99
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=
|
|
25
|
+
`,Ct=H((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Fe(e,o),{uiState:t}=n,s=(X(i?.userRole??[])||r)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:be.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(Y(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(qe(n))},updateCardPaymentModalState:n=>{e(He({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(Ke(n,t,s))},handleFetchPaymentSources:()=>{e($())},resetCardPaymentViewState:()=>{e($e())},handleResetCardPaymentErrorStatuses:()=>{e(Ge())},onBillingAddressSave:n=>{e(Le(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Oe({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Kn),yt=()=>{const e=F(),l=K(),o=M(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((P=>w(P))),S=C((P=>P.cardPaymentViewState)),m=C((P=>P.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=$n(S.addCardPaymentSourceStatus.fetchState),b=S.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=L();d.useEffect((()=>{E!=null&&o(Ne(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o($()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&b==="Completed"&&o($())}),[p,b]);const j=P=>{n(P)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:j}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)},googleAPIKey:be.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},W="external_integrations",St=H((function(e){const l=ze(e,W);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,J("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const S="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(S)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(Ye(t,s,J(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(Xe(t,J("payments"),s))},onNotifyMe:s=>{q.trackIntegrationsNotifyMeClicked("Settings",s),e(We(W,s,r))}}}))(qn),bt=()=>{const e=Hn(),l=F(),o=M(),{tenantEmailDomain:i}=O(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),S=L(),m=X(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(Qe(W))}),[o]);const[p,b]=d.useState(!1);d.useEffect((()=>{p||(b(!0),o($()))}),[p,o]);const E=I=>{t(I)},g=C((I=>Je(I,u))),j=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return S?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(St,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D,plaidConnectionDetails:j})]}):a.jsx(ne,{fetchState:s})},It=B.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -38,7 +38,7 @@ import{j as a}from"./liveblocks-BLPKVqHo.js";import{a as d}from"./sentry-BYwRJ99
|
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
align-items: center;
|
|
40
40
|
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,Et=()=>{const e=M(),{tenantEmailDomain:l}=
|
|
41
|
+
`,Et=()=>{const e=M(),{tenantEmailDomain:l}=O(),[o,i]=d.useState(!1),r=C((p=>w(p))).companyId??v.getSignedInUserTenant(l)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=C((p=>an(p,n.userId))),s=C((p=>on(p,r,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:c}=s,u=p=>{i(p)},h=d.useCallback((p=>{e(ee("user_reimbursement_account",p))}),[]),S=d.useCallback((p=>{e(Y(p,r,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);d.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(sn(n.userId))}),[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(xt,{children:[a.jsx(_,{isAppContentDrawerOpen:o,handleDrawerToggle:u}),a.jsx(Qn,{plaidConnectionDetails:c,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:h,onEstablishConnectionClick:S,onClickMenuIcon:()=>{u(!0)}})]})},kt=B.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
height: 100%;
|
|
44
44
|
width: 100%;
|
|
@@ -46,4 +46,4 @@ import{j as a}from"./liveblocks-BLPKVqHo.js";import{a as d}from"./sentry-BYwRJ99
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ce=({appContent:e})=>{const l=M(),o=
|
|
49
|
+
`,ce=({appContent:e})=>{const l=M(),o=F(),i=K(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:S}=u(V.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(V.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=C((y=>rn(y))),E=fe(t),g=he(m,t),j=!g&&b,P=ye(t,S,m),{isCardsHidden:R}=Se(t?.tenantId),D=!P||R,{areTenantIdsInSync:I}=Jn();d.useEffect((()=>{I&&l(ln(c,j))}),[c,l,j,I]);const x=C((y=>cn(y,j))),T=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:T,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const Z=(function(ke,Pe){let Q=`/${ke}/settings/my_profile`;return Q=Q.concat(`/new/${Pe}`),Q})(s,y),Ee=Wn(i.state?.pathnameStackToGoBack,i.pathname);o(Z,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const Z={...x.myProfileLocalData,phone:y};l(oe({localData:Z})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,Z)=>{l(un(y,Z,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function Pt(){const e=M(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:S}=xe(u),[m,p]=d.useState(!1),b=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(Sn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(bn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),j=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const P=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e(G())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),R=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(Pn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(jn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),T=d.useMemo((()=>{if(S&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[S,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e(G())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e(G()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(_,{isAppContentDrawerOpen:m,handleDrawerToggle:b}),a.jsx(Xn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:j,onClickMenuIcon:()=>{b(!0)},signedInUser:u,onRefresh:P,resetUpdateStatus:R,taskNotifications:T,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((b=>Ce(b))),r=C((b=>w(b))),n=L(),t=Ie(),s=M(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(V.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),S=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s(G()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||S!==!0?Mn(r)?a.jsxs(z,{children:[Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Yn,{})}),_n(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(jt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Tn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Zn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Vn(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),Nn(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Fn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(bt,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),S&&a.jsx(k,{path:"notifications",element:a.jsx(Pt,{})}),a.jsx(k,{path:"*",element:a.jsx(N,{})})]}):a.jsx(z,{children:a.jsx(k,{path:"*",element:a.jsx(N,{})})}):null}function jt(e){return a.jsxs(z,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(N,{})}),a.jsx(k,{path:"*",element:a.jsx(N,{})})]})}export{da as default};
|