@zeniai/web-app-ui 5.2.2-dev → 5.2.3-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DDXG_kNK.js +1 -0
- package/dist/assets/{AddressScreen-CUr-HVcT.js → AddressScreen-BtOzCXFh.js} +2 -2
- package/dist/assets/{AiCfoScreen-CQ5-XgG8.js → AiCfoScreen-uWZbUYJU.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-D2_kNfaY.js → BillPayApprovalRoutes-DBNwOrc9.js} +1 -1
- package/dist/assets/{BillPayRoutes-COEOJVsM.js → BillPayRoutes-CZg3tLma.js} +17 -17
- package/dist/assets/BusinessVerificationPageScreen-BJO3N4aI.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-HxTonb4Z.js → CardsAiCfoScreen-BaHcD5bd.js} +3 -3
- package/dist/assets/{ChargeCardRoutes-Br_JifOo.js → ChargeCardRoutes-BDr7Wpp2.js} +10 -10
- package/dist/assets/CompanyPassportScreen-CgMOUldv.js +1 -0
- package/dist/assets/ConnectionAuthScreen-CIELK18J.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C1MiVKfW.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D7xgi9kE.js → CustomerOnboardingRoutes-szs5YaFT.js} +4 -4
- package/dist/assets/{DashboardRoutes-CrUjulzU.js → DashboardRoutes-CqEqTG-q.js} +4 -4
- package/dist/assets/{DefaultTenantHome-CQVq15dz.js → DefaultTenantHome-B3it7aUC.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-D6ldO-v5.js +18 -0
- package/dist/assets/{DrawerScreen-BWm1l0_Z.js → DrawerScreen-BZIHG-iJ.js} +1 -1
- package/dist/assets/EntityDetailRoutes-Bq0acXd0.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CY3gwyyO.js → ExpenseAutomationRoutes-DTr3_gWW.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-BPUW_5KC.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-PL_f01P7.js +1 -0
- package/dist/assets/{MagicLinkRoutes-DQ1ug8CF.js → MagicLinkRoutes-DuFsZ2Eq.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-DbD5ghXu.js +12 -0
- package/dist/assets/MobileAppDrawer-DUA8Lay7.js +1 -0
- package/dist/assets/NotFoundScreen-B314Xa6t.js +1 -0
- package/dist/assets/NotificationRoutes-CDcyYyhL.js +1 -0
- package/dist/assets/OAuthConsentScreen-O2iLZgF8.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DHyD--lG.js +1 -0
- package/dist/assets/PeopleRoutes-DFw_evkY.js +22 -0
- package/dist/assets/PerformanceRoutes-BUjcMitb.js +1 -0
- package/dist/assets/{Preview-ChMTg4zf.js → Preview-DmA_5jAt.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CmRiNFSq.js → QBOConnectionScreen-RdiPTNMo.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CMiVs8Po.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Be3YasZE.js → ReimbursementApprovalRuleDetailScreen-B2zgMKIa.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BcC0c-hC.js → ReimbursementRoutes-BoKZcV1C.js} +10 -10
- package/dist/assets/{ReportsRoutes-Do7TO9Xv.js → ReportsRoutes-DbWvQfgf.js} +1 -1
- package/dist/assets/RewardsRoutes-B-e311Ed.js +1 -0
- package/dist/assets/ScreenRoutes-DmFUCsMU.js +2 -0
- package/dist/assets/SettingsRoutes-CQXKJAna.js +57 -0
- package/dist/assets/{SetupPagesScreen-Dvy2GpFH.js → SetupPagesScreen-BZtlpfQh.js} +5 -5
- package/dist/assets/{SignInScreen-BZWZX1Q0.js → SignInScreen-EBAhC-wy.js} +1 -1
- package/dist/assets/SignOutScreen-Bcc_zMXg.js +9 -0
- package/dist/assets/{TaskListScreen-CPjplYNX.js → TaskListScreen-CenYjOPZ.js} +2 -2
- package/dist/assets/TaskRoutes-Cyyv5CFi.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-BQtZsJD1.js → TransactionDetailRoutes-Xm9FzfXs.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-B1AYJUjQ.js → TransactionDetailScreen-SXa23sv8.js} +2 -2
- package/dist/assets/{TransactionListRoutes-De3qcM42.js → TransactionListRoutes-gIKSQcT7.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C1F9Ijug.js → TreasuryRoutes-DKrjcHSF.js} +6 -6
- package/dist/assets/{VendorsRoutes-XJ9cWDA2.js → VendorsRoutes-DkVc55j_.js} +23 -23
- package/dist/assets/WiseConfirmationScreen-DbekQU5I.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BXPbqBZ6.js → ZeniAccountRoutes-mC4kRmgc.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-BtAb3Raq.js +9 -0
- package/dist/assets/{accountMappingHelper-BXTm4qLL.js → accountMappingHelper-J0OcQc2L.js} +1 -1
- package/dist/assets/{analytics-B1ozuY-_.js → analytics-Ci054ctJ.js} +1 -1
- package/dist/assets/analyticsHelper-0Z_ii5dt.js +1 -0
- package/dist/assets/{core-jHXRcmGr.js → core-DXwLSsqn.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-C8Ut439h.js → decodeURIComponentSafe-BbzvGEmo.js} +1 -1
- package/dist/assets/{dnd-DXsHzzkY.js → dnd-BFL9IlQe.js} +1 -1
- package/dist/assets/{empty-CT_SeA8A.js → empty-Cv3ER6tQ.js} +1 -1
- package/dist/assets/{empty-DkofjAEy.js → empty-DpUFxs_n.js} +1 -1
- package/dist/assets/{emptyVideoElement-xWUlB5cO.js → emptyVideoElement-D04Keje3.js} +1 -1
- package/dist/assets/{epic-BU3yGtpS.js → epic-fjG6tcBj.js} +2 -2
- package/dist/assets/getLocaleForTenant-YGwofgWv.js +1 -0
- package/dist/assets/{index-Dd8kzaST.js → index-61HgEKPh.js} +1 -1
- package/dist/assets/{index-bO5KWXDm.js → index-B0pSShvk.js} +1 -1
- package/dist/assets/{index-D3N1b9aQ.js → index-BxpV0MpM.js} +13891 -13899
- package/dist/assets/{index-Cz79PJvB.js → index-CVcXqlHF.js} +1 -1
- package/dist/assets/{index-BsfTwJVJ.js → index-CVs7DNpe.js} +2 -2
- package/dist/assets/{index-BaVUy8OL.js → index-Cg02-3bW.js} +1 -1
- package/dist/assets/{index-CVfL0TVn.js → index-DGTgYWnK.js} +1 -1
- package/dist/assets/{index-gdhkfqne.js → index-e9nNUNV2.js} +1 -1
- package/dist/assets/{lexical-BsEGFMKX.js → lexical-t8hl9adA.js} +1 -1
- package/dist/assets/{liveblocks-Cl_SAGXq.js → liveblocks-DIKy4lot.js} +1 -1
- package/dist/assets/{lottie-BvP-9pT9.js → lottie-DAe41SWX.js} +1 -1
- package/dist/assets/{mui-DT0mOTYO.js → mui-BPWJk-fl.js} +2 -2
- package/dist/assets/{pathToGoBack-DeIlb7In.js → pathToGoBack-6O-km18d.js} +1 -1
- package/dist/assets/{pdf-CgzfzxbY.js → pdf-CG1NUThf.js} +3 -3
- package/dist/assets/{pdf-lib-BFqwhQQP.js → pdf-lib-Ko4-CUFO.js} +1 -1
- package/dist/assets/{plaid-NlhYlsbZ.js → plaid-CgXOv8Rh.js} +1 -1
- package/dist/assets/{pusher-Q2OMJpwL.js → pusher-_T7D1pQS.js} +1 -1
- package/dist/assets/{react-BXjQIhaM.js → react-BHrI4XX9.js} +1 -1
- package/dist/assets/{react-DyPd6pWl.js → react-CVvf4qEx.js} +1 -1
- package/dist/assets/{react-CzT5_e98.js → react-Cp9hwg2n.js} +1 -1
- package/dist/assets/{react-3JBqx4v7.js → react-DGBs1odx.js} +1 -1
- package/dist/assets/{react-CbTW5azc.js → react-k5dCLAFT.js} +1 -1
- package/dist/assets/{react-C69jv4Ir.js → react-uMnEgX8u.js} +1 -1
- package/dist/assets/{recharts-qvF3Dod3.js → recharts-BKU02zoL.js} +1 -1
- package/dist/assets/{routePaths-m79Ycpnf.js → routePaths-BZ65TmUh.js} +1 -1
- package/dist/assets/{sentry-4tqT1r6y.js → sentry-Dy6CjI9o.js} +1 -1
- package/dist/assets/{url-yIFPVih_.js → url-DHOGOqHo.js} +1 -1
- package/dist/assets/{url-CXugcAfw.js → url-QgpJHG1D.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-UffvQ0vC.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CaQ8KV1j.js +1 -0
- package/dist/assets/useCashManagementBanner-m4TLytI4.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-CTk-yEyL.js → useChargeCardPusherEvents-D6iq2dOY.js} +1 -1
- package/dist/assets/{useDeviceId-DYiky9LJ.js → useDeviceId-k_nSwj7f.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-B9Wz5ZE4.js → useEmailConnectResultRefresh-Csb_ew9X.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DE7N6h-n.js → useInitialThreadRequest-BNKJrNID.js} +1 -1
- package/dist/assets/{utils-Dc4uXotD.js → utils-BfVxqb_k.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C-SPdXRH.js → withTransactionSidePanel-Do9-2jkM.js} +1 -1
- package/dist/assets/{zeni-epic-state-BER7XwD9.js → zeni-epic-state-Cehmp_zm.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-BpuOCrFB.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-BwKYUVXz.js +0 -9
- package/dist/assets/CompanyPassportScreen-D5p8YGqx.js +0 -1
- package/dist/assets/ConnectionAuthScreen-C7C9oP-O.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DHYr81WM.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-mk_MQEQb.js +0 -18
- package/dist/assets/EntityDetailRoutes-B8mgxcsD.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C0EZ8JBW.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BwGxeepQ.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-tDhHVTnP.js +0 -12
- package/dist/assets/MobileAppDrawer-DJ3VpNqR.js +0 -1
- package/dist/assets/NotFoundScreen-CamJ30ZO.js +0 -1
- package/dist/assets/NotificationRoutes-DK8GwbT3.js +0 -1
- package/dist/assets/OAuthConsentScreen-Bk2mnH8v.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BTkp9Nfx.js +0 -1
- package/dist/assets/PeopleRoutes-BqJR3HeE.js +0 -22
- package/dist/assets/PerformanceRoutes-y59oCr7_.js +0 -1
- package/dist/assets/ReferralListScreen-joOUNqNx.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-CFENXyD5.js +0 -1
- package/dist/assets/RewardsRoutes-CxzqjLpY.js +0 -1
- package/dist/assets/ScreenRoutes-Ch7ptvuu.js +0 -2
- package/dist/assets/SettingsRoutes-BKO1Pjri.js +0 -57
- package/dist/assets/SignOutScreen-ej7zxFCM.js +0 -9
- package/dist/assets/TaskRoutes-D6e-kYJP.js +0 -9
- package/dist/assets/WiseConfirmationScreen-kawXhbh0.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DR8Npwal.js +0 -9
- package/dist/assets/analyticsHelper-mm28SP1t.js +0 -1
- package/dist/assets/getLocaleForTenant-BNQJePqV.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BunYETHX.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DNA9YGXg.js +0 -1
- package/dist/assets/useCashManagementBanner-TkTWt3zi.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cl_SAGXq.js";import{h as Q,g as U,u as W,i as H,j as S,N as z,n as X,o as ve,p as j}from"./core-jHXRcmGr.js";import{eX as K,qR as Z,jW as u,RI as ee,K3 as De,bo as le,RJ as Pe,kx as te,NJ as ae,RK as ue,RL as be,bE as Y,J$ as ye,RM as Ee,RN as me,RO as je,K2 as Ae,RP as xe,RQ as pe,RR as Me,RS as ge,RT as Le,RU as Ce,RV as fe,Lf as Be}from"./zeni-epic-state-BER7XwD9.js";import{a as de,C as ne,G as q,d as G,cq as ce,v as V,p as oe,_ as Re,S as Fe}from"./index-D3N1b9aQ.js";import"./mui-DT0mOTYO.js";import{a as g}from"./sentry-4tqT1r6y.js";import{w as se}from"./withTransactionSidePanel-C-SPdXRH.js";import{p as ie,c as re}from"./routePaths-m79Ycpnf.js";import{v as Oe}from"./utils-Dc4uXotD.js";import{d as P}from"./decodeURIComponentSafe-C8Ut439h.js";import{Z as Ge}from"./ZeniAccountStatementScreen-DR8Npwal.js";import"./recharts-qvF3Dod3.js";import"./analytics-B1ozuY-_.js";import"./plaid-NlhYlsbZ.js";import"./dnd-DXsHzzkY.js";import"./stripe-DMRn4zHo.js";import"./lottie-BvP-9pT9.js";import"./lexical-BsEGFMKX.js";import"./pdf-CgzfzxbY.js";import"./useAskAiCfoHostNavButtonProps-DNA9YGXg.js";import"./TransactionDetailScreen-B1AYJUjQ.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]="c554037a-a5d8-4b53-942c-1e4342e690f0",a._sentryDebugIdIdentifier="sentry-dbid-c554037a-a5d8-4b53-942c-1e4342e690f0")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Oe(a),we=X(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(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=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),m=Je(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:N(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),J=se(function({...a}){const e=Q(),t=U(),n=W(),c=t.pathname.split("/").find(r=>ze.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=H(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S(r=>K(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=S(r=>Z(r))&&k,{dataAvailable:C,initialTimeframeTick:b}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[R,F]=g.useState(void 0),f=g.useMemo(()=>{const r=u(b);return{tranListType:o,accountType:ee(h),title:T,subTitle:D,timeframe:y,period:r}},[o,y,h,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=N(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&R!=null&&(M={...f,period:R}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>F(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;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.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Je=(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},Ne=X(function(a,e){const t=Ee(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=Q(),n=U(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=H(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S(d=>be(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,R]=g.useState(void 0),F=S(d=>K(d)),f=F.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=S(d=>Z(d))&&r;let i;const O=Ve(p,A,k,T,D,y,x);if(O){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ue(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,h,T,D,y,I].filter(d=>d!=null);return O&&L!=null?s.jsx(Ne,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>R(d),...e}):s.jsx(z,{to:Se($.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ve=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ke=X(function(a,e){const t=xe(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Qe=se(function({referrerType:a,...e}){const t=Q(),n=U(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=H(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S(d=>je(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,R]=g.useState(void 0),F=S(d=>K(d)),f=F.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=S(d=>Z(d))&&r;let i;const O=We(p,A,k,T,D,y,x);if(O){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,h,T,D,y,I].filter(d=>d!=null);return O&&L!=null?s.jsx(Ke,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>R(d),...e}):s.jsx(z,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(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,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Q(),n=U(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=H(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=S(v=>Me(v.transactionListState,A,p)),[b,B]=g.useState(!1),[E,R]=g.useState(void 0),F=S(v=>K(v)),f=F.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=F.company?.companyInfo.firstMonthOfFY??1;let r;const w=Ze(p,A,h,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:h,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:O}=ne(),{isFeatureEnabled:L}=O(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=O(q.isProjectsTransactionsEnabled),d=S(v=>Z(v))&&$,{areTenantIdsInSync:_}=Re();g.useEffect(()=>{!b&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[b,r,c,_]);const ke=[l,m,h,T,D,y].filter(v=>v!=null);return w&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>R(v),...e}):s.jsx(z,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=U().state?.referrer,e=S(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[S(n=>K(n)).tenantId],t=Fe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})})]})}export{kt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-DIKy4lot.js";import{h as U,g as K,u as H,i as W,j as h,N as z,n as Z,o as ve,p as j}from"./core-DXwLSsqn.js";import{eW as Q,qQ as X,jV as u,RE as ee,K2 as De,bo as le,RF as be,kw as te,NI as ae,RG as ue,RH as Pe,bE as Y,J_ as ye,RI as Ee,RJ as me,RK as je,K1 as Ae,RL as xe,RM as pe,RN as Me,RO as ge,RP as Le,RQ as Ce,RR as fe,Le as Be}from"./zeni-epic-state-Cehmp_zm.js";import{a as de,C as ne,G as V,d as G,co as ce,s as q,r as oe,Z as Fe,A as Oe}from"./index-BxpV0MpM.js";import"./mui-BPWJk-fl.js";import{a as g}from"./sentry-Dy6CjI9o.js";import{w as se}from"./withTransactionSidePanel-Do9-2jkM.js";import{p as ie,c as re}from"./routePaths-BZ65TmUh.js";import{v as Re}from"./utils-BfVxqb_k.js";import{d as b}from"./decodeURIComponentSafe-BbzvGEmo.js";import{Z as Ge}from"./ZeniAccountStatementScreen-BtAb3Raq.js";import"./recharts-BKU02zoL.js";import"./analytics-Ci054ctJ.js";import"./plaid-CgXOv8Rh.js";import"./dnd-BFL9IlQe.js";import"./stripe-DMRn4zHo.js";import"./lottie-DAe41SWX.js";import"./lexical-t8hl9adA.js";import"./pdf-CG1NUThf.js";import"./useAskAiCfoHostNavButtonProps-CaQ8KV1j.js";import"./TransactionDetailScreen-SXa23sv8.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]="dc58aa9a-7df2-4bba-bd60-841179761e47",a._sentryDebugIdIdentifier="sentry-dbid-dc58aa9a-7df2-4bba-bd60-841179761e47")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z(function(a,e){const t=be(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=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=U(),t=K(),n=H(),c=t.pathname.split("/").find(r=>ze.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h(r=>Q(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(V.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:P}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(P);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}},[o,y,S,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;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.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(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},Je=Z(function(a,e){const t=Ee(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Ve=se(function({referrerType:a,...e}){const t=U(),n=K(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=b(l??""),A=b(m??""),k=b(S??""),x=b(I??""),C=h(d=>Pe(d.transactionListState,A,p,k)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>Q(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(V.isProjectsTransactionsEnabled),w=h(d=>X(d))&&r;let i;const R=qe(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ke(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter(d=>d!=null);return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ke=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Qe=Z(function(a,e){const t=xe(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ue=se(function({referrerType:a,...e}){const t=U(),n=K(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=b(l??""),A=b(m??""),k=b(S??""),x=b(I??""),C=h(d=>je(d.transactionListState,A,p,k)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>Q(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(V.isProjectsTransactionsEnabled),w=h(d=>X(d))&&r;let i;const R=He(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter(d=>d!=null);return R&&L!=null?s.jsx(Qe,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(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,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=U(),n=K(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=b(l??""),A=b(m??""),k=b(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h(v=>Me(v.transactionListState,A,p)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(v=>Q(v)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,S,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(V.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(V.isProjectsTransactionsEnabled),d=h(v=>X(v))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!P&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[P,r,c,_]);const ke=[l,m,S,T,D,y].filter(v=>v!=null);return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=K().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>Q(n)).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ue,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DIKy4lot.js";import{h as F,g as B,u as L,i as O,j as g,N as D,n as G,o as Ie,p as k}from"./core-DXwLSsqn.js";import{cr as N,eW as E,Qo as U,Gp as ae,fV as Q,G7 as ne,Qq as Te,Gs as ke,Qm as be,Qn as se,QC as je,Ew as Ae,ua as Ee,Qs as ve,GL as De,Qp as re,cV as q,yt as oe,fB as Fe,fD as Be,RB as Le,RC as Ue,G8 as Pe,RD as Re,G9 as Me,Gi as Ve,bs as Oe,bJ as Ge,cC as Ne,bK as _e,cq as ze,bt as $e,LZ as Ze,cp as Qe}from"./zeni-epic-state-Cehmp_zm.js";import{I as _,ar as qe,z as A,D as z,d as b,ch as Ke,ci as We,cj as Z,K,y as He,Z as Je,a0 as Xe,C as ie,G as v,F as Ye,B as et,ck as tt,au as W,s as at,cl as nt,r as H,cm as st,m as X,cn as rt,i as ot}from"./index-BxpV0MpM.js";import{D as it,n as R,S as ct}from"./mui-BPWJk-fl.js";import lt from"./NotFoundScreen-B314Xa6t.js";import{S as Y}from"./SetupPagesScreen-BZtlpfQh.js";import{a as p}from"./sentry-Dy6CjI9o.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-CaQ8KV1j.js";import{u as dt}from"./useInitialThreadRequest-BNKJrNID.js";import{u as pt}from"./useCashManagementBanner-m4TLytI4.js";import{M as ce}from"./MobileAppDrawer-DUA8Lay7.js";import{F as mt}from"./FeaturePreviewScreen-BPUW_5KC.js";import{a as ee}from"./analyticsHelper-0Z_ii5dt.js";import"./recharts-BKU02zoL.js";import"./analytics-Ci054ctJ.js";import"./plaid-CgXOv8Rh.js";import"./dnd-BFL9IlQe.js";import"./stripe-DMRn4zHo.js";import"./lottie-DAe41SWX.js";import"./lexical-t8hl9adA.js";import"./pdf-CG1NUThf.js";import"./utils-BfVxqb_k.js";import"./routePaths-BZ65TmUh.js";import"./BusinessVerificationPageScreen-BJO3N4aI.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]="5d134b62-034f-488b-bcc0-883b2b91252e",t._sentryDebugIdIdentifier="sentry-dbid-5d134b62-034f-488b-bcc0-883b2b91252e")}catch{}})();const ft=G(function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(Te(s))}}})(Ke);function yt(){const t=F(),a=B(),n=L(),{tenantEmailDomain:r}=O(),m=_(),s=g(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=qe(s),o=N(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,w]=p.useState(!1),[c,l]=p.useState(!1),S=g(T=>E(T)),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,C=A.getSignedInUser(),h=g(T=>U(T,y)),I=g(T=>T.treasurySetupViewState.fetchState),x=g(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),M=g(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{u||I!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[u,I,y,n]),p.useEffect(()=>{c||M!=="Not-Started"||y==null||(l(!0),n(Q()))},[c,M,y,n]),p.useEffect(()=>{d||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[d,x,y,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:b})]})}const gt=G(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}},function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(We),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=L(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,w]=p.useState(!1),c=g(x=>x.treasurySetupViewState.fetchState),l=g(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),S=g(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=g(x=>E(x)),C=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g(x=>be(x)),I=g(x=>U(x,C));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||c!=="Not-Started"||C==null||(o(!0),r(ae(C,!0,!1)))},[f,c,C,r]),p.useEffect(()=>{u||l!=="Not-Started"||C==null||(i(!0),r(Q()))},[u,l,C,r]),p.useEffect(()=>{d||S!=="Not-Started"||C==null||(w(!0),r(ne()))},[d,S,C,r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(gt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:I,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",h.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-Cl_SAGXq.js";import{h as F,g as B,u as L,i as O,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,
|
|
9
|
+
`,Ct={overlayWidth:new Ye(100,100,48)},xt=G(function(t,a){const n=re(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:U(t,r),downloadEndPoint:`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:r,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:o}=a,{tenantEmailDomain:u}=r;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let d="page-not-found";i==="editPortfolio"?d=wt(u):i==="statements"?d=It(u):i==="taxLetter"?d=Tt(u):i==="settings"&&(d=kt(u));const w=at(m.state?.pathnameStackToGoBack,m.pathname);n(d,{state:{pathnameStackToGoBack:w}})},onColumnSortConfigChanged:(i,d)=>{t(Le({uiState:{sortKey:i,sortOrder:d}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(o?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${u}/checking/cash_management`)}}})(tt);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),r=F(),m=L(),s=K(),f=He(),o=g(j=>E(j)),{tenantEmailDomain:u}=O(),i=o.companyId??A.getSignedInUserTenant(u)?.companyId,[d,w]=p.useState(!1),c=g(j=>re(j)),l=c.fetchState,S=c.accountSummary?.totalBalance?.amount,y=g(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),I=!!o.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(h?.loggedInUserRoleMap),M=q(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=Je();p.useEffect(()=>{l==="Not-Started"&&!d&&P&&(w(!0),m(oe(!0)))},[d,m,l,P]),p.useEffect(()=>{c.transactionsFetchState.fetchState==="Completed"&&c.transactions.length===0&&!n.pathname.includes("transfer")&&x&&r("./transfer")},[c.transactionsFetchState.fetchState,c.transactions.length]);const T=()=>{r("..")},[le,ue]=p.useState(!1),J=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ut({mobileExploreReferrer:"Treasury"});Xe({isDataReady:l==="Completed"});const me=pt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(v.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(v.isCashManagementFeatureEnabled),Se=dt(i,{clearParams:l==="Completed"&&y?.fetchState==="Completed"}),Ce=Fe(o),xe=Be(fe,o);if(Ce===!0&&xe!==!0)return e.jsx(mt,{});if(C){const j=y?.fetchState!=="Completed"||c.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[c.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(bt,{onClick:we=>we.stopPropagation(),children:[t===!0?e.jsx(ht,{isFirstTransfer:c.transactions.length===0||S===0}):null,a===!0?e.jsx(yt,{}):null]})}),e.jsxs(St,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(xt,{treasuryDetailsView:c,isAutoTransferRuleEnabled:ye,navigate:r,currentTenant:o,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:J,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return I&&x?e.jsx(D,{to:"../setup"}):o.companyTreasuryInfo?.info&&!I&&M?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,kt=t=>`/${t}/treasury/setup`,bt=R(ct)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,
|
|
13
|
+
`,jt=R.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 100vh;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-Cl_SAGXq.js";import{h as F,g as B,u as L,i as O,
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function At(){const t=F(),a=L(),n=
|
|
21
|
+
`;function At(){const t=F(),a=L(),n=K(),r=B(),m=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g(l=>Ue(l));p.useEffect(()=>{s||o.fetchState!=="Not-Started"||(f(!0),a(Pe(!1)))},[s,o.fetchState,a]);const u=A.getSignedInUser(),i=g(l=>E(l)),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access statements page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:o,isLoading:c,onBackClick:()=>{const l=H(r.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Et=R.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-Cl_SAGXq.js";import{h as F,g as B,u as L,i as O,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function vt(){const t=F(),a=
|
|
29
|
+
`;function vt(){const t=F(),a=K(),n=B(),r=L(),m=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g(l=>Re(l));p.useEffect(()=>{s||o.fetchState!=="Not-Started"||(f(!0),r(Me(!1)))},[s,o.fetchState,r]);const u=A.getSignedInUser(),i=g(l=>E(l)),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access tax letter page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(Et,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:o,isLoading:c,onBackClick:()=>{const l=H(n.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Dt=G(function(t,a){const{companyId:n}=a,r=U(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Ve(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}})(rt),Ft=()=>{const t=F(),a=B(),n=L(),{tenantEmailDomain:r}=O(),[m,s]=p.useState(!1),f=g(h=>E(h)),[o,u]=p.useState(!1),i=g(h=>h.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);p.useEffect(()=>{o||i?.fetchState!=="Not-Started"||d==null||(u(!0),n(Q()))},[i,n]);const d=A.getSignedInUserTenant(r)?.companyId??f.companyId,w=A.getSignedInUser(),c=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=h=>{s(h)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const S=_(),y=N(S?.loggedInUserRoleMap),C=q(S?.loggedInUserRoleMap);if(c&&y)return e.jsx(D,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!c&&y||C)){if(a.state?.message==="activation"){const h=H(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:h.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:h=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(h)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:l}),e.jsx(Dt,{analytics:b,navigate:t,companyId:d,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-Cl_SAGXq.js";import{h as F,g as B,u as L,i as O,
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
align-items: center;
|
|
36
36
|
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function na(){const t=B(),a=g(I=>E(I)),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=
|
|
37
|
+
`;function na(){const t=B(),a=g(I=>E(I)),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=q(s?.loggedInUserRoleMap),o=a?.userRole!=null&&Oe(a?.userRole),u=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!o)&&Ge(s?.loggedInUserRoleMap),i=Ne(s?.loggedInUserRoleMap),d=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!o)&&_e(s?.loggedInUserRoleMap),w=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!o&&ze(s?.loggedInUserRoleMap),c=r&&!o&&N(s?.loggedInUserRoleMap),{isFeatureEnabled:l}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=n(v.isDebitCardFeatureEnabled),y=ot(a,l,S)&&!o&&$e(s?.loggedInUserRoleMap),C=Ze(s?.loggedInUserRoleMap),h=Qe(s?.loggedInUserRoleMap);return e.jsxs(Ie,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Ft,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(vt,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),c?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):m&&c?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{na as default};
|