@zeniai/web-app-ui 5.4.14-dev → 5.4.15-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BZk8jrAP.js → AccountMappingScreen-BjOLn722.js} +2 -2
- package/dist/assets/ActualMatchingMatchDetailScreen-DxeGt00n.js +1 -0
- package/dist/assets/AddressRoutes-wf3jLMp6.js +1 -0
- package/dist/assets/AddressScreen-6MrKOfvb.js +9 -0
- package/dist/assets/AiCfoScreen-D2IsGTI7.js +22 -0
- package/dist/assets/{AppDrawer-BnkAekbe.js → AppDrawer-51tmFCqo.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-2Q-AgKCr.js → BillPayApprovalRoutes-CqcByft0.js} +1 -1
- package/dist/assets/BillPayRoutes-DjTR6LDc.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-C8E7IOrb.js +9 -0
- package/dist/assets/CardsAiCfoScreen-CyjNAzbg.js +14 -0
- package/dist/assets/ChargeCardRoutes-D1jDUnLE.js +71 -0
- package/dist/assets/CompanyPassportScreen-CCrHjEm4.js +1 -0
- package/dist/assets/ConnectionAuthScreen-u25O8YEL.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DP56g3tx.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CdWk604C.js +30 -0
- package/dist/assets/{DashboardRoutes-VCRBM_Lo.js → DashboardRoutes-CxVvIZyr.js} +4 -4
- package/dist/assets/{DefaultTenantHome-Bnjp4uin.js → DefaultTenantHome-B1dhRA7X.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-HGMMXsdl.js +18 -0
- package/dist/assets/DrawerScreen-DpM9V-h3.js +1 -0
- package/dist/assets/EntityDetailRoutes-CiWU9eOR.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-C-dPVJak.js → ExpenseAutomationRoutes-BykEoKxY.js} +6 -6
- package/dist/assets/FeaturePreviewScreen-5jpbyDlq.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-B-Qgi5tZ.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-CPjcPE2w.js → InboxNotificationsProvider-CJ59FBLr.js} +1 -1
- package/dist/assets/InvoicingRoutes-DVzjxAr7.js +3 -0
- package/dist/assets/MagicLinkRoutes-BulcIao_.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-B3s3dqD3.js +12 -0
- package/dist/assets/MobileAppDrawer-Diz4hNBc.js +1 -0
- package/dist/assets/NotFoundScreen-l_eBhBHD.js +1 -0
- package/dist/assets/NotificationRoutes-P-tvBMkz.js +1 -0
- package/dist/assets/OAuthConsentScreen-CH9Lv95g.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-D7LURgK7.js +1 -0
- package/dist/assets/{PaymentLinkScreen-B77tcNGP.js → PaymentLinkScreen-BWyxCLTs.js} +5 -5
- package/dist/assets/PeopleRoutes-rbgPpJey.js +22 -0
- package/dist/assets/PerformanceRoutes-CoOModp8.js +1 -0
- package/dist/assets/{Preview-DyDyLMFa.js → Preview-0DfltTWd.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DdhMvyre.js → QBOConnectionScreen-Det19rnQ.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-D5ZwAxEx.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BQTsJiep.js +1 -0
- package/dist/assets/ReimbursementRoutes-B_5omRv6.js +68 -0
- package/dist/assets/ReportsRoutes-CRvQbciE.js +1 -0
- package/dist/assets/RewardsRoutes-5nWEeQ99.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-ehyhu56d.js +33 -0
- package/dist/assets/ScreenRoutes-Cg0QxFx2.js +2 -0
- package/dist/assets/SettingsRoutes-foH5ZJ3w.js +49 -0
- package/dist/assets/{SetupPagesScreen-CfUfKDWM.js → SetupPagesScreen-CAejgxls.js} +5 -5
- package/dist/assets/SignInScreen-BLMRggvG.js +1 -0
- package/dist/assets/SignOutScreen-6HU69Hwf.js +9 -0
- package/dist/assets/TaskListScreen-BuEk-5wI.js +9 -0
- package/dist/assets/TaskRoutes-C7UfLoX_.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CKuWykLU.js +1 -0
- package/dist/assets/TransactionDetailScreen-D1z9X11O.js +5 -0
- package/dist/assets/TransactionListRoutes-DZvkZnS3.js +1 -0
- package/dist/assets/TreasuryRoutes-Bm4PZ59U.js +37 -0
- package/dist/assets/{VendorsRoutes-DWNg-EPe.js → VendorsRoutes-ThVY1BXz.js} +20 -20
- package/dist/assets/WiseConfirmationScreen-CnXwL3Zk.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BI00gqox.js → ZeniAccountRoutes-gVqLclSg.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-n4s_O46n.js +9 -0
- package/dist/assets/{accountMappingHelper-DPBaxZAX.js → accountMappingHelper-C2thHMMO.js} +1 -1
- package/dist/assets/{analytics-D_VVN36A.js → analytics-WkSvCk9z.js} +4 -4
- package/dist/assets/analyticsHelper-PDBXl7Se.js +1 -0
- package/dist/assets/{core-Cc1CwF93.js → core-DtTeGJWB.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BhSMetwg.js → decodeURIComponentSafe-Dnku9ZdA.js} +1 -1
- package/dist/assets/{dnd-AdUHoEcy.js → dnd-DR4eaoV-.js} +1 -1
- package/dist/assets/{empty-PD8ivveW.js → empty-BNegk5KG.js} +1 -1
- package/dist/assets/{empty-DhAh77JM.js → empty-DmZnYBE2.js} +1 -1
- package/dist/assets/{emptyVideoElement-BKPO_tn0.js → emptyVideoElement-CGit-XA8.js} +1 -1
- package/dist/assets/{epic-BJGEeb_3.js → epic-C0vaCxPe.js} +1 -1
- package/dist/assets/expenseAutomationHelper-CNcHl26i.js +1 -0
- package/dist/assets/getLocaleForTenant-Bqc2BhMq.js +1 -0
- package/dist/assets/{index-Bp8ijVbG.js → index-BRw-S0Do.js} +1 -1
- package/dist/assets/{index-zmOdoQIt.js → index-B_U4bcDF.js} +14753 -14753
- package/dist/assets/{index-BJg1S6MG.js → index-BoDMWS6Z.js} +2 -2
- package/dist/assets/index-CnQ2Hwrv.js +1 -0
- package/dist/assets/{index-Cxx08j41.js → index-D79Yg4Pa.js} +1 -1
- package/dist/assets/{index-cHP9lO1h.js → index-DQOY5nqW.js} +1 -1
- package/dist/assets/{index-BJ8vYoNR.js → index-X62DPOrd.js} +1 -1
- package/dist/assets/{index-zhmkax0y.js → index-gtxCOQrD.js} +1 -1
- package/dist/assets/{lexical-BRekJTpF.js → lexical-DF0K2978.js} +1 -1
- package/dist/assets/{liveblocks-CM1vcHN_.js → liveblocks-DXlRhlw7.js} +15 -15
- package/dist/assets/{lottie-BXg_FLck.js → lottie-DOEy9FLJ.js} +1 -1
- package/dist/assets/{mui-ehyt9jca.js → mui-UvvMpioS.js} +2 -2
- package/dist/assets/{pathToGoBack-jAeSfAQ9.js → pathToGoBack-CTzkpPUW.js} +1 -1
- package/dist/assets/{pdf-lib-kwPPw7gn.js → pdf-lib-C8URdnXW.js} +1 -1
- package/dist/assets/{pdf-CHwZP-Er.js → pdf-rdPHFveP.js} +4 -4
- package/dist/assets/{plaid-WRjvFkFp.js → plaid-CIpr1Lyg.js} +1 -1
- package/dist/assets/{pusher-C0WLqP6E.js → pusher-DfQYB_JN.js} +1 -1
- package/dist/assets/{react-miDI-z35.js → react-BS0hNTf7.js} +1 -1
- package/dist/assets/{react-CvCXtyEQ.js → react-BTgc9osR.js} +1 -1
- package/dist/assets/{react-CQgMB5FX.js → react-By3kCyTX.js} +1 -1
- package/dist/assets/{react-ZP71p6P6.js → react-CQQuAOkD.js} +1 -1
- package/dist/assets/{react-L2WtUuXe.js → react-DEp3ukzS.js} +1 -1
- package/dist/assets/{react-Bw2LIZU7.js → react-H6WPphNY.js} +1 -1
- package/dist/assets/{recharts-tLFME7sM.js → recharts-VBeTlX07.js} +1 -1
- package/dist/assets/{reportTimeframe-DX5pHUc_.js → reportTimeframe-CAbHy0y8.js} +1 -1
- package/dist/assets/routePaths-DsLddvmS.js +1 -0
- package/dist/assets/{sentry-Bh68thgn.js → sentry-CtZyo70D.js} +2 -2
- package/dist/assets/stripSplatSuffix-DUYOfZtR.js +1 -0
- package/dist/assets/{url-DqRIAQ9M.js → url-DDEUDnJw.js} +4 -4
- package/dist/assets/{url-BTt3PKLo.js → url-ZY4Nz4s5.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-cU8XyJV-.js +1 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-Du9fPfH0.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-Rl6Dxu4t.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CREE1zcc.js +1 -0
- package/dist/assets/{useDeviceId-B4dK-Ywm.js → useDeviceId-CUrjU4ja.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DfCz3FA3.js +1 -0
- package/dist/assets/useEnsureVendorListLoaded-CoE84-0L.js +1 -0
- package/dist/assets/useInitialThreadRequest-B9aUCLGn.js +1 -0
- package/dist/assets/useTaskManagerAccess-jB_YQM25.js +1 -0
- package/dist/assets/useTaskManagerPusherEvents-UGiOcEas.js +1 -0
- package/dist/assets/{utils-CjDqL2uk.js → utils-Bmb8VI_4.js} +2 -2
- package/dist/assets/withTransactionSidePanel-DCK_khop.js +25 -0
- package/dist/assets/{zeni-epic-state-DFhlE0W3.js → zeni-epic-state-DZFeYKWz.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/ActualMatchingMatchDetailScreen-DdqC6TYo.js +0 -1
- package/dist/assets/AddressRoutes-DZnn8xs0.js +0 -1
- package/dist/assets/AddressScreen-DpzckL13.js +0 -9
- package/dist/assets/AiCfoScreen-BuC0DF7-.js +0 -22
- package/dist/assets/BillPayRoutes-CV19o_tt.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-NPjj2cPM.js +0 -9
- package/dist/assets/CardsAiCfoScreen-CadRu1yE.js +0 -14
- package/dist/assets/ChargeCardRoutes-BRNnHx29.js +0 -71
- package/dist/assets/CompanyPassportScreen-d_xThxF-.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B-GQ_uXR.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Dv-djr6z.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-KQwdDIjg.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-FhF-Oy51.js +0 -18
- package/dist/assets/DrawerScreen-DOVfIfbY.js +0 -1
- package/dist/assets/EntityDetailRoutes-BKu8bIme.js +0 -1
- package/dist/assets/FallBackRoute-BsefzYi4.js +0 -2
- package/dist/assets/FeaturePreviewScreen-CEvvSUOY.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BRLjqcM8.js +0 -1
- package/dist/assets/InvoicingRoutes-Cn0ho2Ac.js +0 -3
- package/dist/assets/MagicLinkRoutes-DETheAv8.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-hwNEJu9D.js +0 -12
- package/dist/assets/MobileAppDrawer-YElMwyTk.js +0 -1
- package/dist/assets/NotFoundScreen-DD1ftXbM.js +0 -1
- package/dist/assets/NotificationRoutes-j31qfFA3.js +0 -1
- package/dist/assets/OAuthConsentScreen-CQV1J_Nj.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CUitXoy8.js +0 -1
- package/dist/assets/PeopleRoutes-BbZuMgKW.js +0 -22
- package/dist/assets/PerformanceRoutes-D6iGCdx1.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-lGHZV1sd.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CtdOG2XT.js +0 -1
- package/dist/assets/ReimbursementRoutes-DjGiFO3h.js +0 -68
- package/dist/assets/ReportsRoutes-DNhWXb3T.js +0 -1
- package/dist/assets/RewardsRoutes-C0czxWPN.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CkM33AZC.js +0 -33
- package/dist/assets/ScreenRoutes-DYGYxgwA.js +0 -2
- package/dist/assets/SettingsRoutes-DRSU5I7g.js +0 -49
- package/dist/assets/SignInScreen-DDQ1e38Q.js +0 -1
- package/dist/assets/SignOutScreen-CmYRhks4.js +0 -9
- package/dist/assets/TaskListScreen-D8jqZbNF.js +0 -9
- package/dist/assets/TaskRoutes-Cu7kReic.js +0 -9
- package/dist/assets/TransactionDetailRoutes-B7AzD4hg.js +0 -1
- package/dist/assets/TransactionDetailScreen-CpvJY1a3.js +0 -5
- package/dist/assets/TransactionListRoutes-BejbKDzL.js +0 -1
- package/dist/assets/TreasuryRoutes-DTax48Tc.js +0 -37
- package/dist/assets/WiseConfirmationScreen-C4KbEpAc.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BUg2sDXI.js +0 -9
- package/dist/assets/analyticsHelper-DcUdLdtd.js +0 -1
- package/dist/assets/expenseAutomationHelper-CCv2kRkH.js +0 -1
- package/dist/assets/getLocaleForTenant-CSUvt8Gt.js +0 -1
- package/dist/assets/index-foi_vl2g.js +0 -1
- package/dist/assets/routePaths-RxstHRDw.js +0 -1
- package/dist/assets/stripSplatSuffix-B0jus2nC.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-Dr6cKA7B.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Bl76c5H-.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-C6oeFa4_.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-nv6tTKw5.js +0 -1
- package/dist/assets/useEnsureVendorListLoaded-zh5PaZPv.js +0 -1
- package/dist/assets/useInitialThreadRequest-DqCJRXyQ.js +0 -1
- package/dist/assets/useTaskManagerAccess-DhT542co.js +0 -1
- package/dist/assets/useTaskManagerPusherEvents-B9F1i19u.js +0 -1
- package/dist/assets/withTransactionSidePanel-BaaDGWl5.js +0 -25
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as _}from"./liveblocks-CM1vcHN_.js";import{a as i}from"./sentry-Bh68thgn.js";import{u as M,k as st,j as I,s as Ie,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-Cc1CwF93.js";import{pK as be,fI as te,gZ as rt,Yy as lt,oQ as dt,om as ut,E9 as Q,a1i as mt,gk as pt,bm as ft,eg as _e,bp as Re,t7 as H,$J as Y,a1j as we,_E as le,a03 as Pe,ml as Fe,a1k as xe,a07 as de,a08 as ue,na as Ue,T4 as me,VJ as $,mf as Ve,md as Le,mp as ht,px as St,_F as yt,_G as Tt,E0 as Z,mk as Be,Sp as Oe,cd as gt,d5 as It,a1l as bt,VH as vt,a1m as Et,a1n as kt,a1o as Dt,a1p as Ct,DY as At,a1q as _t,a1r as Rt,a1s as wt,a1t as Pt,$1 as Ft,mo as xt,a1u as Ut,a1v as Vt,VI as Lt,a1w as Bt,a1x as Ot,a1y as Nt,Sj as zt,S9 as jt,Sy as Mt,mq as Gt,T5 as ve,pC as $t}from"./zeni-epic-state-DFhlE0W3.js";import{p as J,b as w,e as q,dc as qt,z as Ne,a2 as Wt,dd as Ht,ac as Yt,a5 as ie,V as Jt,cg as Kt,v as re,al as Qt,ch as Zt,cj as Xt,de as en,af as tn,aj as ce}from"./index-zmOdoQIt.js";import{n as nn,S as an,u as on,D as sn}from"./mui-ehyt9jca.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{d as ze}from"./decodeURIComponentSafe-BhSMetwg.js";import{u as rn}from"./useInitialThreadRequest-DqCJRXyQ.js";import{h as je,t as Me,g as ln,j as dn}from"./routePaths-RxstHRDw.js";import{u as un}from"./expenseAutomationHelper-CCv2kRkH.js";import{B as mn}from"./utils-CjDqL2uk.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]="efc47610-e7dc-44c3-a48e-47785ef6dda8",t._sentryDebugIdIdentifier="sentry-dbid-efc47610-e7dc-44c3-a48e-47785ef6dda8")}catch{}})();function pn(t=!0,e=!0){const o=M(),n=st(),{useFeatureGate:a}=J(),{isFeatureEnabled:s}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||e&&s!==!0)return;const c=d=>{const f=n.getState().createTransferEntryState.transferAccountsByType[d].fetchState;return f!=="In-Progress"&&f!=="Completed"};c("transferEntryEligible")&&o(be({kind:"transferEntryEligible"})),c("creditCardOnlyEligible")&&o(be({kind:"creditCardOnlyEligible"}))}),[t,e,s,o,n])}function fn(t,e){const o=(function(){const d=M(),[f,h]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=J(),{configValue:v,isDynamicConfigLoading:S}=y("transaction_categorization_config"),T=!S&&v?.capitalization_enabled===!0,k=I((b=>te(b))),C=k.companyId,P=I((b=>rt(b.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:F,dismissedAccounts:x}=I((b=>{const g=b.tenantState.currentTenantId,R=g!=null?b.tenantState.tenantsById[g]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),Ie),L=i.useRef(A);L.current=A;const U=i.useRef(F);U.current=F;const B=i.useRef(x);B.current=x;const O=I((b=>lt(b.accountState)),Ie),G=i.useMemo((()=>{const b={};for(const g of O)g.accountId!=null&&g.accountName!=null&&(b[g.accountId]=g.accountName);return b}),[O]),W=l!=null?G[l]??null:null,N=i.useCallback((b=>{if(!T)return;const g=L.current;if(g==null)return;const R=g.accounts??[],K=new Set(b),ne=U.current??{},ae=B.current;for(const z of R)if(K.has(z.accountId)&&ne[z.accountId]==null&&ae?.[z.accountId]==null)return p(z.classificationType),u(z.accountId),void h(!0)}),[T]),E=i.useCallback(((b,g)=>{d(dt(C,b,g,!0)),h(!1),p(null),u(null)}),[d,C]),r=i.useCallback((()=>{l!=null&&(d(ut(C,l)),h(!1),p(null),u(null))}),[d,C,l]);return{showPopup:f&&T,popupType:D,popupAccountId:l,popupAccountName:W,currencySymbol:P,checkAndShowPopup:N,handleSubmit:E,handleDismiss:r}})(),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 j=new Map,Ge=(t,e,o)=>`${t}|${e??""}|${o}`,X=(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}},ee=(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}),Ee=(t,e)=>{j.set(Ge(e,t.lineId,t.dimension),{feedback:t,transactionId:e})},$e=(t,e,o)=>{q.trackRecommendationFeedbackRetracted(X(e,o)),t(Q(ee(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));j.forEach(((n,a)=>{o.has(n.transactionId)&&(j.delete(a),$e(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));j.forEach(((o,n)=>{e.has(o.transactionId)&&j.delete(n)}))};function hn(t){const e=M(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=I(mt),{isEnabled:d,fallbackTransactionId:f}=t,h=i.useCallback((u=>u.transactionId??f??""),[f]),D=i.useCallback((u=>{if(!d)return;const y=h(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((S,T,k,C)=>{const P=Ge(T,k,C),A=j.get(P);return A!=null&&(j.delete(P),$e(S,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((S,T)=>{q.trackRecommendationAccepted(X(S,T))})(u,y),e(Q(ee(u,y,{}))))}),[d,h,e]),p=i.useCallback((u=>{if(o==null)return;const y=h(o);((v,S,T)=>{q.trackRecommendationFeedbackSubmitted({...X(v,S),feedbackReason:T})})(o,y,u),e(Q(ee(o,y,{reasonText:u,skipped:!1}))),Ee(o,y),s(!0)}),[o,h,e]),l=i.useCallback((()=>{if(o==null)return;const u=h(o);((y,v)=>{q.trackRecommendationFeedbackSkipped(X(y,v))})(o,u),e(Q(ee(o,u,{skipped:!0}))),Ee(o,u),s(!1),n(null)}),[o,h,e]);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?_.jsx(qt,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:o}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function qe(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=M(),{useFeatureGate:n}=J(),a=I((r=>te(r))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&_e(a.userRole),d=a.userRole!=null&&Re(a.userRole),{isFeatureEnabled:f}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=n(w.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=I((r=>Y(r,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,v=I((r=>{const b=Y(r,p)?.transactionDetailLocalData.vendorUpdates?.id;return b==null?"Not-Started":r.transactionVendorViewState.editVendorStateById[b]?.saveStatus.fetchState??"Not-Started"})),S=i.useMemo((()=>l?.fetchState==="Completed"?qe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),T=I((r=>{if(S!=null)return we(r.customerIncomeState,r.vendorExpenseState,r.trendState,S,"month")})),k=I((r=>le(r))),C=I((r=>{if(S!=null)return Pe(r.trendWithTransactionsState,S,"TransactionDetail")})),P=a.company?.companyInfo.firstMonthOfFY??1,A=I((r=>Fe(r.accountState,r.accountListState,"accountList"))),[F,x]=i.useState(!1),[L,U]=i.useState(!1),[B,O]=i.useState(!1);i.useEffect((()=>{x(!1),U(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{x(!1),U(!1)}),[]),[W,N]=i.useState(!1),E=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{B||l==null||l.transaction==null||(o(xe({id:l.transaction.id,type:l.transaction.type})),O(!0)),S!=null&&(!s||c&&d===!1)&&(F?L||T==null||(U(!0),o(me(S,"TransactionDetail",{timeframe:"month",timePeriod:E??T}))):(o(de()),o(ue()),x(!0),o(Ue(S))))}),[o,B,l?.fetchState,l?.transaction,S,s,c,d,F,L,T,E]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?N(!0):N(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:h,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:v,tranEntity:S,defaultTrendTransactionTimePeriod:T,vendorViewDetails:k,uiState:C,firstMonthOfFY:P,uncategorizedAccounts:A,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:W,setIsCreateVendorDrawerOpen:N}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=on(),c=Wt(),d=M(),f=I((p=>le(p))),h=()=>{n()},D={vendorDetailView:a??f,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:h,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return _.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:h,children:_.jsx(Tn,{onClick:p=>p.stopPropagation(),children:_.jsx(Ht,{...D})})})},Tn=nn(an)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function gn(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 In({currentTransactionId:t,enabled:e=!0,buildPath:o,beforeNavigate:n,navigate:a,navigateState:s}){const c=I((f=>f.createTransferEntryState.lastTransferEntryReplacement)),d=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||d.current===c)return;const{previousTransactionId:f,newTransactionId:h}=c;t.id===f.id&&t.type===f.type&&(d.current=c,n?.(),a(o(h),{replace:!0,state:s}))}),[e,c,t,o,n,a,s])}const bn=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:o})=>{const n=De(),a=Ce(),s=M(),c=pe(),{transactionTypeEncoded:d,transactionId:f}=Ae(),h=e??f,D=o??ze(d??"");let p;je(h,D)&&(p={id:h,type:H(D)});const l=p!=null?I((y=>Y(y,p))):void 0,u=()=>{const y=ie(n.state?.pathnameStackToGoBack),v=y.poppedPathname??((S=2)=>{let T="../";for(let k=0;k<S;k++)T=`${T}../`;return T})(1);a(v,{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,v={id:l?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:l?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:l?.transactionDetailLocalData.vendorUpdates?.qboId??""},S={transactionId:{id:l?.transaction?.id,type:l?.transaction?.type},transaction:l?.transaction,lineIds:l?.transaction?.lines?.map((T=>T.id))??[]};s(Z({entity:v,amount:l?.transaction?.amount.amount,transactionDetails:S,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=bt(t,e.entity,"TransactionDetail"));const d=t.entityAutoCompleteState.autoCompleteText.common,f=vt(t,"common"),h=te(t);return{transactionDetail:o,transactionAttachmentEndpointToDownload:`${ce}/transaction_attachment`,transactionAttachmentsEndpointToFetch:h.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ce}/transaction_attachments_accounting_provider`:`${ce}/transaction_attachments`,attachmentUploadEndpoint:`${tn.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:n,analytics:q,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:f},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=ie(e.location.state?.pathnameStackToGoBack),a=n.poppedPathname??We(2);e.navigate(a,{state:{pathnameStackToGoBack:n.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(n,a)=>{e.transaction!=null&&t($t({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:n,customerId:a}))},onTransactionClick:n=>{e.resetTrendIsFetchedStates(),t(de()),t(ue());const a=re(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):Gt({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,f)=>{t(Ot(n,a,s,c,d,f))},onChangeCategoryClassWhenUpdateAllIsChecked:(n,a)=>{e.transaction!=null&&t(Bt({id:e.transaction.id,type:e.transaction.type},e.transaction,n,a))},onSaveSuccess:()=>{const n=ie(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(Z({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(Ut(n))},onSaveVendorInLocalData:(n,a,s,c,d)=>{if(t(xt({transactionId:n,vendorUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(Z({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 f=e.transaction,h=re(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(f.type??"")}/${f.id}/vendor/create`,{state:{pathnameStackToGoBack:h}})}},onSaveCustomerInLocalData:(n,a,s,c,d)=>{t(Ft({transactionId:n,customerUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(Z({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(Rt(n,a,s))},saveLatestSelectedEntity:(n,a,s)=>{t(_t({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=>gn(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))}}}))(en);function zn(){const t=Ce(),e=M(),o=De(),{useFeatureGate:n}=J(),a=Jt(),s=I((m=>te(m))),c=s.userRole.includes("charge_card_user")||s.userRole.includes("charge_card_admin"),d=s.userRole!=null&&_e(s.userRole),f=s.userRole!=null&&Re(s.userRole),{isFeatureEnabled:h}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:D}=n(w.isExpenseAutomationEnabled),{tenantEmailDomain:p,transactionTypeEncoded:l,transactionId:u}=Ae(),[y,v]=i.useState(!1),S=ze(l??""),T=je(u,S),k=I((m=>m.transactionVendorViewState)),C=pe(),{isFeatureEnabled:P}=n(w.isRecommendationFeedbackEnabled),A=Kt(),{onRecommendationSelection:F,popup:x}=hn({isEnabled:P,fallbackTransactionId:u}),L=i.useMemo((()=>({...A,onRecommendationSelection:F})),[A,F]),{isFeatureEnabled:U}=n(w.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:B}=n(w.isProjectsTransactionsEnabled),{isFeatureEnabled:O}=n(w.isTransactionSplitEnabled),G=a?.currentTenant?.companyId,W=a?.currentTenant?.companyName,N=rn(G),E=i.useMemo((()=>{if(T)return{id:u,type:H(S)}}),[T,u,S]),r=E!=null?I((m=>Y(m,E))):void 0,b=r?.transactionDetailLocalData.vendorUpdates?.id!=null?k.editVendorStateById[r?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",g=r?.fetchState==="Completed"?qe(r?.transaction):void 0,R=I((m=>g!=null?we(m.customerIncomeState,m.vendorExpenseState,m.trendState,g,"month"):void 0)),K=I((m=>le(m))),ne=I((m=>g!=null?Pe(m.trendWithTransactionsState,g,"TransactionDetail"):void 0)),ae=s.company?.companyInfo.firstMonthOfFY??1,z=I((m=>Fe(m.accountState,m.accountListState,"accountList"))),[He,fe]=i.useState(!1),[Ye,he]=i.useState(!1),[Je,Se]=i.useState(!1),Ke=i.useCallback((m=>Me(m,p??"")+o.search),[p,o.search]),Qe=i.useCallback((()=>{Se(!1)}),[]);In({currentTransactionId:E,enabled:p!=null&&p!=="",buildPath:Ke,beforeNavigate:Qe,navigate:t,navigateState:o.state});const ye=()=>{fe(!1),he(!1)},Te=un();pn();const oe=i.useRef(r?.transaction);oe.current=r?.transaction;const Ze=r?.transactionDetailUpdateStatus?.fetchState,V=fn(Ze,(()=>{const m=[];if(oe.current!=null)for(const se of oe.current.lines??[])"account"in se&&se.account?.accountId!=null&&m.push(se.account.accountId);return m}));i.useEffect((()=>{E!=null&&r!=null&&r.fetchState==="Not-Started"&&(e(Oe(E,!1)),ye())}),[e,E,r?.fetchState]),i.useEffect((()=>{if(E!=null&&r?.fetchState==="Error"){const m=re(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"}})}}),[E,r?.fetchState,t,o.state,o.pathname,Te]),i.useEffect((()=>{Je||r==null||r.transaction==null||(e(xe({id:r.transaction.id,type:r.transaction.type})),Se(!0));const m=o.state?.searchContext;g==null&&r?.fetchState==="Completed"&&ke(r?.transaction,m),g!=null&&(!c||d&&f===!1)&&(He?Ye||R==null||(he(!0),e(me(g,"TransactionDetail",{timeframe:"month",timePeriod:ne?.selectedPeriod?.timePeriod??R}))):(e(de()),e(ue()),ke(r?.transaction,m),fe(!0),e(Ue(g))))}),[r?.fetchState,r?.transaction,R,c]),i.useEffect((()=>{K.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)}),[K.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e($("common"))}),[]);const Xe=[l,u].filter((m=>m!=null)),{transactionId:ge,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}=bn({closeDrawerHandler:m=>{v(!1),t(m?"../":"../..")}}),{isAiCfoAccessEnabled:at,onAskAiCfoClick:ot}=cn({mobileExploreReferrer:"Transaction Details"});return Qt({isDataReady:r?.fetchState==="Completed"}),T?_.jsxs(_.Fragment,{children:[ge!=null&&y&&_.jsx(yn,{isOpen:y,transactionId:ge,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}),_.jsx(Zt,{toolkit:L,children:_.jsx(vn,{hideDeleteAttachment:!0,firstMonthOfFY:ae,isDisabled:r?.transaction?.type==="transfer"&&a?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:p,location:o,navigate:t,selectedTransaction:E,entity:g,isCOTEnabled:C,defaultTrendTransactionTimePeriod:R,resetTrendIsFetchedStates:ye,transaction:r?.transaction,uncategorizedAccounts:z,vendorSaveStatus:b,isVendorBulkUpdateOnTransactionEnabled:h,isCreateTransferEntryFromExpenseEnabled:U,isExpenseAutomationEnabled:D,isAiCfoAccessEnabled:at,onAskAiCfoClick:ot,isProjectsTransactionsEnabled:B,isTransactionSplitEnabled:O,companyId:G,companyName:W,initialOpenThreadRequest:N})}),x,V.showPopup&&V.popupType!=null&&_.jsx(Xt,{popupType:V.popupType,currencySymbol:V.currencySymbol,accountId:V.popupAccountId??"",accountName:V.popupAccountName??"",onSubmit:V.handleSubmit,onDismiss:V.handleDismiss})]}):_.jsx(ct,{to:We(Xe.length)})}const We=(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);q.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,e!=null?"search":void 0)}},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=>gt(t)===!0?t.customer?.name??"":It(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{yn as C,vn as T,pn as a,fn as b,hn as c,gn as d,On as e,Nn as f,bn as g,In as h,zn as i,ke as l,Bn as r,pe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CM1vcHN_.js";import{h as W,g as N,u as Z,i as H,j as g,N as U,l as K,n as Ce,o as C}from"./core-Cc1CwF93.js";import{fI as q,ur as Q,lq as p,eI as ee,SX as Ae,bv as me,XU as Me,ma as te,XV as ae,XW as pe,XX as Be,bE as k,ST as Se,XY as Le,XZ as fe,X_ as Fe,SW as he,X$ as Oe,Y0 as Te,Y1 as ze,Y2 as ge,Y3 as Ge,Y4 as we,Y5 as De,U8 as $e}from"./zeni-epic-state-DFhlE0W3.js";import{p as ne,b as ce,e as L,G as Ie,b6 as oe,v as R,a5 as se,aC as Re,f as Xe}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import{a as y}from"./sentry-Bh68thgn.js";import{w as ie}from"./withTransactionSidePanel-BaaDGWl5.js";import{p as re,t as de}from"./routePaths-RxstHRDw.js";import{c as _e}from"./utils-CjDqL2uk.js";import{d as j}from"./decodeURIComponentSafe-BhSMetwg.js";import{Z as Ve}from"./ZeniAccountStatementScreen-BUg2sDXI.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import"./TransactionDetailScreen-CpvJY1a3.js";import"./useInitialThreadRequest-DqCJRXyQ.js";import"./expenseAutomationHelper-CCv2kRkH.js";import"./stripSplatSuffix-B0jus2nC.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]="7ff1e177-5ece-4911-9549-7d8f35f6926b",a._sentryDebugIdIdentifier="sentry-dbid-7ff1e177-5ece-4911-9549-7d8f35f6926b")}catch{}})();const Ne=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],V=a=>_e(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=K((function(a,e){const t=Me(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,V(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=V(e.selectedAccount.tranListType),d=We(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:V(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:V(e.selectedAccount.tranListType)}))}}}))(oe),_=ie((function({...a}){const e=W(),t=N(),n=Z(),c=t.pathname.split("/").find((l=>Ne.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),{accountType:Y,title:v,subTitle:A}=qe(o),f="month",T=g((l=>q(l))),b=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>Q(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=Je(o,b,T.bookCloseDate),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:v,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=V(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:b,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>z(l),...a})})),qe=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Je=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},We=(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=K((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),He=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=H(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=Ke(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=Qe(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,v,A,f,T,b].filter((r=>r!=null));return G&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:Ye(X.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(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,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=K((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=H(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=at(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,v,A,f,T,b].filter((r=>r!=null));return G&&B!=null?s.jsx(et,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:ve(X.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=K((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:v,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:b}=H(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(b!=null&&b==="exclude_subaccounts"),F=g((D=>ze(D.transactionListState,h,S))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((D=>q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,v,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:v,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:G}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[Ee,je]=ue.split("?"),J=new URLSearchParams(je??"");J.set("view","full"),J.set("thread_id",le),J.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${Ee}?${J.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:X}=G(ce.isProjectsTransactionsEnabled),r=g((D=>Q(D)))&&X,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,v,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>z(D),...e}):s.jsx(U,{to:be(Pe.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Mt(){const a=N().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>q(n))).tenantId],t=Xe();return s.jsxs(Ce,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ve,{})}),s.jsx(C,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(_,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Mt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CM1vcHN_.js";import{h as L,g as P,u as F,i as V,j as y,N as D,l as M,n as xe,o as k}from"./core-Cc1CwF93.js";import{cm as N,fI as E,$x as U,P9 as ae,OS as H,OT as ne,$y as Ie,Pc as Te,$z as we,$A as se,Yg as Ce,Nd as ke,CJ as je,$B as Ae,Pj as be,$C as oe,ee as Z,Hk as re,ep as ve,eq as Ee,$D as De,$E as Le,OU as Pe,$F as Fe,OV as Ue,P2 as Be,bp as Re,bJ as Oe,cx as Ve,bK as Me,cl as Ne,br as $e,ha as ze,ck as _e}from"./zeni-epic-state-DFhlE0W3.js";import{V as $,s as Ge,z as v,a9 as z,e as A,co as He,cp as Ze,cq as G,a2 as q,aC as qe,al as Ke,p as ie,b as O,ac as We,a8 as Je,cr as Ye,af as K,v as Qe,cs as Xe,a5 as W,ct as et,az as tt,a0 as Q,cu as at,i as nt}from"./index-zmOdoQIt.js";import{u as st,D as ot,n as R,S as rt}from"./mui-ehyt9jca.js";import it from"./NotFoundScreen-DD1ftXbM.js";import{S as X}from"./SetupPagesScreen-CfUfKDWM.js";import{a as p}from"./sentry-Bh68thgn.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{u as lt}from"./useInitialThreadRequest-DqCJRXyQ.js";import{M as ce}from"./MobileAppDrawer-YElMwyTk.js";import{F as ut}from"./FeaturePreviewScreen-CEvvSUOY.js";import{a as ee}from"./analyticsHelper-DcUdLdtd.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./BusinessVerificationPageScreen-NPjj2cPM.js";import"./routePaths-RxstHRDw.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.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]="73f77f72-9c33-4aaf-8362-0b2fa8d2f173",t._sentryDebugIdIdentifier="sentry-dbid-73f77f72-9c33-4aaf-8362-0b2fa8d2f173")}catch{}})();const dt=M((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(He);function pt(){const t=L(),a=P(),n=F(),{tenantEmailDomain:r}=V(),i=$(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ge(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>U(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(H()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=M((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{G(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{G(a.analytics,"confirm",o,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=V(),i=F(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>U(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(H()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{G(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=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
|
-
`,gt={overlayWidth:new We(100,100,48)},St=M((function(t,a){const n=oe(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:U(t,r),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:i,handleDrawerToggle:o,analytics:m}=a,{tenantEmailDomain:s}=r;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(re(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=ht(s):d==="statements"?c=xt(s):d==="taxLetter"?c=It(s):d==="settings"&&(c=Tt(s));const S=Qe(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(De({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{o(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Ye);function _({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=P(),r=L(),i=F(),o=q(),m=st(),s=y((b=>E(b))),{tenantEmailDomain:d}=V(),c=s.companyId??v.getSignedInUserTenant(d)?.companyId,[S,I]=p.useState(!1),l=y((b=>oe(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),T=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:B}=qe();p.useEffect((()=>{u==="Not-Started"&&!S&&B&&(I(!0),i(re(!0)))}),[S,i,u,B]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&r("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,r]);const w=()=>{r("..")},[le,ue]=p.useState(!1),J=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});Ke({isDataReady:u==="Completed"});const{useFeatureGate:Y}=ie(),{isFeatureEnabled:me}=Y(O.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=Y(O.isAutoTransferRuleEnabled),ye=lt(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),ge=ve(s),Se=Ee(me,s);if(ge===!0&&Se!==!0)return e.jsx(ut,{});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:gt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(wt,{onClick:he=>he.stopPropagation(),children:[t===!0?e.jsx(ft,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(pt,{}):null]})}),e.jsxs(yt,{windowSize:o,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(St,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:r,currentTenant:s,location:n,companyId:c,analytics:A,handleDrawerToggle:J,initialOpenThreadRequest:ye,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&T?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Je,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,xt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,wt=R(rt)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Ct=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 kt(){const t=L(),a=F(),n=q(),r=P(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Le(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),a(Pe(!1)))}),[o,s.fetchState,a]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=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(Ct,{windowSize:n,children:e.jsx(Xe,{currentTenantCompanyName:I,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(r.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const jt=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 At(){const t=L(),a=q(),n=P(),r=F(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Fe(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),r(Ue(!1)))}),[o,s.fetchState,r]);const d=v.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},I=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(jt,{windowSize:a,children:e.jsx(et,{currentTenantCompanyName:I,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 bt=M((function(t,a){const{companyId:n}=a,r=U(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Be(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(at),vt=()=>{const t=tt(),a=L(),n=P(),r=F(),{tenantEmailDomain:i}=V(),[o,m]=p.useState(!1),s=y((g=>E(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||I==null||(c(!0),r(H()))}),[S,r]);const I=v.getSignedInUserTenant(i)?.companyId??s.companyId,l=v.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=Z(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(Q,{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:o,handleDrawerToggle:x}),e.jsx(bt,{analytics:A,navigate:a,companyId:I,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{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 ta(){const t=P(),a=y((g=>E(g))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,o=$(),m=Z(o?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Oe(o?.loggedInUserRoleMap),c=Ve(o?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(o?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&Ne(o?.loggedInUserRoleMap),l=r&&!s&&N(o?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(O.isDebitCardFeatureEnabled),f=nt(a,u,x)&&!s&&$e(o?.loggedInUserRoleMap),C=ze(o?.loggedInUserRoleMap),h=_e(o?.loggedInUserRoleMap);return e.jsxs(xe,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:I,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(kt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(_,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(_,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(_,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):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{ta as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-CM1vcHN_.js";import{a as f}from"./sentry-Bh68thgn.js";import{t as u,u as h,j as b,N as y}from"./core-Cc1CwF93.js";import{Vk as I,gl as w,Kd as j}from"./zeni-epic-state-DFhlE0W3.js";import{z as l,a8 as x,ag as S,ah as D}from"./index-zmOdoQIt.js";import{n as c}from"./mui-ehyt9jca.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.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]="5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0",e._sentryDebugIdIdentifier="sentry-dbid-5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.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
|
-
`,_=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-CM1vcHN_.js";import{a as m}from"./sentry-Bh68thgn.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-Cc1CwF93.js";import{U8 as s,U7 as B,a10 as C,fI as T,a11 as U}from"./zeni-epic-state-DFhlE0W3.js";import{a2 as z,af as g,z as D,a8 as E,cY as L,a5 as P}from"./index-zmOdoQIt.js";import{u as N,n as _}from"./mui-ehyt9jca.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb",e._sentryDebugIdIdentifier="sentry-dbid-6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function F(){const e=x(),n=$(),d=z(),l=j();let{accountId:a}=v(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,b]=m.useState(!1),y=N();m.useEffect((()=>{u||(b(!0),n(B(a??"",!1)))}),[u,n]);const o=p((t=>C(t,a??""))),h=()=>{const t=P(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>T(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=U(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(E,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(L,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:f})})}export{F as Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cK as m,cL as l,a1f as _,ef as d}from"./zeni-epic-state-DFhlE0W3.js";import{e as u}from"./index-zmOdoQIt.js";import"./sentry-Bh68thgn.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]="809cf848-7390-4e2d-8891-d9d464c5c58e",e._sentryDebugIdIdentifier="sentry-dbid-809cf848-7390-4e2d-8891-d9d464c5c58e")}catch{}})();const h=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},b=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach((n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)})),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",w=e=>Object.values(e.allocation).map(String).join("-");export{w as a,b as f,g,h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1g as u}from"./zeni-epic-state-DFhlE0W3.js";import"./sentry-Bh68thgn.js";import{q as f,g as m}from"./core-Cc1CwF93.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2cfb0432-0d2a-4099-8945-61194d3e6358",e._sentryDebugIdIdentifier="sentry-dbid-2cfb0432-0d2a-4099-8945-61194d3e6358")}catch{}})();const b=/^(0?[1-9]|1[0-2])-\d{4}$/;function a(e){if(e!=null&&e!=="")return u(e)}function d(e){return e!=null&&b.test(e)}function y(e){const{selectedPeriod:n,selectedTab:o,tenantEmailDomain:t}=e,s=a(o);if(t!=null&&t!==""&&s!=null&&d(n))return`/${t}/month_end_close_checks/review/${s}/${n}`}function w(e){const{selectedTab:n,tenantEmailDomain:o,accountId:t,period:s}=e,l=a(n);if(o==null||o===""||l==null)return;const r=new URLSearchParams;t!=null&&t!==""&&r.set("accountId",t),s!=null&&d(s)&&r.set("period",s);const c=r.toString(),i=`/${o}/month_end_close_checks/review/${l}/report`;return c===""?i:`${i}?${c}`}const $=()=>{const e=_();return f("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},_=()=>m().state?.message==="expenseAutomation";export{w as a,a as b,d as i,y as m,$ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as n}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="227db5e8-bf87-42bb-b403-87b09e52f245",e._sentryDebugIdIdentifier="sentry-dbid-227db5e8-bf87-42bb-b403-87b09e52f245")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./sentry-Bh68thgn.js";import{a as u}from"./index-BJ8vYoNR.js";import{r as d}from"./url-DqRIAQ9M.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="47456600-6743-4fe7-b069-68c24bbc3387",e._sentryDebugIdIdentifier="sentry-dbid-47456600-6743-4fe7-b069-68c24bbc3387")}catch{}})();var p,c={exports:{}};function y(){return p||(p=1,(function(e){var o=u(),i=d(),r=e.exports;for(var n in o)o.hasOwnProperty(n)&&(r[n]=o[n]);function f(t){if(typeof t=="string"&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),t.protocol!=="https:")throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}r.request=function(t,s){return t=f(t),o.request.call(this,t,s)},r.get=function(t,s){return t=f(t),o.get.call(this,t,s)}})(c)),c.exports}export{y as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bv as u,d9 as i}from"./zeni-epic-state-DFhlE0W3.js";import{G as $}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import"./sentry-Bh68thgn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1b0f09a1-b396-437b-9ced-e125336b5d99",e._sentryDebugIdIdentifier="sentry-dbid-1b0f09a1-b396-437b-9ced-e125336b5d99")}catch{}})();const{dateFormat:{analytics:{YYYYDashMMDashDDFormat:s}}}=$.getLocalizedStrings();function C(e,n){return`/${n}/transaction/${encodeURIComponent(e.type)}/${e.id}`}function D(e,n){return`/${e}/transaction/new/${encodeURIComponent(n)}`}const m=["prepaid_expenses","fixed_assets","accrued_expenses","one_time_accrual"];function R(e){return e!=null&&m.includes(e)}function U(e,n,o){return`${o.trim()===""?"":`/${o}`}/vendors/schedules/${e}/details/${n}`}const y=(e,n)=>e!=null&&e.length>0&&n!=null&&n.length>0;function _(e,n,o,t,a,d,r=!0){let c=`/${e}/transactions/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${a}/${d.startDate.format(s)}/${d.endDate.format(s)}/${encodeURIComponent(t)}`;return c=r===!1?`${c}/exclude_subaccounts`:`${c}/include_subaccounts`,c}const g=(e,n)=>({startDate:i(u(),n,Math.abs(e),"year"),endDate:u()});function h(e,n,o,t,a,d,r){return`/${e}/transactions/by-class/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function v(e,n,o,t,a,d,r){return`/${e}/transactions/by-project/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function w(e,n){return`/${n}/${e.type}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`}const x=(e,n,o,t)=>{let a=`/${o}/vendors/summary/${encodeURIComponent(e)}/vendor_${encodeURIComponent(n)}`;return t!=null&&(a+=`/${t.balanceTimeFrame}/${t.startDate.format(s)}/${t.endDate.format(s)}`),a};function Y(e,n,o){let t=`/${e}/address`;return t=o!=null?t.concat(`/edit/${n}/${encodeURIComponent(o)}`):t.concat(`/new/${n}`),t}function k(e){return`/${e}/vendors/schedules/prepaid_expenses`}function F(e){return`/${e}/vendors/schedules/fixed_assets`}const l=["explore","new_chat","routines","skills"];function M(e){return l.some((n=>n===e))}export{_ as a,v as b,h as c,Y as d,w as e,D as f,k as g,y as h,R as i,F as j,M as k,g as p,U as s,C as t,x as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as f}from"./decodeURIComponentSafe-BhSMetwg.js";import"./sentry-Bh68thgn.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="a2778894-df72-4810-8839-d076d2642bfc",n._sentryDebugIdIdentifier="sentry-dbid-a2778894-df72-4810-8839-d076d2642bfc")}catch{}})();function y(n){return n.split("/").map((t=>encodeURIComponent(f(t)))).join("/")}function d(n,t){return n===""?null:t.exec(n)}function x(n,t,r){const o=d(r,n)??d(f(r),n);if(o!=null)return o;const e=[t,f(t)];for(const s of e){const l=s.replace(/^\//,"").split("/");for(let i=l.length-1;i>=0;i--){const c=d(l.slice(i).join("/"),n);if(c!=null)return c}}return null}function D(n,t,r){const o=x(n,t,r);return(function(e,s){if(s==="")return e;const l=[s,y(s),f(s)],i=[e,f(e)];for(const c of i)for(const a of l){const p=`/${a}`,u=c.lastIndexOf(p);if(u>=0){if(c===e)return e.slice(0,u);const b=e.lastIndexOf(p);if(b>=0)return e.slice(0,b);const I=`/${y(a)}`,g=e.lastIndexOf(I);return g>=0?e.slice(0,g):e.slice(0,u)}}return e})(t,o?.[0]??"")}const m=/\/match\/[^/?]+$/i,h=/\/expense-automation\/actual-matching\/[^/?]+$/i;function O(n,t){if(n==null||n==="")return t;const r=n.indexOf("?"),o=r<0?n:n.slice(0,r),e=r<0?"":n.slice(r);if(h.test(o))return t;if(m.test(o)){const s=o.replace(m,"");return s===""?t:`${s}${e}`}return n}export{O as a,x as m,D as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./sentry-Bh68thgn.js";import{u as C,h as p,g as k,i as g,j as r}from"./core-Cc1CwF93.js";import{a1D as S,a1E as $,_H as x,_J as A,s1 as h,_I as M,_K as U,sv as P,s7 as j,sb as F,t7 as H}from"./zeni-epic-state-DFhlE0W3.js";import{a as f}from"./stripSplatSuffix-B0jus2nC.js";import{a5 as m,v as J}from"./index-zmOdoQIt.js";import{t as K}from"./routePaths-RxstHRDw.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]="d1e4df5e-165d-49ea-989a-81e250c54cdf",t._sentryDebugIdIdentifier="sentry-dbid-d1e4df5e-165d-49ea-989a-81e250c54cdf")}catch{}})();function N(t,a,n){return{pathname:K({id:t.id,type:H(t.type)},a),state:{pathnameStackToGoBack:J(n.state?.pathnameStackToGoBack,`${n.pathname}${n.search}`)}}}function O(){const t=p(),a=k(),{tenantEmailDomain:n}=g();return o.useCallback((s=>{if(n==null)return;const c=N(s,n,a);t(c.pathname,{state:c.state})}),[a,t,n])}function X(t){const a=C(),n=p(),s=k(),{tenantEmailDomain:c}=g(),{match:l,detailFetchState:u,refreshStatus:b,undoReversalStatus:_,ignoreStatus:y,lastMatchResults:I,lastUndoResults:v}=r((e=>S(e,t))),R=r((e=>$(e,t))),i=r(x),d=r(A);o.useEffect((()=>{t!==""&&l==null&&u.fetchState==="Not-Started"&&a(h(t))}),[t,l,u.fetchState,a]),o.useEffect((()=>{if(i==null||i!==t||!s.pathname.includes("/expense-automation/actual-matching/"))return;const e=m(s.state?.pathnameStackToGoBack);n(f(e.poppedPathname,`/${c??""}/month_end_close_checks/review`),{state:{pathnameStackToGoBack:e.newStack}}),a(M())}),[i,a,s.pathname,s.state,t,n,c]),o.useEffect((()=>{if(d==null||d!==t||!s.pathname.includes("/expense-automation/actual-matching/"))return;const e=m(s.state?.pathnameStackToGoBack);n(f(e.poppedPathname,`/${c??""}/month_end_close_checks/review`),{state:{pathnameStackToGoBack:e.newStack}}),a(U())}),[d,a,s.pathname,s.state,t,n,c]);const T=o.useCallback((()=>{t!==""&&a(h(t,!0))}),[a,t]),w=o.useCallback((e=>{t!==""&&a(P(t,e))}),[a,t]),B=o.useCallback(((e,G)=>{t!==""&&a(j(t,e,G))}),[a,t]),D=o.useCallback((e=>{a(F(e.transactionId,e.transactionIntegrationId,e.transactionType,e.lineIds,e.transactionSyncToken,e.accrualIds))}),[a]),E=O();return{match:l,detailFetchState:u,handleOpenBill:E,handleApproveAndReverse:D,handleIgnoreMatchSuggestion:B,handleRefresh:T,handleUndoReversal:w,lastMatchResults:I,lastUndoResults:v,refreshStatus:b,ignoreStatus:y,matchAndReverseStatus:R,undoReversalStatus:_}}export{O as a,N as b,X as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{da as n}from"./index-zmOdoQIt.js";import"./sentry-Bh68thgn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="b3128737-482b-40f1-b0a8-0c1d0c14147a",e._sentryDebugIdIdentifier="sentry-dbid-b3128737-482b-40f1-b0a8-0c1d0c14147a")}catch{}})();function a(){return n("dashboard")}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./sentry-Bh68thgn.js";import{h as u,g,i as h,j as S}from"./core-Cc1CwF93.js";import{fI as y}from"./zeni-epic-state-DFhlE0W3.js";import{j as k,a2 as C,a as A,ar as I,J as T,v,ax as w}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.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]="f841527d-d16e-4762-b276-44690e349379",e._sentryDebugIdIdentifier="sentry-dbid-f841527d-d16e-4762-b276-44690e349379")}catch{}})();function j(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),s=u(),o=g(),{tenantEmailDomain:n}=h(),l=C(),f=w(l),c=A(),p=I(),m=S((a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0)),d=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&c&&!r,onAskAiCfoClick:b.useCallback((()=>{if(n!=null)if(d)if(f){const a=v(o.state?.pathnameStackToGoBack,o.pathname);s(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else T({location:o,navigate:s,mergeState:{referrer:t}})}),[d,f,o,t,s,i,n])}}export{j as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Bh68thgn.js";import{dg as _,dh as m}from"./index-zmOdoQIt.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b16dace8-a004-4576-a2e4-540347efd8c6",e._sentryDebugIdIdentifier="sentry-dbid-b16dace8-a004-4576-a2e4-540347efd8c6")}catch{}})();const v=e=>{const{events:n,onEvent:c,onSubscribed:h}=e,o=_(),g=r.useRef(c),p=r.useRef(h),y=r.useRef(0);r.useEffect((()=>{g.current=c}),[c]),r.useEffect((()=>{p.current=h}),[h]);const E=r.useMemo((()=>[...n].sort().join("|")),[n]);r.useEffect((()=>{if(o==null||n.length===0)return;const f=[],i=new Set,w=()=>{if(p.current==null)return;const t=Date.now();t-y.current<5e3||(y.current=t,p.current())};return n.forEach((t=>{const[u,d]=m(t);if(d==="")return;const b=o.channel(u),a=l=>{g.current(d,l)};let s;if(b?.subscribed===!0)s=b,s.bind(d,a),i.has(u)||(i.add(u),w()),f.push((()=>{b.unbind(d,a)}));else{if(s=b??o.subscribe(u),s.bind(d,a),!i.has(u)){i.add(u);const l=()=>{w()};s.bind("pusher:subscription_succeeded",l),f.push((()=>{s.unbind("pusher:subscription_succeeded",l)}))}f.push((()=>{s.unbind(d,a)}))}})),()=>{f.forEach((t=>t()))}}),[o,E])};export{v as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./sentry-Bh68thgn.js";import{u as L}from"./plaid-WRjvFkFp.js";import{u as A,j as m}from"./core-Cc1CwF93.js";import{a1A as v,GC as R,Nd as $,CJ as I,a1B as N,fI as F,gP as T,Cn as U,a1C as V}from"./zeni-epic-state-DFhlE0W3.js";import{df as q,z as j}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6c371724-17e6-49c3-83d2-f28dae7a04d7",t._sentryDebugIdIdentifier="sentry-dbid-6c371724-17e6-49c3-83d2-f28dae7a04d7")}catch{}})();const z=new Set(N),O=({companyId:t})=>{const n=A(),i=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.link_external_account)),s=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.update_account)),d=m((e=>v(e.paymentAccountState))),c=a.useRef(!1),[o,u]=a.useState(void 0),[r,l]=a.useState(!1);a.useEffect((()=>{n(R())}),[n]);const f=a.useCallback((e=>{t!=null&&(n($(e,t,"external_account",void 0,o!=null?"update_account":"link_external_account")),c.current=!1,o!=null&&l(!0))}),[n,t,o]),x=a.useCallback((()=>{c.current=!1,u(void 0),l(!1)}),[]),p=o!=null?s:i,C=p.fetchStatus.fetchState==="Completed"?p.linkToken??null:null,{open:g,ready:h}=L({token:C,onSuccess:f,onExit:x});a.useEffect((()=>{c.current&&h&&(g(),c.current=!1)}),[h,g]);const _=p.fetchStatus.fetchState;a.useEffect((()=>{_==="Error"&&(c.current=!1)}),[_]);const D=a.useCallback((()=>{t!=null&&(u(void 0),c.current=!0,n(I("external_account","link_external_account")))}),[n,t]),E=a.useCallback((e=>{t!=null&&(u(e),l(!1),c.current=!0,n(I("external_account","update_account",e)))}),[n,t]),b=s.fetchStatus.fetchState==="In-Progress"||s.updateStatus.fetchState==="In-Progress"?"In-Progress":s.fetchStatus.fetchState==="Error"||r&&s.updateStatus.fetchState==="Error"?"Error":"Not-Started";return{plaidAccounts:a.useMemo((()=>d.map((e=>{const P=q(e.institutionDetails?.logo);return{accountId:e.paymentAccountId,name:e.institutionDetails?.institutionName??e.accountName,mask:e.accountLast4Digits,balanceFormatted:(S=e.balances?.current?.amount,y=e.balances?.current?.currencySymbol,S==null?"":`${y??"$"}${S.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`),isActive:z.has(e.providerVerificationStatus?.code??""),isLoginRequired:e.isLoginRequired,reLoginStatus:e.paymentAccountId===o?b:"Not-Started",institutionLogoUrl:P};var S,y}))),[d,o,b]),onAddPlaidAccount:D,onReLoginPlaidAccount:E}},w="email_connect_result",k="onboarding_step",Q=()=>{const t=A(),n=m((o=>F(o).tenantId)),i=j.getSignedInUser()?.userId,s=a.useRef(!1),[d,c]=a.useState(null);return a.useEffect((()=>{if(s.current||i==null||i===""||n==null||n==="")return;const{consumed:o,onboardingStep:u}=(()=>{const r=new URL(window.location.href),l=r.searchParams.has(w),f=r.searchParams.get(k);return l||f!=null?(r.searchParams.delete(w),r.searchParams.delete(k),window.history.replaceState(window.history.state,"",`${r.pathname}${r.search}${r.hash}`),{consumed:l,onboardingStep:f}):{consumed:!1,onboardingStep:null}})();!o&&u==null||(s.current=!0,o&&(t(T(i,n)),c("email")),u!=null&&new Set(["connect_data_source"]).has(u)&&t(U({step:V(u)})))}),[t,n,i]),{pendingAutoFocusTabId:d}};export{O as a,Q as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./sentry-Bh68thgn.js";import{u as f,j as o}from"./core-Cc1CwF93.js";import{mC as r}from"./zeni-epic-state-DFhlE0W3.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]="7e5cf202-3061-40b0-ad65-7fe19ac69d56",e._sentryDebugIdIdentifier="sentry-dbid-7e5cf202-3061-40b0-ad65-7fe19ac69d56")}catch{}})();function c(e=!0){const t=f(),a=o((d=>d.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),n=o((d=>d.vendorListState.allVendorIdsBillsTab.length>0));s.useEffect((()=>{e&&!n&&a==="Not-Started"&&t(r({}))}),[e,n,a,t])}export{c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./sentry-Bh68thgn.js";import{db as c}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import{t as l}from"./core-Cc1CwF93.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="e3f0ffe3-1d73-47e0-9b4f-b3c0be13dd05",e._sentryDebugIdIdentifier="sentry-dbid-e3f0ffe3-1d73-47e0-9b4f-b3c0be13dd05")}catch{}})();function _(e,f){const{clearParams:d=!0}=f??{},[t,u]=l(),[i,o]=n.useState(),s=n.useRef(!1),a=n.useRef(!1);return n.useEffect((()=>{if(s.current||e==null||!(t.has("thread_id")||t.has("entity_type")))return;const r=c(t,e);r!=null&&(o(r),s.current=!0)}),[t,e]),n.useEffect((()=>{if(!s.current||a.current||!d||!(t.has("thread_id")||t.has("entity_type")))return;const r=new URLSearchParams(t);r.delete("thread_id"),r.delete("entity_type"),u(r,{replace:!0}),a.current=!0}),[t,u,d]),i}export{_ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Bh68thgn.js";import{bm as i}from"./zeni-epic-state-DFhlE0W3.js";import{p as d,b as t}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b055466d-4c11-47c0-81a2-2b2d940905be",e._sentryDebugIdIdentifier="sentry-dbid-b055466d-4c11-47c0-81a2-2b2d940905be")}catch{}})();const c=e=>{const{useFeatureGate:s}=d(),{isFeatureEnabled:n}=s(t.isTaskManagerCustomerUserAccessEnabled),{isFeatureEnabled:o}=s(t.isTaskManagerNotificationControlsEnabled),a=r.useMemo((()=>i(e)),[e]);return{isNotificationControlsEnabled:a||o,isTaskManagerAccessEnabled:a||n,isZeniUser:a}};export{c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Bh68thgn.js";import{dg as E,dh as m}from"./index-zmOdoQIt.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="e34e4866-72c0-4110-84da-c218e1ffc704",n._sentryDebugIdIdentifier="sentry-dbid-e34e4866-72c0-4110-84da-c218e1ffc704")}catch{}})();const v=n=>{const{events:s,onEvent:o,onSubscribed:h}=n,f=E(),y=r.useRef(o),l=r.useRef(h),_=r.useRef(0);r.useEffect((()=>{y.current=o}),[o]),r.useEffect((()=>{l.current=h}),[h]);const w=r.useMemo((()=>[...s].sort().join("|")),[s]);r.useEffect((()=>{if(f==null||s.length===0)return;const i=[],b=new Set,g=()=>{if(l.current==null)return;const t=Date.now();t-_.current<5e3||(_.current=t,l.current())};return s.forEach((t=>{const[c,d]=m(t);if(d==="")return;const a=f.channel(c),p=u=>{y.current(d,u)};let e;if(a?.subscribed===!0){if(e=a,e.bind(d,p),!b.has(c)){b.add(c),g();const u=()=>{g()};e.bind("pusher:subscription_succeeded",u),i.push((()=>{e.unbind("pusher:subscription_succeeded",u)}))}i.push((()=>{a.unbind(d,p)}))}else{if(e=a??f.subscribe(c),e.bind(d,p),!b.has(c)){b.add(c);const u=()=>{g()};e.bind("pusher:subscription_succeeded",u),i.push((()=>{e.unbind("pusher:subscription_succeeded",u)}))}i.push((()=>{e.unbind(d,p)}))}})),()=>{i.forEach((t=>t()))}}),[f,w])};export{v as u};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CM1vcHN_.js";import{R as Y,a as i}from"./sentry-Bh68thgn.js";import{V as ue,p as J,b as C,cg as me,al as pe,d9 as fe,ch as he,cj as be,a2 as Te,c7 as U}from"./index-zmOdoQIt.js";import{c as K,n as O}from"./mui-ehyt9jca.js";import{u as Pe}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{f as ve,c as ye,a as xe,b as Ee,g as Ie,l as Se,C as ge,T as Ce,h as we}from"./TransactionDetailScreen-CpvJY1a3.js";import{u as Oe}from"./useInitialThreadRequest-DqCJRXyQ.js";import{h as $,g as F,i as k,u as $e,j as Fe}from"./core-Cc1CwF93.js";import{t7 as ke,$J as je,Sp as De}from"./zeni-epic-state-DFhlE0W3.js";import{m as Me,s as Ve}from"./stripSplatSuffix-B0jus2nC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="28d7ee91-d9fd-4a40-a349-cc038e7947f0",a._sentryDebugIdIdentifier="sentry-dbid-28d7ee91-d9fd-4a40-a349-cc038e7947f0")}catch{}})();const H=O.div`
|
|
2
|
-
${({$active:a})=>a&&K`
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
height: 100%;
|
|
6
|
-
`}
|
|
7
|
-
`,_=O.div`
|
|
8
|
-
${({$active:a})=>a&&K`
|
|
9
|
-
flex: 1;
|
|
10
|
-
min-height: 0;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
min-width: 0;
|
|
15
|
-
overflow-x: hidden;
|
|
16
|
-
overflow-y: auto;
|
|
17
|
-
`}
|
|
18
|
-
`,Ae=O.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
flex: 1;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
min-height: 0;
|
|
23
|
-
min-width: 0;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
`,Re=Y.memo((({isFullView:a,transactionId:n,transactionType:h,onBackToList:r,onClose:l})=>{const f=$(),o=F(),{tenantEmailDomain:v}=k(),e=ue(),{useFeatureGate:c}=J(),{isFeatureEnabled:d}=c(C.isCreateTransferEntryFromExpenseEnabled),s=l!=null&&a!==!0,b=e?.currentTenant?.companyId,I=e?.currentTenant?.companyName,{isFeatureEnabled:T}=c(C.isProjectsTransactionsEnabled),{isFeatureEnabled:y}=c(C.isTransactionSplitEnabled),{selectedTransaction:S,transactionDetail:t,tranEntity:m,isChainOfThoughtEnabled:p,defaultTrendTransactionTimePeriod:g,resetTrendIsFetchedStates:P,uncategorizedAccounts:x,vendorSaveStatus:j,isVendorBulkUpdateOnTransactionEnabled:Q,isExpenseAutomationEnabled:W,firstMonthOfFY:X,isCreateVendorDrawerOpen:D,rawDetailSaveStatus:Z,rawDetailLineItemById:M}=ve(n,h),ee=Oe(b,{clearParams:t!=null}),{isFeatureEnabled:ne}=c(C.isRecommendationFeedbackEnabled),V=me(),{onRecommendationSelection:A,popup:ae}=ye({isEnabled:ne,fallbackTransactionId:n}),te=i.useMemo((()=>({...V,onRecommendationSelection:A})),[V,A]);xe(a===!0);const R=i.useRef(M);R.current=M;const E=Ee(Z,(()=>{const w=[],G=R.current;if(G!=null)for(const de of Object.values(G)){const B=de.account;B?.accountId!=null&&w.push(B.accountId)}return w})),{transactionId:N,onSaveVendor:se,onSaveSuccess:ie,onCancel:oe}=Ie({closeDrawerHandler:()=>{},overrideTransactionId:n,overrideTransactionType:h}),{isAiCfoAccessEnabled:re,onAskAiCfoClick:ce}=Pe({mobileExploreReferrer:"Transaction Details"}),L=a===!0&&re;pe({isDataReady:a===!0&&t?.fetchState==="Completed"});const z=i.useRef(null);if(i.useEffect((()=>{if(z.current!==n&&t?.fetchState==="Completed"){z.current=n;const w=o.state?.searchContext;Se(t.transaction,w)}}),[o.state,t,n]),t==null)return u.jsx(H,{$active:s,children:u.jsx(_,{$active:s,children:u.jsx(fe,{})})});const le=u.jsxs(u.Fragment,{children:[N!=null&&D?u.jsx(ge,{isOpen:D,transactionId:N,onSaveVendor:se,onSaveSuccess:ie,onCancel:oe}):null,u.jsx(Ae,{children:u.jsx(he,{toolkit:te,children:u.jsx(Ce,{hideDeleteAttachment:!0,initialOpenThreadRequest:ee,firstMonthOfFY:X,isDisabled:t?.transaction?.type==="transfer"&&e?.connectionName==="netsuite"?"readonly":void 0,isNavBarVisible:!s,tenantEmailDomain:v??"",location:o,navigate:f,selectedTransaction:S,entity:m,isCOTEnabled:p,isCreateTransferEntryFromExpenseEnabled:d,defaultTrendTransactionTimePeriod:g,resetTrendIsFetchedStates:P,transaction:t?.transaction,uncategorizedAccounts:x,vendorSaveStatus:j,isVendorBulkUpdateOnTransactionEnabled:Q,isExpenseAutomationEnabled:W,isAiCfoAccessEnabled:L,onAskAiCfoClick:L?ce:void 0,isProjectsTransactionsEnabled:T,isTransactionSplitEnabled:y,companyId:b,companyName:I,onBackClick:r})})}),ae,E.showPopup&&E.popupType!=null&&u.jsx(be,{popupType:E.popupType,currencySymbol:E.currencySymbol,accountId:E.popupAccountId??"",accountName:E.popupAccountName??"",onSubmit:E.handleSubmit,onDismiss:E.handleDismiss})]});return u.jsx(H,{$active:s,children:u.jsx(_,{$active:s,children:le})})})),Ne=/^transaction\/(?!new\/)([^/]+)\/([^/?]+)$/,Le=[];function ze(a){const{childPathPattern:n,enabled:h=!0,listPath:r}=a,l=$(),f=k(),o=F(),v=Te(),e=v==="small"||v==="medium-compact",c=f["*"]??"",d=Me(n,o.pathname,c),s=h&&!e&&d!=null,b=i.useMemo((()=>new URLSearchParams(o.search).get("view")),[o.search]),I=s&&b==="full",T=d?.slice(1).join("\0"),y=i.useMemo((()=>d==null?Le:d.slice(1)),[T]),S=i.useMemo((()=>r??Ve(n,o.pathname,c)),[n,r,o.pathname,c]),t=i.useRef({isOpen:s,locationState:o.state,basePath:S,pathname:o.pathname,search:o.search});t.current.isOpen=s,t.current.locationState=o.state,t.current.basePath=S,t.current.pathname=o.pathname,t.current.search=o.search;const m=i.useCallback(((P,x)=>{l(`${t.current.basePath}/${P}`,{replace:x?.replace??!1,state:x?.extraState!=null?{...t.current.locationState,...x.extraState}:t.current.locationState})}),[l]),p=i.useCallback((()=>{t.current.isOpen&&l(t.current.basePath,{replace:!0,state:t.current.locationState})}),[l]),g=i.useCallback((()=>{const P=new URLSearchParams(t.current.search);P.set("view","full"),l(`${t.current.pathname}?${P.toString()}`,{replace:!0,state:t.current.locationState})}),[l]);return i.useEffect((()=>{if(!s)return;const P=x=>{if(x.key==="Escape"){if(x.target?.closest('[role="dialog"], [role="alertdialog"]'))return;if(!I&&(document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLSelectElement))return void document.activeElement.blur();p()}};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)}),[s,I,p]),{backToList:p,basePath:S,closePanel:p,isFullView:I,isMobile:e,isOpen:s,matchGroups:y,maximize:g,navigateToChild:m}}function q(a){try{return decodeURIComponent(a)}catch{return a}}function Ge(a){return function(n){const h=n.displayName??n.name??"Component",r=Y.memo(n),l=f=>{const{useFeatureGate:o}=J(),{isFeatureEnabled:v}=o(a.gateName??C.isTransactionDetailSplitViewEnabled),e=a.usePanelSetup(a.gateName==null||v),c=i.useContext(U),d=i.useMemo((()=>e.selectedItemId==null?c:{closePanel:e.sidePanel.closePanel,maximize:e.sidePanel.maximize,selectedItemId:e.selectedItemId}),[c,e.sidePanel.closePanel,e.sidePanel.maximize,e.selectedItemId]);return u.jsx(U.Provider,{value:d,children:u.jsx(r,{...f,...e.injectedProps})})};return l.displayName=`${a.displayNamePrefix}(${h})`,l}}const Xe=Ge({displayNamePrefix:"withTransactionSidePanel",gateName:C.isTransactionDetailSplitViewEnabled,usePanelSetup:function(a){const n=(function(r=!0){const l=$(),f=F(),o=$e(),v=k(),e=ze({childPathPattern:Ne,enabled:r}),c=e.matchGroups[0]!=null&&e.matchGroups[0]!==""?ke(q(e.matchGroups[0])):void 0,d=e.matchGroups[1]!=null&&e.matchGroups[1]!==""?q(e.matchGroups[1]):void 0,s=i.useMemo((()=>{if(r&&d!=null&&c!=null)return{id:d,type:c}}),[r,d,c]),b=Fe((m=>{if(s!=null)return je(m,s)})),I=i.useMemo((()=>e.isOpen&&s!=null?b==null?"In-Progress":b.fetchState:"Not-Started"),[e.isOpen,s,b]),T=v.tenantEmailDomain??f.pathname.split("/").find(Boolean)??"";i.useEffect((()=>{e.isOpen&&s!=null&&o(De(s,!1))}),[o,e.isOpen,s]);const y=i.useRef({isOpen:e.isOpen,transactionId:d});y.current={isOpen:e.isOpen,transactionId:d};const S=i.useCallback((m=>{const p=encodeURIComponent(m.type);return e.isMobile||!r?`/${T}/transaction/${p}/${m.id}${f.search}`:`${e.basePath}/transaction/${p}/${m.id}${f.search}`}),[e.isMobile,e.basePath,r,T,f.search]);we({currentTransactionId:s,enabled:T!=="",buildPath:S,navigate:l,navigateState:f.state});const t=i.useCallback(((m,p,g)=>{!e.isMobile&&r?y.current.isOpen&&y.current.transactionId===m?e.closePanel():e.navigateToChild(`transaction/${encodeURIComponent(p)}/${m}`,{replace:y.current.isOpen,extraState:g!=null?{searchContext:g}:void 0}):l(`/${T}/transaction/${encodeURIComponent(p)}/${m}`)}),[l,e.isMobile,e.navigateToChild,e.closePanel,r,T]);return{backToList:e.closePanel,closePanel:e.closePanel,fetchState:I,isFullView:e.isFullView,isOpen:e.isOpen,maximize:e.maximize,openPanel:t,selectedTransactionId:r?s:void 0,transactionDetail:r?b:void 0,transactionId:r?d:void 0,transactionType:r?c:void 0}})(a),h=i.useMemo((()=>{if(n.isOpen&&n.transactionId!=null&&n.transactionType!=null)return u.jsx(Re,{isFullView:n.isFullView,transactionId:n.transactionId,transactionType:n.transactionType,onBackToList:n.closePanel,onClose:n.closePanel})}),[n.isOpen,n.isFullView,n.transactionId,n.transactionType,n.closePanel]);return{injectedProps:i.useMemo((()=>a?{closeSidePanel:n.closePanel,openTransactionPanel:n.openPanel,panelContent:h,sidePanelIsFullView:n.isFullView,sidePanelIsOpen:n.isOpen}:{}),[a,n.closePanel,n.openPanel,h,n.isFullView,n.isOpen]),selectedItemId:n.transactionId,sidePanel:n}}});export{Ge as a,ze as u,Xe as w};
|