@zeniai/web-app-ui 5.2.9-dev → 5.2.10-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-HIo_2eUA.js +1 -0
- package/dist/assets/{AddressScreen-CS_7zy0w.js → AddressScreen-DJ_3MnK6.js} +1 -1
- package/dist/assets/{AiCfoScreen-iW6cLrky.js → AiCfoScreen-CtS-iR-f.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CX584cho.js → BillPayApprovalRoutes-Bf6L6XeY.js} +1 -1
- package/dist/assets/{BillPayRoutes-CZ_W5Z9a.js → BillPayRoutes-D7_mnWYx.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CyYTkSJk.js → BusinessVerificationPageScreen-qeMJ0wCE.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-Do2CM9NI.js → CardsAiCfoScreen-Y52Gs7uN.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Bw9A89pe.js → ChargeCardRoutes-DSQ6FUXi.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Cfn_9183.js → CompanyPassportScreen-75Cla0FO.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DNfbV6Cs.js → ConnectionAuthScreen-cnWRAMKv.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C2P5Y8lU.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-DwfnXRL0.js +30 -0
- package/dist/assets/{DashboardRoutes-PGKQ0Moe.js → DashboardRoutes-BcwPj7vZ.js} +1 -1
- package/dist/assets/{DefaultTenantHome-x6jalJiO.js → DefaultTenantHome-CMKnv0sU.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BfQ0MRPv.js → DomesticWireDetailScreen-BlXcV2fG.js} +1 -1
- package/dist/assets/{DrawerScreen-ng7Vkepm.js → DrawerScreen-BoPFU7SR.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BZgvjOQf.js → EntityDetailRoutes-DWpIcLjm.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DhN19M7c.js → ExpenseAutomationRoutes-BBke9yOS.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BTGR97Fd.js → FeaturePreviewScreen-D6WKjJlU.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BTBofz2n.js → HubSpotOAuthCallbackScreen-Cn8xbz7K.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CVvSbDRe.js → MagicLinkRoutes-zQH9Mi2i.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BSaTrOoV.js → MagicLinkSignInScreen-Cw5ZdWiT.js} +1 -1
- package/dist/assets/{MobileAppDrawer-CrYdORTa.js → MobileAppDrawer-BNt5yYB_.js} +1 -1
- package/dist/assets/NotFoundScreen-bb3TXXqm.js +1 -0
- package/dist/assets/{NotificationRoutes-CpnG1o79.js → NotificationRoutes-DhdleHX2.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-UW-i7iNJ.js → OAuthConsentScreen-DxNCNGlz.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BhJsKt5l.js → PandLWithForecastRoutes-BAYF91yK.js} +1 -1
- package/dist/assets/{PeopleRoutes-C2a-KGIZ.js → PeopleRoutes-0EvPepF5.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DUsD3MMO.js → PerformanceRoutes-BaMTYMQc.js} +1 -1
- package/dist/assets/{Preview-Cj3JppRF.js → Preview-DmBwmeMg.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-6SpIc2GW.js → QBOConnectionScreen-DdzPLFVI.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-uO-QkUb5.js → ReimbursementApprovalRoutes-DYcp3ZQI.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-h4Xa7G88.js → ReimbursementApprovalRuleDetailScreen-BpTjuhRk.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DOnoVy-K.js → ReimbursementRoutes-lwHd6juR.js} +1 -1
- package/dist/assets/{ReportsRoutes-D8ZGwQbw.js → ReportsRoutes-j4l-ppVW.js} +1 -1
- package/dist/assets/{RewardsRoutes-WlT7olAX.js → RewardsRoutes-8P94sTS8.js} +1 -1
- package/dist/assets/{ScreenRoutes-BfH4klTS.js → ScreenRoutes-CvmRrQkp.js} +2 -2
- package/dist/assets/{SettingsRoutes-LY7c8epf.js → SettingsRoutes-DmlfuJR1.js} +1 -1
- package/dist/assets/{SetupPagesScreen-B6MCIymI.js → SetupPagesScreen-CFSy9MGO.js} +1 -1
- package/dist/assets/{SignInScreen-By7D8uvx.js → SignInScreen-820s6zG2.js} +1 -1
- package/dist/assets/{SignOutScreen-CsyzSdg-.js → SignOutScreen-BltCHGf2.js} +1 -1
- package/dist/assets/{TaskListScreen-C1omaWqK.js → TaskListScreen-CptFrynw.js} +1 -1
- package/dist/assets/{TaskRoutes-6hwT2MgW.js → TaskRoutes-BTKKQ13t.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-CtLhxWox.js → TransactionDetailRoutes-CkCRF4w1.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Brema_7y.js → TransactionDetailScreen-Ba0XAZeZ.js} +1 -1
- package/dist/assets/{TransactionListRoutes-huZThwT8.js → TransactionListRoutes-SiAILtLj.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B6pwb5CA.js → TreasuryRoutes-B0G2PpGc.js} +1 -1
- package/dist/assets/{VendorsRoutes-BvqnyUHV.js → VendorsRoutes-B-ytLkC0.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BZm8dkwf.js → WiseConfirmationScreen-CW8LdE_o.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BPo-hTc9.js → ZeniAccountRoutes-BliWhnxQ.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DBY93QB3.js → ZeniAccountStatementScreen-cpvhoHZk.js} +1 -1
- package/dist/assets/{accountMappingHelper-F9iVvIst.js → accountMappingHelper-Cu47aLLw.js} +1 -1
- package/dist/assets/{analytics-CzAweyQD.js → analytics-CW1zdFm7.js} +1 -1
- package/dist/assets/{analyticsHelper-3Gu9cPjm.js → analyticsHelper-CPMPgJbh.js} +1 -1
- package/dist/assets/{core-DGp_s-v5.js → core-i8NP-_wJ.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B1HNc06R.js → decodeURIComponentSafe-CWtVVOeC.js} +1 -1
- package/dist/assets/{dnd-Dv83AsVV.js → dnd-DslcPrv3.js} +1 -1
- package/dist/assets/{empty-CwBt9OsO.js → empty-B7bQqDzY.js} +1 -1
- package/dist/assets/{empty-Bs3ZKbS5.js → empty-D20MLmd1.js} +1 -1
- package/dist/assets/{emptyVideoElement-Ce3Auj8x.js → emptyVideoElement-ChcO5u-B.js} +1 -1
- package/dist/assets/{epic-B473FHIG.js → epic-Dtt0bmiB.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DQyjLBRZ.js → getLocaleForTenant-KhVEJ6R2.js} +1 -1
- package/dist/assets/{index-CLXVBUN9.js → index-B9LK_TbN.js} +1 -1
- package/dist/assets/{index-CklnO7MC.js → index-B9Sgv9NR.js} +1 -1
- package/dist/assets/{index-D20OqJJX.js → index-BSHXxZmQ.js} +1 -1
- package/dist/assets/{index-TundQtwk.js → index-D-IZDKX8.js} +1 -1
- package/dist/assets/{index-Du4bjclL.js → index-D4jZKafy.js} +2 -2
- package/dist/assets/{index-B7XJe0Nt.js → index-DdxkZqcW.js} +1 -1
- package/dist/assets/{index-s0HleIMs.js → index-kv2B65Vd.js} +1431 -1431
- package/dist/assets/{index-BwhVclXq.js → index-xQ6QZSsg.js} +1 -1
- package/dist/assets/{lexical-BI9o6Rzd.js → lexical-Ii9S5yIP.js} +1 -1
- package/dist/assets/{liveblocks-BQ1kyMTn.js → liveblocks-DcIzwukV.js} +1 -1
- package/dist/assets/{lottie-CBfI26wD.js → lottie-DdHGU3nu.js} +1 -1
- package/dist/assets/{mui-BKDz48_f.js → mui-BiZrYGuH.js} +1 -1
- package/dist/assets/{pathToGoBack-DkAc2FWv.js → pathToGoBack-XkSNImKf.js} +1 -1
- package/dist/assets/{pdf-CLZhSauj.js → pdf-DmI-yqFa.js} +3 -3
- package/dist/assets/{pdf-lib-KHPbWA1x.js → pdf-lib-COLnix2R.js} +1 -1
- package/dist/assets/{plaid-FOcqk85t.js → plaid-BZbWifVR.js} +1 -1
- package/dist/assets/{pusher-C_fUl_CW.js → pusher-3N9hZ7vw.js} +1 -1
- package/dist/assets/{react-CE5DgNhh.js → react-B3_kiFrP.js} +1 -1
- package/dist/assets/{react-DXdWsARm.js → react-BgYvl2we.js} +1 -1
- package/dist/assets/{react-BNvttsYS.js → react-C0xHgXbx.js} +1 -1
- package/dist/assets/{react-Dm2rgxL7.js → react-CbvPaaO5.js} +1 -1
- package/dist/assets/{react-Ge7IlhvK.js → react-DA_gDnq5.js} +1 -1
- package/dist/assets/{react-Lt0NhAvg.js → react-DC5TLH0I.js} +1 -1
- package/dist/assets/{recharts-om305-Co.js → recharts-CqPHpbL0.js} +1 -1
- package/dist/assets/{routePaths-BSw_NTbY.js → routePaths-wA_3WBh7.js} +1 -1
- package/dist/assets/{sentry-CRnwGvtj.js → sentry-DmARXi_b.js} +1 -1
- package/dist/assets/{url-BEGOiM2S.js → url-1CKnXXri.js} +1 -1
- package/dist/assets/{url-BFXW4vx0.js → url-DkswVAuM.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-QHUuBb0J.js → useAiCfoDashboardSuggestedQuestionsChips-SoQlWR_F.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Bh9PS9wx.js → useAskAiCfoHostNavButtonProps-C6Id_vuu.js} +1 -1
- package/dist/assets/{useCashManagementBanner-DTaGzioM.js → useCashManagementBanner-CUuZI_9N.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-CtddpIll.js → useChargeCardPusherEvents-CDZzo60a.js} +1 -1
- package/dist/assets/{useDeviceId-CunMxRLL.js → useDeviceId-Rek-4R2r.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BBoXuKk_.js → useEmailConnectResultRefresh-BV3YRmKJ.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CwFv9Eqv.js → useInitialThreadRequest-CtKR3SPq.js} +1 -1
- package/dist/assets/{utils-BJ3kLhBy.js → utils-Cahat5el.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-D7VzfbTv.js → withTransactionSidePanel-D_vELex0.js} +1 -1
- package/dist/assets/{zeni-epic-state-Dk4VKziD.js → zeni-epic-state-C9sevClC.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-q8yYrEbz.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-B_3t9Fai.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-CYvJ6SV5.js +0 -30
- package/dist/assets/NotFoundScreen-De_OVTcT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BQ1kyMTn.js";import{h as W,g as U,u as K,i as X,j as S,N as R,n as H,o as ve,p as j}from"./core-DGp_s-v5.js";import{eW as q,r3 as Q,jZ as u,RS as ee,Kg as De,bo as le,RT as Pe,kA as te,NW as ae,RU as ue,RV as be,bE as Y,Kc as ye,RW as Ee,RX as me,RY as je,Kf as Ae,RZ as xe,R_ as pe,R$ as Me,S0 as ge,S1 as Le,S2 as Ce,S3 as fe,Ls as Be}from"./zeni-epic-state-Dk4VKziD.js";import{O as de,A as ne,X as Z,c as G,co as ce,s as N,r as oe,Z as Fe,M as Oe}from"./index-s0HleIMs.js";import"./mui-BKDz48_f.js";import{a as g}from"./sentry-CRnwGvtj.js";import{w as se}from"./withTransactionSidePanel-D7VzfbTv.js";import{p as ie,c as re}from"./routePaths-BSw_NTbY.js";import{v as ze}from"./utils-BJ3kLhBy.js";import{d as P}from"./decodeURIComponentSafe-B1HNc06R.js";import{Z as Ge}from"./ZeniAccountStatementScreen-DBY93QB3.js";import"./recharts-om305-Co.js";import"./analytics-CzAweyQD.js";import"./plaid-FOcqk85t.js";import"./dnd-Dv83AsVV.js";import"./stripe-cKAAJElX.js";import"./lottie-CBfI26wD.js";import"./lexical-BI9o6Rzd.js";import"./pdf-CLZhSauj.js";import"./useAskAiCfoHostNavButtonProps-Bh9PS9wx.js";import"./TransactionDetailScreen-Brema_7y.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]="7c66190d-96be-481a-a9ac-7a314f2ac81e",a._sentryDebugIdIdentifier="sentry-dbid-7c66190d-96be-481a-a9ac-7a314f2ac81e")}catch{}})();const Re=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>ze(a),we=H((function(a,e){const t=Pe(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=Ve(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=N(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),V=se((function({...a}){const e=W(),t=U(),n=K(),c=t.pathname.split("/").find((r=>Re.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=X(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S((r=>q(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(Z.isProjectsTransactionsEnabled),x=S((r=>Q(r)))&&k,{dataAvailable:C,initialTimeframeTick:b}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[F,O]=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=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(R,{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}}},Ve=(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=H((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=N(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),Ze=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=X(),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,F]=g.useState(void 0),O=S((d=>q(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(Z.isProjectsTransactionsEnabled),w=S((d=>Q(d)))&&r;let i;const z=Ne(p,A,k,T,D,y,x);if(z){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 z&&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(R,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(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),qe=H((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=N(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),We=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=X(),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,F]=g.useState(void 0),O=S((d=>q(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(Z.isProjectsTransactionsEnabled),w=S((d=>Q(d)))&&r;let i;const z=Ke(p,A,k,T,D,y,x);if(z){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Xe(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 z&&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(R,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(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,Xe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),He=H((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=N(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=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=X(),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,F]=g.useState(void 0),O=S((v=>q(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Qe(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:z}=ne(),{isFeatureEnabled:L}=z(Z.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(Z.isProjectsTransactionsEnabled),d=S((v=>Q(v)))&&$,{areTenantIdsInSync:_}=Fe();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(He,{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(R,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(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=>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(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})})]})}export{kt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-DcIzwukV.js";import{h as W,g as U,u as K,i as X,j as S,N as R,n as H,o as ve,p as j}from"./core-i8NP-_wJ.js";import{eW as q,r3 as Q,jZ as u,RS as ee,Kg as De,bo as le,RT as Pe,kA as te,NW as ae,RU as ue,RV as be,bE as Y,Kc as ye,RW as Ee,RX as me,RY as je,Kf as Ae,RZ as xe,R_ as pe,R$ as Me,S0 as ge,S1 as Le,S2 as Ce,S3 as fe,Ls as Be}from"./zeni-epic-state-C9sevClC.js";import{O as de,A as ne,X as Z,c as G,co as ce,s as N,r as oe,Z as Fe,M as Oe}from"./index-kv2B65Vd.js";import"./mui-BiZrYGuH.js";import{a as g}from"./sentry-DmARXi_b.js";import{w as se}from"./withTransactionSidePanel-D_vELex0.js";import{p as ie,c as re}from"./routePaths-wA_3WBh7.js";import{v as ze}from"./utils-Cahat5el.js";import{d as P}from"./decodeURIComponentSafe-CWtVVOeC.js";import{Z as Ge}from"./ZeniAccountStatementScreen-cpvhoHZk.js";import"./recharts-CqPHpbL0.js";import"./analytics-CW1zdFm7.js";import"./plaid-BZbWifVR.js";import"./dnd-DslcPrv3.js";import"./stripe-cKAAJElX.js";import"./lottie-DdHGU3nu.js";import"./lexical-Ii9S5yIP.js";import"./pdf-DmI-yqFa.js";import"./useAskAiCfoHostNavButtonProps-C6Id_vuu.js";import"./TransactionDetailScreen-Ba0XAZeZ.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]="7c66190d-96be-481a-a9ac-7a314f2ac81e",a._sentryDebugIdIdentifier="sentry-dbid-7c66190d-96be-481a-a9ac-7a314f2ac81e")}catch{}})();const Re=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>ze(a),we=H((function(a,e){const t=Pe(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=Ve(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=N(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),V=se((function({...a}){const e=W(),t=U(),n=K(),c=t.pathname.split("/").find((r=>Re.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=X(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S((r=>q(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(Z.isProjectsTransactionsEnabled),x=S((r=>Q(r)))&&k,{dataAvailable:C,initialTimeframeTick:b}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[F,O]=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=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(R,{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}}},Ve=(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=H((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=N(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),Ze=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=X(),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,F]=g.useState(void 0),O=S((d=>q(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(Z.isProjectsTransactionsEnabled),w=S((d=>Q(d)))&&r;let i;const z=Ne(p,A,k,T,D,y,x);if(z){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 z&&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(R,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(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),qe=H((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=N(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),We=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=X(),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,F]=g.useState(void 0),O=S((d=>q(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(Z.isProjectsTransactionsEnabled),w=S((d=>Q(d)))&&r;let i;const z=Ke(p,A,k,T,D,y,x);if(z){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Xe(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 z&&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(R,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(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,Xe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),He=H((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=N(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=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=W(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=X(),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,F]=g.useState(void 0),O=S((v=>q(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Qe(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:z}=ne(),{isFeatureEnabled:L}=z(Z.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(Z.isProjectsTransactionsEnabled),d=S((v=>Q(v)))&&$,{areTenantIdsInSync:_}=Fe();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(He,{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(R,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(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=>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(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(R,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DcIzwukV.js";import{h as B,g as F,u as L,i as O,j as g,N as D,n as G,o as we,p as k}from"./core-i8NP-_wJ.js";import{cr as N,eW as E,QC as U,GD as ae,fV as Z,Gl as ne,QE as Ie,GG as ke,QA as je,QB as se,QQ as Ae,EK as be,uo as Ee,QG as ve,GZ as De,QD as re,cV as H,yH as oe,fB as Be,fD as Fe,RP as Le,RQ as Ue,Gm as Pe,RR as Re,Gn as Me,Gw as Ve,bs as Oe,bJ as Ge,cC as Ne,bK as _e,cq as ze,bt as $e,Mb as Qe,cp as Ze}from"./zeni-epic-state-C9sevClC.js";import{T as _,ar as He,z as b,_ as z,c as j,ch as Ke,ci as We,cj as Q,J as K,y as qe,Z as Je,a0 as Xe,A as ie,X as v,C as Ye,B as et,ck as tt,au as W,s as at,cl as nt,r as q,cm as st,V as X,cn as rt,i as ot}from"./index-kv2B65Vd.js";import{D as it,n as R,S as ct}from"./mui-BiZrYGuH.js";import lt from"./NotFoundScreen-bb3TXXqm.js";import{S as Y}from"./SetupPagesScreen-CFSy9MGO.js";import{a as p}from"./sentry-DmARXi_b.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-C6Id_vuu.js";import{u as dt}from"./useInitialThreadRequest-CtKR3SPq.js";import{u as pt}from"./useCashManagementBanner-CUuZI_9N.js";import{M as ce}from"./MobileAppDrawer-BNt5yYB_.js";import{F as mt}from"./FeaturePreviewScreen-D6WKjJlU.js";import{a as ee}from"./analyticsHelper-CPMPgJbh.js";import"./recharts-CqPHpbL0.js";import"./analytics-CW1zdFm7.js";import"./plaid-BZbWifVR.js";import"./dnd-DslcPrv3.js";import"./stripe-cKAAJElX.js";import"./lottie-DdHGU3nu.js";import"./lexical-Ii9S5yIP.js";import"./pdf-DmI-yqFa.js";import"./utils-Cahat5el.js";import"./routePaths-wA_3WBh7.js";import"./BusinessVerificationPageScreen-qeMJ0wCE.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]="3f9f58ae-e1a3-4579-a687-a0d55174c8e5",t._sentryDebugIdIdentifier="sentry-dbid-3f9f58ae-e1a3-4579-a687-a0d55174c8e5")}catch{}})();const ft=G((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:j}}),(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(Ie(s))}}}))(Ke);function yt(){const t=B(),a=F(),n=L(),{tenantEmailDomain:r}=O(),m=_(),s=g((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=He(s),o=N(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,T]=p.useState(!1),[c,l]=p.useState(!1),S=g((I=>E(I))),y=b.getSignedInUserTenant(r)?.companyId??S.companyId,x=b.getSignedInUser(),h=g((I=>U(I,y))),w=g((I=>I.treasurySetupViewState.fetchState)),C=g((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),M=g((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,w,y,n]),p.useEffect((()=>{c||M!=="Not-Started"||y==null||(l(!0),n(Z()))}),[c,M,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(T(!0),n(ne()))}),[d,C,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||w!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:j})]})}const gt=G((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ae(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:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(be(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(We),ht=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),r=L(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,T]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=b.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>je(C))),w=g((C=>U(C,x)));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(Z()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(T(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(gt,{analytics:j,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(j,"review",h.treasuryTransferMoneyLocalData,w.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%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DcIzwukV.js";import{a as f}from"./sentry-DmARXi_b.js";import{h as J,g as Y,i as N,j as S,n as G,u as z,o as at,p as O,N as $}from"./core-i8NP-_wJ.js";import{eW as L,Nk as Ee,Nl as Re,gx as X,cx as be,cy as Ie,xg as St,Nm as nt,xk as zt,Lj as ee,kA as te,xe as Yt,x8 as qt,Nn as Ue,x0 as Ht,w$ as Wt,wV as Qt,x5 as Zt,xl as Xt,No as he,Np as Me,x1 as ea,Nq as pe,fI as ft,xA as gt,xt as vt,Nr as xt,pV as Tt,xo as yt,xm as Dt,Ns as Ct,xH as Et,xE as bt,xp as It,xG as Je,JK as kt,Nt as ta,Nu as aa,cA as na,Nv as sa,Nw as oa,Nx as me,Ny as ie,Nz as ke,Lk as Ge,xW as ye,Li as De,xJ as wt,xh as $e,NA as la,Ll as H,NB as Ke,xb as ia,NC as ca,ND as da,NE as ze,NF as Ye,NG as qe,NH as He,xQ as we,NI as At,xx as jt,NJ as ra,NK as ua,NL as ha,NM as pa,NN as ma,NO as Sa,NP as fa,NQ as ga,uA as va,uI as xa,uB as Ta,Kq as je,NR as ya,NS as Da,jZ as Fe,bo as Ca,NT as Ea,NU as ba,ly as Ia,lH as ka,Kp as Pe,bE as st,NV as Ft,K0 as Pt,NW as wa,NX as Aa,NY as ja,lJ as Fa,NZ as ot,N_ as lt,N$ as it,O0 as ct,O1 as Pa,lF as _a,O2 as Va,lI as La,O3 as Oa,O4 as _t,KL as Vt,kY as Ba,O5 as Na,O6 as _e,O7 as Lt,KJ as Ot,Ac as Ra,O8 as Ua,O9 as Ma,lg as Bt,Oa as Ja,Ob as Ga,KX as $a,s9 as Ka,Oc as Nt,Od as dt,KU as Ve,Oe as rt,Of as za,KZ as Ya,Og as qa,Oh as Ha,Oi as Wa,Oj as Qa,Ok as Za,sc as Xa,Ol as en,Lm as tn,Om as an,KC as Le,hI as nn,On as sn,Oo as on,hG as ln,Op as cn,Oq as dn,Ag as rn,Or as un,Os as hn,Ot as pn,Ou as mn,l0 as Sn,bn as fn,fD as gn,fB as vn}from"./zeni-epic-state-C9sevClC.js";import{z as R,ar as Oe,B as Rt,_ as Q,c as j,a4 as Z,aB as xn,s as M,O as Ce,w as ce,aC as We,aD as Tn,aE as yn,r as Qe,aF as Dn,y as Cn,J as de,C as Ze,A as ae,X as K,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,Z as In,aJ as kn,T as wn,aK as An,au as Mt,aL as jn,o as W,S as Fn,F as Jt,G as Pn,aM as _n,aN as Vn,f as et,aO as Ln,aP as On,p as Bn,aQ as Nn,aR as Rn}from"./index-kv2B65Vd.js";import{n as U,D as Un,S as Gt}from"./mui-BiZrYGuH.js";import{t as Mn,A as Jn}from"./AddressScreen-DJ_3MnK6.js";import le from"./NotFoundScreen-bb3TXXqm.js";import{F as Gn}from"./FeaturePreviewScreen-D6WKjJlU.js";import{c as q,v as tt,d as $n}from"./routePaths-wA_3WBh7.js";import{p as $t}from"./pathToGoBack-XkSNImKf.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-C6Id_vuu.js";import{M as ge}from"./MobileAppDrawer-BNt5yYB_.js";import{D as Kn}from"./DrawerScreen-BoPFU7SR.js";import{g as zn,m as Yn}from"./accountMappingHelper-Cu47aLLw.js";import"./recharts-CqPHpbL0.js";import"./analytics-CW1zdFm7.js";import"./plaid-BZbWifVR.js";import"./dnd-DslcPrv3.js";import"./stripe-cKAAJElX.js";import"./lottie-DdHGU3nu.js";import"./lexical-Ii9S5yIP.js";import"./pdf-DmI-yqFa.js";import"./utils-Cahat5el.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]="959cbd21-a135-4cd3-b02a-38e1932931b5",e._sentryDebugIdIdentifier="sentry-dbid-959cbd21-a135-4cd3-b02a-38e1932931b5")}catch{}})();const qn=Ce.getLocalizedStrings(),Hn=G((function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(xn),Wn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=N(),{scheduleType:o}=N();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S((g=>L(g))),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S((g=>Re(g,r))),p=i.selectedJELinkRowIndex,d=S((g=>X(g,c.companyId))),u=Oe(i.updateStatus.fetchState);f.useEffect((()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[u,i.updateStatus.fetchState]),f.useEffect((()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const m=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&p!=null?l.jsxs(l.Fragment,{children:[m===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(Hn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[p]})]}):null})},Kt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some((p=>p.isRecommendedTransaction===!0)),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...Kt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-BZm8dkwf.js → WiseConfirmationScreen-CW8LdE_o.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-DcIzwukV.js";import{a as f}from"./sentry-DmARXi_b.js";import{t as u,u as h,j as b,N as y}from"./core-i8NP-_wJ.js";import{Mu as I,fz as w,Bx as x}from"./zeni-epic-state-C9sevClC.js";import{z as l,B as j,F as S,G as D}from"./index-kv2B65Vd.js";import{n as c}from"./mui-BiZrYGuH.js";import"./recharts-CqPHpbL0.js";import"./analytics-CW1zdFm7.js";import"./plaid-BZbWifVR.js";import"./dnd-DslcPrv3.js";import"./stripe-cKAAJElX.js";import"./lottie-DdHGU3nu.js";import"./lexical-Ii9S5yIP.js";import"./pdf-DmI-yqFa.js";import"./utils-Cahat5el.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]="de82cdcc-970d-465f-91b1-bde21aead6be",e._sentryDebugIdIdentifier="sentry-dbid-de82cdcc-970d-465f-91b1-bde21aead6be")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,g]=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||(g(!0),a(x(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=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-DcIzwukV.js";import{u as U,h as N,i as G,j as A,N as Q,n as W,g as K,o as $e,p as f}from"./core-i8NP-_wJ.js";import{Rq as Ve,Rr as Un,BC as Mn,Rs as zn,Rt as $n,bH as Vn,Ru as He,DF as Ze,Rv as Ne,eW as M,yF as Ge,Pw as We,cq as te,cr as qe,yz as Hn,Rw as Zn,Rx as Nn,yC as Gn,yJ as ye,yw as Wn,yt as qn,Ry as Qe,BI as Qn,Qf as de,Rz as Jn,Hj as Kn,Nn as Yn,Hl as Xn,lh as Re,RA as ea,rQ as Je,rE as Ke,l8 as Ye,lb as Be,No as Fe,Np as na,RB as aa,la as ta,lx as oa,k$ as sa,jy as ra,jx as ia,RC as ca,RD as xe,H0 as la,RE as da,RF as ua,Q8 as we,RG as Oe,RH as pa,Hw as ma,QQ as fa,EK as Xe,uo as en,RI as ha,Ht as ga,RJ as nn,cS as Ae,BJ as an,fV as ya,fB as tn,fD as De,Hy as xa,EE as Ca,Hq as wa,RK as on,RL as sn,H2 as rn,Hc as Le,RM as Aa,QH as Da,HA as ka,bs as Sa,bJ as Ia,cC as ba,bK as ja,bt as va,Mb as Ea}from"./zeni-epic-state-C9sevClC.js";import{J as z,c4 as Pa,T as oe,A as Z,X as F,z as S,a4 as ke,c5 as Ta,y as $,B as ue,c6 as Ra,C as Y,r as cn,ar as Ba,ag as _e,c as _,c7 as Fa,au as Se,c8 as Oa,_ as pe,c9 as La,f as Ie,aS as J,ca as _a,Z as Ua,a0 as ln,ad as Ma,cb as Ue,cc as za,s as le,cd as $a,ce as Va,cf as Ha,i as Za,o as Na}from"./index-kv2B65Vd.js";import{n as O,D as X,S as ee}from"./mui-BiZrYGuH.js";import{a as p}from"./sentry-DmARXi_b.js";import{u as dn}from"./useCashManagementBanner-CUuZI_9N.js";import H from"./NotFoundScreen-bb3TXXqm.js";import{S as Me}from"./SetupPagesScreen-CFSy9MGO.js";import{F as un}from"./FeaturePreviewScreen-D6WKjJlU.js";import{M as me}from"./MobileAppDrawer-BNt5yYB_.js";import{A as Ga,D as Wa,V as qa}from"./DomesticWireDetailScreen-BlXcV2fG.js";import{A as Qa}from"./AddressScreen-DJ_3MnK6.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-C6Id_vuu.js";import{Z as Ja}from"./ZeniAccountStatementScreen-cpvhoHZk.js";import"./recharts-CqPHpbL0.js";import"./analytics-CW1zdFm7.js";import"./plaid-BZbWifVR.js";import"./dnd-DslcPrv3.js";import"./stripe-cKAAJElX.js";import"./lottie-DdHGU3nu.js";import"./lexical-Ii9S5yIP.js";import"./pdf-DmI-yqFa.js";import"./utils-Cahat5el.js";import"./analyticsHelper-CPMPgJbh.js";import"./routePaths-wA_3WBh7.js";import"./BusinessVerificationPageScreen-qeMJ0wCE.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]="edb33832-5af6-4188-a146-3bb66201ad24",n._sentryDebugIdIdentifier="sentry-dbid-edb33832-5af6-4188-a146-3bb66201ad24")}catch{}})();const Ka=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-DcIzwukV.js";import{a as f}from"./sentry-DmARXi_b.js";import{h as x,u as B,g as L,i as $,j as p}from"./core-i8NP-_wJ.js";import{Ls as s,Lr as j,RN as v,eW as C,RO as T}from"./zeni-epic-state-C9sevClC.js";import{J as z,au as g,y as D,z as E,B as N,cg as P,r as U}from"./index-kv2B65Vd.js";import{n as _}from"./mui-BiZrYGuH.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]="2cfcb88e-3d74-44e6-8b38-5d9babb6d275",e._sentryDebugIdIdentifier="sentry-dbid-2cfcb88e-3d74-44e6-8b38-5d9babb6d275")}catch{}})();const G=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-DmARXi_b.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}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 a(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{d as a,i as g,a as m};
|