@zeniai/web-app-ui 5.3.65-qa → 5.3.66-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountMappingScreen-BN6vdX7G.js +9 -0
- package/dist/assets/ActualMatchingMatchDetailScreen-iQJZPD_1.js +1 -0
- package/dist/assets/AddressRoutes-C_txA2zJ.js +1 -0
- package/dist/assets/AddressScreen-zaTuzB5p.js +9 -0
- package/dist/assets/{AiCfoScreen-BJhHFB_H.js → AiCfoScreen-Eub8XSPm.js} +5 -5
- package/dist/assets/AppDrawer-BkAQdkfJ.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-U0Rf3A34.js → BillPayApprovalRoutes-DXjuz2Ti.js} +1 -1
- package/dist/assets/BillPayRoutes-CfwSwOlV.js +119 -0
- package/dist/assets/{BusinessVerificationPageScreen-r1Ek9gB4.js → BusinessVerificationPageScreen-DvozPdQh.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-D-vv9FF8.js +14 -0
- package/dist/assets/ChargeCardRoutes-CD9M-Usw.js +71 -0
- package/dist/assets/CompanyPassportScreen-CIBLpPTS.js +1 -0
- package/dist/assets/ConnectionAuthScreen-9eXT0VUF.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-7indpcEG.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-Cz54b8yE.js +30 -0
- package/dist/assets/DashboardRoutes-BXOzbIeh.js +20 -0
- package/dist/assets/DefaultTenantHome-DbNAKlnl.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-DCw4C2US.js +18 -0
- package/dist/assets/DrawerScreen-CWeGSAI6.js +1 -0
- package/dist/assets/EntityDetailRoutes-DMAT9LsS.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DC_bgKvG.js +38 -0
- package/dist/assets/FeaturePreviewScreen-B0fvU5Um.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CwAEMNyS.js +1 -0
- package/dist/assets/InboxNotificationsProvider-Bvn-EOCR.js +1 -0
- package/dist/assets/InvoicingRoutes-1yOhJ_sU.js +2 -0
- package/dist/assets/MagicLinkRoutes-BRZQi3Rn.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-QYJdECal.js +12 -0
- package/dist/assets/MobileAppDrawer-MqeZAr94.js +1 -0
- package/dist/assets/NotFoundScreen-B5LVzvCT.js +1 -0
- package/dist/assets/NotificationRoutes-DupCd-Rg.js +1 -0
- package/dist/assets/OAuthConsentScreen-DsduWuVl.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DNq1_ARm.js +1 -0
- package/dist/assets/{PaymentLinkScreen-ssw1HUNS.js → PaymentLinkScreen-BH9uceE9.js} +5 -5
- package/dist/assets/PeopleRoutes-PN0WkU27.js +22 -0
- package/dist/assets/PerformanceRoutes-DqNETDLp.js +1 -0
- package/dist/assets/{Preview-DB5CbRio.js → Preview-B2iczV8Z.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CGXzaY9Z.js → QBOConnectionScreen-CzgT4mRd.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DE2dfRVc.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BaabHenl.js → ReimbursementApprovalRuleDetailScreen-Dh-_8qvy.js} +1 -1
- package/dist/assets/ReimbursementRoutes-BQqlCPAS.js +68 -0
- package/dist/assets/ReportsRoutes-CEQzyTST.js +1 -0
- package/dist/assets/RewardsRoutes-B86LbXk0.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DMzBHsBi.js → ScheduleDetailsPrepaidExpensesScreen-Culiu7tt.js} +5 -5
- package/dist/assets/ScreenRoutes-CMNeXjjO.js +2 -0
- package/dist/assets/{SettingsRoutes-DLS1pb7Z.js → SettingsRoutes-L8fkqBOk.js} +6 -6
- package/dist/assets/{SetupPagesScreen-LpdfT-pH.js → SetupPagesScreen-gPQd_kHy.js} +5 -5
- package/dist/assets/SignInScreen-RV2rnGNS.js +1 -0
- package/dist/assets/SignOutScreen-DswQNHMm.js +9 -0
- package/dist/assets/{TaskListScreen-Mlh19Bfa.js → TaskListScreen-Dn8w8tw1.js} +2 -2
- package/dist/assets/TaskRoutes-Cfvk2ewR.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CEME3GYl.js +1 -0
- package/dist/assets/TransactionDetailScreen-BQn-CaJc.js +5 -0
- package/dist/assets/TransactionListRoutes-ChPVOe9j.js +1 -0
- package/dist/assets/TreasuryRoutes-D-VhEDaT.js +37 -0
- package/dist/assets/{VendorsRoutes-owMMCmOI.js → VendorsRoutes-B17WyjV9.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-BQvjApl5.js +12 -0
- package/dist/assets/ZeniAccountRoutes-BgXjxcZ8.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-DUlZ_ds_.js +9 -0
- package/dist/assets/{accountMappingHelper-mjWJVrZb.js → accountMappingHelper-BDERhFkI.js} +1 -1
- package/dist/assets/analytics-CUp3ZA3r.js +68 -0
- package/dist/assets/{analyticsHelper-B0PgYJQ4.js → analyticsHelper-h7GNG_TP.js} +1 -1
- package/dist/assets/{core-BBG4mxvC.js → core-DH5NyLW2.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DgKmvHaP.js → decodeURIComponentSafe-BCOdiOkt.js} +1 -1
- package/dist/assets/{dnd-oIrpOltC.js → dnd-D7CsX5Sk.js} +1 -1
- package/dist/assets/{empty-BVUnugO_.js → empty-B9eASS9M.js} +1 -1
- package/dist/assets/{empty-zUa_Ywzm.js → empty-DQJIvG7D.js} +1 -1
- package/dist/assets/{emptyVideoElement-WG4m8gNp.js → emptyVideoElement-DWKe77Mx.js} +1 -1
- package/dist/assets/epic-BDxFLjmJ.js +2 -0
- package/dist/assets/expenseAutomationHelper-CrhgoNQO.js +1 -0
- package/dist/assets/getLocaleForTenant-DN-ANTbC.js +1 -0
- package/dist/assets/{index-DlbH0-p0.js → index-B_KwxsBt.js} +1 -1
- package/dist/assets/{index-lbu92FYh.js → index-CSyuPEgb.js} +1 -1
- package/dist/assets/{index-CyCQjJen.js → index-DMHy_SA4.js} +1 -1
- package/dist/assets/{index-CD8RychW.js → index-DNi0X34P.js} +1 -1
- package/dist/assets/{index-Bgwcwudg.js → index-DNshEICy.js} +1 -1
- package/dist/assets/{index-B9QH_oKn.js → index-DoDNemdV.js} +2 -2
- package/dist/assets/{index-BhDgyETA.js → index-DoOOksKb.js} +29082 -29221
- package/dist/assets/{index-BlZF-J3g.js → index-W21n9iFY.js} +1 -1
- package/dist/assets/{lexical-BRrdO5Cu.js → lexical-BKNSP2gz.js} +1 -1
- package/dist/assets/{liveblocks-CzCs-qU3.js → liveblocks-D15RiFCG.js} +1 -1
- package/dist/assets/{lottie-ULJlrwjP.js → lottie-BDOOwIRK.js} +1 -1
- package/dist/assets/{mui-B2F_PvWe.js → mui-BJmjbHJq.js} +1 -1
- package/dist/assets/{pathToGoBack-e0pJACvC.js → pathToGoBack-CchmBFeO.js} +1 -1
- package/dist/assets/{pdf-CeVn9A9c.js → pdf-DNi_3ylG.js} +4 -4
- package/dist/assets/{pdf-lib-DiMa7ymi.js → pdf-lib-CPsiFjf_.js} +1 -1
- package/dist/assets/{plaid-BWZxX3Bn.js → plaid-CoLmm0Qk.js} +1 -1
- package/dist/assets/{pusher-wcP4-1ih.js → pusher-DolVlNhF.js} +1 -1
- package/dist/assets/{react-BrDYknqm.js → react--In1Mfxx.js} +1 -1
- package/dist/assets/{react-Dv-IwMT5.js → react-BhK_7rrU.js} +1 -1
- package/dist/assets/{react-Chuw6ptT.js → react-BwPFPSJZ.js} +1 -1
- package/dist/assets/{react-CGMaXwI-.js → react-C0rsxobL.js} +1 -1
- package/dist/assets/{react-D7hd8riP.js → react-iOuQiSJm.js} +1 -1
- package/dist/assets/{react-3Jh1nOTX.js → react-qPFYxlAc.js} +1 -1
- package/dist/assets/{recharts-CzGMTm3v.js → recharts-ZfW9kU_v.js} +1 -1
- package/dist/assets/{routePaths-BvbR2--r.js → routePaths-vlSgnRAt.js} +1 -1
- package/dist/assets/{sentry-CWp8Ph3h.js → sentry-CKsmO8pj.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BWJSV6oD.js → stripSplatSuffix-I0ZnDMgZ.js} +1 -1
- package/dist/assets/{url-DV6CtKQ5.js → url-Bel3NJ1X.js} +1 -1
- package/dist/assets/{url-CnTmKJO0.js → url-CbgN2lvl.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-BEohEPMP.js +1 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DSGriTeK.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CT0mpA7T.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CxcxRS1k.js +1 -0
- package/dist/assets/{useDeviceId-Bzw6IkAe.js → useDeviceId-zMm3qqgX.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-Crt-6fWQ.js +1 -0
- package/dist/assets/useInitialThreadRequest-DFml2VJj.js +1 -0
- package/dist/assets/useTaskManagerAccess-Dwl3Yru5.js +1 -0
- package/dist/assets/useTaskManagerPusherEvents-HEKoUMnN.js +1 -0
- package/dist/assets/{utils-u0mlLj2I.js → utils-5onWhP-T.js} +1 -1
- package/dist/assets/withTransactionSidePanel-BYLq7mXT.js +25 -0
- package/dist/assets/{zeni-epic-state-FRanwwFO.js → zeni-epic-state-DJybC3kH.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-Bn4DiIps.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-CyKLkfoX.js +0 -1
- package/dist/assets/AddressRoutes-CMlXZdpL.js +0 -1
- package/dist/assets/AddressScreen-CPZX6Mga.js +0 -9
- package/dist/assets/AppDrawer-f4P22T-s.js +0 -10
- package/dist/assets/BillPayRoutes-DGRh7xdO.js +0 -119
- package/dist/assets/CardsAiCfoScreen-0le7ZJMu.js +0 -14
- package/dist/assets/ChargeCardRoutes-DJ2vt6zk.js +0 -71
- package/dist/assets/CompanyPassportScreen-RZ6JI1G1.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DmnnDeQw.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DbeMqdYb.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-s6nbTZNu.js +0 -30
- package/dist/assets/DashboardRoutes-BT8Ep0Zj.js +0 -20
- package/dist/assets/DefaultTenantHome-Df11kb8h.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-y2obrXna.js +0 -18
- package/dist/assets/DrawerScreen-oFb1moZ7.js +0 -1
- package/dist/assets/EntityDetailRoutes-BSBRT0xT.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Ca8MyQ3F.js +0 -38
- package/dist/assets/FeaturePreviewScreen-hmh5qa1F.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BO5xFdxD.js +0 -1
- package/dist/assets/InboxNotificationsProvider-J2K-16R3.js +0 -1
- package/dist/assets/InvoicingRoutes-CdrMbO5s.js +0 -2
- package/dist/assets/MagicLinkRoutes-BK5YhMpS.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CwfKFdEK.js +0 -12
- package/dist/assets/MobileAppDrawer-jPjMoXMc.js +0 -1
- package/dist/assets/NotFoundScreen-Cw8n2XQn.js +0 -1
- package/dist/assets/NotificationRoutes-bPTL-gx1.js +0 -1
- package/dist/assets/OAuthConsentScreen-qHIRXDfy.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-iv8FS1Jh.js +0 -1
- package/dist/assets/PeopleRoutes-gWK7cISf.js +0 -22
- package/dist/assets/PerformanceRoutes-Q-0RiFCz.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-C_sgAcum.js +0 -1
- package/dist/assets/ReimbursementRoutes-uxVKhJh3.js +0 -68
- package/dist/assets/ReportsRoutes-DO9Wko2u.js +0 -1
- package/dist/assets/RewardsRoutes-CpyMm_K4.js +0 -1
- package/dist/assets/ScreenRoutes-2kGhSSY5.js +0 -2
- package/dist/assets/SignInScreen-D0AGVtSB.js +0 -1
- package/dist/assets/SignOutScreen-DqG7ICcF.js +0 -9
- package/dist/assets/TaskRoutes-BLQqIb0y.js +0 -9
- package/dist/assets/TransactionDetailRoutes-B7iSSfjs.js +0 -1
- package/dist/assets/TransactionDetailScreen-DSLjb6UM.js +0 -5
- package/dist/assets/TransactionListRoutes-Bw5UrSgh.js +0 -1
- package/dist/assets/TreasuryRoutes-CssMsW2Q.js +0 -37
- package/dist/assets/WiseConfirmationScreen-DjHi2MKV.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CmkqZp90.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-Cs6xkdf1.js +0 -9
- package/dist/assets/analytics-cC2XJoxx.js +0 -68
- package/dist/assets/epic-Du6qCFYI.js +0 -2
- package/dist/assets/expenseAutomationHelper-BkZxz0F-.js +0 -1
- package/dist/assets/getLocaleForTenant-DnBPPnzL.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-vmzr0KEG.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BsM9KkGc.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BmnPs4uO.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-BiuqGlTA.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-DMSbnQoq.js +0 -1
- package/dist/assets/useInitialThreadRequest-CdCPw0ds.js +0 -1
- package/dist/assets/useTaskManagerAccess-ljLSKJCt.js +0 -1
- package/dist/assets/useTaskManagerPusherEvents-BBtG4erb.js +0 -1
- package/dist/assets/withTransactionSidePanel-DG1lldsp.js +0 -25
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as R}from"./liveblocks-D15RiFCG.js";import{a as i}from"./sentry-CKsmO8pj.js";import{u as j,k as st,j as g,s as ge,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-DH5NyLW2.js";import{pv as Ie,fF as ee,gV as rt,UK as lt,oB as dt,ob as ut,DF as se,WY as mt,gh as pt,bn as ft,df as Re,bq as _e,sS as H,VQ as Y,WZ as we,W_ as le,We as Pe,ma as Fe,W$ as Ue,Wj as de,Wk as ue,m$ as xe,Sf as me,WU as $,m4 as Ve,m2 as Le,me as ht,pi as St,X0 as yt,X1 as Tt,Dw as Q,m9 as Be,RA as Oe,cm as bt,dl as gt,X2 as It,WT as vt,X3 as Et,X4 as kt,X5 as Dt,X6 as Ct,Ds as At,X7 as Rt,X8 as _t,X9 as wt,Xa as Pt,Xb as Ft,md as Ut,Xc as xt,Xd as Vt,WV as Lt,Xe as Bt,Xf as Ot,Xg as Nt,Ru as zt,Rk as jt,RJ as Mt,mf as Wt,Sg as ve,pn as Xt}from"./zeni-epic-state-DJybC3kH.js";import{o as K,S as _,k as G,b3 as $t,z as Ne,E as Gt,a2 as qt,b4 as Ht,ac as Yt,a5 as ce,K as Kt,b5 as Jt,p as ie,at as Qt,b6 as Zt,b7 as en,b8 as tn,af as nn,aw as oe}from"./index-DoOOksKb.js";import{n as an,S as on,D as sn}from"./mui-BJmjbHJq.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-CT0mpA7T.js";import{d as ze}from"./decodeURIComponentSafe-BCOdiOkt.js";import{u as rn}from"./useInitialThreadRequest-DFml2VJj.js";import{h as je,c as Me,g as ln,e as dn}from"./routePaths-vlSgnRAt.js";import{u as un}from"./expenseAutomationHelper-CrhgoNQO.js";import{A as mn}from"./utils-5onWhP-T.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="56a01da2-3440-4838-983f-9b53b0426146",t._sentryDebugIdIdentifier="sentry-dbid-56a01da2-3440-4838-983f-9b53b0426146")}catch{}})();function pn(t=!0){const e=j(),o=st(),{useFeatureGate:n}=K(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const d=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return d!=="In-Progress"&&d!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function fn(t,e){const o=(function(){const d=j(),[T,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=K(),{configValue:I,isDynamicConfigLoading:h}=y("transaction_categorization_config"),b=!h&&I?.capitalization_enabled===!0,k=g((r=>ee(r))),C=k.companyId,w=g((r=>rt(r.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:P,dismissedAccounts:F}=g((r=>{const v=r.tenantState.currentTenantId,E=v!=null?r.tenantState.tenantsById[v]:void 0;return{capitalizableAccounts:E?.capitalizableAccounts??null,capitalizableAccountOverrides:E?.capitalizableAccountOverrides??null,dismissedAccounts:E?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const U=i.useRef(P);U.current=P;const L=i.useRef(F);L.current=F;const B=g((r=>lt(r.accountState)),ge),q=i.useMemo((()=>{const r={};for(const v of B)v.accountId!=null&&v.accountName!=null&&(r[v.accountId]=v.accountName);return r}),[B]),M=l!=null?q[l]??null:null,O=i.useCallback((r=>{if(!b)return;const v=V.current;if(v==null)return;const E=v.accounts??[],X=new Set(r),J=U.current??{},te=L.current;for(const N of E)if(X.has(N.accountId)&&J[N.accountId]==null&&te?.[N.accountId]==null)return p(N.classificationType),u(N.accountId),void S(!0)}),[b]),W=i.useCallback(((r,v)=>{d(dt(C,r,v,!0)),S(!1),p(null),u(null)}),[d,C]),f=i.useCallback((()=>{l!=null&&(d(ut(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:T&&b,popupType:D,popupAccountId:l,popupAccountName:M,currencySymbol:w,checkAndShowPopup:O,handleSubmit:W,handleDismiss:f}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),We=(t,e,o)=>{G.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),We(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:T}=t,S=i.useCallback((u=>u.transactionId??T??""),[T]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((h,b,k,C)=>{const w=Ee(b,k,C),A=z.get(w);return A!=null&&(z.delete(w),We(h,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((h,b)=>{G.trackRecommendationAccepted(Z(h,b))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((I,h,b)=>{G.trackRecommendationFeedbackSubmitted({...Z(I,h),feedbackReason:b})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((I,h)=>{z.set(Ee(h,I.lineId,I.dimension),{feedback:I,transactionId:h})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),G.trackRecommendationFeedbackSkipped(Z(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?R.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=K(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function Xe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=K(),a=g((f=>ee(f))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),d=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:T}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(_.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=g((f=>Y(f,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,I=g((f=>{const r=Y(f,p)?.transactionDetailLocalData.vendorUpdates?.id;return r==null?"Not-Started":f.transactionVendorViewState.editVendorStateById[r]?.saveStatus.fetchState??"Not-Started"})),h=i.useMemo((()=>l?.fetchState==="Completed"?Xe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),b=g((f=>{if(h!=null)return we(f.customerIncomeState,f.vendorExpenseState,f.trendState,h,"month")})),k=g((f=>le(f))),C=g((f=>{if(h!=null)return Pe(f.trendWithTransactionsState,h,"TransactionDetail")})),w=a.company?.companyInfo.firstMonthOfFY??1,A=g((f=>Fe(f.accountState,f.accountListState,"accountList"))),[P,F]=i.useState(!1),[V,U]=i.useState(!1),[L,B]=i.useState(!1);i.useEffect((()=>{F(!1),U(!1),B(!1)}),[t,e]);const q=i.useCallback((()=>{F(!1),U(!1)}),[]),[M,O]=i.useState(!1),W=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),B(!0)),h!=null&&(!s||c&&d===!1)&&(P?V||b==null||(U(!0),o(me(h,"TransactionDetail",{timeframe:"month",timePeriod:W??b}))):(o(de()),o(ue()),F(!0),o(xe(h))))}),[o,L,l?.fetchState,l?.transaction,h,s,c,d,P,V,b,W]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:I,tranEntity:h,defaultTrendTransactionTimePeriod:b,vendorViewDetails:k,uiState:C,firstMonthOfFY:w,uncategorizedAccounts:A,resetTrendIsFetchedStates:q,isCreateVendorDrawerOpen:M,setIsCreateVendorDrawerOpen:O}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=qt(),d=j(),T=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??T,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return R.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:R.jsx(Tn,{onClick:p=>p.stopPropagation(),children:R.jsx(Ht,{...D})})})},Tn=an(on)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`;function bn(t,e){t(St({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:H(e.transactionType),sourceTransactionType:H(e.sourceTransactionType)}))}function gn({currentTransactionId:t,enabled:e=!0,buildPath:o,beforeNavigate:n,navigate:a,navigateState:s}){const c=g((T=>T.createTransferEntryState.lastTransferEntryReplacement)),d=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||d.current===c)return;const{previousTransactionId:T,newTransactionId:S}=c;t.id===T.id&&t.type===T.type&&(d.current=c,n?.(),a(o(S),{replace:!0,state:s}))}),[e,c,t,o,n,a,s])}const In=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:o})=>{const n=De(),a=Ce(),s=j(),c=pe(),{transactionTypeEncoded:d,transactionId:T}=Ae(),S=e??T,D=o??ze(d??"");let p;je(S,D)&&(p={id:S,type:H(D)});const l=p!=null?g((y=>Y(y,p))):void 0,u=()=>{const y=ce(n.state?.pathnameStackToGoBack),I=y.poppedPathname??((h=2)=>{let b="../";for(let k=0;k<h;k++)b=`${b}../`;return b})(1);a(I,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:p,onSaveVendor:()=>{s(Be(p,void 0))},onSaveSuccess:()=>{if(l!=null&&l?.transaction&&l?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&l?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=l?.transactionDetailLocalData.vendorUpdates,I={id:l?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:l?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:l?.transactionDetailLocalData.vendorUpdates?.qboId??""},h={transactionId:{id:l?.transaction?.id,type:l?.transaction?.type},transaction:l?.transaction,lineIds:l?.transaction?.lines?.map((b=>b.id))??[]};s(Q({entity:I,amount:l?.transaction?.amount.amount,transactionDetails:h,flowType:"detail",isFetchCOT:c}))}u()},onCancel:()=>{p!=null&&s(yt({transactionId:p})),s(Le()),s(Tt()),t(!0),u()}}},vn=it((function(t,e){const o=Y(t,e.selectedTransaction);let n;o==null&&console.warn("Check if the you've selected the transaction before getting the details");const a=Ne.getSignedInUser(),s=t.tenantState.currentTenantId,c={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:s??""};o!=null&&o.fetchState==="Completed"&&o.transaction!=null&&e.entity!=null&&(n=It(t,e.entity,"TransactionDetail"));const d=t.entityAutoCompleteState.autoCompleteText.common,T=vt(t,"common"),S=ee(t);return{transactionDetail:o,transactionAttachmentEndpointToDownload:`${oe}/transaction_attachment`,transactionAttachmentsEndpointToFetch:S.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${oe}/transaction_attachments_accounting_provider`:`${oe}/transaction_attachments`,attachmentUploadEndpoint:`${nn.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:n,analytics:G,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:T},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails"),isTransactionSplitEditMode:o?.transactionDetailLocalData?.editMode??!1}}),(function(t,e){const{isCOTEnabled:o}=e;return{onBackClick:()=>{if(t($("common")),e.onBackClick!=null)return void e.onBackClick();const n=ce(e.location.state?.pathnameStackToGoBack),a=n.poppedPathname??$e(2);e.navigate(a,{state:{pathnameStackToGoBack:n.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(n,a)=>{e.transaction!=null&&t(Xt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:n,customerId:a}))},onTransactionClick:n=>{e.resetTrendIsFetchedStates(),t(de()),t(ue());const a=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Me(n,e.tenantEmailDomain),{state:{pathnameStackToGoBack:a}})},onTrendSelectedPeriodChange:n=>{if(n==null)e.defaultTrendTransactionTimePeriod!=null&&t(ve(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const a=n.currentTimePeriod==null?n.addTimePeriod:{startDate:n.addTimePeriod.startDate,endDate:n.currentTimePeriod.endDate};t(me(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:n.addTimePeriod})),t(ve(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:a}))}},onSaveUpdates:(n,a,s,c)=>{t(c===!0&&s!=null?Be(n,s,!0,e.isExpenseAutomationEnabled):Wt({transactionId:n,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:a})),t($("common"))},onUploadAttachmentAttachment:n=>{t(Mt(n))},onDeleteAttachment:n=>{e.transaction!=null&&t(jt(n,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(n,a)=>{t(zt({transactionId:n,transactionLocalData:a}))},onUpdateAllChecked:(n,a,s,c)=>{e.transaction!=null&&t(Nt(e.selectedTransaction,e.transaction,n,a,s,c))},onResetLineItemsCategoryClassInLocalData:(n,a,s,c,d,T)=>{t(Ot(n,a,s,c,d,T))},onChangeCategoryClassWhenUpdateAllIsChecked:(n,a)=>{e.transaction!=null&&t(Bt({id:e.transaction.id,type:e.transaction.type},e.transaction,n,a))},onSaveSuccess:()=>{const n=ce(e.location.state?.pathnameStackToGoBack);if(n.poppedPathname!=null){const a=mn(n.poppedPathname,"/").split("/"),s=a[a.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(s)&&e.navigate(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${ln(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${dn(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(Oe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(n,a)=>{n.trim().length>=2?t(Lt({searchString:n,entityType:a,searchOrigin:"common"})):n.trim().length===0&&t($("common"))},onCancelAutoComplete:()=>{t($("common"))}},onFetchRecommendationsForEntity:(n,a,s,c)=>{t(Q({entity:n,amount:a,transactionDetails:s,flowType:"detail",isBulkFetch:c,isFetchCOT:o}))},clearRecommendationForLineId:n=>{const{transactionId:a,transaction:s,lineId:c}=n;t(Vt(a,s,c))},resetUpdateErrorState:()=>{const n={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(xt(n))},onSaveVendorInLocalData:(n,a,s,c,d)=>{if(t(Ut({transactionId:n,vendorUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(Q({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o})),t(Ve({vendorId:a.id?a.id:void 0,localData:{vendorName:a.name,vendorId:a.id?a.id:void 0}})),!a.id&&e.transaction!=null){const T=e.transaction,S=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(T.type??"")}/${T.id}/vendor/create`,{state:{pathnameStackToGoBack:S}})}},onSaveCustomerInLocalData:(n,a,s,c,d)=>{t(Ft({transactionId:n,customerUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(Q({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o}))},onUpdateAllTranactionsWithCurrentVendorChecked:n=>{t(Pt({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:n}))},onClickUpdateVendorToAllLineItems:(n,a,s)=>{t(wt(n,a,s))},onResetVendorToAllLineItems:(n,a,s)=>{t(_t(n,a,s))},saveLatestSelectedEntity:(n,a,s)=>{t(Rt({transactionId:n,lineId:a,entity:s}))},updateVendorBulkRecommendationsFetchStatus:(n,a)=>{t(At(n,a))},setIsVendorUpdateAllChecked:(n,a,s)=>{t(Ct(n,a,s))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?n=>bn(t,n):void 0,onLineAdd:()=>{if(e.transaction==null)return;const n={id:e.transaction.id,type:e.transaction.type},a=e.transaction.type==="journal_entry",s=e.transaction.amount?.currencyCode??"",c=e.transaction.amount?.currencySymbol??"",d=a?{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"journal_entry_line_detail",type:"journal_entry_transaction_line",postingType:void 0,postingTypeName:"",lineTransactionType:"journal_entry"}:{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"account_based_expense_line_detail",type:"transaction_with_account_and_class_line"};t(Dt(n,d))},onLineDelete:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(kt(a,n))},onToggleSplitEditMode:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(Et(a,n))}}}))(tn);function zn(){const t=Ce(),e=j(),o=De(),{useFeatureGate:n}=K(),a=Kt(),s=g((m=>ee(m))),c=s.userRole.includes("charge_card_user")||s.userRole.includes("charge_card_admin"),d=s.userRole!=null&&Re(s.userRole),T=s.userRole!=null&&_e(s.userRole),{isFeatureEnabled:S}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:D}=n(_.isExpenseAutomationEnabled),{tenantEmailDomain:p,transactionTypeEncoded:l,transactionId:u}=Ae(),[y,I]=i.useState(!1),h=ze(l??""),b=je(u,h),k=g((m=>m.transactionVendorViewState)),C=pe(),{isFeatureEnabled:w}=n(_.isRecommendationFeedbackEnabled),A=Jt(),{onRecommendationSelection:P,popup:F}=hn({isEnabled:w,fallbackTransactionId:u}),V=i.useMemo((()=>({...A,onRecommendationSelection:P})),[A,P]),{isFeatureEnabled:U}=n(_.isTransactionCommentingEnabled),{isFeatureEnabled:L}=n(_.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:B}=n(_.isProjectsTransactionsEnabled),{isFeatureEnabled:q}=n(_.isTransactionSplitEnabled),M=a?.currentTenant?.companyId,O=a?.currentTenant?.companyName,W=rn(M),f=i.useMemo((()=>{if(b)return{id:u,type:H(h)}}),[b,u,h]),r=f!=null?g((m=>Y(m,f))):void 0,v=r?.transactionDetailLocalData.vendorUpdates?.id!=null?k.editVendorStateById[r?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",E=r?.fetchState==="Completed"?Xe(r?.transaction):void 0,X=g((m=>E!=null?we(m.customerIncomeState,m.vendorExpenseState,m.trendState,E,"month"):void 0)),J=g((m=>le(m))),te=g((m=>E!=null?Pe(m.trendWithTransactionsState,E,"TransactionDetail"):void 0)),N=s.company?.companyInfo.firstMonthOfFY??1,Ge=g((m=>Fe(m.accountState,m.accountListState,"accountList"))),[qe,fe]=i.useState(!1),[He,he]=i.useState(!1),[Ye,Se]=i.useState(!1),Ke=i.useCallback((m=>Me(m,p??"")+o.search),[p,o.search]),Je=i.useCallback((()=>{Se(!1)}),[]);gn({currentTransactionId:f,enabled:p!=null&&p!=="",buildPath:Ke,beforeNavigate:Je,navigate:t,navigateState:o.state});const ye=()=>{fe(!1),he(!1)},Te=un();pn();const ne=i.useRef(r?.transaction);ne.current=r?.transaction;const Qe=r?.transactionDetailUpdateStatus?.fetchState,x=fn(Qe,(()=>{const m=[];if(ne.current!=null)for(const ae of ne.current.lines??[])"account"in ae&&ae.account?.accountId!=null&&m.push(ae.account.accountId);return m}));i.useEffect((()=>{f!=null&&r!=null&&r.fetchState==="Not-Started"&&(e(Oe(f,!1)),ye())}),[e,f,r?.fetchState]),i.useEffect((()=>{if(f!=null&&r?.fetchState==="Error"){const m=ie(o.state?.pathnameStackToGoBack,o.pathname);t("page-not-found",{replace:!0,state:Te?{pathnameStackToGoBack:m,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:m,message:"pageNotFound",origin:"transaction_detail"}})}}),[f,r?.fetchState,t,o.state,o.pathname,Te]),i.useEffect((()=>{Ye||r==null||r.transaction==null||(e(Ue({id:r.transaction.id,type:r.transaction.type})),Se(!0));const m=o.state?.searchContext;E==null&&r?.fetchState==="Completed"&&ke(r?.transaction,m),E!=null&&(!c||d&&T===!1)&&(qe?He||X==null||(he(!0),e(me(E,"TransactionDetail",{timeframe:"month",timePeriod:te?.selectedPeriod?.timePeriod??X}))):(e(de()),e(ue()),ke(r?.transaction,m),fe(!0),e(xe(E))))}),[r?.fetchState,r?.transaction,X,c]),i.useEffect((()=>{J.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)}),[J.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e($("common"))}),[]);const Ze=[l,u].filter((m=>m!=null)),{transactionId:be,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}=In({closeDrawerHandler:m=>{I(!1),t(m?"../":"../..")}}),{isAiCfoAccessEnabled:at,onAskAiCfoClick:ot}=cn({mobileExploreReferrer:"Transaction Details"});return Qt({isDataReady:r?.fetchState==="Completed"}),b?R.jsxs(R.Fragment,{children:[be!=null&&y&&R.jsx(yn,{isOpen:y,transactionId:be,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}),R.jsx(Zt,{toolkit:V,children:R.jsx(vn,{hideDeleteAttachment:!0,firstMonthOfFY:N,isDisabled:r?.transaction?.type==="transfer"&&a?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:p,location:o,navigate:t,selectedTransaction:f,entity:E,isCOTEnabled:C,defaultTrendTransactionTimePeriod:X,resetTrendIsFetchedStates:ye,transaction:r?.transaction,uncategorizedAccounts:Ge,vendorSaveStatus:v,isVendorBulkUpdateOnTransactionEnabled:S,isCreateTransferEntryFromExpenseEnabled:L,isExpenseAutomationEnabled:D,isAiCfoAccessEnabled:at,onAskAiCfoClick:ot,isTransactionCommentingEnabled:U,isProjectsTransactionsEnabled:B,isTransactionSplitEnabled:q,companyId:M,companyName:O,initialOpenThreadRequest:W})}),F,x.showPopup&&x.popupType!=null&&R.jsx(en,{popupType:x.popupType,currencySymbol:x.currencySymbol,accountId:x.popupAccountId??"",accountName:x.popupAccountName??"",onSubmit:x.handleSubmit,onDismiss:x.handleDismiss})]}):R.jsx(ct,{to:$e(Ze.length)})}const $e=(t=2)=>{let e="../";for(let o=0;o<t;o++)e=`${e}../`;return e},ke=(t,e)=>{if(t!=null){const{transactionCategory:o,transactionClass:n}=En(t),a=kn(t);G.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,o.length>0?o:void 0,n.length>0?n:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((s=>s.fileName)),e!=null?"Search":void 0,e?.searchTerm,e?.resultPosition,e?.resultsCount)}},En=t=>{const e=[],o=[];return t.lines?.forEach((n=>{switch(n.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const a=n;a!=null&&a.account!=null&&a.account.accountName?.length>0&&e.push(a.account.accountName),a.class!=null&&a.class.className?.length>0&&o.push(a.class.className);break}}})),{transactionCategory:e,transactionClass:o}},kn=t=>bt(t)===!0?t.customer?.name??"":gt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{yn as C,zn as T,hn as a,pn as b,fn as c,In as d,vn as e,gn as f,pe as g,bn as h,On as i,ke as l,Bn as r,Nn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D15RiFCG.js";import{h as K,g as U,u as Z,i as X,j as g,N as q,l as H,n as Me,o as C}from"./core-DH5NyLW2.js";import{fF as Q,ua as ee,lf as p,eE as te,S6 as Se,br as pe,$K as Be,l$ as ae,Wg as ne,$L as fe,$M as Le,bE as k,S2 as he,$N as Fe,$O as Te,$P as Oe,S5 as ge,$Q as $e,$R as De,$S as Ge,$T as Ie,$U as ze,$V as we,$W as ye,Ti as Re}from"./zeni-epic-state-DJybC3kH.js";import{o as ce,S as J,k as F,G as ke,de as oe,p as w,a5 as se,ar as _e,Q as Ve}from"./index-DoOOksKb.js";import"./mui-BJmjbHJq.js";import{a as y}from"./sentry-CKsmO8pj.js";import{w as ie}from"./withTransactionSidePanel-BYLq7mXT.js";import{p as re,c as de}from"./routePaths-vlSgnRAt.js";import{B as Ne}from"./utils-5onWhP-T.js";import{d as j}from"./decodeURIComponentSafe-BCOdiOkt.js";import{Z as Je}from"./ZeniAccountStatementScreen-DUlZ_ds_.js";import"./recharts-ZfW9kU_v.js";import"./analytics-CUp3ZA3r.js";import"./plaid-CoLmm0Qk.js";import"./dnd-D7CsX5Sk.js";import"./stripe-cKAAJElX.js";import"./lottie-BDOOwIRK.js";import"./lexical-BKNSP2gz.js";import"./pdf-DNi_3ylG.js";import"./useAskAiCfoHostNavButtonProps-CT0mpA7T.js";import"./TransactionDetailScreen-BQn-CaJc.js";import"./useInitialThreadRequest-DFml2VJj.js";import"./expenseAutomationHelper-CrhgoNQO.js";import"./stripSplatSuffix-I0ZnDMgZ.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]="aabf1800-f1ed-4031-a64a-787a2a7bd7dc",a._sentryDebugIdIdentifier="sentry-dbid-aabf1800-f1ed-4031-a64a-787a2a7bd7dc")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(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:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=Qe(o),f="month",T=g((l=>Q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,v,T.bookCloseDate),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){$(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Qe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(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},Ze=H((function(a,e){const t=Fe(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:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=$e(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:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();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)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>Ge(D.transactionListState,h,S))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((D=>Q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&($(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-D15RiFCG.js";import{h as L,g as F,u as U,i as M,j as y,N as D,l as V,n as Te,o as k}from"./core-DH5NyLW2.js";import{cv as N,fF as v,Zj as P,Ow as ae,Od as H,Oe as ne,Zl as Ie,Oz as we,Zh as Ce,Zi as se,Zx as ke,MA as je,Cd as Ae,Zn as be,OG as Ee,Zk as re,dd as q,GK as oe,dZ as ve,d_ as De,$H as Le,$I as Fe,Of as Ue,$J as Pe,Og as Be,Op as Oe,bq as Re,bJ as Me,cG as Ve,bK as Ne,cu as _e,bt as Ze,Ui as ze,ct as Ge}from"./zeni-epic-state-DJybC3kH.js";import{K as _,j as $e,z as E,a9 as Z,k as A,d7 as He,d8 as qe,d9 as $,a2 as K,E as Ke,ar as Je,at as We,o as ie,S as O,ac as Qe,a8 as Xe,da as Ye,af as J,p as et,db as tt,a5 as W,dc as at,aj as nt,a0 as X,dd as st,f as rt}from"./index-DoOOksKb.js";import{D as ot,n as R,S as it}from"./mui-BJmjbHJq.js";import ct from"./NotFoundScreen-B5LVzvCT.js";import{S as Y}from"./SetupPagesScreen-gPQd_kHy.js";import{a as p}from"./sentry-CKsmO8pj.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-CT0mpA7T.js";import{u as ut}from"./useInitialThreadRequest-DFml2VJj.js";import{M as ce}from"./MobileAppDrawer-MqeZAr94.js";import{F as dt}from"./FeaturePreviewScreen-B0fvU5Um.js";import{a as ee}from"./analyticsHelper-h7GNG_TP.js";import"./recharts-ZfW9kU_v.js";import"./analytics-CUp3ZA3r.js";import"./plaid-CoLmm0Qk.js";import"./dnd-D7CsX5Sk.js";import"./stripe-cKAAJElX.js";import"./lottie-BDOOwIRK.js";import"./lexical-BKNSP2gz.js";import"./pdf-DNi_3ylG.js";import"./utils-5onWhP-T.js";import"./BusinessVerificationPageScreen-DvozPdQh.js";import"./routePaths-vlSgnRAt.js";import"./InboxNotificationsProvider-Bvn-EOCR.js";import"./useTaskManagerAccess-Dwl3Yru5.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]="0907433a-ce25-49b6-a9cd-12e49cdaa456",t._sentryDebugIdIdentifier="sentry-dbid-0907433a-ce25-49b6-a9cd-12e49cdaa456")}catch{}})();const pt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(He);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=M(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=$e(r),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>P(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(H()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{$(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{$(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=M(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>P(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(H()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{$(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=R.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
+
`,St={overlayWidth:new Qe(100,100,48)},ht=V((function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:o,location:i,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=xt(s):d==="statements"?c=Tt(s):d==="taxLetter"?c=It(s):d==="settings"&&(c=wt(s));const S=et(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(Le({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Ye);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=F(),o=L(),i=U(),r=K(),m=Ke(),s=y((b=>v(b))),{tenantEmailDomain:d}=M(),c=s.companyId??E.getSignedInUserTenant(d)?.companyId,[S,T]=p.useState(!1),l=y((b=>re(b))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=N(h?.loggedInUserRoleMap),I=q(h?.loggedInUserRoleMap),{areTenantIdsInSync:B}=Je();p.useEffect((()=>{u==="Not-Started"&&!S&&B&&(T(!0),i(oe(!0)))}),[S,i,u,B]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&o("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,o]);const w=()=>{o("..")},[le,ue]=p.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:u==="Completed"});const{useFeatureGate:z}=ie(),{isFeatureEnabled:me}=z(O.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=z(O.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=z(O.isTreasuryCommentingEnabled),ge=ut(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),Se=ve(s),he=De(me,s);if(Se===!0&&he!==!0)return e.jsx(dt,{});if(C){const b=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(Z,{analytics:A,onLoad:()=>{}}):null,e.jsx(ot,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(ht,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:c,analytics:A,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&I?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Ct=R(it)`
|
|
10
|
+
display: flex;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
`,kt=R.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
width: 100%;
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: center;
|
|
20
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
+
`;function jt(){const t=L(),a=U(),n=K(),o=F(),i=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Fe(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[r,s.fetchState,a]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:T,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(o.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const At=R.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
width: 100%;
|
|
25
|
+
flex: 1 1 auto;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
+
`;function bt(){const t=L(),a=K(),n=F(),o=U(),i=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Pe(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Be(!1)))}),[r,s.fetchState,o]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=W(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const Et=V((function(t,a){const{companyId:n}=a,o=P(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(st),vt=()=>{const t=nt(),a=L(),n=F(),o=U(),{tenantEmailDomain:i}=M(),[r,m]=p.useState(!1),s=y((g=>v(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||T==null||(c(!0),o(H()))}),[S,o]);const T=E.getSignedInUserTenant(i)?.companyId??s.companyId,l=E.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=_(),C=N(f?.loggedInUserRoleMap),h=q(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=W(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:r,handleDrawerToggle:x}),e.jsx(Et,{analytics:A,navigate:a,companyId:T,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
+
`;function aa(){const t=F(),a=y((g=>v(g))),{useFeatureGate:n}=ie(),o=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=q(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),c=Ve(r?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),T=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&_e(r?.loggedInUserRoleMap),l=o&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(O.isDebitCardFeatureEnabled),f=rt(a,u,x)&&!s&&Ze(r?.loggedInUserRoleMap),C=ze(r?.loggedInUserRoleMap),h=Ge(r?.loggedInUserRoleMap);return e.jsxs(Te,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(bt,{})}),o?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{aa as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-D15RiFCG.js";import{a as u}from"./sentry-CKsmO8pj.js";import{h as M,u as G,i as z,j as f,l as N,g as q,n as We,o as P,N as L}from"./core-DH5NyLW2.js";import{VN as gt,VO as Ze,RA as et,VP as vt,fF as U,g_ as ge,VQ as Tt,cE as xt,VR as bt,FH as yt,VS as wt,VT as oe,VU as te,VV as ve,T9 as ue,Ta as ke,FX as pe,T8 as he,FK as tt,Fh as Pe,VW as It,Tb as Y,l$ as me,VX as je,Fb as Ct,VY as Dt,VZ as Et,V_ as Ve,V$ as _e,W0 as Ae,W1 as Re,FR as Te,W2 as nt,Fy as at,W3 as Ft,W4 as kt,W5 as Pt,W6 as jt,W7 as Vt,W8 as _t,W9 as At,Wa as Rt,Cp as Ut,Cx as Lt,Cq as Bt,Sg as we,Wb as Ot,Wc as Wt,lf as Ie,br as Mt,Wd as Nt,We as Gt,mZ as $t,n6 as zt,Sf as Ce,bE as Me,Wf as ot,RS as st,Wg as Yt,Wh as Jt,Wi as Kt,n8 as qt,Wj as Ne,Wk as Ge,Wl as $e,Wm as ze,Wn as Ht,n4 as Qt,Wo as Xt,n7 as Zt,Wp as en,Wq as it,SB as rt,mn as tn,Wr as nn,Ws as De,Wt as dt,Sz as lt,Ip as an,Wu as on,Wv as sn,mH as ct,Ww as rn,Wx as dn,SN as ln,vg as cn,Wy as ut,Wz as Ye,SK as Ee,WA as Je,WB as un,SP as pn,WC as hn,WD as mn,WE as fn,WF as Sn,WG as gn,vj as vn,WH as Tn,Tc as xn,UM as bn,Ss as Fe,ia as yn,UO as wn,UN as In,i8 as Cn,WI as Dn,WJ as En,Iu as Fn,WK as kn,WL as Pn,WM as jn,WN as Vn,mr as _n,bn as An,d_ as Rn,dZ as Un}from"./zeni-epic-state-DJybC3kH.js";import{E as Ln,a2 as ne,ac as Ue,o as H,S as W,z as R,a8 as Bn,aN as On,k as j,_ as Le,O as xe,aw as ee,at as se,aO as Wn,aP as pt,ar as Mn,a9 as Se,aQ as Nn,p as K,K as Gn,G as ht,aR as $n,af as mt,a5 as zn,j as Ke,aS as Yn,H as J,aa as Jn,ag as ft,ah as Kn,aT as qn,aU as Hn,V as Be,aV as Qn,aW as Xn,a4 as Zn,aX as ea,aY as ta}from"./index-DoOOksKb.js";import{D as na,n as B,S as St}from"./mui-BJmjbHJq.js";import{t as aa,A as oa}from"./AddressScreen-zaTuzB5p.js";import fe from"./NotFoundScreen-B5LVzvCT.js";import{F as sa}from"./FeaturePreviewScreen-B0fvU5Um.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-Culiu7tt.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CT0mpA7T.js";import{M as re}from"./MobileAppDrawer-MqeZAr94.js";import{v as Oe,c as ua,d as pa}from"./routePaths-vlSgnRAt.js";import{D as ha}from"./DrawerScreen-CWeGSAI6.js";import{a as ma,m as fa}from"./accountMappingHelper-BDERhFkI.js";import"./recharts-ZfW9kU_v.js";import"./analytics-CUp3ZA3r.js";import"./plaid-CoLmm0Qk.js";import"./dnd-D7CsX5Sk.js";import"./stripe-cKAAJElX.js";import"./lottie-BDOOwIRK.js";import"./lexical-BKNSP2gz.js";import"./pdf-DNi_3ylG.js";import"./utils-5onWhP-T.js";import"./pathToGoBack-CchmBFeO.js";import"./InboxNotificationsProvider-Bvn-EOCR.js";import"./useTaskManagerAccess-Dwl3Yru5.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]="be60093b-0fde-42b6-8882-41a946c55fb8",e._sentryDebugIdIdentifier="sentry-dbid-be60093b-0fde-42b6-8882-41a946c55fb8")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=q(),a
|
|
5
|
+
`,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=q(),a=G(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},Q="accrued_expenses",xa=N((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Q,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Q,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Q,searchText:t}))},onReloadReport:()=>{e(tt(Q))},onScroll:t=>{e(Ve({scheduleType:Q,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Et()),j.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Q,fetchState:t}))}}}))(Wn),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=M(),h=G(),{useFeatureGate:v}=H(),m=xe();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(W.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),T=f((S=>U(S))),x={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:T.tenantId},g=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:T.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),E=f((S=>ke(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&E==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:Pe("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,E]);const V=f((S=>It(S,Q))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:F}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:V.fetchState==="Completed"});const D=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const k=f((S=>ge(S,T.companyId))),$=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:$}),o.jsx(xa,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:V,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:j,controllerUserDetails:k,isAiCfoAccessEnabled:O,onAskAiCfoClick:F,onClickMenuIcon:()=>$(!0)})]})},X="fixed_assets",ya=N((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:X,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:X,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:X,searchText:t}))},onReloadReport:()=>{e(Te(X))},onScroll:t=>{e(Ve({scheduleType:X,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:X,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=M(),l=G();ce();const{useFeatureGate:p}=H(),h=xe(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(W.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>U(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[x,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>ke(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&x===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[x]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,E,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(Te("fixed_assets",{selectedTimeframe:Pe("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,X))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:V}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),$=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:$}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:T,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:V,onClickMenuIcon:()=>{$(!0)}})]})},Ia=B.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
min-height: 100%;
|
|
8
8
|
width: 100%;
|
|
@@ -10,7 +10,7 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: center;
|
|
12
12
|
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`,Ca=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=Y(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Lt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(Vt(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Pt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))(Nn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=M(),n
|
|
13
|
+
`,Ca=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=Y(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Lt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(Vt(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Pt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))(Nn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=M(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(W.isOpexByVendorFeatureEnabled),d=f((F=>Y(F)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,T]=u.useState(!1),x=f((F=>ue(F))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((F=>oe(F))),{isAiCfoAccessEnabled:E,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Mn();u.useEffect((()=>{(g||y||b)&&c===!1&&x!=="Completed"&&w&&(n(pe()),T(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[x,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,V]=u.useState(!1),O=F=>{V(F)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:j,onLoad:F=>{I.previousTab==null?F.trackVendorOperatingExpensesPageLoaded("Side Panel"):F.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:E,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Ea=N((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(Te(Z))},onScroll:t=>{e(Ve({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Z,fetchState:t}))}}}))(pt),Fa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=M(),l=G(),{useFeatureGate:p}=H(),h=xe();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(W.isOpexByVendorFeatureEnabled),d=f((S=>U(S))),c=f((S=>ke(S,"prepaid_expenses"))),T={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(Te("prepaid_expenses",{selectedTimeframe:Pe("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:E,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,E,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:V}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>Y(S).isReportGenerated));f((S=>Y(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),$=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:$}),o.jsx(Ea,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:x,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:V,onClickMenuIcon:()=>{$(!0)}})]})},ka=B.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
min-height: 100%;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${e=>e.theme.colors.grey4};
|
|
21
|
-
`,Pa=N((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Yt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=zn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:V}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,T??"",x,g,y,b,I,E,C,w,A,V)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Xt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(
|
|
21
|
+
`,Pa=N((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Yt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=zn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:V}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,T??"",x,g,y,b,I,E,C,w,A,V)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Xt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Qt({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(Ht({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&j.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ne()),e(Ge()),e($e()),e(ze()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&j.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(qt("Not-Started",n)),e(Ne()),e(Ge()),e($e()),e(ze()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Kt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),T=K(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:T}})},onVendorDetailUIChange:r=>{e(Jt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=K(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))($n);function qe({referrerType:e,isFiling1099FeatureEnabled:a}){const s=G(),t=q(),n=M(),i=Gn(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=z(),c=d.vendorId,T=d.qboId,{tenantEmailDomain:x,timeframe:g,startDate:y,endDate:b}=d,I={id:T??"",name:"",type:"vendor",zeniId:c??"",qboId:T??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const E=ne(),C=f((_=>U(_))),w=f((_=>c!=null?Ot(_,c,I):void 0)),A=f((_=>_.vendorState.vendorByID[c??""])),V=f((_=>U(_).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Wt(V,2))),F=Ie({startDate:O.startDate,endDate:Mt()}),D=Nt(V),k=f((_=>Gt(_.trendWithTransactionsState,I,"EntityDetail"))),[$,S]=u.useState(!1),be=l===!1&&m===!1?void 0:k?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s($t(c,I)),()=>{e!=null&&c!=null&&s(zt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((_,ae,ye)=>{_.id!=null&&j.trackVendorDetails(_.id,_.name,ye,_.account?.accountName,_.class?.className,_.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&$===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:k?.selectedPeriod?.timeframe??"quarter",timePeriod:be},V)),S(!0));const _=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Me(y,_.YYYYDashMMDashDDFormat),endDate:Me(b,_.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,k?.selectedPeriod?.timeframe,l,V]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:F,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??F,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(ka,{windowSize:E,children:o.jsx(Pa,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:V,isTrendPeriodSelected:l,selectedPeriodTimePeriod:k?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:x})})}const ja=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,Va={containerWidth:new Ue(100,58)},_a=B(Jn)`
|
|
22
22
|
width: ${J.sp4};
|
|
23
23
|
height: ${J.sp4};
|
|
24
24
|
cursor: pointer;
|
|
@@ -35,7 +35,7 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
width: ${e=>`${Va.containerWidth.value(e.windowSize)}%`};
|
|
37
37
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
38
|
-
`,Ua=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(qn);function
|
|
38
|
+
`,Ua=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(qn);function He({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=G(),t=M(),{vendorId:n}=z(),i=ne(),l=xe(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=H(),{isFeatureEnabled:r}=m(W.isVendorRecommendationFeatureEnabled),d=f((D=>U(D))).companyName,c=new AbortController,T=c.signal;let x,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");x=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const E=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,T)))}),[n]);const w=Ke(y?.fetchState),A=Ke(g?.fetchState),V=x.vendor?.contactIds,O=V?.[V.length-1],F=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&x?.vendor!=null&&(s(nn(n,x.vendor,F)),x?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,x?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Ma,{children:o.jsx(Yn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(Ba,{children:[o.jsx(_a,{onClick:C}),o.jsxs(La,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Wa,{showAutofill:!1,children:d})]})]}):null,o.jsx(Ua,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?ja.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:x?.vendor?.legalName,isLoading:E}),o.jsx(Ra,{windowSize:i,children:e})]})}const La=B.div`
|
|
39
39
|
display: ${e=>e.showContent?"flex":"none"};
|
|
40
40
|
align-items: center;
|
|
41
41
|
`,Ba=B.div`
|
|
@@ -57,7 +57,7 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
57
57
|
height: 100vh;
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
background-color: ${e=>e.theme.colors.grey4};
|
|
60
|
-
`,Na=N((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(
|
|
60
|
+
`,Na=N((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Hn);function Ga(){const e=M();return o.jsx(Na,{navigate:e})}const $a=B.div`
|
|
61
61
|
display: flex;
|
|
62
62
|
min-height: 100%;
|
|
63
63
|
width: 100%;
|
|
@@ -65,11 +65,11 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
65
65
|
flex-direction: column;
|
|
66
66
|
align-items: center;
|
|
67
67
|
background-color: ${e=>e.theme.colors.grey4};
|
|
68
|
-
`,za=N((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Je())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ya(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Je())},onClickRedirectToQBO:()=>{window.open(`${Le.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(
|
|
68
|
+
`,za=N((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Je())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ya(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Je())},onClickRedirectToQBO:()=>{window.open(`${Le.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(Qn);function Qe(){const e=M(),a=G(),s=q(),{tenantEmailDomain:t}=z(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=z(),p=f((d=>Ye(d))),[h,v]=u.useState(!1),m=f((d=>Ye(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ee(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Be.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:j,onLoad:r}):null,o.jsx(Se,{analytics:j,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Ue(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(Ja,{onClick:d=>d.stopPropagation(),children:o.jsx(Ga,{})})}),o.jsx($a,{windowSize:n,children:o.jsx(za,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const Ya=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,Ja=B(St)`
|
|
69
69
|
display: flex;
|
|
70
70
|
min-height: 100%;
|
|
71
71
|
flex-direction: column;
|
|
72
|
-
`,Ka=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Le.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=K(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=K(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Zn}}))(Xn);function qa(){const e=M(),a=q(),{vendorId:s}=z(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ka,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const
|
|
72
|
+
`,Ka=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Le.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=K(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=K(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Zn}}))(Xn);function qa(){const e=M(),a=q(),{vendorId:s}=z(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ka,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const Ha=B.div`
|
|
73
73
|
display: flex;
|
|
74
74
|
min-height: 100%;
|
|
75
75
|
width: 100%;
|
|
@@ -77,7 +77,7 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
77
77
|
flex-direction: column;
|
|
78
78
|
align-items: center;
|
|
79
79
|
background-color: ${e=>e.theme.colors.grey4};
|
|
80
|
-
`,
|
|
80
|
+
`,Qa=N((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(En({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Fe(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Be.Event.vendor1099TabSettingsSave)}}}))(ea);function Xe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=M(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>xn(C))),T=f((C=>bn(C))),{isAiCfoAccessEnabled:x,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Fe(!1)))}),[r,d]),u.useEffect((()=>{T.saveState.fetchState==="Completed"&&n(Fe(!1))}),[T.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>U(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},E=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:j,onLoad:()=>j.trackPageLoaded(Be.Event.vendor1099ListPage)})}):null,o.jsxs(Ha,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Qa,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:j,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:T,downloadParams:E,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:x,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Xa=B.div`
|
|
81
81
|
display: flex;
|
|
82
82
|
min-height: 100%;
|
|
83
83
|
width: 100%;
|
|
@@ -85,4 +85,4 @@ import{j as o}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3
|
|
|
85
85
|
flex-direction: column;
|
|
86
86
|
align-items: center;
|
|
87
87
|
background-color: ${e=>e.theme.colors.grey4};
|
|
88
|
-
`,Za=N((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(Vn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Pn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=M(),n
|
|
88
|
+
`,Za=N((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(Vn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Pn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=M(),n=G(),i=q(),{tenantEmailDomain:l}=z(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=H(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(W.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),T=e.includes("accrued_expenses"),x=f((k=>oe(k)));let g={};g=f((k=>Fn(k,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((k=>ue(k))),w=f((k=>Y(k).isReportGenerated));f((k=>Y(k).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,V]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),V(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:T,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),j.trackVendorList(x.currentTab,x.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,F]=u.useState(!1),D=k=>{F(k)};return o.jsxs(Xa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:E})]})}function ko(){const{useFeatureGate:e}=H(),a=q().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(W.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(W.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(W.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(W.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(W.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(W.isFiling1099FeatureEnabled),T=f((E=>U(E))),x=T?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];x!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),x!=="netsuite"&&r===!0&&g.push("fixed_assets"),x!=="netsuite"&&d===!0&&g.push("accrued_expenses"),x!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(W.isDebitCardFeatureEnabled),b=Rn(y,T),I=Un(T);return b===!0||I===!0?o.jsx(We,{children:o.jsx(P,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(We,{children:[o.jsx(P,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../summary"})}),o.jsx(P,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(P,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(L,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Fa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099",element:c&&p?o.jsx(Xe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Xe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(He,{appContent:o.jsx(qa,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(He,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(L,{to:"../opex"})}),o.jsx(P,{path:"/summary/:vendorId/:qboId",element:o.jsx(qe,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(qe,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/review",element:v===!0?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/review/vendor/:vendorId",element:v?o.jsx(Qe,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/",element:o.jsx(L,{to:"summary"})}),o.jsx(P,{path:"*",element:o.jsx(fe,{})})]})}export{ko as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-D15RiFCG.js";import{a as l}from"./sentry-CKsmO8pj.js";import{t as u,u as h,j as y,N as I}from"./core-DH5NyLW2.js";import{UA as b,gi as w,JD as j}from"./zeni-epic-state-DJybC3kH.js";import{z as f,a8 as x,ag as S,ah as D}from"./index-DoOOksKb.js";import{n as g}from"./mui-BJmjbHJq.js";import"./recharts-ZfW9kU_v.js";import"./analytics-CUp3ZA3r.js";import"./plaid-CoLmm0Qk.js";import"./dnd-D7CsX5Sk.js";import"./stripe-cKAAJElX.js";import"./lottie-BDOOwIRK.js";import"./lexical-BKNSP2gz.js";import"./pdf-DNi_3ylG.js";import"./utils-5onWhP-T.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]="d20c9811-4153-46da-8628-ea8c5647eb5e",e._sentryDebugIdIdentifier="sentry-dbid-d20c9811-4153-46da-8628-ea8c5647eb5e")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y((m=>b(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{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),l.useEffect((()=>{n||(p(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
+
`,_=g(D.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{B as default};
|