@zeniai/web-app-ui 5.3.84-prod → 5.3.85-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-Da9lNgTh.js → AccountMappingScreen-VlkHI3xY.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-Cme87N6F.js → ActualMatchingMatchDetailScreen-D2w0402Y.js} +1 -1
- package/dist/assets/AddressRoutes-ChEkAt9U.js +1 -0
- package/dist/assets/AddressScreen-Ddq_CqzP.js +9 -0
- package/dist/assets/{AiCfoScreen-CmeUs6M1.js → AiCfoScreen-DZMyDWi7.js} +1 -1
- package/dist/assets/{AppDrawer-BvSnr3LW.js → AppDrawer-DgKtqckJ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-C7ELb8IL.js → BillPayApprovalRoutes-BNUUByv0.js} +1 -1
- package/dist/assets/{BillPayRoutes-2a_IZnwa.js → BillPayRoutes-C6ApjpPQ.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BMy0l7mH.js → BusinessVerificationPageScreen-Bt2MC2-R.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-CqoF74R8.js → CardsAiCfoScreen-rZP4bSgz.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BRLKWsqh.js → ChargeCardRoutes-B-GJ-Bri.js} +7 -7
- package/dist/assets/CompanyPassportScreen-Bzj5vwX-.js +1 -0
- package/dist/assets/ConnectionAuthScreen-BYY41VkQ.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-D2U3ohrN.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-C-xGwLOY.js → CustomerOnboardingRoutes-DKZXnZ66.js} +3 -3
- package/dist/assets/{DashboardRoutes-B204TMlK.js → DashboardRoutes-DG0LnHD5.js} +1 -1
- package/dist/assets/{DefaultTenantHome-MEymJr7l.js → DefaultTenantHome-BfkBFl-w.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DHQbDcNG.js +18 -0
- package/dist/assets/{DrawerScreen-D-EbmxsO.js → DrawerScreen-FFX6peDV.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DJQtBHmg.js → EntityDetailRoutes-DfxLoaAu.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DndYYpK4.js → ExpenseAutomationRoutes-BvSgjc7b.js} +7 -7
- package/dist/assets/FeaturePreviewScreen-BKEnTrse.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DUPKhb1k.js → HubSpotOAuthCallbackScreen-mZJfTUzG.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-BPTkk56Z.js → InboxNotificationsProvider-DTx76-7a.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BegsYwP5.js → InvoicingRoutes-7dd3ECkW.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DGnkgyIy.js → MagicLinkRoutes-BePEhm0H.js} +21 -21
- package/dist/assets/MagicLinkSignInScreen-DdBVqdZ6.js +12 -0
- package/dist/assets/MobileAppDrawer-B-LrFFrs.js +1 -0
- package/dist/assets/NotFoundScreen-D7YKuY7u.js +1 -0
- package/dist/assets/{NotificationRoutes-yv8wAOZf.js → NotificationRoutes-DtJvpFLz.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BiUYup5g.js → OAuthConsentScreen-BlNpiX2k.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CdbkRZNP.js → PandLWithForecastRoutes-g9ft1qXA.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-exmyEd7O.js → PaymentLinkScreen-9YlFVhJT.js} +5 -5
- package/dist/assets/{PeopleRoutes-CIibObVn.js → PeopleRoutes-CAteVI0g.js} +3 -3
- package/dist/assets/PerformanceRoutes-CGryxKcT.js +1 -0
- package/dist/assets/{Preview-CNq1BOL1.js → Preview-DCDdGY49.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DCCiwBvr.js → QBOConnectionScreen-DRJ9l1ZN.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-f7b2MUNz.js → ReimbursementApprovalRoutes-CJHSclit.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-ZIBaIx9-.js → ReimbursementApprovalRuleDetailScreen-BSbU5iHI.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cx2mA5oI.js → ReimbursementRoutes-CwwSdr2n.js} +6 -6
- package/dist/assets/{ReportsRoutes-D_y8Fj_V.js → ReportsRoutes-C2Jb5zyi.js} +1 -1
- package/dist/assets/RewardsRoutes-BWyKBIYZ.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DCKvd2Rw.js → ScheduleDetailsPrepaidExpensesScreen-DX-YxATr.js} +1 -1
- package/dist/assets/ScreenRoutes-DN7T70Gm.js +2 -0
- package/dist/assets/{SettingsRoutes-DJySqZaP.js → SettingsRoutes-Bfs7XUiH.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DIAlz55b.js → SetupPagesScreen-C1bkOzJr.js} +1 -1
- package/dist/assets/SignInScreen-BKWATPtE.js +1 -0
- package/dist/assets/SignOutScreen-TJtfwdGX.js +9 -0
- package/dist/assets/{TaskListScreen-CDkR9GBn.js → TaskListScreen-DvcC1URP.js} +2 -2
- package/dist/assets/TaskRoutes-DORm-aw2.js +9 -0
- package/dist/assets/TransactionDetailRoutes-8PpDu4Rs.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Db4tleaR.js → TransactionDetailScreen-1ibKq26Q.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Bou1SXH0.js → TransactionListRoutes-DLxmG7Ta.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CAU50PuC.js → TreasuryRoutes-CLEbVEMG.js} +1 -1
- package/dist/assets/{VendorsRoutes-B0jpUEsr.js → VendorsRoutes-DB9yoziH.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C7rNKySw.js → WiseConfirmationScreen-UrofaKPf.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-rvEU6aIV.js → ZeniAccountRoutes-YvPOvTvu.js} +9 -9
- package/dist/assets/{ZeniAccountStatementScreen-Bx3EGjPX.js → ZeniAccountStatementScreen-25uaLk4M.js} +1 -1
- package/dist/assets/{accountMappingHelper-CwsbX9Ea.js → accountMappingHelper-C4sKhzhY.js} +1 -1
- package/dist/assets/{analytics-BXM45nWq.js → analytics-DgOwHMv9.js} +1 -1
- package/dist/assets/{analyticsHelper-Cx6i8svJ.js → analyticsHelper-DeEJJP1T.js} +1 -1
- package/dist/assets/{core-C81VRbeP.js → core-CKdWu7C4.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CrALq_f_.js → decodeURIComponentSafe-De-pfuHA.js} +1 -1
- package/dist/assets/{dnd-BdXAZjIP.js → dnd-GMAnxo5D.js} +1 -1
- package/dist/assets/{empty-CCGHlGh0.js → empty-CCBmgRCN.js} +1 -1
- package/dist/assets/{empty-CatVTIO7.js → empty-DZ4e7m7E.js} +1 -1
- package/dist/assets/{emptyVideoElement-B0T9fl5M.js → emptyVideoElement-CjciNHh4.js} +1 -1
- package/dist/assets/{epic-D-qeSG0v.js → epic-DaFddCaZ.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-Crya3Dv_.js → expenseAutomationHelper-QjlEGiQT.js} +1 -1
- package/dist/assets/{getLocaleForTenant-nCPleYdt.js → getLocaleForTenant-BykJ4K_E.js} +1 -1
- package/dist/assets/{index--a-B3LAp.js → index-8yj575lF.js} +1 -1
- package/dist/assets/{index-BMGzjwLG.js → index-B-KqmJJm.js} +1 -1
- package/dist/assets/{index-CF1zoe-f.js → index-BZQtvi2u.js} +1 -1
- package/dist/assets/{index-CUVRvOQe.js → index-BunveEom.js} +1 -1
- package/dist/assets/{index-DE2jmi6G.js → index-D6kwssUw.js} +1 -1
- package/dist/assets/{index-B42hg9O2.js → index-DUEtWU0V.js} +2 -2
- package/dist/assets/{index-DBuws41Q.js → index-DpMage3e.js} +13860 -13846
- package/dist/assets/{index-Ba_1Hknz.js → index-ph4OiQVe.js} +1 -1
- package/dist/assets/{lexical-DcaHthb5.js → lexical-Bbndsy_i.js} +1 -1
- package/dist/assets/{liveblocks-ElMRERc9.js → liveblocks-CiRsIXv9.js} +1 -1
- package/dist/assets/{lottie-B6h9ACvw.js → lottie-Bk0D-wP9.js} +1 -1
- package/dist/assets/{mui-DoMnHjRT.js → mui-uBLtQnjV.js} +1 -1
- package/dist/assets/{pathToGoBack-CArS3X2C.js → pathToGoBack-B8jPctZc.js} +1 -1
- package/dist/assets/{pdf-DFrRjL7N.js → pdf-C6vaCCoi.js} +3 -3
- package/dist/assets/{pdf-lib-NwhHokxt.js → pdf-lib-xbfYrsmJ.js} +1 -1
- package/dist/assets/{plaid-4usmEsnw.js → plaid-BNZ1yRTN.js} +1 -1
- package/dist/assets/{pusher-B9pbrwG6.js → pusher-BxkxzHUj.js} +1 -1
- package/dist/assets/{react-DMYtvh_5.js → react-ABdSIYHq.js} +1 -1
- package/dist/assets/{react-BlNQJp9p.js → react-DDSLhBDZ.js} +1 -1
- package/dist/assets/{react-Rj0qpQ1t.js → react-DJjTf4Q5.js} +1 -1
- package/dist/assets/{react-B76u7RNU.js → react-jCicCcT0.js} +1 -1
- package/dist/assets/{react-BzqY0M4o.js → react-nPQI4P7d.js} +1 -1
- package/dist/assets/{react-DPm5G7V9.js → react-siQwgdfv.js} +1 -1
- package/dist/assets/{recharts-DdTjw53U.js → recharts-CnFcvsiB.js} +1 -1
- package/dist/assets/{routePaths-CfxWxmyX.js → routePaths-Ld6pXFbh.js} +1 -1
- package/dist/assets/{sentry-B8nCx7v9.js → sentry-DyyEkQvE.js} +1 -1
- package/dist/assets/{stripSplatSuffix-YfV8OHUS.js → stripSplatSuffix-CLkpHspw.js} +1 -1
- package/dist/assets/{url-BjLh-KZK.js → url-BCdZ1CbH.js} +1 -1
- package/dist/assets/{url-CyEEo-3q.js → url-C7o4oPZz.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-DVb3aFLv.js → useActualMatchingMatchDetail-Dbi0I2OZ.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CdPJGZky.js → useAiCfoDashboardSuggestedQuestionsChips-WvX1r_Wk.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CAip1ZNF.js → useAskAiCfoHostNavButtonProps-D35qbi_p.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BdQgr28p.js → useChargeCardPusherEvents-CvQP33nJ.js} +1 -1
- package/dist/assets/{useDeviceId-BHwBnu_B.js → useDeviceId-YV51-SzN.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DLH0Ue8L.js → useEmailConnectResultRefresh-BnC-Kc6A.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Df2EXypG.js → useInitialThreadRequest-D5CxaA02.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BpFV6J8j.js → useTaskManagerAccess-Bvl8DVEY.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-iP182dSE.js → useTaskManagerPusherEvents-Dec5VxRR.js} +1 -1
- package/dist/assets/{utils-CSS89dSa.js → utils-RyVg9L9D.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BP_l6766.js → withTransactionSidePanel-BRJU_73M.js} +1 -1
- package/dist/assets/{zeni-epic-state-DklVhJVB.js → zeni-epic-state-BuhfcA02.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-B_mWuw-F.js +0 -1
- package/dist/assets/AddressScreen-DFztK6Ig.js +0 -9
- package/dist/assets/CompanyPassportScreen-B6j95Qyx.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DP7_3Lnx.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BpjWikGb.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-CBzt-Nae.js +0 -18
- package/dist/assets/FeaturePreviewScreen-Cu8urpMS.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-Cb3CO89l.js +0 -12
- package/dist/assets/MobileAppDrawer-DtO8FQWm.js +0 -1
- package/dist/assets/NotFoundScreen-DHMPApWS.js +0 -1
- package/dist/assets/PerformanceRoutes-DRZwF4Om.js +0 -1
- package/dist/assets/RewardsRoutes-CDc0bjMu.js +0 -1
- package/dist/assets/ScreenRoutes-CU67IyZN.js +0 -2
- package/dist/assets/SignInScreen-BODRPfBX.js +0 -1
- package/dist/assets/SignOutScreen-Bi7O_J9b.js +0 -9
- package/dist/assets/TaskRoutes-CQdL9o7q.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Cjl1b082.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ElMRERc9.js";import{h as H,g as q,u as K,i as Q,j as g,N as U,l as X,n as Me,o as M}from"./core-C81VRbeP.js";import{fI as N,uh as Z,lj as p,eI as ee,Sw as Ae,br as me,a0a as Ce,m3 as te,WG as ae,a0b as pe,a0c as Be,bF as k,Ss as Se,a0d as Le,a0e as fe,a0f as Fe,Sv as he,a0g as Oe,a0h as Te,a0i as Ge,a0j as ge,a0k as ze,a0l as we,a0m as De,TI as $e}from"./zeni-epic-state-DklVhJVB.js";import{W as ne,A as ce,j as L,G as Ie,db as oe,p as R,a2 as se,ao as Re,D as _e}from"./index-DBuws41Q.js";import"./mui-DoMnHjRT.js";import{a as y}from"./sentry-B8nCx7v9.js";import{w as ie}from"./withTransactionSidePanel-BP_l6766.js";import{p as re,c as de}from"./routePaths-CfxWxmyX.js";import{B as Ve}from"./utils-CSS89dSa.js";import{d as E}from"./decodeURIComponentSafe-CrALq_f_.js";import{Z as Je}from"./ZeniAccountStatementScreen-Bx3EGjPX.js";import"./recharts-DdTjw53U.js";import"./analytics-BXM45nWq.js";import"./plaid-4usmEsnw.js";import"./dnd-BdXAZjIP.js";import"./stripe-cKAAJElX.js";import"./lottie-B6h9ACvw.js";import"./lexical-DcaHthb5.js";import"./pdf-DFrRjL7N.js";import"./useAskAiCfoHostNavButtonProps-CAip1ZNF.js";import"./TransactionDetailScreen-Db4tleaR.js";import"./useInitialThreadRequest-Df2EXypG.js";import"./expenseAutomationHelper-Crya3Dv_.js";import"./stripSplatSuffix-YfV8OHUS.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="49b1916e-37e3-4e69-9233-9a94044b0b38",a._sentryDebugIdIdentifier="sentry-dbid-49b1916e-37e3-4e69-9233-9a94044b0b38")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ve(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=X((function(a,e){const t=Ce(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=He(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=H(),t=q(),n=K(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=Ne(o),f="month",T=g((l=>N(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>Z(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=We(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let C=u;return u!=null&&j!=null&&(C={...u,period:j}),c==null||C==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:C,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Ne=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},He=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ke=X((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((r=>N(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Z(r)))&&m;let i;const z=Xe(S,h,I,A,f,T,x);if(z){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=Ze(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return z&&B!=null?s.jsx(Ke,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:Ye(_.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=X((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((r=>N(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Z(r)))&&m;let i;const z=at(S,h,I,A,f,T,x);if(z){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return z&&B!=null?s.jsx(et,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:be(_.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=X((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=E(d??""),h=E(Y??""),I=E(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>Ge(D.transactionListState,h,S))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((D=>N(D))),C=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,b,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&j!=null&&(i={...m,period:j});const{useFeatureGate:z}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[je,Ee]=ue.split("?"),W=new URLSearchParams(Ee??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:_}=z(ce.isProjectsTransactionsEnabled),r=g((D=>Z(D)))&&_,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:C,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(U,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Ct(){const a=q().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>N(n))).tenantId],t=_e();return s.jsxs(Me,{children:[s.jsx(M,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(M,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(M,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(M,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Ct as default};
|
|
1
|
+
import{j as s}from"./liveblocks-CiRsIXv9.js";import{h as H,g as q,u as K,i as Q,j as g,N as U,l as X,n as Me,o as M}from"./core-CKdWu7C4.js";import{fI as N,uh as Z,lj as p,eI as ee,Sw as Ae,br as me,a0a as Ce,m3 as te,WG as ae,a0b as pe,a0c as Be,bF as k,Ss as Se,a0d as Le,a0e as fe,a0f as Fe,Sv as he,a0g as Oe,a0h as Te,a0i as Ge,a0j as ge,a0k as ze,a0l as we,a0m as De,TI as $e}from"./zeni-epic-state-BuhfcA02.js";import{W as ne,A as ce,j as L,G as Ie,db as oe,p as R,a2 as se,ao as Re,e as _e}from"./index-DpMage3e.js";import"./mui-uBLtQnjV.js";import{a as y}from"./sentry-DyyEkQvE.js";import{w as ie}from"./withTransactionSidePanel-BRJU_73M.js";import{p as re,c as de}from"./routePaths-Ld6pXFbh.js";import{B as Ve}from"./utils-RyVg9L9D.js";import{d as E}from"./decodeURIComponentSafe-De-pfuHA.js";import{Z as Je}from"./ZeniAccountStatementScreen-25uaLk4M.js";import"./recharts-CnFcvsiB.js";import"./analytics-DgOwHMv9.js";import"./plaid-BNZ1yRTN.js";import"./dnd-GMAnxo5D.js";import"./stripe-cKAAJElX.js";import"./lottie-Bk0D-wP9.js";import"./lexical-Bbndsy_i.js";import"./pdf-C6vaCCoi.js";import"./useAskAiCfoHostNavButtonProps-D35qbi_p.js";import"./TransactionDetailScreen-1ibKq26Q.js";import"./useInitialThreadRequest-D5CxaA02.js";import"./expenseAutomationHelper-QjlEGiQT.js";import"./stripSplatSuffix-CLkpHspw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="d938e4f0-1b2d-458a-a7ba-610c2d1072ae",a._sentryDebugIdIdentifier="sentry-dbid-d938e4f0-1b2d-458a-a7ba-610c2d1072ae")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ve(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=X((function(a,e){const t=Ce(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=He(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=H(),t=q(),n=K(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=Ne(o),f="month",T=g((l=>N(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>Z(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=We(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let C=u;return u!=null&&j!=null&&(C={...u,period:j}),c==null||C==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:C,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Ne=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},He=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ke=X((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((r=>N(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Z(r)))&&m;let i;const z=Xe(S,h,I,A,f,T,x);if(z){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=Ze(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return z&&B!=null?s.jsx(Ke,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:Ye(_.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=X((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((r=>N(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Z(r)))&&m;let i;const z=at(S,h,I,A,f,T,x);if(z){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return z&&B!=null?s.jsx(et,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:be(_.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=X((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=H(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=E(d??""),h=E(Y??""),I=E(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>Ge(D.transactionListState,h,S))),[P,O]=y.useState(!1),[j,G]=y.useState(void 0),u=g((D=>N(D))),C=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,b,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&j!=null&&(i={...m,period:j});const{useFeatureGate:z}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[je,Ee]=ue.split("?"),W=new URLSearchParams(Ee??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:_}=z(ce.isProjectsTransactionsEnabled),r=g((D=>Z(D)))&&_,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:C,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(U,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Ct(){const a=q().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>N(n))).tenantId],t=_e();return s.jsxs(Me,{children:[s.jsx(M,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(M,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(M,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(M,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(M,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Ct as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-CiRsIXv9.js";import{h as L,g as U,u as B,i as M,j as y,N as D,l as V,n as xe,o as k}from"./core-CKdWu7C4.js";import{cw as N,fI as E,ZK as F,OT as ae,OA as G,OB as ne,ZM as Ie,OW as Te,ZI as we,ZJ as se,ZY as Ce,MX as ke,Cx as je,ZO as Ae,P1 as be,ZL as oe,de as H,H2 as re,d$ as ve,e0 as Ee,a07 as De,a08 as Le,OC as Ue,a09 as Be,OD as Fe,OM as Pe,bq as Oe,bK as Re,cH as Me,bL as Ve,cv as Ne,bu as Ze,UI as _e,cu as $e}from"./zeni-epic-state-BuhfcA02.js";import{V as Z,h as ze,z as v,a6 as _,j as A,d4 as Ge,d5 as He,d6 as z,$ as q,ao as qe,aq as Ke,W as ie,A as R,a9 as We,a5 as Je,d7 as Xe,ac as K,p as Ye,d8 as Qe,a2 as W,d9 as et,ag as tt,Z as Y,da as at,g as nt}from"./index-DpMage3e.js";import{u as st,D as ot,n as O,S as rt}from"./mui-uBLtQnjV.js";import it from"./NotFoundScreen-D7YKuY7u.js";import{S as Q}from"./SetupPagesScreen-C1bkOzJr.js";import{a as p}from"./sentry-DyyEkQvE.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-D35qbi_p.js";import{u as lt}from"./useInitialThreadRequest-D5CxaA02.js";import{M as ce}from"./MobileAppDrawer-B-LrFFrs.js";import{F as ut}from"./FeaturePreviewScreen-BKEnTrse.js";import{a as ee}from"./analyticsHelper-DeEJJP1T.js";import"./recharts-CnFcvsiB.js";import"./analytics-DgOwHMv9.js";import"./plaid-BNZ1yRTN.js";import"./dnd-GMAnxo5D.js";import"./stripe-cKAAJElX.js";import"./lottie-Bk0D-wP9.js";import"./lexical-Bbndsy_i.js";import"./pdf-C6vaCCoi.js";import"./utils-RyVg9L9D.js";import"./BusinessVerificationPageScreen-Bt2MC2-R.js";import"./routePaths-Ld6pXFbh.js";import"./InboxNotificationsProvider-DTx76-7a.js";import"./useTaskManagerAccess-Bvl8DVEY.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]="630b7d76-5046-4a9e-9c54-59ab191240f9",t._sentryDebugIdIdentifier="sentry-dbid-630b7d76-5046-4a9e-9c54-59ab191240f9")}catch{}})();const dt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:F(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(Ge);function pt(){const t=L(),a=U(),n=B(),{tenantEmailDomain:r}=M(),i=Z(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=ze(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>F(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(G()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:F(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{z(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{z(a.analytics,"confirm",o,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"))}}}))(He),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=M(),i=B(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>F(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(G()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{z(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-CiRsIXv9.js";import{a as u}from"./sentry-DyyEkQvE.js";import{h as M,u as G,i as z,j as f,l as $,g as q,n as We,o as P,N as U}from"./core-CKdWu7C4.js";import{Wb as gt,Wc as Ze,R_ as et,Wd as vt,fI as L,h2 as ge,We as Tt,cF as xt,Wf as bt,F$ as yt,Wg as wt,Wh as oe,Wi as te,Wj as ve,Tz as ue,TA as ke,Gf as pe,Ty as he,G2 as tt,FB as Pe,Wk as It,TB as Y,m3 as me,Wl as je,Fv as Ct,Wm as Dt,Wn as Et,Wo as _e,Wp as Ve,Wq as Ae,Wr as Re,G9 as Te,Ws as nt,FS as at,Wt as Ft,Wu as kt,Wv as Pt,Ww as jt,Wx as _t,Wy as Vt,Wz as At,WA as Rt,CJ as Lt,CR as Ut,CK as Bt,SG as we,WB as Ot,WC as Wt,lj as Ie,br as Mt,WD as $t,WE as Gt,n1 as Nt,na as zt,SF as Ce,bF as Me,WF as ot,Sg as st,WG as Yt,WH as Jt,WI as Kt,nc as qt,WJ as $e,WK as Ge,WL as Ne,WM as ze,WN as Xt,n8 as Ht,WO as Qt,nb as Zt,WP as en,WQ as it,S$ as rt,mr as tn,WR as nn,WS as De,WT as dt,SZ as lt,IJ as an,WU as on,WV as sn,mL as ct,WW as rn,WX as dn,Tb as ln,vn as cn,WY as ut,WZ as Ye,T8 as Ee,W_ as Je,W$ as un,Td as pn,X0 as hn,X1 as mn,X2 as fn,X3 as Sn,X4 as gn,vq as vn,X5 as Tn,TC as xn,Va as bn,SS as Fe,ie as yn,Vc as wn,Vb as In,ic as Cn,X6 as Dn,X7 as En,IO as Fn,X8 as kn,X9 as Pn,Xa as jn,Xb as _n,mv as Vn,bn as An,e0 as Rn,d$ as Ln}from"./zeni-epic-state-BuhfcA02.js";import{$ as ne,a9 as Le,W as X,A as W,z as R,a5 as Un,aK as Bn,j,U as Ue,X as xe,at as ee,aq as se,aL as On,aM as pt,ao as Wn,a6 as Se,aN as Mn,p as K,V as $n,G as ht,aO as Gn,ac as mt,a2 as Nn,h as Ke,aP as zn,E as J,a7 as Yn,ad as ft,ae as Jn,aQ as Kn,aR as qn,N as Be,aS as Xn,aT as Hn,a1 as Qn,aU as Zn,aV as ea}from"./index-DpMage3e.js";import{u as ta,D as na,n as B,S as St}from"./mui-uBLtQnjV.js";import{t as aa,A as oa}from"./AddressScreen-Ddq_CqzP.js";import fe from"./NotFoundScreen-D7YKuY7u.js";import{F as sa}from"./FeaturePreviewScreen-BKEnTrse.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-DX-YxATr.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-D35qbi_p.js";import{M as re}from"./MobileAppDrawer-B-LrFFrs.js";import{v as Oe,c as ua,d as pa}from"./routePaths-Ld6pXFbh.js";import{D as ha}from"./DrawerScreen-FFX6peDV.js";import{a as ma,m as fa}from"./accountMappingHelper-C4sKhzhY.js";import"./recharts-CnFcvsiB.js";import"./analytics-DgOwHMv9.js";import"./plaid-BNZ1yRTN.js";import"./dnd-GMAnxo5D.js";import"./stripe-cKAAJElX.js";import"./lottie-Bk0D-wP9.js";import"./lexical-Bbndsy_i.js";import"./pdf-C6vaCCoi.js";import"./utils-RyVg9L9D.js";import"./pathToGoBack-B8jPctZc.js";import"./InboxNotificationsProvider-DTx76-7a.js";import"./useTaskManagerAccess-Bvl8DVEY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="044410f5-5900-49f0-9ecc-57fbf1980af6",e._sentryDebugIdIdentifier="sentry-dbid-044410f5-5900-49f0-9ecc-57fbf1980af6")}catch{}})();const Sa={drawerLeftMargin:new Le(0,0,100,200)},ga=$((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=L(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Ue.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=X(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>L(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Un,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
package/dist/assets/{WiseConfirmationScreen-C7rNKySw.js → WiseConfirmationScreen-UrofaKPf.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-CiRsIXv9.js";import{a as f}from"./sentry-DyyEkQvE.js";import{t as u,u as h,j as b,N as y}from"./core-CKdWu7C4.js";import{U_ as I,gl as w,JX as j}from"./zeni-epic-state-BuhfcA02.js";import{z as l,a5 as x,ad as S,ae as _}from"./index-DpMage3e.js";import{n as c}from"./mui-uBLtQnjV.js";import"./recharts-CnFcvsiB.js";import"./analytics-DgOwHMv9.js";import"./plaid-BNZ1yRTN.js";import"./dnd-GMAnxo5D.js";import"./stripe-cKAAJElX.js";import"./lottie-Bk0D-wP9.js";import"./lexical-Bbndsy_i.js";import"./pdf-C6vaCCoi.js";import"./utils-RyVg9L9D.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]="4e444eca-7b9d-4b49-a9fb-c9d158cde1e6",e._sentryDebugIdIdentifier="sentry-dbid-4e444eca-7b9d-4b49-a9fb-c9d158cde1e6")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=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||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-CiRsIXv9.js";import{u as _,h as ne,g as W,i as N,j as k,l as ae,N as J,n as Re,o as x}from"./core-CKdWu7C4.js";import{$O as Ue,LP as Fe,$P as $e,fI as R,H0 as _e,$Q as An,cv as ee,cw as ze,GW as wn,$R as Dn,$S as kn,GZ as In,H4 as me,GT as Sn,GQ as Pn,Zl as ce,$T as bn,Pn as vn,Xh as jn,Pp as En,mM as Pe,$U as Tn,v2 as Me,uS as Ve,mD as Ze,mG as be,Xi as ve,Xj as Bn,$V as On,mF as Ln,n0 as Rn,mu as Un,kU as Fn,kT as $n,$W as _n,$X as ge,P4 as zn,$Y as Mn,$Z as Vn,ZB as fe,$_ as je,$$ as Zn,PA as Hn,ZY as Gn,MX as He,Cx as Ge,a00 as Wn,Px as Nn,a01 as We,db as ye,PE as Ne,d$ as Xe,e0 as xe,PC as Xn,MR as Yn,Pu as qn,a02 as Ye,a03 as qe,P6 as Ke,Pg as Ee,a04 as Kn,ZP as Qn,PF as Jn,bq as ea,bK as na,cH as aa,bL as ta,bu as oa,UI as sa}from"./zeni-epic-state-BuhfcA02.js";import{V as te,W as Z,A as V,z as b,at as Ce,a5 as le,cV as ra,$ as z,a9 as X,a2 as Qe,h as ia,n as Te,j as L,cW as ca,ac as Ae,cX as la,a6 as de,cY as da,N as we,bg as G,cZ as ua,ao as pa,aq as Je,c_ as Be,c$ as ma,p as ie,d0 as ga,ag as ha,d1 as fa,d2 as ya,g as xa,E as Ca}from"./index-DpMage3e.js";import{u as U,n as F,D as Y,S as q}from"./mui-uBLtQnjV.js";import Q from"./NotFoundScreen-D7YKuY7u.js";import{S as Oe}from"./SetupPagesScreen-C1bkOzJr.js";import{F as en}from"./FeaturePreviewScreen-BKEnTrse.js";import{a as g}from"./sentry-DyyEkQvE.js";import{M as ue}from"./MobileAppDrawer-B-LrFFrs.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-DHQbDcNG.js";import{A as ka}from"./AddressScreen-Ddq_CqzP.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-D35qbi_p.js";import{Z as Ia}from"./ZeniAccountStatementScreen-25uaLk4M.js";import"./recharts-CnFcvsiB.js";import"./analytics-DgOwHMv9.js";import"./plaid-BNZ1yRTN.js";import"./dnd-GMAnxo5D.js";import"./stripe-cKAAJElX.js";import"./lottie-Bk0D-wP9.js";import"./lexical-Bbndsy_i.js";import"./pdf-C6vaCCoi.js";import"./utils-RyVg9L9D.js";import"./BusinessVerificationPageScreen-Bt2MC2-R.js";import"./routePaths-Ld6pXFbh.js";import"./analyticsHelper-DeEJJP1T.js";import"./InboxNotificationsProvider-DTx76-7a.js";import"./useTaskManagerAccess-Bvl8DVEY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="5754378d-8987-4abc-8926-5233265f3fa8",n._sentryDebugIdIdentifier="sentry-dbid-5754378d-8987-4abc-8926-5233265f3fa8")}catch{}})();const Sa=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,15 +6,15 @@ import{j as e}from"./liveblocks-ElMRERc9.js";import{u as _,h as ne,g as W,i as N
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${n=>n.theme.colors.grey4};
|
|
9
|
-
`;function Le({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=_(),p=ne(),
|
|
9
|
+
`;function Le({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=_(),p=ne(),h=W(),{ruleId:y,tenantEmailDomain:s}=N(),l=te(),{useFeatureGate:f}=Z(),m=k((u=>Ue(u))),P=k((u=>Fe(u.depositAccountState,u.depositAccountListState))),D=k((u=>$e(u))),w=k((u=>R(u))),{isFeatureEnabled:I}=f(V.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(_e(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||ze(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!h.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,M)=>{c(In(u,M))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new X(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(q)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,ja={overlayWidth:new X(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=_(),t=U(),o=z();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ja.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=F(
|
|
13
|
+
`,ja={overlayWidth:new X(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=_(),t=U(),o=z();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ja.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=F(q)`
|
|
14
14
|
display: flex;
|
|
15
15
|
min-height: 100%;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
`,Ba={overlayWidth:new X(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=F(
|
|
17
|
+
`,Ba={overlayWidth:new X(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=_(),o=U(),i=z();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=F(q)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
@@ -26,15 +26,15 @@ import{j as e}from"./liveblocks-ElMRERc9.js";import{u as _,h as ne,g as W,i as N
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${n=>n.theme.colors.grey4};
|
|
29
|
-
`,Ua=ae((function(n,a){const r=R(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n($n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ze({files:t}))},onDeleteFile:t=>{n(Ve(t))},onEditFileName:(t,o)=>{n(Me(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=_(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=N(),
|
|
29
|
+
`,Ua=ae((function(n,a){const r=R(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n($n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ze({files:t}))},onDeleteFile:t=>{n(Ve(t))},onEditFileName:(t,o)=>{n(Me(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=_(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=N(),h=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>R(u))),l=k((u=>bn(u))),f=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=Qe(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(Ra,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:f,isExpressPayPage:!0}),e.jsx(Ua,{navigate:t,location:o,companyId:m,accountId:j,analytics:L,currentTenant:s,vendorId:f,roleMap:h?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Fa={overlayWidth:new X(100,100,58)},$a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=U(),d=z(),c=k((s=>$e(s))),p=k((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},y={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(Y,{anchor:"right",open:r,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(_a,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},_a=F(q)`
|
|
30
30
|
display: flex;
|
|
31
31
|
min-height: 100%;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
`,za={overlayWidth:new X(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=z(),o=_(),i=k((s=>R(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const
|
|
33
|
+
`,za={overlayWidth:new X(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=z(),o=_(),i=k((s=>R(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const h=k((s=>_n(s))),y={analytics:L,checkDeposit:h,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Mn(s))},updateFilesEntity:s=>{o(Ze({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o(Ve(s))},onEditFileName:(s,l)=>{o(Me(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(zn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(Y,{anchor:"right",open:n,PaperProps:{style:{width:za.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Ma,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Ma=F(q)`
|
|
34
34
|
display: flex;
|
|
35
35
|
min-height: 100%;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
`,Va={overlayWidth:new X(100,100,58)},Za=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Nn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(He(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>Vn(C))),d=k((C=>R(C))),c=U(),p=z(),
|
|
37
|
+
`,Va={overlayWidth:new X(100,100,58)},Za=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Nn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(He(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>Vn(C))),d=k((C=>R(C))),c=U(),p=z(),h=_(),{accountId:y}=N(),[s,l]=g.useState("achTransfer"),[f,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=Z(),{configValue:D}=P(G.zeniAccountsConfig),w=fe(D),I=()=>{t(!0),h(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(Y,{onClose:()=>{(s==="achTransfer"&&f===!1||s==="achTransfer"&&f&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ha,{onClick:C=>C.stopPropagation(),children:e.jsx(Za,{analytics:L,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Hn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{h(Zn(C))},onAnotherTransferClick:()=>{m(!1),h(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:f,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Ha=F(q)`
|
|
38
38
|
display: flex;
|
|
39
39
|
min-height: 100%;
|
|
40
40
|
flex-direction: column;
|
|
@@ -46,7 +46,7 @@ import{j as e}from"./liveblocks-ElMRERc9.js";import{u as _,h as ne,g as W,i as N
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${n=>n.theme.colors.grey4};
|
|
49
|
-
`,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:
|
|
49
|
+
`,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const f=Na(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(Ne(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let f="page-not-found";s==="sendMoney"&&(f=cn(y)),s==="payBill"?f=on(t,p,h):s==="transfer"?(f=sn(y),l!=null&&n(Ye(l))):s==="checkDeposit"&&(f=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(qn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ge("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,f)=>{n(Yn(s,l,"zeni_accounts","external_account",f))},onEstablishConnectionClick:s=>{n(He(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Xn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=W(),t=ne(),o=_(),i=z(),{tenantEmailDomain:d}=N(),{useDynamicConfig:c,useFeatureGate:p}=Z(),h=U(),{configValue:y}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p(V.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(V.isAutoTransferRuleEnabled),f=fe(y),m=k(($=>R($))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(G.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k(($=>We($))),B=S.fetchState,u=k(($=>Ue($))),M=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),H=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,K=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(Ne(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&M==="Not-Started"&&P&&(E(!0),o(_e(!0)))}),[A,M,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=$=>{gn($)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn}=nn({mobileExploreReferrer:"Checking Accounts"});Je({isDataReady:B==="Completed"});const yn=Xe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:L,onLoad:$=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})($)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Ga,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:L,maxInsuredAmount:f.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn})]})]}):H&&K?e.jsx(J,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!H&&ln?e.jsx(J,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Na=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,Xa=F.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
width: 100%;
|
|
52
52
|
flex: 1 1 auto;
|
|
@@ -54,4 +54,4 @@ import{j as e}from"./liveblocks-ElMRERc9.js";import{u as _,h as ne,g as W,i as N
|
|
|
54
54
|
align-items: center;
|
|
55
55
|
min-height: 100vh;
|
|
56
56
|
background-color: ${n=>n.theme.colors.grey4};
|
|
57
|
-
`,Ya=ae((function(n,a){const{currentTenant:r}=a,t=
|
|
57
|
+
`,Ya=ae((function(n,a){const{currentTenant:r}=a,t=qe(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=cn(d):c==="payBill"?h=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=sn(d,i),p!=null&&n(Ye(p))):c==="checkDeposit"?(h=rn(d,i),p!=null&&n(Kn(p))):c==="accountStatement"&&(h=Ka(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=qa(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Ke(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=W(),o=ne(),i=_(),d=z(),{tenantEmailDomain:c,accountId:p}=N(),{useDynamicConfig:h}=Z(),{useFeatureGate:y}=Z(),{isFeatureEnabled:s}=y(V.isDebitCardFeatureEnabled),l=k((K=>R(K))),{configValue:f}=h(G.expressPayConfig),m=f.is_enable_all_tenants===!0||f.tenant_ids!=null&&f.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((K=>qe(K,p??""))),M=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Je({isDataReady:M==="Completed"}),g.useEffect((()=>{A||(i(Ke(p??"",!1)),E(!0))}),[A,i,M]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const H=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx($a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:H,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:H,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:H,isCheckDepositDrawerOpen:j}):null,e.jsx(Xa,{windowSize:d,children:e.jsx(Ya,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const qa=(n,a)=>`/${n}/checking/${a}/account-info`,Ka=(n,a)=>`/${n}/checking/${a}/statements`,Qa=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Qn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(Jn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Ja=()=>{const n=ne(),a=W(),{tenantEmailDomain:r}=N(),{useDynamicConfig:t}=Z(),o=ha(),i=U(),[d,c]=g.useState(!1),[p,h]=g.useState(!1),y=k((A=>R(A))),{configValue:s}=t(G.zeniAccountsConfig),l=fe(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const f=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(J,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=Qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(fa,{showConfetti:p}),e.jsx(de,{analytics:L,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Qa,{analytics:L,navigate:n,companyId:f,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=W(),a=k((S=>R(S))),r=U(),{useFeatureGate:t,useDynamicConfig:o}=Z(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t(V.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(V.isDebitCardFeatureEnabled),l=Xe(a),f=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(G.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t(V.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||ze(i?.loggedInUserRoleMap);return e.jsxs(Re,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Le,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Le,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(Q,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(Q,{})}),e.jsx(x,{path:"promo",element:e.jsx(Ja,{})}),l&&!f?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(he,{})}),e.jsx(x,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(Q,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(Q,{})})]}):h&&d?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(J,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Re,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(Q,{})})]})}export{jt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-CiRsIXv9.js";import{a as m}from"./sentry-DyyEkQvE.js";import{h as x,u as T,g as $,i as j,j as p}from"./core-CKdWu7C4.js";import{TI as s,TH as v,a05 as B,fI as C,a06 as z}from"./zeni-epic-state-BuhfcA02.js";import{$ as D,ac as g,z as E,a5 as L,d3 as P,a2 as N}from"./index-DpMage3e.js";import{u as U,n as _}from"./mui-uBLtQnjV.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]="7ee6dedc-8bd1-4b05-a7b5-4f3569cb5a46",e._sentryDebugIdIdentifier="sentry-dbid-7ee6dedc-8bd1-4b05-a7b5-4f3569cb5a46")}catch{}})();const G=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-DyyEkQvE.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
|