@zeniai/web-app-ui 5.0.12-qa → 5.0.13-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-CBVrrn2k.js +1 -0
- package/dist/assets/{AddressScreen-CtX_qKM4.js → AddressScreen-UXVORYsI.js} +1 -1
- package/dist/assets/{AiCfoScreen-DFClKDvA.js → AiCfoScreen-9T_HnT1O.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BuPgz0VZ.js → BillPayApprovalRoutes-CyvUP9dD.js} +1 -1
- package/dist/assets/{BillPayRoutes-Bpbp5_TI.js → BillPayRoutes-DKU3IRRM.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Ul9pbxMd.js → BusinessVerificationPageScreen-DiJtIpXw.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DBw7wMQc.js → ChargeCardRoutes-BMJyua_C.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Cqz1qGsf.js → CompanyPassportScreen-CBgDYpA6.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B0hut9cU.js → ConnectionAuthScreen-n7c7ca9F.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Boxxhazt.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-1srmqR5-.js → CustomerOnboardingRoutes-eFJ1d9x5.js} +1 -1
- package/dist/assets/{DashboardRoutes-B8hxKVWr.js → DashboardRoutes-C2PPVCPA.js} +1 -1
- package/dist/assets/{DefaultTenantHome-By01i4JV.js → DefaultTenantHome-Dr0E8E-x.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BknvyqFc.js → DomesticWireDetailScreen-CPFM3IcN.js} +1 -1
- package/dist/assets/{DrawerScreen-CPuMvDg7.js → DrawerScreen-CxkjwQIn.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CehcYova.js → EntityDetailRoutes-B7THCB4r.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes--qEGkNAZ.js → ExpenseAutomationRoutes-DsES659J.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BDotwidZ.js → FeaturePreviewScreen-B_86CEQS.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-B7lTPJi5.js → MagicLinkRoutes-DeBDkqdD.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-B64APuKo.js → MagicLinkSignInScreen-BG8wm2_4.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DJybBxxC.js → MobileAppDrawer-Bx8lTmg0.js} +1 -1
- package/dist/assets/NotFoundScreen-BGqya0iF.js +1 -0
- package/dist/assets/{NotificationRoutes-ByMmcTfv.js → NotificationRoutes-Bf5LBZ8R.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CI7fhzbD.js → PandLWithForecastRoutes-CgM9Wo-6.js} +1 -1
- package/dist/assets/{PeopleRoutes-2EjYhZMl.js → PeopleRoutes-fVruxg09.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DuSG2sOu.js → PerformanceRoutes-BEEfGS4X.js} +1 -1
- package/dist/assets/{Preview-C3TcKeZU.js → Preview-RtmufjZX.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CHf-hKza.js → QBOConnectionScreen-CC6k4vJE.js} +1 -1
- package/dist/assets/{ReferralListScreen-DXnNEK59.js → ReferralListScreen-wswn86OV.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-D_6AwVb9.js → ReimbursementApprovalRoutes-aSZ_wShn.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B0UWTjpK.js → ReimbursementApprovalRuleDetailScreen-CUguJaa6.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DpKjqTcA.js → ReimbursementRoutes-UN8So9Js.js} +1 -1
- package/dist/assets/{ReportsRoutes-Ci1ouv8p.js → ReportsRoutes-lc7GidmL.js} +1 -1
- package/dist/assets/{RewardsRoutes-BgSfJ48K.js → RewardsRoutes-C8QB5nn1.js} +1 -1
- package/dist/assets/{ScreenRoutes-Bd9RFirn.js → ScreenRoutes-DyKpA6gG.js} +2 -2
- package/dist/assets/{SettingsRoutes-B5wg5ovm.js → SettingsRoutes-BIohG9kB.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BanbOOgQ.js → SetupPagesScreen-B6qYnyZ1.js} +1 -1
- package/dist/assets/{SignInScreen-CZI8HoAd.js → SignInScreen-kdxqbji_.js} +1 -1
- package/dist/assets/{SignOutScreen-BL4TvYfS.js → SignOutScreen-CoA4NiIP.js} +1 -1
- package/dist/assets/{TaskListScreen-BRZ-S3Tv.js → TaskListScreen-BOnN17k2.js} +1 -1
- package/dist/assets/{TaskRoutes-D4NPFxWo.js → TaskRoutes-CUZbFNHU.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-h1cHra4c.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BQBVq_ZG.js → TransactionDetailScreen-C4h7v589.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BeBY15XF.js → TransactionListRoutes-26j8jmQu.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BnDkIw9o.js → TreasuryRoutes-DIYYeRNB.js} +1 -1
- package/dist/assets/{VendorsRoutes-Bg_qB9es.js → VendorsRoutes-p6kpb3Y0.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C9IRTjl_.js → WiseConfirmationScreen-bVdCcMoK.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B-_OsFeA.js → ZeniAccountRoutes-CHWXhbKm.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CVRPKBLf.js → ZeniAccountStatementScreen-CEDgFdf8.js} +1 -1
- package/dist/assets/{accountMappingHelper-DUJwjv4V.js → accountMappingHelper-VkYriGBP.js} +1 -1
- package/dist/assets/{analytics-DuZD1FBf.js → analytics-D3BPH6yx.js} +1 -1
- package/dist/assets/{analyticsHelper-CezXrIid.js → analyticsHelper-CT8y7LQ5.js} +1 -1
- package/dist/assets/{core-CHx9v1R3.js → core-CZukbx0Q.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-IyDHJK_-.js → decodeURIComponentSafe-BMhpBWAI.js} +1 -1
- package/dist/assets/{dnd-Ci4anwe2.js → dnd-C982KOaa.js} +1 -1
- package/dist/assets/{empty-CXijM8Yn.js → empty-BWCQ_0J5.js} +1 -1
- package/dist/assets/{empty-DC_zzPcD.js → empty-v0hJlOmn.js} +1 -1
- package/dist/assets/{emptyVideoElement-C2-_1qo0.js → emptyVideoElement-BxwhKJBx.js} +1 -1
- package/dist/assets/epic-CGgrgTSz.js +2 -0
- package/dist/assets/{getLocaleForTenant-BobWg4Hu.js → getLocaleForTenant-BkEEFtfp.js} +1 -1
- package/dist/assets/{index-DXrrGmep.js → index-B40Qim0p.js} +1 -1
- package/dist/assets/{index-DW2V2aM1.js → index-BCUyk4vZ.js} +1 -1
- package/dist/assets/{index-BJaFzjLY.js → index-BL5F9FcF.js} +1 -1
- package/dist/assets/{index-BYgpnDFl.js → index-BclNqUUi.js} +1 -1
- package/dist/assets/{index-DZjotWfe.js → index-BiQB87nE.js} +2 -2
- package/dist/assets/{index-DvW5_poC.js → index-CTCUMK3y.js} +1 -1
- package/dist/assets/{index-_YbuoSTd.js → index-uvx_AADs.js} +643 -614
- package/dist/assets/{lexical-DQpmcVQ9.js → lexical-BiHBh7jO.js} +1 -1
- package/dist/assets/{liveblocks-CQd3J_Jz.js → liveblocks-D6KTXvhv.js} +1 -1
- package/dist/assets/{lottie-Dnly7PBz.js → lottie-28Wzb4-h.js} +1 -1
- package/dist/assets/{mui-B5MJXy46.js → mui-BsWf3aoF.js} +1 -1
- package/dist/assets/{pathToGoBack-eAzzRDV4.js → pathToGoBack-DuOzAHpB.js} +1 -1
- package/dist/assets/{pdf-DYwn2DuC.js → pdf-D4etPH5X.js} +4 -4
- package/dist/assets/{pdf-lib-DV6Dg2jz.js → pdf-lib-B-kXlgH7.js} +1 -1
- package/dist/assets/{plaid-CcgrQve1.js → plaid-BlZUWQEE.js} +1 -1
- package/dist/assets/{pusher-SIueaQE_.js → pusher-DNeGnq4j.js} +1 -1
- package/dist/assets/{react-fY2vQLDW.js → react-BKssAPFM.js} +1 -1
- package/dist/assets/{react-Df7SmVuu.js → react-Bgw1-uo-.js} +1 -1
- package/dist/assets/{react-B_6uxiQm.js → react-BjugJboI.js} +1 -1
- package/dist/assets/{react-C7IO6ybw.js → react-Cmcopb6P.js} +1 -1
- package/dist/assets/{react-vH2UXDZO.js → react-DIioZG0x.js} +1 -1
- package/dist/assets/{react-BOC875DV.js → react-ScHkzTjl.js} +1 -1
- package/dist/assets/{recharts-nKX4-UUs.js → recharts-Kt4_Z9D4.js} +1 -1
- package/dist/assets/{routePaths-DcafKlRb.js → routePaths-Cqo_muAD.js} +1 -1
- package/dist/assets/{sentry-BO53Tmje.js → sentry-DlTle5wx.js} +1 -1
- package/dist/assets/{url-CXCHGUpp.js → url-B8abWcfS.js} +1 -1
- package/dist/assets/{url-kAF8xbJK.js → url-kIFJA3dP.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BndHsfWo.js → useAskAiCfoHostNavButtonProps-BOODwYej.js} +1 -1
- package/dist/assets/{useDeviceId-J1-jcXdc.js → useDeviceId-DgVtbX-U.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js → useFetchSuggestedQuestionsWhenReady-DFgEppv4.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CIDuB5B_.js → useInitialThreadRequest-CKZbNN_8.js} +1 -1
- package/dist/assets/{utils-DpJstXha.js → utils-CnNkpT2e.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bvasj9MO.js → withTransactionSidePanel-CuBFY4e0.js} +1 -1
- package/dist/assets/{zeni-epic-state-T7UkKQQw.js → zeni-epic-state-1VZHEC1T.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-BB3QwcV2.js +0 -1
- package/dist/assets/AddressRoutes-RZvAbm7b.js +0 -1
- package/dist/assets/AddressScreen-fg6k52x4.js +0 -9
- package/dist/assets/AiCfoScreen-jLlIeMQC.js +0 -11
- package/dist/assets/BillPayApprovalRoutes-DpwujefZ.js +0 -1
- package/dist/assets/BillPayRoutes-CQiDaAlk.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-Z_-aQI_5.js +0 -9
- package/dist/assets/ChargeCardRoutes-mbNdCQ5I.js +0 -71
- package/dist/assets/CompanyPassportScreen-Dof8QyCO.js +0 -1
- package/dist/assets/ConnectionAuthScreen-D3iY5CZB.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-InYw6yWH.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-SG-PPDAy.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-DNuKHrz2.js +0 -23
- package/dist/assets/DashboardRoutes-BJM-IVpb.js +0 -20
- package/dist/assets/DefaultTenantHome-Cc07dgHD.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-C5mre1dZ.js +0 -18
- package/dist/assets/DrawerScreen-Dd2y9Zxp.js +0 -1
- package/dist/assets/EntityDetailRoutes-CsheHpOm.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Bn2btjHv.js +0 -20
- package/dist/assets/FeaturePreviewScreen-jkbWAKFD.js +0 -1
- package/dist/assets/MagicLinkRoutes-Bk7xjaNH.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CIKfHfB4.js +0 -12
- package/dist/assets/MobileAppDrawer-gMG7WLxC.js +0 -1
- package/dist/assets/NotFoundScreen-Cd8X5xCE.js +0 -1
- package/dist/assets/NotFoundScreen-DKiPvQrK.js +0 -1
- package/dist/assets/NotificationRoutes-DRSZhtx9.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CzASlWgo.js +0 -1
- package/dist/assets/PeopleRoutes-BG3ChQRM.js +0 -22
- package/dist/assets/PerformanceRoutes-hWmBUaHL.js +0 -1
- package/dist/assets/QBOConnectionScreen-OXmvz2uL.js +0 -100
- package/dist/assets/ReferralListScreen-DmQVP2Me.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-E6bF5lHy.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CMkDXxn8.js +0 -1
- package/dist/assets/ReimbursementRoutes-zGe6V_ZX.js +0 -68
- package/dist/assets/ReportsRoutes-D7nHEFeV.js +0 -1
- package/dist/assets/RewardsRoutes-LUDjkgNt.js +0 -1
- package/dist/assets/ScreenRoutes-CPqWF-Ww.js +0 -2
- package/dist/assets/SettingsRoutes-B7PmQ0pH.js +0 -57
- package/dist/assets/SetupPagesScreen-Ch-NFUb5.js +0 -29
- package/dist/assets/SignInScreen-DBNzBnK2.js +0 -1
- package/dist/assets/SignOutScreen-CpX3JLX_.js +0 -9
- package/dist/assets/TaskListScreen-C090Vv7j.js +0 -9
- package/dist/assets/TaskRoutes-p-A0ZRuC.js +0 -9
- package/dist/assets/TransactionDetailRoutes-5Y-Qd0jd.js +0 -1
- package/dist/assets/TransactionDetailRoutes-DQpiFP5C.js +0 -1
- package/dist/assets/TransactionDetailScreen-B_ny21sj.js +0 -5
- package/dist/assets/TransactionListRoutes-HA0OKQn5.js +0 -1
- package/dist/assets/TreasuryRoutes-Cfd3gerU.js +0 -37
- package/dist/assets/VendorsRoutes-QN_UpFaZ.js +0 -112
- package/dist/assets/WiseConfirmationScreen-RvJMSTLm.js +0 -12
- package/dist/assets/ZeniAccountRoutes-2FokmTKZ.js +0 -66
- package/dist/assets/ZeniAccountStatementScreen-VNEYE6MA.js +0 -9
- package/dist/assets/analyticsHelper-Mt04lTg1.js +0 -1
- package/dist/assets/epic-ClqXieiv.js +0 -2
- package/dist/assets/getLocaleForTenant-NjEbUk_c.js +0 -1
- package/dist/assets/index-Dq9jqf2N.js +0 -70788
- package/dist/assets/routePaths-abbP8AF2.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BoUrQmeU.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-SLtAuNb5.js +0 -1
- package/dist/assets/useInitialThreadRequest-DORcYYgp.js +0 -1
- package/dist/assets/withTransactionSidePanel-UHZfMBs6.js +0 -21
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CQd3J_Jz.js";import{J as l,C as f,h as b}from"./index-Dq9jqf2N.js";import{D as c}from"./mui-B5MJXy46.js";import"./sentry-BO53Tmje.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8b1eb99b-980f-433e-8113-44fe445caabb",e._sentryDebugIdIdentifier="sentry-dbid-8b1eb99b-980f-433e-8113-44fe445caabb")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=b();return d.jsx(c,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CQd3J_Jz.js";import{a as d}from"./sentry-BO53Tmje.js";import{j as A,h as B,u as J,l as q,g as l,N as F,k as M,n as O,o as N}from"./core-CHx9v1R3.js";import{Kp as _,eM as K,JO as R,km as W,Gw as k,Ku as Y,Jh as $,jm as z,Gx as S,JT as U,JU as V,Jj as H,Ji as L}from"./zeni-epic-state-T7UkKQQw.js";import{aM as Q,c as X,q as Z,v as tt}from"./index-Dq9jqf2N.js";import"./mui-B5MJXy46.js";import{d as b}from"./decodeURIComponentSafe-IyDHJK_-.js";import{w as et}from"./withTransactionSidePanel-UHZfMBs6.js";import{e as at,b as nt}from"./routePaths-DcafKlRb.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./useAskAiCfoHostNavButtonProps-BoUrQmeU.js";import"./useFetchSuggestedQuestionsWhenReady-SLtAuNb5.js";import"./TransactionDetailScreen-BQBVq_ZG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4ee1a195-5526-4beb-9eb3-dc56a1f4c5e8",a._sentryDebugIdIdentifier="sentry-dbid-4ee1a195-5526-4beb-9eb3-dc56a1f4c5e8")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(U()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=J(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=q(),r=b(j??""),p=b(x??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CQd3J_Jz.js";import un from"./NotFoundScreen-Cd8X5xCE.js";import{a as l}from"./sentry-BO53Tmje.js";import{n as Te,D as St,S as ze}from"./mui-B5MJXy46.js";import{h as he,j as It,u as Ve,g as V,l as nt,k as mn,n as hn,o as Be}from"./core-CHx9v1R3.js";import{eM as $e,OI as pn,f0 as me,fe as gn,q3 as Cn,OJ as je,mI as ft,mO as kt,OK as Et,nb as Sn,OL as yt,mB as In,pB as fn,OM as kn,jy as En,ON as yn,Fx as bn,eY as Me,pg as bt,Kq as at,Ks as vn,jp as Tn,Kt as An,jw as Pn,cT as wn,t5 as Le,Jh as xn,jx as Rn,e_ as Dn,mP as vt,ng as ve,ob as Tt,oK as Un,e$ as At,nf as ot,mG as ae,ni as Pt,nk as Bn,bB as On,kV as Fn,kS as _n,nj as Ee,nh as ue,OO as Vn,nA as st,Bd as wt,OP as xt,s2 as Rt,oG as jn,jm as Mn,OQ as Ln,Jj as ct,Ji as ke,OR as it,jN as zn,OS as $n,OT as Gn,OU as qn,OV as Yn,mY as Jn,OW as Kn,OX as Nn,OY as Zn,nq as Hn,jA as Qn,jr as Wn,OZ as Xn,jz as lt,KA as ea,O_ as ta,O$ as na,pc as aa,oT as oa,oS as Oe,P0 as sa,P1 as ca,l4 as ia,bp as la,k$ as rt,kN as ra,P2 as da,gy as dt,fL as ua,kY as ma,u_ as ha,P3 as pa,nR as ga,nM as Ca,nQ as Sa,nB as Ia,P4 as fa,n4 as ka,mV as Ea,ff as ut,nl as ya,P5 as ba,P6 as va,P7 as Ta,P8 as Aa,P9 as Pa,Pa as mt,po as wa,oB as xa,ok as ht,ot as Ra,og as Da,oH as Ua,ol as Ba,Pb as Oa,Pc as Fa,n_ as _a,Pd as Va,nY as ja,nZ as Ma,nW as La,ov as za}from"./zeni-epic-state-T7UkKQQw.js";import{K as Dt,i as Ut,s as ye,c as M,v as H,N as Bt,cq as $a,h as Ot,z as Ae,cr as Ga,ao as be,cs as qa,B as Ft,ct as Ya,cu as Ja,al as Fe,Y as Ka,S as Na,aI as Za,cv as Ha,aZ as Qa,C as Wa,D as Xa,cw as eo,T as to,cx as no}from"./index-Dq9jqf2N.js";import{u as _t}from"./useAskAiCfoHostNavButtonProps-BoUrQmeU.js";import{c as Vt}from"./useFetchSuggestedQuestionsWhenReady-SLtAuNb5.js";import{c as pt,C as ao}from"./TransactionDetailScreen-BQBVq_ZG.js";import{w as oo}from"./withTransactionSidePanel-UHZfMBs6.js";import{h as so,v as co}from"./routePaths-DcafKlRb.js";import{g as _e}from"./accountMappingHelper-DUJwjv4V.js";import{D as io}from"./DrawerScreen-Dd2y9Zxp.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./decodeURIComponentSafe-IyDHJK_-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new t.Error().stack;c&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[c]="26eab456-4be1-4582-b67b-fa7e25750391",t._sentryDebugIdIdentifier="sentry-dbid-26eab456-4be1-4582-b67b-fa7e25750391")}catch{}})();const lo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:c}=Dt(),w=he(),A=It(),y=Ve(),r=V(p=>$e(p)),{useFeatureGate:m}=Ut(),{isFeatureEnabled:x}=m(ye.isRealtimeInsightsFeatureEnabled),g=V(p=>p.expenseAutomationViewState.selectedPeriodByTenantId),a=V(p=>pn(p,r.tenantId)),{isAiCfoAccessEnabled:j,onAskAiCfoClick:b}=_t({isAiCfoOpen:t,setIsAiCfoOpen:c,mobileExploreReferrer:"Month-End Close Overview"}),I=l.useCallback((p,E,U=!1)=>{w(me({tenantId:E,period:{month:p.month,year:p.year},refreshViewInBackground:U}))},[]),$=l.useCallback(p=>{const E=y.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(p.month,p.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,E??null),w(gn(r.tenantId,p))},[r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),S=g[r.tenantId],k=l.useCallback(()=>{const p=y.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(S.month,S.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),I(S,r.tenantId,!0)},[I,S,r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),L=H(y.state?.pathnameStackToGoBack,y.pathname),K=l.useCallback(()=>{if(a.monthEndCloseChecks!=null&&S!=null){const p=a.monthEndCloseChecks.monthEndCloseCheckList.find(E=>E.progress<100);if(p!=null)return void A(`./${p.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}});A(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}})}},[a.monthEndCloseChecks,S]),{areTenantIdsInSync:d}=Bt();return Vt({isDataReady:a.fetchState==="Completed"}),l.useEffect(()=>{S!=null&&a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&d&&I(S,r.tenantId)},[I,S,a.fetchState,r.tenantId,d]),l.useEffect(()=>{S!=null&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&d&&w(Cn(S))},[S,a.monthClosePerformanceTrendFetchStatus.fetchState,d]),l.useEffect(()=>{const p=setInterval(()=>{a.fetchState!=="In-Progress"&&a.fetchState==="Completed"&&k()},3e5);return()=>clearInterval(p)},[a.fetchState]),l.useEffect(()=>{if(a.fetchState==="Completed"&&a.monthEndCloseChecks?.auditSummary!=null){const p=y.state?.referrer;M.trackMonthCloseAuditPage(a.selectedPeriod.month,a.selectedPeriod.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}},[a.fetchState,a.selectedPeriod,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),u.jsx(ro,{children:u.jsx($a,{monthEndCloseChecksView:a,isRealtimeInsightsFeatureEnabled:x,onMonthEndCheckClick:p=>{A(`./${p}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:$,handleReviewButtonClick:K,onBackClick:()=>{A("../../dashboard")},onReload:k,isAiCfoAccessEnabled:j,onAskAiCfoClick:b})})},ro=Te.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,uo="512px",mo=({reconciliation:t,selectedDrawerAccountId:c,onFetchLinkTokenClick:w,onEstablishConnectionClick:A})=>{const y=Ot(),r=he(),m=Ae.getSignedInUser(),x=V(s=>$e(s)),g=t.excludedAccountIDs,a={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:x.tenantId??""},{accountReconciliationsByAccountID:j,monthYearPeriod:b,statementUploadChosen:I}=t,$=c!=null?j[c]:void 0,S=$?.accountReconEntity.statementMetaData?.statementUploadId,k=l.useCallback(()=>{c!=null&&r(je({selectedDrawerAccountId:void 0}))},[r,c]),L=(s,C)=>{r(fn(s,C.split(".")[0]))},K=s=>{S!=null&&r(In({accountId:c??"",selectedPeriod:b,fileId:s,statementUploadId:S}))},d=()=>{r(Et({statementUploadChosen:!1}))},p=s=>{c!=null&&r(Sn({accountId:c,selectedPeriod:b,payload:s}))},E=s=>{c!=null&&r(yt({accountId:c,selectedPeriod:b,localData:{accountSource:s}}))},U=l.useCallback(()=>{c!=null&&r(ft({accountId:c}))},[r,c]),e=l.useCallback(()=>{c!=null&&r(kt({accountId:c}))},[r,c]),n=g.includes(c??"")?t.excludedAccountReconciliationByAccountID[c??""]:void 0,o=$!=null?u.jsx(Ga,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:$,monthYearPeriod:b,onDismissClick:k,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:w,onEstablishConnectionClick:A,onEditFileName:L,onDeleteFile:K,onSelectSourceType:E,filesEndPoint:`${be.fileMicroServiceBaseUrl}`,authParams:a,openFilePicker:I,onStatementUploadSuccess:p,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:U}):n!=null?u.jsx(qa,{excludedAccountReconciliation:n,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:e}):null;return o==null?null:u.jsx(St,{anchor:"right",open:c!=null,PaperProps:{style:{width:uo,color:y.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>k(),children:u.jsx(ho,{onClick:s=>s.stopPropagation(),children:o})})},ho=Te(ze)`
|
|
9
|
-
display: flex;
|
|
10
|
-
min-height: 100%;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
`;function po({companyId:t,closeCustomerRequestDrawer:c,addCustomerRequest:w,resetCustomerRequest:A}){const y=Ae.getSignedInUser();if(y==null)throw Error("Can't access Customer Request page without signing in...");const r=V(m=>kn(m,t,y));return l.useEffect(()=>{A()},[]),u.jsx(u.Fragment,{children:r.fetchState==="In-Progress"||r.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?u.jsx(Ft,{fetchState:"In-Progress"}):u.jsx(Ya,{onCloseClick:c,addCustomerRequest:w,snippets:r.companyMonthEndReportTemplatesData,bulletPoints:r.zeniRequestsData??[]})})}const go=t=>u.jsx(Ja,{...t}),Co="512px",So=({selectedTransactionId:t,onClose:c})=>{const w=Ot(),A=he(),y=V(g=>t==null?void 0:En(g.transactionState,t)),r=y?.qboId,m=V(g=>r==null?void 0:yn(g,r));l.useEffect(()=>{r!=null&&A(bn(r))},[A,t,r]);const x=l.useCallback(()=>{c()},[c]);return t==null||m==null?null:u.jsx(St,{anchor:"right",open:t!=null,PaperProps:{style:{width:Co,color:w.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:x,children:u.jsx(Io,{onClick:g=>g.stopPropagation(),children:u.jsx(go,{transactionActivityLogSelectorView:m,onClose:x})})})},Io=Te(ze)`
|
|
13
|
-
display: flex;
|
|
14
|
-
min-height: 100%;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
`,fo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:ko,comma:gt,space:Eo}},dateFormat:jt}=Xa.getLocalizedStrings(),Ct=za,yo=mn(function(t,c){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:A,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,companyId:m,isMissingReceiptsBulkUploadEnabled:x,isTransactionActivityEnabled:g}=c,a=Ae.getSignedInUser(),j=t.tenantState.currentTenantId,b={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:j??""},I=Me(t),{selectedTransactionCategorizationTab:$}=I;return{expenseAutomationViewSelector:I,bulkUploadSelector:I.missingReceipts.bulkUpload,vendorSearchAutoCompleteData:A,authParams:b,receiptUploadEndpoint:`${be.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${to}/transaction_attachments`,bulkUploadEndpoint:x===!0?`${be.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:$,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:a,uncategorizedAccounts:w,companyId:m,isTransactionActivityEnabled:g,isAccountingClassesEnabled:Mn(t)}},function(t,c){const{themeState:w,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:y,isMissingReceiptsBulkUploadEnabled:r,location:m,vendorSearchAutoCompleteData:x,expenseAutomationViewSelector:g,currentTenant:a,uncategorizedAccounts:j,navigate:b,onClickCustomerRequest:I,handleEditClick:$,setActivityLogTransactionId:S}=c,{selectedPeriod:k,currentSelectedView:L,reconciliation:{selectedAccountId:K}}=g,{accountSettingsView:d}=g.jeSchedules,p=vt(k),E=ve(p.start),U=ve(p.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{M.trackMissingReceiptAttached(k.month,k.year),t(xa(e))},onUploadTransactionReceipt:(e,n,o,s,C,h)=>{t(mt(e,n,{fetchState:"In-Progress"}));const f=()=>t(mt(e,n,{fetchState:"Error"}));no(`${be.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,h,n,o,s,C).then(v=>{v!=null?t(wa(e,v)):f()}).catch(f)},onMissingReceiptsRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Pa(e,n)),a!=null&&t(me({tenantId:a.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,o,s)=>{t(Aa(e,{fetchState:n,error:o})),o!=null&&t(dt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:s!=null?Eo+ko+s+gt:gt}]}))},onUpdateJESchedulesUIState:e=>{t(Ta(e))},onUpdateMissingReceiptsUIState:e=>{t(va(e))},onFetchMissingReceiptsList:()=>{U!=null&&E!=null&&t(Pt({start:E,end:U},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(La(e))},onBulkUploadProgress:e=>{t(Ma(e))},onBulkUploadSuccess:e=>{t(ja({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Va(e))},onConfirmBulkUploadMatch:(e,n,o,s,C)=>{t(_a(e,n,o,s,C))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fa())},onSetBulkUploadResultsTab:e=>{t(Oa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Ba(e))},onSetBulkUploadSortConfig:(e,n)=>{t(ht({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ua())},onSearchTransactionsForManualMatch:(e,n)=>{t(Ct(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=g.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Ct(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Da(e,n))},onFetchBulkUploadBatches:e=>{t(Tt(e))},onFetchMoreBatchDetails:()=>{t(Ra())},onResetBulkUploadSort:()=>{t(ht({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(ba())},onSearchTextChanged:e=>{const n=g.currentSelectedView,o=g.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Oe({selectedTab:o,uiState:{searchString:e}})),U!=null&&E!=null&&t(ue(o,{start:E,end:U},!0,!1,e,void 0,!0)))},onRefresh:()=>{c.trackExpenseAutomationTabAnalytics(!0),t(ya(y))},onClose:()=>{L==="reconciliation"&&K!=null&&t(ut({selectedAccountId:void 0})),b("../")},onBack:()=>{L==="reconciliation"&&K!=null&&t(ut({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Ea(e))},onSaveReconciliationReview:e=>{t(ka(e))},onUpdateStep:e=>{const{selectedPeriod:n}=g,o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:o,referrer:g.currentSelectedView}}),t(At(e))},handleLogOutClick:()=>{const e=H(m.state?.pathnameStackToGoBack,m.pathname);b("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:o,fixedAssetsAccount:s,accruedExpensesAccount:C}=n,h=_e(d.prepaidExpensesAccountList,o.selectedOptions),f=_e(d.fixedAssetsAccountList,s.selectedOptions),v=_e(d.accruedExpensesAccountList,C.selectedOptions),z={selectedPrepaidExpensesAccountIds:h.map(B=>B.accountId),selectedFixedAssetsAccountIds:f.map(B=>B.accountId),selectedAccruedExpensesAccountIds:v.map(B=>B.accountId)};t(fa({data:z}))},onSaveJeAccountSettingsClick:()=>{t(Ia())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:o,accumulatedDepreciationCategory:s,scheduleClass:C,scheduleExpenseCategory:h,vendor:f}=n,{allAccountList:v,allClassList:z,allDepreciationAccountList:B}=g.jeSchedules,N=x.entityAutoCompleteView.vendor.length>0?x.entityAutoCompleteView.vendor.find(G=>G.id===f?.selectedOption):void 0,oe={id:N?.zeniId??f?.selectedOption??"",name:N?.name??f?.defaultOptions.find(G=>G.value===f?.selectedOption)?.label??"",logo:N?.logo},pe=h?.selectedOption!=null?v.find(G=>G.qboId===h.selectedOption):void 0,Pe=C?.selectedOption!=null?z.find(G=>G.classId===C.selectedOption):void 0,te=s?.selectedOption!=null?B.find(G=>G.qboId===s.selectedOption):void 0;t(Sa({scheduledJournalEntryID:e,localData:{jeScheduleID:o,scheduledJournalEntryID:e,updatedCategoryId:pe?.accountId,updatedClassId:Pe?.classId,updatedAccumulatedDepreciationCategoryID:te?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ca(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ct({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onCancelAutoComplete:()=>{t(ke("common"))}},onPostJESchedule(e,n){t(ga({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(pa())},handleJeScheduleClick:(e,n,o)=>{t(ha({selectedJEScheduleKey:n}));const s=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../vendors/schedules/${o}/details/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{a!=null&&t(ma(e,a.companyId,a.tenantId))},onClickCustomerRequest:I,setActivityLogTransactionId:S,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(ua())},onOpenFileAttachmentSnackBar:()=>{t(dt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(da(e))},onUpdateFileAttachment:e=>{t(ra({files:e}))},previewMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!0,o,s,a.tenantId))},saveMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!1,o,s,a.tenantId))},onEditMonthEndInsightsClick:$,sendMonthEndReport:e=>{const n=m.state?.referrer,{selectedPeriod:o,auditSummary:s}=g;a!=null&&s?.auditScorePercentage!=null&&(t(ia(a.companyId,e,a.tenantId)),M.trackInsightsEmailPage(o.month,o.year,!1,"draft",s.auditScorePercentage,la().format(jt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,o,s,C,h,f,v,z,B,N)=>{t(ca(e,n,o,s,j,C,h,f,v,z,B,N))},onCancelAutoComplete:()=>{t(ke("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(it({scrollPosition:e}))},onUpdateTab:e=>{c.closeSidePanel?.(),U!=null&&E!=null&&(t(ue(e,{start:E,end:U},!1,!1)),t(sa(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n})),U!=null&&E!=null&&t(ue(e,{start:E,end:U},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,o,s,C,h,f)=>{U!=null&&E!=null&&t(ue(e,{start:E,end:U},!0,o,n,s,C,h,f))},resetTransactionCategorizationLocalData:(e,n,o,s,C,h,f,v)=>{t(oa(e,n,o,s,v??null,C,h,!1,f))},updateSelectedVendorForTransaction:(e,n,o,s,C)=>{t(lt({selectedTab:e,transactionId:n,lineId:o,selectedTransaction:s,uncategorizedAccounts:j,updatedVendor:C}))},onSaveUpdateTransactionCategorization:(e,n,o)=>{const s=m.state?.referrer;e==="autoCategorized"?M.trackTransactionsAutoCategorisedPage(k.month,k.year,g.transactionView.totalCountByTab.autoCategorized,n.length,!1,s??null):M.trackTransactionsReviewPage(k.month,k.year,g.transactionView.totalCountByTab.review,n.length,!1,s??null),t(aa(e,n,o,y))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(na({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,o,s,C,h,f)=>{const{transactionId:v,transaction:z,lineIds:B}=n;h!=null&&t(ea({transactionId:v,customerUpdates:h})),t(ta({selectedTab:s,transactionId:v.id,lineId:B[0],selectedTransaction:z,uncategorizedAccounts:j,updatedCustomer:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))},onFetchRecommendationsForEntityCategorization:(e,n,o,s,C,h,f)=>{const{transactionId:v,transaction:z,lineIds:B}=n;h!=null&&(t(Qn({transactionId:v,vendorUpdates:{name:h.name,id:h.id?h.id:void 0}})),t(Wn({vendorId:h.id?h.id:void 0,localData:{vendorName:h.name,vendorId:h.id?h.id:void 0}}))),h?.id?(t(lt({selectedTab:s,transactionId:v.id,lineId:B[0],selectedTransaction:z,uncategorizedAccounts:j,updatedVendor:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))):t(Xn({selectedTab:s,transactionId:v.id,lineId:B[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Ee(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Ee(k,!0,!1,null,!1,!1))},markAsReview:(e,n,o,s)=>{M.trackFluxAnalysisReviewed(o.month,o.year,s??!1,e),t(Hn(n,e,o,s??!1))},onUpdateFluxAnalysisUIState:e=>{t(Zn(e))},updateOperatingExpensesIdsForReview:e=>{t(Nn({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(c.tenantEmailDomain!=null){const n=co(e.id,e.qboId,c.tenantEmailDomain),o=H(c.location.state?.pathnameStackToGoBack,c.location.pathname);c.navigate(n,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Kn({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,o)=>{t(Ee(e,!0,!1,n,!0,o))},onReviewClicked:e=>{t(ae(k,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Rt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const o=a?.companyId;o!=null&&(t(wt(e,o,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(xt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(yt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Et({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ae(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Jn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Yn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(qn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{c.closeSidePanel?.(),t(Gn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,o)=>{const s=e.vendor?.id;o&&s!=null&&t(zn(s)),t($n({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,bt("bill"));const n=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{b(-1)},onReconListPageScroll:e=>{t(it({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ct({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ln({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(ft({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(kt({accountId:e}))}}},(t,c,w)=>{const{isMissingReceiptsBulkUploadEnabled:A,...y}=w;return function(r,m,x){return{...r,...m,...x,onUploadTransactionReceipt:(g,a,j,b,I)=>{m.onUploadTransactionReceipt(g,a,j,b,I,r.authParams)}}}(t,c,y)})(eo),bo=oo(({closeSidePanel:t,openTransactionPanel:c,panelContent:w,sidePanelIsFullView:A,sidePanelIsOpen:y})=>{const{isAiCfoOpen:r,setIsAiCfoOpen:m}=Dt(),x=It(),g=Ve(),a=he(),{isAiCfoAccessEnabled:j,onAskAiCfoClick:b}=_t({isAiCfoOpen:r,setIsAiCfoOpen:m,mobileExploreReferrer:"Transaction categorization"}),{areTenantIdsInSync:I}=Bt(),$=(()=>{const i=V(q=>Me(q)),T=Ve(),{currentSelectedViewFetchState:D,currentSelectedView:F,selectedPeriod:R}=i,de=Fe(F),X=Fe(D.fetchState),Se=l.useCallback(q=>{const Z=T.state?.referrer;F==="transaction_categorization"&&(i.selectedTransactionCategorizationTab==="review"?M.trackTransactionsReviewPage(R.month,R.year,i.transactionView.totalCountByTab.review,0,q,Z??null):M.trackTransactionsAutoCategorisedPage(R.month,R.year,i.transactionView.totalCountByTab.autoCategorized,0,q,Z??null)),F==="missing_receipts"&&M.trackMissingReceiptsPage(R.month,R.year,q,i.missingReceipts.transactions.length,Z??null),F==="je_schedules"&&M.trackMonthCloseScheduleListPage(R.month,R.year,q,i.jeSchedules.draftSchedules.length,i.jeSchedules.resolveSchedules.length,Z??null),F==="flux_analysis"&&M.trackFluxAnalysisPage(R.month,R.year,q,fo(i.fluxAnalysis),Z??null),F==="month_end_insights"&&i.auditSummary?.auditScorePercentage!=null&&M.trackInsightsEmailPage(R.month,R.year,q,"draft",i.auditSummary.auditScorePercentage,null,Z??null)},[R,i]);return l.useEffect(()=>{X===D.fetchState&&F===de||D.fetchState!=="Completed"||Se(!1)},[F,D.fetchState,de]),Se})(),S=Ka(),[k,L]=l.useState(!1),K=V(i=>at(i)),d=V(i=>$e(i)),[p,E]=l.useState(!1),[U,e]=l.useState(!1),[n,o]=l.useState([]),[s,C]=l.useState(void 0),[h,f]=l.useState(!1),v=l.useRef(!1),{selectedTab:z}=nt(),{tenantEmailDomain:B}=nt(),[N,oe]=l.useState(g.state?.message==="comingFromTransactionDetail"),pe=g.state?.message==="comingFromOverview",Pe=Na(),te=Ae.getSignedInUser(),{useDynamicConfig:G,useFeatureGate:we}=Ut(),{configValue:Mt}=G(Za.enableUncategorizedExpenseCategory),Q=Mt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ge}=we(ye.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:se}=we(ye.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:qe}=we(ye.isTransactionActivityEnabled),Lt=V(i=>xn(i,"common")),_=V(i=>Me(i)),{monthEndCloseChecksView:J,currentSelectedView:O,selectedPeriod:P,selectedTransactionCategorizationTab:Ye,currentSelectedViewBackgroundRefreshFetchState:zt,currentSelectedViewFetchState:W,jeSchedules:xe,reconciliation:$t}=_,{selectedAccountId:ce}=$t,Je=Fe(xe.accountSettingsView.saveState.fetchState),Gt=V(i=>Rn(i.accountState,i.accountListState,"accountList")),ie=z!=null?Dn(z):O,qt=V(i=>i.entityAutoCompleteState.autoCompleteText.common);if(Vt({isDataReady:W.fetchState==="Completed"}),te==null)throw Error("Can't access expense automation screen without signing in...");const Ke=vt(P),le=ve(Ke.start),re=ve(Ke.end);if(le==null||re==null)throw Error(`Invalid start - ${le} and end - ${re} period from given ${P}`);const Yt=l.useCallback(()=>{E(!1)},[]),Jt=l.useCallback(()=>{e(!0)},[]),Kt=l.useCallback(i=>{o(i),e(!1)},[]),Nt=l.useCallback(()=>{o([])},[]),Re=`private-${te.userId}`,Ne="missing-receipts-batch-completed",ge=Ha();l.useEffect(()=>{if(ge==null||O!=="missing_receipts"||se===!1)return;const i=ge.channel(Re)??ge.subscribe(Re),T=D=>{a(jn({batchId:D.batch_id,progress:D.progress,status:D.status.toLowerCase()}))};return i.bind(Ne,T),()=>{i.unbind(Ne,T)}},[ge,O,Re,a,se]);const Ce=_.missingReceipts.bulkUpload.phase,Ze=_.missingReceipts.bulkUpload.currentBatchId;l.useEffect(()=>{O==="missing_receipts"&&Ce==="matching"&&Ze!=null&&a(Tt({cacheOverride:!0}))},[O,Ce,Ze,a]);const He=te?.userId,Zt=P.month,Ht=P.year,Qe=d?.tenantId;l.useEffect(()=>{O==="missing_receipts"&&se!==!1&&Ce==="idle"&&He!=null&&Qe!=null&&a(Un())},[O,se,Ce,He,Qe,Zt,Ht,a]),l.useEffect(()=>{K.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[K.newVendorState?.vendorDetailLocalData?.vendorName]),l.useEffect(()=>{ie!=null&&O!==ie&&a(At(ie))},[ie]),l.useEffect(()=>{h!==!1||W.fetchState!=="Completed"&&W.fetchState!=="Error"||!I||(f(!0),a(ot(!1,!1,Q)))},[h,W,I,Q]),l.useEffect(()=>{!pe&&I&&(a(ot(!1,!1,Q)),a(ae(P,ce,!1,!1)))},[P.month,P.year,I,Q]);const We=l.useCallback((i=!1,T=!1)=>{const D={start:le,end:re};switch(O){case"transaction_categorization":a(ue(Ye,D,i,!N,void 0,void 0,T,void 0,Q)),oe(!1);break;case"flux_analysis":a(Ee(P,i,T,null));break;case"month_end_insights":if(T===!1){const F=new Date(P.year,P.month,0),R=On(F.toDateString()).format(jt.analytics.YYYYDashMMDashDDFormat);a(Fn(!0,d.companyId,d.tenantId,R)),a(_n(d.companyId,d.tenantId))}break;case"je_schedules":a(Bn(D,T));break;case"missing_receipts":a(Pt(D,{amount:75,currencyCode:"USD",currencySymbol:"$"},i,T));break;default:a(ae(P,ce,i,T))}},[O,le,re,d.companyId,d.tenantId,Ye,P,ce,N,oe,Q]);l.useEffect(()=>{O===ie&&W.fetchState==="Not-Started"&&I&&We(!0)},[W,le,re,d.companyId,d.tenantId,I]),l.useEffect(()=>{pe||N||v.current||zt.fetchState==="In-Progress"||W.fetchState!=="Completed"||(v.current=!0,We(!0,!0))},[]),l.useEffect(()=>{J.fetchState!=="In-Progress"&&J.fetchState!=="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!1}))},[J.fetchState,d.tenantId]),l.useEffect(()=>{_.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?E(!0):E(!1)},[_.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),l.useEffect(()=>{_.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&I&&(a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0})),a(Vn({companyId:d.companyId})),x("../"))},[_.monthEndInsights?.sendMonthEndReportStatus?.fetchState,d.tenantId,P,d.companyId,I]),l.useEffect(()=>{const i=setInterval(()=>{J.fetchState!=="In-Progress"&&J.fetchState==="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(i)},[J.fetchState,d.tenantId,P,a]),l.useEffect(()=>{const i=setInterval(()=>{O==="reconciliation"&&ce==null&&_.reconciliation.fetchStatus.fetchState==="Completed"&&_.reconciliation.refreshStatus.fetchState!=="In-Progress"&&a(ae(P,void 0,!0,!0))},3e5);return()=>clearInterval(i)},[O,a,_.reconciliation.fetchStatus.fetchState,_.reconciliation.refreshStatus.fetchState,ae,ce,P]);const Qt=pt();l.useEffect(()=>{const i=(J.monthEndCloseChecks?.monthEndCloseCheckList.find(T=>T.id==="month_end_insights")?.isDisabled??!1)&&!Ge;O!=="month_end_insights"||!i&&J.monthEndCloseChecks?.reportEmailSentDate==null||x("../")},[O,J.monthEndCloseChecks]);const Wt=_.reconciliation.selectedDrawerAccountId;l.useEffect(()=>{Je==="In-Progress"&&xe.accountSettingsView.saveState.fetchState==="Completed"&&a(st())},[Je,xe.accountSettingsView.saveState.fetchState,st]);const{transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}=(({expenseAutomationViewSelector:i,closeDrawerHandler:T,currentSelectedView:D})=>{const F=he();let R,de,X;const Se=pt(),q=i.transactionView;let Z=()=>{};const{transactions:an,selectedTransactionId:ne,selectedTransactionLineId:Ie,transactionLocalData:on}=q;if(D==="transaction_categorization"){const De=on.find(ee=>ee.transactionId===ne),Y=an.find(ee=>ee.id===ne),et=Ie!=null?De?.transactionReviewLocalData?.lineItemById[Ie]:void 0,tt=et?.account;de=et?.class?.classId,R=["Uncategorized Income","Uncategorized Expense"].includes(tt?.accountName??"")?void 0:tt?.accountId;const cn=so(ne,Y?.typeOfTransaction);Y!=null&&cn&&(X={id:ne,type:bt(Y.typeOfTransaction)}),Z=()=>{if(ne!=null&&Ie!=null&&Y!=null){const ee=q.transactionLocalData.find(fe=>fe.transactionId===ne)?.transactionReviewLocalData;if(ee!=null&&Y.lines!=null&&Y.lines.length>0){const fe=ee.lineItemById[Ie];let Ue=ee.selectedEntity;if(wn(Y)||(Ue=fe.selectedEntityLine),Ue!=null){const ln=Ue,rn={transactionId:{id:Y.id,type:Y.type},transaction:Y,lineIds:Y.lines.map(dn=>dn.id)??[]};F(Le(ln,fe.amount.amount,rn,!1,!0,Se))}}}}}const sn=V(De=>at(De,void 0,R,de));return{transactionId:X,onSaveVendor:()=>{F(Pn(X,void 0,!1,!0))},onSaveSuccess:Z,onCancel:()=>{X!=null&&F(vn({transactionId:X})),F(Tn()),F(An()),T()},vendorViewDetails:sn}})({expenseAutomationViewSelector:_,closeDrawerHandler:()=>{L(!1)},currentSelectedView:O});return Pe?.loggedInUserRoleMap==null?J.fetchState==="Error"?u.jsx(Qa,{onGoHome:()=>x("../",{replace:!0}),onReload:()=>window.location.reload()}):u.jsx(Ft,{fetchState:"In-Progress"}):u.jsxs(u.Fragment,{children:[u.jsx(io,{isOpen:U,drawerLeftMargin:new Wa(0,0,300,650),onClose:()=>{e(!1)},children:u.jsx(vo,{onClick:i=>i.stopPropagation(),children:u.jsx(po,{companyId:d.companyId,closeCustomerRequestDrawer:()=>e(!1),addCustomerRequest:Kt,resetCustomerRequest:Nt})})}),Xe!=null&&k&&u.jsx(ao,{isOpen:k,transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}),u.jsx(mo,{selectedDrawerAccountId:Wt,reconciliation:_.reconciliation,onFetchLinkTokenClick:(i,T)=>{a(Rt("expense_automation_reconcile",i,T))},onEstablishConnectionClick:(i,T)=>{const D=d?.companyId;D!=null&&(a(wt(i,D,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",T)),a(xt({accountId:T,connectionInProgress:!0})))}}),qe&&u.jsx(So,{selectedTransactionId:s,onClose:()=>C(void 0)}),u.jsx(yo,{navigate:x,location:g,themeState:S,vendorSearchAutoCompleteData:{autoCompleteText:qt,entityAutoCompleteView:Lt},expenseAutomationViewSelector:_,isMissingReceiptsBulkUploadEnabled:se,monthEndInsightsPreviewMode:p,monthEndInsightsCustomerRequestData:n,isRealtimeInsightsFeatureEnabled:Ge,isUncategorizedExpenseCategoryEnabled:Q,isCOTEnabled:Qt,currentTenant:d,companyId:d.companyId,signedInUser:te,isTransactionActivityEnabled:qe,uncategorizedAccounts:Gt,onClickCustomerRequest:Jt,handleEditClick:Yt,tenantEmailDomain:B,trackExpenseAutomationTabAnalytics:$,setActivityLogTransactionId:C,closeSidePanel:t,openTransactionPanel:c,sidePanelIsOpen:y,sidePanelIsFullView:A,panelContent:w,isAiCfoAccessEnabled:j,onAskAiCfoClick:b})]})}),vo=Te(ze)`
|
|
17
|
-
display: flex;
|
|
18
|
-
min-height: 100%;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
`;function Zo(){return u.jsxs(hn,{children:[u.jsx(Be,{path:"*",element:u.jsx(lo,{})}),u.jsx(Be,{path:"/:selectedTab/:selectedPeriod/*",element:u.jsx(bo,{})}),u.jsx(Be,{path:"*",element:u.jsx(un,{})})]})}export{Zo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CQd3J_Jz.js";import{a as r}from"./sentry-BO53Tmje.js";import{X as i,$ as l,Z as p,q as d}from"./index-Dq9jqf2N.js";import"./mui-B5MJXy46.js";import m from"./NotFoundScreen-Cd8X5xCE.js";import{j as b,u}from"./core-CHx9v1R3.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]="f0a431af-9ff7-4bb4-8c6c-80849a1f61cb",a._sentryDebugIdIdentifier="sentry-dbid-f0a431af-9ff7-4bb4-8c6c-80849a1f61cb")}catch{}})();const D=()=>{const a=b(),e=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=d(e.state?.pathnameStackToGoBack),c=n.poppedPathname??k();a(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{D as F};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CQd3J_Jz.js";import{l as b,k as x,j,u as y,h as Z,q as ee,g as A,N as ae,n as te,o as p}from"./core-CHx9v1R3.js";import{Iu as S,Iv as k,Iw as N,yQ as $,yC as L,Ix as C,Iy as ne,Iz as oe,yG as ie,eN as I,yN as se,yK as le}from"./zeni-epic-state-T7UkKQQw.js";import{J as g,o as r,E as re,c as v,j as E,p as de,q as ce,r as me,v as F,i as pe,s as ue,R as he,Y as xe,h as ge,B as fe,x as we,k as be,y as ye,A as Se,C as ke,M as ve}from"./index-Dq9jqf2N.js";import{n as c}from"./mui-B5MJXy46.js";import f from"./NotFoundScreen-Cd8X5xCE.js";import{a as P}from"./sentry-BO53Tmje.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="0a570bad-c742-4b8e-9722-1340e1a3f86c",e._sentryDebugIdIdentifier="sentry-dbid-0a570bad-c742-4b8e-9722-1340e1a3f86c")}catch{}})();const Ie=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
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
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,je=x(function(e){const t=S(e),n=k(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(re);function z(){const e=g(),{vendorId:t,billId:n}=b();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(je,{vendorId:t,billId:n})})})}const $e=c.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Ce=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const t=j(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:o,children:a.jsx(Ce,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,ze=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(N({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Ne(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=b();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Pe,{windowSize:n,children:a.jsx(ze,{location:t,navigate:e,vendorId:o,billId:i})})})}const Le=c.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Ee=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=b(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
|
|
38
|
-
width: ${r.sp4};
|
|
39
|
-
height: ${r.sp4};
|
|
40
|
-
margin-bottom: ${r.sp3};
|
|
41
|
-
margin-top: ${r.sp3};
|
|
42
|
-
margin-left: ${r.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,Me=c.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,He=c.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,Ke=c.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,Ve=x(function(e,t){return{file:t.file,type:t.type}})(Se);function h({appContent:e}){const t=Z(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=b(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),w=g(),G=xe(),B=ge(),M=()=>{G.toggle()},H=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:W,billFetchState:D,companyName:_,currencySymbol:U,amount:q}=H,{tenantId:J,userId:O,sessionId:Q}=V,{fetchState:R,internationalBankAccountCreateStatus:Y}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(I(O,Q,J),l!=null&&t(le(l)))},[m]),m==="Error"?a.jsx(f,{}):R==="Completed"||Y.fetchState==="Completed"?(I(),a.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?a.jsx(fe,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[m==="Completed"&&D==="Completed"&&a.jsx(we,{analytics:v,onLoad:u=>(X=>X.trackBillPayMagicLinkPageLoad(o??"",i??"",_,l??"",We(n.pathname),U,q))(u)}),a.jsxs(Me,{windowSize:w,children:[w!=="small"?a.jsx(Ge,{onClick:M}):null,a.jsx(Ke,{windowSize:w,isAddressPage:T,children:D==="In-Progress"?a.jsx(be,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:W,type:"bill"})}),a.jsx(He,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return a.jsx(ve,{})}function la(){return a.jsxs(te,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(_e,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Fe,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{la as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CQd3J_Jz.js";import{a as f}from"./sentry-BO53Tmje.js";import{h as U,u as w,j as _,q as M,g as l,N as T}from"./core-CHx9v1R3.js";import{z as r,h as P,D as V,d as A,c as N,e as q,w as R,k as W,g as $}from"./index-_YbuoSTd.js";import{eM as B,Ie as G,Ip as H,If as J,eN as K,fi as Q,Il as X,fF as Y,cR as Z,Iq as ee,Ir as te}from"./zeni-epic-state-T7UkKQQw.js";import{n as ne}from"./mui-B5MJXy46.js";import{u as ae}from"./useDeviceId-J1-jcXdc.js";import{f as se}from"./analyticsHelper-CezXrIid.js";import{t as ie}from"./getLocaleForTenant-BobWg4Hu.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c31c3e87-f625-4a2f-b43b-e7ea45ae5d4a",t._sentryDebugIdIdentifier="sentry-dbid-c31c3e87-f625-4a2f-b43b-e7ea45ae5d4a")}catch{}})();const D=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function De(){const t=U(),s=w(),m=_(),[b]=M(),n=b.get("token"),p=b.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),k=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,a?.zeniSessionId]),f.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),a.zeniSessionId),K(a.userId,a.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,a,o,k,v,s.state,t]);const F=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:O,onCancelVerifyDevice:F});if(S==="In-Progress"&&I==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!D(n,p)||g==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-CQd3J_Jz.js";import{a as c}from"./sentry-BO53Tmje.js";import{h as pe,g as t,l as We,u as Xe,j as qe,i as R}from"./core-CHx9v1R3.js";import{eM as he,eU as Je,eV as Se,eO as Ke,bm as Qe,f3 as ea,eW as aa,eX as ta,eZ as na,f1 as sa,fb as oa,f2 as g,f5 as ia,f6 as ue,f9 as ra,f7 as da,f8 as la,fa as ca,cF as ua,fd as fa,cL as ma,bu as ba,eL as pa,fi as ha,fj as Sa,fh as ga}from"./zeni-epic-state-T7UkKQQw.js";import{a1 as Ea,a2 as ka,Y as Ca,i as ya,z as k,a3 as Ia,u as Ta,s as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,X as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Ma,ab as Pa,ac as be,c as x,v as F,ad as N,ae as Ra}from"./index-_YbuoSTd.js";import{D as xa}from"./mui-B5MJXy46.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="8aeef85c-5d6d-40a4-9759-2f5ad03f3c41",f._sentryDebugIdIdentifier="sentry-dbid-8aeef85c-5d6d-40a4-9759-2f5ad03f3c41")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=We(),a=Xe(),C=Ca(),o=qe(),V=Ke(),m=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Qe(G),s=t(e=>he(e)),L=t(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Z),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||W&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Me=t(e=>g(e).totalUnreadCount),Pe=t(e=>g(e).reducedFetchCountState),J=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Fa();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&Q!=null){const e=`dashboard_${s.companyId}`;O(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Pe,count:Me},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=t(e=>da(e,S,h,X,W,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&H.fetchState==="Completed"&&fa(H.notificationSettings,h.userEmail,Z,s),re=_a(),ze=re&&Da(a),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[Ye,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Ze=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(Ze);return U.jsx(xa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=F(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(a.state?.pathnameStackToGoBack,a.pathname);return x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ra(e.type);be(e.type)?(j!=null&&m(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;x.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...a})};export{za as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CQd3J_Jz.js";import{j as r,k as i}from"./core-CHx9v1R3.js";import{W as n}from"./index-Dq9jqf2N.js";import"./mui-B5MJXy46.js";import"./sentry-BO53Tmje.js";import"./zeni-epic-state-T7UkKQQw.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="fe0dc2e3-d6a3-4690-8e18-122b6c1ede12",o._sentryDebugIdIdentifier="sentry-dbid-fe0dc2e3-d6a3-4690-8e18-122b6c1ede12")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(d,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CQd3J_Jz.js";import{j as r,k as i}from"./core-CHx9v1R3.js";import{W as n}from"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import"./sentry-BO53Tmje.js";import"./zeni-epic-state-T7UkKQQw.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="fe0dc2e3-d6a3-4690-8e18-122b6c1ede12",o._sentryDebugIdIdentifier="sentry-dbid-fe0dc2e3-d6a3-4690-8e18-122b6c1ede12")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(d,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-CQd3J_Jz.js";import ut from"./NotFoundScreen-DKiPvQrK.js";import{a as k}from"./sentry-BO53Tmje.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as L}from"./core-CHx9v1R3.js";import{cn as It,eW as X,eM as H,fa as Ct,f2 as b,OD as Q,f6 as d,eV as y,qn as $,vB as Tt,OE as yt,eU as At,fd as Et,qs as _t,OF as F,bp as M,gy as x,qw as J,OG as Nt,cy as Bt,cs as wt}from"./zeni-epic-state-T7UkKQQw.js";import{N as xt,z as vt,i as Dt,s as Rt,K as Ut,cn as Gt,v as N,a1 as Pt,co as Ft,a2 as Mt,q as $t}from"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="a689ce42-a8db-4470-8287-605d980410b8",t._sentryDebugIdIdentifier="sentry-dbid-a689ce42-a8db-4470-8287-605d980410b8")}catch{}})();const Vt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),qt=St(function(t,l){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t($("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],M())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Vt(s,B).then(()=>{t(F(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ft)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=Dt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Ut(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:U,fetchMore:nt}=dt(),{threads:V,isLoading:q,fetchMore:W,isFetchingMore:z,hasFetchedAll:K}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(Q(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=A||U===!0||C!==!0||A||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||K===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(yt(ct))}},[A,U,z,C,K,q,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Mt(p)){const T=At(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s($("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(L,{path:"/:selectedTab",element:_.jsx(Wt,{})}),_.jsx(L,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-CQd3J_Jz.js";import{j as H,h as K,u as Q,l as Z,g as d,k as X,n as ee,o as C}from"./core-CHx9v1R3.js";import{eM as M,qb as v,pL as ae,J5 as w,pG as T,bu as te,bm as se,bQ as oe,pH as re,J6 as ne,IS as S,dF as ie,ty as ce,J7 as le,tV as de,eT as me,eR as fe}from"./zeni-epic-state-T7UkKQQw.js";import{K as pe,z as ue,N as he,S as Fe,i as $,s as N,x as be,c as q,aj as ge,v as Ie}from"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import Ce from"./NotFoundScreen-DKiPvQrK.js";import{F as Se}from"./FeaturePreviewScreen-BDotwidZ.js";import{a as h}from"./sentry-BO53Tmje.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as ye}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{u as Ae}from"./useInitialThreadRequest-DORcYYgp.js";import{t as xe}from"./routePaths-abbP8AF2.js";import{M as ke}from"./MobileAppDrawer-gMG7WLxC.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="ddd68e13-e61b-46cd-9e99-b31bd0507955",s._sentryDebugIdIdentifier="sentry-dbid-ddd68e13-e61b-46cd-9e99-b31bd0507955")}catch{}})();const y=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:q}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s(w(e,o)),a.isPandLReportFetched(e)||s(T(e)),y(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=xe(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(ge);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=H(),o=K(),r=Q(),{forecastId:i,tenantEmailDomain:F}=Z(),[f,p]=h.useState(!1),[b,A]=h.useState(!1),u=ue.getSignedInUser(),x=d(t=>M(t)),B=x.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>k.pandLByForecastID[t]!=null&&re(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=he();ye({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:_}=Te({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&g)p(!0),l||o(ae());else if(l&&!b){A(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(I=>I.id===R):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o(w(c.forecasts[t].id,t)),y(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&y(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&g&&o(T(c.forecasts[t].id))}},[f,p,o,l,c,b,A,v,T,g]);const L=Fe(),V=L?.loggedInUserRole!=null&&te(L.loggedInUserRole),{useFeatureGate:W}=$(),{isFeatureEnabled:E}=W(N.isReportsCommentingEnabled),Y=Ae(E?x?.companyId:void 0,{clearParams:l&&b}),[J,z]=h.useState(!1),O=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(be,{analytics:q,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ke,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:B,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Ke(){const s=d(i=>M(i)),{useFeatureGate:a}=$(),{isFeatureEnabled:e}=a(N.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CQd3J_Jz.js";import{J0 as oe,eM as q,jm as z,eT as Q,eR as ie,GA as Y,IE as re,sG as Ie,J1 as X,su as Pe,sP as je,sJ as le,sy as de,sN as Te,sK as Le,J2 as ce,uk as ve,J3 as Ae,fx as Fe,J4 as J,sD as pe,sB as ue,sS as Oe,b$ as Re}from"./zeni-epic-state-T7UkKQQw.js";import{J as me,i as ee,s as E,z as H,a4 as ge,F as he,af as fe,ag as Ve,C as Ce,o as F,G as be,D as ye,ah as Ue,N as Be,K as Ze,x as $e,c as we,e as Ge,v as Je,ai as Ke,S as _e}from"./index-Dq9jqf2N.js";import{D as Se,n as W,S as De}from"./mui-B5MJXy46.js";import te from"./NotFoundScreen-Cd8X5xCE.js";import{a as l}from"./sentry-BO53Tmje.js";import{h as se,l as ze,g,j as He,u as We,k as Me,n as ne,o as G}from"./core-CHx9v1R3.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-BoUrQmeU.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-SLtAuNb5.js";import{M as qe}from"./MobileAppDrawer-DJybBxxC.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="d6da022b-aa99-4bae-82b6-89504db15201",e._sentryDebugIdIdentifier="sentry-dbid-d6da022b-aa99-4bae-82b6-89504db15201")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},K=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[I,w]=l.useState(!1),{userId:S}=ze(),c=g(t=>oe(t)),m=g(t=>q(t)),D=g(t=>z(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:k}=C(E.isDebitCardFeatureEnabled),P=Q(k,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(X()),y()},A=()=>{O===!0?w(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,k),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:A,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(Ie(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[I===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:K.discardTitle}),descriptionComponent:s.jsx(Ee,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=W(De)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,xe=W(be.H6Regular)`
|
|
6
|
-
margin-top: ${F.sp7};
|
|
7
|
-
padding-left: ${F.sp8};
|
|
8
|
-
padding-right: ${F.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=W(be.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${F.sp8};
|
|
14
|
-
padding-right: ${F.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${F.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,ss={overlayWidth:new Ce(100,100,48)},_=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[I,w]=l.useState(!1),S=g(r=>oe(r)),c=g(r=>q(r)),m=g(r=>z(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),k=Q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!k&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(X())},b=()=>{O===!0?w(!0):x()},A={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:Z}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=D(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:B,mode:h,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(X()))},[S.invitePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[I===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:_.discardTitle}),descriptionComponent:s.jsx(Ee,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:A}):null,s.jsx(Ue,{...T})]})})},ts=W(De)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,ns=Me(function(e,n){const d=ce(e),o=H.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:z(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(J({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(J({searchText:i}))}}}})(Ke);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=He(),o=se(),h=We(),{areTenantIdsInSync:i}=Be(),y=H.getSignedInUser(),f=g(a=>q(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>z(a)),I=!Q(O,f)&&R,w=Y(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[m,D]=l.useState(!1),[C,k]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:A,setIsAiCfoOpen:B}=Ze(),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:$}=Ne({isAiCfoOpen:A,setIsAiCfoOpen:B,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Xe({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Ae(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Fe(a)),t=f?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(J({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,S,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,I))},[t,I,i]),l.useEffect(()=>{k(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(J({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{k(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:we,onLoad:a=>a.trackPageLoaded(Ge.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:I,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,M)=>{o(J({sortKey:a,sortOrder:M}))},onRowClick:a=>{const M=`/${c}/people/${encodeURIComponent(a)}/edit`,ke=Je(h.state?.pathnameStackToGoBack,h.pathname);d(M,{state:{pathnameStackToGoBack:ke}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:Z,onAskAiCfoClick:$})]})}function Es(){const e=_e();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(G,{path:"/",element:s.jsx(N,{})}),s.jsx(G,{path:"new",element:s.jsx(N,{isInvitePeopleDrawerOpen:!0})}),s.jsx(G,{path:":userId/edit",element:s.jsx(N,{isEditPeopleDrawerOpen:!0})}),s.jsx(G,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(G,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CQd3J_Jz.js";import _ from"./NotFoundScreen-DKiPvQrK.js";import{a as r}from"./sentry-BO53Tmje.js";import{j as M,u as v,g,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-CHx9v1R3.js";import{eM as F,OH as b,bn as H,bm as K,h2 as N,gy as Y}from"./zeni-epic-state-T7UkKQQw.js";import{Y as $,z as I,K as q,cp as G}from"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as L}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{M as Q}from"./MobileAppDrawer-gMG7WLxC.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="355b019c-d23c-4761-8050-1bd9bfc6674a",e._sentryDebugIdIdentifier="sentry-dbid-355b019c-d23c-4761-8050-1bd9bfc6674a")}catch{}})();const W=V(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),X=()=>{const e=M(),t=v(),c=$(),o=g(s=>F(s)),{aggregatedReportViewState:n}=g(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,S]=r.useState(!1),k=H(o?.userRole??[]),w=o?.userRole?.includes("bookkeeping_admin")??!1,y=K(l),A=k||w||y,d=r.useCallback((s,i,O)=>{p(N({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p(Y({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),f.current=!0},[n?.fetchState,d]),x=r.useCallback((s,i)=>{d(s,i,!1)},[d]),u=s=>{S(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=q(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=J({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(Q,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),a.jsx(W,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:x,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return a.jsxs(B,{children:[a.jsx(h,{path:"*",element:a.jsx(X,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
|