@zeniai/web-app-ui 5.0.77-dev → 5.0.78-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-BhkbfnzS.js +1 -0
- package/dist/assets/AddressScreen-BmR-OoZ_.js +9 -0
- package/dist/assets/{AiCfoScreen-DbYSFoNw.js → AiCfoScreen-C8ZpEKvV.js} +5 -5
- package/dist/assets/BillPayApprovalRoutes-CzEk_nhg.js +1 -0
- package/dist/assets/{BillPayRoutes-CFin72Sd.js → BillPayRoutes-BYOQqAtg.js} +28 -28
- package/dist/assets/BusinessVerificationPageScreen-DsFRoHnS.js +9 -0
- package/dist/assets/{ChargeCardRoutes-BqilxZnu.js → ChargeCardRoutes-UrbQPmqH.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-Btm8q2XT.js → CompanyPassportScreen-DfcahYi3.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-KRY6Oem5.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CtDlGb6t.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-ClmI94EA.js +23 -0
- package/dist/assets/{DashboardRoutes-Dr7E3H8N.js → DashboardRoutes-D6LkoAS1.js} +4 -4
- package/dist/assets/{DefaultTenantHome-BmA8DcRx.js → DefaultTenantHome-C_HBx_e-.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-loJ8GquO.js +18 -0
- package/dist/assets/{DrawerScreen-AH0ysY6V.js → DrawerScreen-sfY6PIZF.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DzARLOVe.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-BhbZS8a1.js → ExpenseAutomationRoutes-mHXp4ejt.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-BbijPpnJ.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-Cqm6jDxt.js +1 -0
- package/dist/assets/{MagicLinkRoutes-jZeMo5Ui.js → MagicLinkRoutes-DOskkrWK.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CRHf1Pq5.js +12 -0
- package/dist/assets/{MobileAppDrawer-CNxBiA0K.js → MobileAppDrawer-DrdSJdo1.js} +1 -1
- package/dist/assets/NotFoundScreen-C5GqrkuK.js +1 -0
- package/dist/assets/NotificationRoutes-2PbblZyO.js +1 -0
- package/dist/assets/OAuthConsentScreen-BJ1rRrOX.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C-wtMSOq.js +1 -0
- package/dist/assets/PeopleRoutes-DW6v38OQ.js +22 -0
- package/dist/assets/PerformanceRoutes-SuLEsbMN.js +1 -0
- package/dist/assets/{Preview-B7yw63qf.js → Preview-TxzQXr3i.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BRrDd8wr.js → QBOConnectionScreen-BCkDW1I6.js} +1 -1
- package/dist/assets/ReferralListScreen-DYfKAeQl.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-B6agiTbB.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtZbBICM.js → ReimbursementApprovalRuleDetailScreen-O71vUBoF.js} +1 -1
- package/dist/assets/ReimbursementRoutes-D5zdl8gM.js +68 -0
- package/dist/assets/ReportsRoutes-BDvJqZZF.js +1 -0
- package/dist/assets/RewardsRoutes-CrQQoiRC.js +1 -0
- package/dist/assets/ScreenRoutes-DCX1O3Md.js +2 -0
- package/dist/assets/{SettingsRoutes-Dr2cLQZf.js → SettingsRoutes-88kae7-O.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BMUAJOjI.js → SetupPagesScreen-Ccazxtke.js} +5 -5
- package/dist/assets/SignInScreen-mIfi177N.js +1 -0
- package/dist/assets/SignOutScreen-DIeOz12t.js +9 -0
- package/dist/assets/{TaskListScreen-DdoFZv0I.js → TaskListScreen-BfyHzekg.js} +2 -2
- package/dist/assets/TaskRoutes-Bmq0PDng.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CALv3lzc.js +1 -0
- package/dist/assets/{TransactionDetailScreen--PMkud8g.js → TransactionDetailScreen-DVUrpN27.js} +2 -2
- package/dist/assets/{TransactionListRoutes-quiJ_wNs.js → TransactionListRoutes-ZGPTqV4b.js} +1 -1
- package/dist/assets/TreasuryRoutes-mN-Tiy6z.js +37 -0
- package/dist/assets/{VendorsRoutes-DJYa05bm.js → VendorsRoutes-Cx_ts7OM.js} +28 -28
- package/dist/assets/WiseConfirmationScreen-BVKaZUB7.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CpYvVE1u.js → ZeniAccountRoutes-DLsDt2CE.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-z63ZBClm.js +9 -0
- package/dist/assets/{accountMappingHelper-D6x0RpVY.js → accountMappingHelper-DpGnVAea.js} +1 -1
- package/dist/assets/{analytics-CgRNtlDm.js → analytics-Dwe2jubl.js} +1 -1
- package/dist/assets/{analyticsHelper-DhD4YoYg.js → analyticsHelper-VfNEEHsS.js} +1 -1
- package/dist/assets/{core-uYqCzel8.js → core-XIdi9yav.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DCnYf30M.js → decodeURIComponentSafe-CqshbMyv.js} +1 -1
- package/dist/assets/{dnd-BSWou54V.js → dnd-C8_bqxJQ.js} +1 -1
- package/dist/assets/{empty-CKinwWZY.js → empty-CP3zMx39.js} +1 -1
- package/dist/assets/{empty-BFCAZWzA.js → empty-CwZgS-VN.js} +1 -1
- package/dist/assets/{emptyVideoElement-E29-Nor3.js → emptyVideoElement-BnCGoR33.js} +1 -1
- package/dist/assets/epic-Bd7YYQOZ.js +2 -0
- package/dist/assets/getLocaleForTenant-CJ_gALMc.js +1 -0
- package/dist/assets/{index-CeZ7L-BQ.js → index-BFHwjIZ6.js} +12640 -12668
- package/dist/assets/{index-8d_FSGLw.js → index-BGt9CQn-.js} +1 -1
- package/dist/assets/{index-BsLHs9Ab.js → index-BuT_Em2K.js} +1 -1
- package/dist/assets/{index-DWPRup5s.js → index-BwOJsH8g.js} +1 -1
- package/dist/assets/{index-Dl7Wgss6.js → index-C5MHMUJX.js} +1 -1
- package/dist/assets/{index-F3uqdkEv.js → index-CT8IgTpZ.js} +2 -2
- package/dist/assets/{index-DeBaxB_L.js → index-DZp35-bi.js} +1 -1
- package/dist/assets/{index-CxWCBC6O.js → index-hYoHMc0Z.js} +1 -1
- package/dist/assets/{lexical-DbCoEckm.js → lexical-L3dbahzM.js} +1 -1
- package/dist/assets/{liveblocks-CfCKAQeM.js → liveblocks-BTKJAzKw.js} +1 -1
- package/dist/assets/{lottie-Dc_IH0fS.js → lottie-B4nk2ufU.js} +1 -1
- package/dist/assets/{mui-CTbUXhla.js → mui-D-cfPqvW.js} +1 -1
- package/dist/assets/{pathToGoBack-Y7yporNq.js → pathToGoBack-CEbHtWH4.js} +1 -1
- package/dist/assets/{pdf-lib-CNgiyR2K.js → pdf-lib-DNtyO1c9.js} +1 -1
- package/dist/assets/{pdf-O9N1jd2N.js → pdf-vaniLLX-.js} +3 -3
- package/dist/assets/{plaid-Bio3MiLm.js → plaid-_FJLoBl-.js} +1 -1
- package/dist/assets/{pusher--jGYOMJ8.js → pusher-DxLcqjAa.js} +1 -1
- package/dist/assets/{react-BYbqG6ZW.js → react-AWyiT1J_.js} +1 -1
- package/dist/assets/{react-D9RjhqSo.js → react-B6KkVX_w.js} +1 -1
- package/dist/assets/{react-BaqpebX1.js → react-BDdVRErx.js} +1 -1
- package/dist/assets/{react-KPWjcD7D.js → react-CZ7HzwCB.js} +1 -1
- package/dist/assets/{react-kWXzqyUF.js → react-DW2dmFYn.js} +1 -1
- package/dist/assets/{react-DqfAPb7w.js → react-PsEdw6eg.js} +1 -1
- package/dist/assets/{recharts-BUFoogHS.js → recharts-Db9qTggV.js} +1 -1
- package/dist/assets/{routePaths-vUmlDccC.js → routePaths-DYhINZNz.js} +1 -1
- package/dist/assets/{sentry-131ydzJg.js → sentry-BidZRtdZ.js} +1 -1
- package/dist/assets/{url-BRm_J7V6.js → url-B1tfhvRN.js} +1 -1
- package/dist/assets/{url-DlWfObPw.js → url-CX5VwIV_.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DvEC_Rfy.js +1 -0
- package/dist/assets/{useDeviceId-CBU-vDdN.js → useDeviceId-rJ9quQG0.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js → useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-cRvS9PIT.js → useInitialThreadRequest-1r6joKrr.js} +1 -1
- package/dist/assets/{utils-BkkIzijx.js → utils-DDxx6oUt.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BS7S2wn5.js → withTransactionSidePanel-_oROnP2L.js} +3 -3
- package/dist/assets/{zeni-epic-state-BmAPZlsC.js → zeni-epic-state-znLEvSss.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Clm_yxMo.js +0 -1
- package/dist/assets/AddressScreen-ByYpZmgQ.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-CX2-tB9Z.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-C-d6e6xJ.js +0 -9
- package/dist/assets/ConnectionAuthScreen-B3NEPge1.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BP98cwHW.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-Cx10OoO6.js +0 -23
- package/dist/assets/DomesticWireDetailScreen-CzSUYZwn.js +0 -18
- package/dist/assets/EntityDetailRoutes-DVGIBaLz.js +0 -1
- package/dist/assets/FeaturePreviewScreen-DPxCLrsp.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BvqLZI0N.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-PJSTdmbN.js +0 -12
- package/dist/assets/NotFoundScreen-CsEhUGfR.js +0 -1
- package/dist/assets/NotificationRoutes-9IJgVYJ1.js +0 -1
- package/dist/assets/OAuthConsentScreen-1ZY7Ls_k.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-8SC0GJZW.js +0 -1
- package/dist/assets/PeopleRoutes-DQ3Y767r.js +0 -22
- package/dist/assets/PerformanceRoutes-BZb18QS3.js +0 -1
- package/dist/assets/ReferralListScreen-DWAGGjua.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DSgEFO1H.js +0 -1
- package/dist/assets/ReimbursementRoutes-Iavqnxfs.js +0 -68
- package/dist/assets/ReportsRoutes-CjoIF9EB.js +0 -1
- package/dist/assets/RewardsRoutes-CTiffYxG.js +0 -1
- package/dist/assets/ScreenRoutes-zUtLUY3P.js +0 -2
- package/dist/assets/SignInScreen-BO8V1s1B.js +0 -1
- package/dist/assets/SignOutScreen-B1QfOGXO.js +0 -9
- package/dist/assets/TaskRoutes-DR1BBqXQ.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DLkTkOiV.js +0 -1
- package/dist/assets/TreasuryRoutes-BVcC0j-i.js +0 -37
- package/dist/assets/WiseConfirmationScreen-CTaGbwbB.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-C8feQjoH.js +0 -9
- package/dist/assets/epic-dPIWYPli.js +0 -2
- package/dist/assets/getLocaleForTenant-CFQN8jbL.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-CfCKAQeM.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as Ie,o as G}from"./core-uYqCzel8.js";import{eQ as L,fa as S,JG as we,jC as Z,JH as X,qd as O,jq as Re,iu as Te,tJ as K,qi as Ae,bv as Oe,JI as Fe,bn as ke,uI as De,JJ as Ee,JK as je,tB as Pe,JL as Y,JM as Le,JN as Me,JO as Je,JP as Be,JQ as I,JR as F,JS as k,JT as H,JU as D,JV as E,dE as Ue,uo as ve,uc as q,ud as N,uu as Ve,uh as $,uA as xe,JW as ze,JX as Ge,JY as Ye,JZ as He,J_ as qe,eW as Ne,eU as $e}from"./zeni-epic-state-BmAPZlsC.js";import{R as Qe,T as We,Z as Ze,y as ee,S as j,z as ae,U as Xe,c as Ke,a as ea,A as aa,d as P,f as sa,q as se,W as ta,X as oa,Y as na}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import ra from"./NotFoundScreen-CsEhUGfR.js";import{F as ia}from"./FeaturePreviewScreen-DPxCLrsp.js";import{a as _}from"./sentry-131ydzJg.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{u as fa}from"./useInitialThreadRequest-cRvS9PIT.js";import{t as Q,a as W}from"./routePaths-vUmlDccC.js";import{M as ma}from"./MobileAppDrawer-CNxBiA0K.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="2ce673f1-141d-4ad7-803e-06d1f899a822",e._sentryDebugIdIdentifier="sentry-dbid-2ce673f1-141d-4ad7-803e-06d1f899a822")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(Ye()),e(He()),e(qe())},ha=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=S(e),r=Fe(u);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,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Z(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(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(ve({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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Je({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Ze(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:J}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=d(n=>L(n)),oe=B.company?.companyInfo.firstMonthOfFY??1,ne=fa(J?B?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Z(n)),T=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),A=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(O(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(K());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,U,T]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Oe(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:J,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Ie,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CfCKAQeM.js";import{y as j,z as w,aK as y,A as I,d as p,f as F,cF as L,S as P}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import l from"./NotFoundScreen-CsEhUGfR.js";import{a as f}from"./sentry-131ydzJg.js";import{h as A,g as b,j as T,u as V,k as Q,n as R,o as u}from"./core-uYqCzel8.js";import{eQ as U,Qh as C,N6 as z,Qi as k,u3 as Y,f0 as G,Qj as K,u1 as O}from"./zeni-epic-state-BmAPZlsC.js";import{R as x}from"./ReferralListScreen-DWAGGjua.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import"./MobileAppDrawer-CNxBiA0K.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]="ff287741-b2ea-437c-b3e3-27962bf276a9",e._sentryDebugIdIdentifier="sentry-dbid-ff287741-b2ea-437c-b3e3-27962bf276a9")}catch{}})();const q=Q(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=A(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>U(i)),c=T(),v=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),D=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),_=z(S);f.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(q,{navigate:c,location:v,currentTenant:r,companyName:N,userName:D,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:_.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(R,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-Dr7E3H8N.js","assets/sentry-131ydzJg.js","assets/core-uYqCzel8.js","assets/zeni-epic-state-BmAPZlsC.js","assets/index-CeZ7L-BQ.js","assets/mui-CTbUXhla.js","assets/analytics-CgRNtlDm.js","assets/utils-BkkIzijx.js","assets/withTransactionSidePanel-BS7S2wn5.js","assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js","assets/useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js","assets/TransactionDetailScreen--PMkud8g.js","assets/decodeURIComponentSafe-DCnYf30M.js","assets/routePaths-vUmlDccC.js","assets/NotFoundScreen-CsEhUGfR.js","assets/analyticsHelper-DhD4YoYg.js","assets/CompanyPassportScreen-Btm8q2XT.js","assets/MobileAppDrawer-CNxBiA0K.js","assets/FeaturePreviewScreen-DPxCLrsp.js","assets/ReferralListScreen-DWAGGjua.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CFin72Sd.js","assets/AddressScreen-ByYpZmgQ.js","assets/DomesticWireDetailScreen-CzSUYZwn.js","assets/useInitialThreadRequest-cRvS9PIT.js","assets/DrawerScreen-AH0ysY6V.js","assets/SetupPagesScreen-BMUAJOjI.js","assets/BusinessVerificationPageScreen-C-d6e6xJ.js","assets/BillPayApprovalRoutes-CX2-tB9Z.js","assets/ReimbursementApprovalRuleDetailScreen-CtZbBICM.js","assets/getLocaleForTenant-CFQN8jbL.js","assets/ReimbursementRoutes-Iavqnxfs.js","assets/ReimbursementApprovalRoutes-DSgEFO1H.js","assets/TransactionListRoutes-quiJ_wNs.js","assets/ZeniAccountStatementScreen-C8feQjoH.js","assets/SettingsRoutes-Dr2cLQZf.js","assets/accountMappingHelper-D6x0RpVY.js","assets/QBOConnectionScreen-BRrDd8wr.js","assets/empty-CKinwWZY.js","assets/index-DeBaxB_L.js","assets/url-BRm_J7V6.js","assets/index-CxWCBC6O.js","assets/ReportsRoutes-CjoIF9EB.js","assets/ChargeCardRoutes-BqilxZnu.js","assets/PeopleRoutes-DQ3Y767r.js","assets/ExpenseAutomationRoutes-BhbZS8a1.js","assets/TreasuryRoutes-BVcC0j-i.js","assets/VendorsRoutes-DJYa05bm.js","assets/pathToGoBack-Y7yporNq.js","assets/ZeniAccountRoutes-CpYvVE1u.js","assets/AddressRoutes-Clm_yxMo.js","assets/PandLWithForecastRoutes-8SC0GJZW.js","assets/CustomerOnboardingRoutes-Cx10OoO6.js","assets/TransactionDetailRoutes-DLkTkOiV.js","assets/EntityDetailRoutes-DVGIBaLz.js","assets/NotificationRoutes-9IJgVYJ1.js","assets/PerformanceRoutes-BZb18QS3.js","assets/RewardsRoutes-CTiffYxG.js","assets/TaskRoutes-DR1BBqXQ.js","assets/TaskListScreen-DdoFZv0I.js","assets/AiCfoScreen-DbYSFoNw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as Hs,fd as Rs,bF as Ds,bs,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-BmAPZlsC.js";import{j as e}from"./liveblocks-CfCKAQeM.js";import{a as v}from"./sentry-131ydzJg.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-uYqCzel8.js";import{m as ws,u as Gs,z as R,y as zs,a as $s,M as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import{f as je}from"./analyticsHelper-DhD4YoYg.js";import{t as qs}from"./getLocaleForTenant-CFQN8jbL.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="678d69e8-81cc-474a-9ccc-d975a94edf1a",i._sentryDebugIdIdentifier="sentry-dbid-678d69e8-81cc-474a-9ccc-d975a94edf1a")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-Dr7E3H8N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-CFin72Sd.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-Iavqnxfs.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-quiJ_wNs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-Dr2cLQZf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-CjoIF9EB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BqilxZnu.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DQ3Y767r.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BhbZS8a1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BVcC0j-i.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DJYa05bm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CpYvVE1u.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-CjoIF9EB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-Clm_yxMo.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DQ3Y767r.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-8SC0GJZW.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-Cx10OoO6.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DJYa05bm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DLkTkOiV.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-DVGIBaLz.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-Dr7E3H8N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-CFin72Sd.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-Dr2cLQZf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-Iavqnxfs.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CpYvVE1u.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BVcC0j-i.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-quiJ_wNs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BqilxZnu.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-9IJgVYJ1.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-BZb18QS3.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-BhbZS8a1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-CTiffYxG.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),gn=l(()=>n(()=>import("./TaskRoutes-DR1BBqXQ.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),xn=l(()=>n(()=>import("./AiCfoScreen-DbYSFoNw.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-CsEhUGfR.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),In=l(()=>n(()=>import("./TaskListScreen-DdoFZv0I.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),q=os(h),z=Ms(),[N,be]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ws(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&b!=null){const a=K.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=R.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,b,h,f,U))},[b,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):A==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Rs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Ds(E?.loggedInUserRoleMap),qe=oe&&bs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-CfCKAQeM.js";import{a as u,b as T,q as A}from"./sentry-131ydzJg.js";import{h as D,j as z,g as d,u as J,N as j,k as M}from"./core-uYqCzel8.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,F as N,g as V,v as $,h as v}from"./index-CeZ7L-BQ.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-BmAPZlsC.js";import"./mui-CTbUXhla.js";import{u as ee}from"./useDeviceId-CBU-vDdN.js";import{f as te}from"./analyticsHelper-DhD4YoYg.js";import{t as ne}from"./getLocaleForTenant-CFQN8jbL.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="5c586f82-c3e8-48e7-83b5-68432973b1c8",t._sentryDebugIdIdentifier="sentry-dbid-5c586f82-c3e8-48e7-83b5-68432973b1c8")}catch{}})();const ie=M(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),c=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:k,accountLocked:U,accountUnlockTime:h}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),L=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>q(e)),I=d(e=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[k.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as n}from"./sentry-131ydzJg.js";import{h as c,u as m,j as p,N as g}from"./core-uYqCzel8.js";import{z as d,x as y,t as h,d as f,f as b}from"./index-CeZ7L-BQ.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-BmAPZlsC.js";import{n as w}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="0d4e10f8-6e4d-4060-b559-a82d79d922a8",e._sentryDebugIdIdentifier="sentry-dbid-0d4e10f8-6e4d-4060-b559-a82d79d922a8")}catch{}})();function $(){const e=c(),t=m(),i=p(),a=n.useRef(!1),l=d.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(u){console.error("Error during sign out:",u)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{$ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-CfCKAQeM.js";import se from"./NotFoundScreen-CsEhUGfR.js";import{a as c}from"./sentry-131ydzJg.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-uYqCzel8.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-BmAPZlsC.js";import{z as C,cG as De,s as xe,y as ye,S as b,p as Y,q as w,A as je,d as z,f as we,cH as ve,h as A,aq as Re}from"./index-CeZ7L-BQ.js";import{n as Be}from"./mui-CTbUXhla.js";import{u as Pe}from"./useInitialThreadRequest-cRvS9PIT.js";import{M as Ue}from"./MobileAppDrawer-CNxBiA0K.js";import Le from"./TaskListScreen-DdoFZv0I.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.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]="16d0f71a-5cb1-4ef9-9150-5e701deda351",e._sentryDebugIdIdentifier="sentry-dbid-16d0f71a-5cb1-4ef9-9150-5e701deda351")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let V,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,v=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(j,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CfCKAQeM.js";import i from"./NotFoundScreen-CsEhUGfR.js";import{T as r}from"./TransactionDetailScreen--PMkud8g.js";import"./sentry-131ydzJg.js";import{n as a,o}from"./core-uYqCzel8.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import"./decodeURIComponentSafe-DCnYf30M.js";import"./routePaths-vUmlDccC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CfCKAQeM.js";import{j as B,u as L,h as P,l as O,g as f,N as F,k as M,n as xe,o as k}from"./core-uYqCzel8.js";import{cm as V,eQ as v,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Te,Ny as Ie,Nz as se,NR as Ce,BU as ke,sJ as je,NE as Ae,DY as be,NB as re,cP as Z,wP as oe,eU as Ee,eW as De,OM as ve,ON as Ue,Dt as Fe,OO as Be,Du as Le,DD as Pe,bv as Re,bF as Ne,cx as Oe,bG as Me,cl as Ve,fd as ze,bs as _e,Jd as Ge,ck as $e}from"./zeni-epic-state-BmAPZlsC.js";import{c as z,an as We,z as b,A as _,d as j,b$ as He,c0 as Ze,c1 as W,Z as q,m as qe,U as Ke,y as ie,S as D,G as Je,x as Qe,c2 as Ye,aq as K,q as Xe,c3 as et,p as J,c4 as tt,B as Y,c5 as at,a6 as nt}from"./index-CeZ7L-BQ.js";import{D as st,n as N,S as rt}from"./mui-CTbUXhla.js";import ot from"./NotFoundScreen-CsEhUGfR.js";import{S as X}from"./SetupPagesScreen-BMUAJOjI.js";import{a as d}from"./sentry-131ydzJg.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{M as ce}from"./MobileAppDrawer-CNxBiA0K.js";import{F as lt}from"./FeaturePreviewScreen-DPxCLrsp.js";import{a as ee}from"./analyticsHelper-DhD4YoYg.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./routePaths-vUmlDccC.js";import"./BusinessVerificationPageScreen-C-d6e6xJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="cfe97a2e-901a-4523-9de9-a04381975f0a",t._sentryDebugIdIdentifier="sentry-dbid-cfe97a2e-901a-4523-9de9-a04381975f0a")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(C=>v(C)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,w=b.getSignedInUser(),S=f(C=>R(C,h)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),U=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||U!=="Not-Started"||h==null||(l(!0),n(H()))},[u,U,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(F,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>v(x)),w=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>Ie(x)),T=f(x=>R(x,w));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,yt={overlayWidth:new Je(100,100,48)},gt=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=ht(s):c==="statements"?i=St(s):c==="taxLetter"?i=xt(s):c==="settings"&&(i=wt(s));const y=Xe(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(ve({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Ye);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=B(),p=P(),r=q(),m=qe(),s=f(A=>v(A)),{tenantEmailDomain:c}=O(),i=s.companyId??b.getSignedInUserTenant(c)?.companyId,[y,I]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),w=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=z(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),U=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ke();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(I(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=it({mobileExploreReferrer:"Treasury"});ct({isDataReady:l==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(D.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(D.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(D.isTreasuryCommentingEnabled),ge=Ee(s),he=De(me,s);if(ge===!0&&he!==!0)return e.jsx(lt,{});if(w){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(_,{analytics:j,onLoad:()=>{}}):null,e.jsx(st,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Tt,{onClick:Se=>Se.stopPropagation(),children:[t===!0?e.jsx(mt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(dt,{}):null]})}),e.jsxs(ft,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(gt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(F,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&U?e.jsx(F,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,St=t=>`/${t}/treasury/statements`,xt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Tt=N(rt)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,It=N.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function Ct(){const t=B(),a=P(),n=q(),o=L(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Fe(!1)))},[r,s.fetchState,a]);const c=b.getSignedInUser(),i=f(l=>v(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(It,{windowSize:n,children:e.jsx(et,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const kt=N.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function jt(){const t=B(),a=q(),n=L(),o=P(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Le(!1)))},[r,s.fetchState,o]);const c=b.getSignedInUser(),i=f(l=>v(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:a,children:e.jsx(tt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=M(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(at),bt=()=>{const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>v(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=b.getSignedInUserTenant(o)?.companyId??m.companyId,I=b.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const g=z(),h=V(g?.loggedInUserRoleMap),w=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(F,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||w)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(At,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=N.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function Yt(){const t=L(),a=f(E=>v(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(D.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=z(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Oe(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(D.isDepositAccountsFeatureEnabled),u=I&&!s&&Ve(r?.loggedInUserRoleMap),l=a.company!=null&&ze(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(D.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=n(D.isDebitCardFeatureEnabled),S=nt(a,h,w)&&!s&&_e(r?.loggedInUserRoleMap),T=Ge(r?.loggedInUserRoleMap),x=$e(r?.loggedInUserRoleMap),U=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(xe,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(bt,{})}),e.jsx(k,{path:"statements",element:e.jsx(Ct,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(jt,{})}),U?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ot,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(F,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(F,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{Yt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-CfCKAQeM.js";import{a as f}from"./sentry-131ydzJg.js";import{q as u,h,g as b,N as y}from"./core-uYqCzel8.js";import{Jw as I,eR as w,zA as x}from"./zeni-epic-state-BmAPZlsC.js";import{z as l,x as j,I as S,J as D}from"./index-CeZ7L-BQ.js";import{n as g}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="66ea4a52-feb8-401f-b169-3be5b1c2ddea",e._sentryDebugIdIdentifier="sentry-dbid-66ea4a52-feb8-401f-b169-3be5b1c2ddea")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=g(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-CfCKAQeM.js";import{a as u}from"./sentry-131ydzJg.js";import{j as x,h as j,u as $,l as v,g as p}from"./core-uYqCzel8.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-BmAPZlsC.js";import{Z as z,aq as g,m as D,z as E,x as P,b_ as _,p as N}from"./index-CeZ7L-BQ.js";import{n as U}from"./mui-CTbUXhla.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7",e._sentryDebugIdIdentifier="sentry-dbid-bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7")}catch{}})();const G=U.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function Q(){const e=x(),n=j(),d=z(),f=$();let{accountId:a}=v(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),y=D();u.useEffect(()=>{m||(b(!0),n(B(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),h=()=>{const t=N(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),c=p(t=>L(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(_,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:l})})}export{Q as Z};
|