@zeniai/web-app-ui 5.2.0-dev → 5.2.0-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-oOQJC3Yo.js → AddressRoutes-DGCDOoKb.js} +1 -1
- package/dist/assets/{AddressScreen-B2g0EGq7.js → AddressScreen-Dzf83tSk.js} +1 -1
- package/dist/assets/{AiCfoScreen--Z8a2CnQ.js → AiCfoScreen-TZ---AU4.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DI5OQIWZ.js → BillPayApprovalRoutes-iPPwT0JG.js} +1 -1
- package/dist/assets/{BillPayRoutes-CXhgkFrh.js → BillPayRoutes-U0Aszwdv.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CHlhD1bn.js → BusinessVerificationPageScreen-B4os1LkS.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BfeQo7N4.js → CardsAiCfoScreen-Db20Cfsg.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DYWdITos.js → ChargeCardRoutes-rxetskAF.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-B0IdpqTW.js → CompanyPassportScreen-COm4H_kf.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DLk20sBX.js → ConnectionAuthScreen-C5LpJddx.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-D31AAVKC.js → CustomerOnboardingAuthScreen-BIc9nbPF.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-D44ZNBEA.js → CustomerOnboardingRoutes-Id7ixv-a.js} +1 -1
- package/dist/assets/{DashboardRoutes-684orl8N.js → DashboardRoutes-D_SbIh49.js} +1 -1
- package/dist/assets/{DefaultTenantHome-3UFjXhiS.js → DefaultTenantHome-BsKeybH6.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BtYZfhuG.js → DomesticWireDetailScreen-BKpkRMty.js} +1 -1
- package/dist/assets/{DrawerScreen-CSMp2A9F.js → DrawerScreen-BPgZ_1JF.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CRNQJyjq.js → EntityDetailRoutes-BZ9Mr897.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CB1lyxjv.js → ExpenseAutomationRoutes-CN3ihdCO.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-D3z2gcpi.js → FeaturePreviewScreen-Di3PuVRR.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-gDziUA5z.js → HubSpotOAuthCallbackScreen-CW56Ncxa.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BMPUgnVn.js → MagicLinkRoutes-DJ7vyce1.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-_ZejKaCn.js → MagicLinkSignInScreen-BZfit8o3.js} +1 -1
- package/dist/assets/{MobileAppDrawer-8wrd6B-7.js → MobileAppDrawer-NdU6zrS3.js} +1 -1
- package/dist/assets/{NotFoundScreen-Bge2JGwW.js → NotFoundScreen-wlhddpbg.js} +1 -1
- package/dist/assets/{NotificationRoutes--6GU4tbu.js → NotificationRoutes-DbRksc78.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-B59fm6Kj.js → OAuthConsentScreen-sL3GodJ_.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CxdNyFxC.js → PandLWithForecastRoutes-BoM4q2mR.js} +1 -1
- package/dist/assets/{PeopleRoutes-CmOZGcsk.js → PeopleRoutes-0fm-JoER.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Bu3nN2tK.js → PerformanceRoutes-Cq8pT07f.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-8ZlWNPA9.js → QBOConnectionScreen-D9vGR9Iz.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CTijKmMu.js → ReimbursementApprovalRoutes-DfMng3xh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DIOgjJyZ.js → ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DRMiWLSm.js → ReimbursementRoutes-uHKvr9EG.js} +1 -1
- package/dist/assets/{ReportsRoutes-DnRmWO_g.js → ReportsRoutes-BosLV3TS.js} +1 -1
- package/dist/assets/{RewardsRoutes-b9NXQyW4.js → RewardsRoutes-BPVfq5Np.js} +1 -1
- package/dist/assets/{ScreenRoutes-CkNF9DLW.js → ScreenRoutes-Drpg91zT.js} +2 -2
- package/dist/assets/{SettingsRoutes-D5DPlYhg.js → SettingsRoutes-BmbweE5j.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BIZfrXFn.js → SetupPagesScreen-HhCCJlo-.js} +1 -1
- package/dist/assets/{SignInScreen-CHZM3Frk.js → SignInScreen-B8UhmfC2.js} +1 -1
- package/dist/assets/{SignOutScreen-Cx6F3vmB.js → SignOutScreen-CxWWZOhK.js} +1 -1
- package/dist/assets/{TaskListScreen-BnrFj0CA.js → TaskListScreen-B7M-Cqce.js} +1 -1
- package/dist/assets/{TaskRoutes-BAC-3C1s.js → TaskRoutes-CyLfJ8Tw.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-C9ZhFLf5.js → TransactionDetailRoutes-Ct4erWuE.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BsgXSNNV.js → TransactionDetailScreen-DRzSksYw.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BrzIlvyk.js → TransactionListRoutes-B191v9kk.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Dyw-ZAPa.js → TreasuryRoutes-DZNZaxYZ.js} +1 -1
- package/dist/assets/{VendorsRoutes-BWBUUjTt.js → VendorsRoutes-CvrHlc-r.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CcZrE5_R.js → WiseConfirmationScreen-B9yx7qcI.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-3OROP5vK.js → ZeniAccountRoutes-YPhOuFwx.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-B3_VR-tZ.js → ZeniAccountStatementScreen-DJU3198J.js} +1 -1
- package/dist/assets/{analyticsHelper-CixncN58.js → analyticsHelper-CbsMOq15.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C5b46Qyn.js → getLocaleForTenant-BuGWeb9s.js} +1 -1
- package/dist/assets/{index-BWvweS0E.js → index-D7tfVykC.js} +5 -5
- package/dist/assets/{routePaths-D87yNyzK.js → routePaths-CVAI7AUa.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-COKjoYH2.js → useAiCfoDashboardSuggestedQuestionsChips-DwtRgARG.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-c_VzJZE9.js → useAskAiCfoHostNavButtonProps-Bl-nKTXG.js} +1 -1
- package/dist/assets/{useCashManagementBanner-OkHozYlV.js → useCashManagementBanner-SbCmMLis.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-C2sCX5OQ.js → useChargeCardPusherEvents-Cg9Qn_oP.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-CMBVShl-.js → useEmailConnectResultRefresh-gsc6JcZn.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-EuACK97s.js → useInitialThreadRequest-CXnpfTcs.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BJ1dqQdE.js → withTransactionSidePanel-ZQvLeKiY.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-s55OcG-D.js";import{a as u}from"./sentry-qwy54zvC.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CnGMK-sC.js";import{LX as N,eV as _,f$ as U,LY as k,ob as R,LZ as z}from"./zeni-epic-state-NrbJoBOX.js";import{u as $,z as f,L as T,t as I,a as j,b as O}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-s55OcG-D.js";import{a as u}from"./sentry-qwy54zvC.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CnGMK-sC.js";import{LX as N,eV as _,f$ as U,LY as k,ob as R,LZ as z}from"./zeni-epic-state-NrbJoBOX.js";import{u as $,z as f,L as T,t as I,a as j,b as O}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{t as P}from"./getLocaleForTenant-BuGWeb9s.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="85a13326-229a-4748-97de-9d2c90286e64",t._sentryDebugIdIdentifier="sentry-dbid-85a13326-229a-4748-97de-9d2c90286e64")}catch{}})();const Q=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=O(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=$(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(Q,{})}const V=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of V)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-BtYZfhuG.js → DomesticWireDetailScreen-BKpkRMty.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-s55OcG-D.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-CnGMK-sC.js";import{Q2 as k,Q9 as _,gh as W,gg as q,gf as J,jw as K,Nc as L,rv as M,eV as V,PA as D,ju as T,Q3 as v,Qc as j,js as F,jP as G}from"./zeni-epic-state-NrbJoBOX.js";import{bz as X,m as N,C as R,z as U,y as z,r as p,G as S,B as O,bA as Y,o as Q,bB as ee,v as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-s55OcG-D.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-CnGMK-sC.js";import{Q2 as k,Q9 as _,gh as W,gg as q,gf as J,jw as K,Nc as L,rv as M,eV as V,PA as D,ju as T,Q3 as v,Qc as j,js as F,jP as G}from"./zeni-epic-state-NrbJoBOX.js";import{bz as X,m as N,C as R,z as U,y as z,r as p,G as S,B as O,bA as Y,o as Q,bB as ee,v as te}from"./index-D7tfVykC.js";import{n as Z}from"./mui-CggbPNN2.js";import"./sentry-qwy54zvC.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]="c7535589-2ce3-48e5-8cf1-8bc6148d58e3",e._sentryDebugIdIdentifier="sentry-dbid-c7535589-2ce3-48e5-8cf1-8bc6148d58e3")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(J(n,"BillPayVendor"))},onResendOtp:n=>{e(q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-s55OcG-D.js";import{m as l,F as c,y as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-s55OcG-D.js";import{m as l,F as c,y as f}from"./index-D7tfVykC.js";import{D as p}from"./mui-CggbPNN2.js";import"./sentry-qwy54zvC.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]="b1f1e181-2dd7-4674-a7e9-de5dedc4fc70",e._sentryDebugIdIdentifier="sentry-dbid-b1f1e181-2dd7-4674-a7e9-de5dedc4fc70")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:d,onClose:t}=e,n=l(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:d})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as d}from"./sentry-qwy54zvC.js";import{h as A,u as B,g as O,i as G,j as l,N as q,n as F,o as z,p as _}from"./core-CnGMK-sC.js";import{Ok as K,eV as M,NI as R,lz as V,Kd as k,Op as W,Nb as Y,kz as $,Ke as S,NN as X,NO as H,Nd as J,Nc as L}from"./zeni-epic-state-NrbJoBOX.js";import{aX as Q,d as U,r as Z,v as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as d}from"./sentry-qwy54zvC.js";import{h as A,u as B,g as O,i as G,j as l,N as q,n as F,o as z,p as _}from"./core-CnGMK-sC.js";import{Ok as K,eV as M,NI as R,lz as V,Kd as k,Op as W,Nb as Y,kz as $,Ke as S,NN as X,NO as H,Nd as J,Nc as L}from"./zeni-epic-state-NrbJoBOX.js";import{aX as Q,d as U,r as Z,v as tt}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{d as b}from"./decodeURIComponentSafe-uWfgYCNH.js";import{w as et}from"./withTransactionSidePanel-ZQvLeKiY.js";import{f as at,c as nt}from"./routePaths-CVAI7AUa.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import"./TransactionDetailScreen-DRzSksYw.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]="9aabb11b-1066-4a2d-8a84-b50f62e25d91",a._sentryDebugIdIdentifier="sentry-dbid-9aabb11b-1066-4a2d-8a84-b50f62e25d91")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:$(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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(X()),a(H()),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=O(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:N,entityNameEncoded:v}=G(),r=b(N??""),p=b(v??""),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=>K(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(V(i)))}),[m,u,i]);const E=l((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,x=(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:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:x,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{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 Nt({entityType:a}){return s.jsx(z,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Nt as EntityDetailRoutes,Nt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-CB1lyxjv.js → ExpenseAutomationRoutes-CN3ihdCO.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-s55OcG-D.js";import oa from"./NotFoundScreen-
|
|
1
|
+
import{j as h}from"./liveblocks-s55OcG-D.js";import oa from"./NotFoundScreen-wlhddpbg.js";import{a as o,b as Jt}from"./sentry-qwy54zvC.js";import{n as Ue,S as sa}from"./mui-CggbPNN2.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-CnGMK-sC.js";import{eV as Re,T0 as la,ol as Ee,fW as ra,s6 as da,oD as Kt,oY as Zt,T1 as Qt,p6 as ua,T2 as Ht,ow as ma,rE as pa,fH as Ie,T3 as De,uc as Wt,Ey as Xt,T4 as en,T5 as ha,rc as Ze,Ol as Pt,On as ga,kC as Ca,Oo as Sa,kJ as fa,cZ as Ia,vs as Qe,oJ as tn,pb as Fe,oB as de,T6 as Ea,Nd as Rt,Nc as we,T7 as Dt,k_ as ka,T8 as Ta,T9 as ya,Ta as ba,Tb as va,oQ as Aa,pe as xe,Tc as wa,Td as xa,Te as Pa,pl as Ra,kN as Da,kE as Fa,Tf as Ua,kM as Ft,Ov as Ba,Tg as Oa,Th as _a,r8 as Va,qM as za,pc as me,qL as Ne,Ti as Ma,Tj as La,Tk as ja,mh as $a,bo as qa,mc as Ut,l_ as Ga,Tl as Na,fx as Bt,gx as Ja,m9 as Ya,xl as Ka,Tm as Za,pM as Qa,pH as Ha,pL as Wa,pw as Xa,Tn as eo,fK as nn,o$ as to,oM as no,fX as Ot,pg as ao,To as oo,Tp as so,pd as an,Tq as co,Tr as io,Ts as lo,Tt as ro,Tu as _t,rk as uo,qD as mo,Nb as po,Tv as ho,Tw as go,kL as Co,Tx as So,Je as fo,kK as Io,kz as Eo,fJ as ko,q9 as on,qv as To,pa as Vt,pf as yo,bE as bo,m6 as vo,m3 as Ao,Ty as wo,pv as zt,qr as Mt,qp as xo,Tz as Po,qe as Ro,pW as Do,qs as Fo,TA as Uo,TB as Bo,p_ as Oo,TC as _o,pR as Vo,pZ as zo,pX as Mo,qy as Lo}from"./zeni-epic-state-NrbJoBOX.js";import{C as sn,G as X,d as q,v as ae,_ as cn,a0 as ln,cZ as jo,z as Be,c_ as $o,au as Pe,c$ as qo,aZ as Lt,B as rn,d0 as Go,ar as Je,a as No,a9 as Jo,d1 as Yo,a4 as Ko,d2 as Zo,Z as Qo,d3 as Ho,d4 as Wo,Q as Xo,T as es,aS as ts,d5 as ns,d6 as as,be as os,F as ss,aV as cs}from"./index-D7tfVykC.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{f as jt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-DRzSksYw.js";import{w as us}from"./withTransactionSidePanel-ZQvLeKiY.js";import{h as ms,v as ps}from"./routePaths-CVAI7AUa.js";import{g as Ye}from"./accountMappingHelper-SWFIL59M.js";import{D as hs}from"./DrawerScreen-BPgZ_1JF.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./decodeURIComponentSafe-uWfgYCNH.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]="d22bd39b-2c1d-45d5-82cd-1c792f7af4d0",t._sentryDebugIdIdentifier="sentry-dbid-d22bd39b-2c1d-45d5-82cd-1c792f7af4d0")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x((d=>Re(d))),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x((d=>d.expenseAutomationViewState.selectedPeriodByTenantId)),s=x((d=>la(d,f.tenantId))),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback(((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))}),[]),v=o.useCallback((d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))}),[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback((()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)}),[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback((()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find((G=>G.progress<100));if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}}),[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect((()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&k(g,f.tenantId)}),[k,g,s.fetchState,f.tenantId,T]),o.useEffect((()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))}),[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect((()=>{const d=setInterval((()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(d)}),[s.fetchState]),o.useEffect((()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}}),[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as r}from"./sentry-qwy54zvC.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as r}from"./sentry-qwy54zvC.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import f from"./NotFoundScreen-wlhddpbg.js";import{h as u,g as b}from"./core-CnGMK-sC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5a21547d-8d37-447e-91de-3190153d226c",e._sentryDebugIdIdentifier="sentry-dbid-5a21547d-8d37-447e-91de-3190153d226c")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=c(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:m(o),onDemoClick:t,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-qwy54zvC.js";import{u as f,h as l,g as m}from"./core-CnGMK-sC.js";import{ht as p,Mj as b,Mk as g}from"./zeni-epic-state-NrbJoBOX.js";import{u as _,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-qwy54zvC.js";import{u as f,h as l,g as m}from"./core-CnGMK-sC.js";import{ht as p,Mj as b,Mk as g}from"./zeni-epic-state-NrbJoBOX.js";import{u as _,L as h,z as y}from"./index-D7tfVykC.js";import"./liveblocks-s55OcG-D.js";import"./recharts-CmLekiCG.js";import"./mui-CggbPNN2.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="7bdb0c0b-4008-400a-98f6-b177b9affb24",e._sentryDebugIdIdentifier="sentry-dbid-7bdb0c0b-4008-400a-98f6-b177b9affb24")}catch{}})();function C(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-s55OcG-D.js";import{i as S,n as g,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-CnGMK-sC.js";import{Mc as k,Md as v,Me as F,Bg as B,B2 as T,Mf as D,Mg as oe,Mh as ie,B6 as se,fy as $,Bd as le,Ba as re}from"./zeni-epic-state-NrbJoBOX.js";import{m as x,o as r,n as de,d as j,j as G,q as ce,r as me,s as pe,v as V,C as ue,G as he,D as ge,Q as xe,y as fe,w as we,B as be,x as Se,H as ye,S as ke,A as ve,F as je,M as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-s55OcG-D.js";import{i as S,n as g,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-CnGMK-sC.js";import{Mc as k,Md as v,Me as F,Bg as B,B2 as T,Mf as D,Mg as oe,Mh as ie,B6 as se,fy as $,Bd as le,Ba as re}from"./zeni-epic-state-NrbJoBOX.js";import{m as x,o as r,n as de,d as j,j as G,q as ce,r as me,s as pe,v as V,C as ue,G as he,D as ge,Q as xe,y as fe,w as we,B as be,x as Se,H as ye,S as ke,A as ve,F as je,M as $e}from"./index-D7tfVykC.js";import{n as m}from"./mui-CggbPNN2.js";import f from"./NotFoundScreen-wlhddpbg.js";import{a as I}from"./sentry-qwy54zvC.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6eed3f7c-2655-4ccc-b517-1e498012ee1f",e._sentryDebugIdIdentifier="sentry-dbid-6eed3f7c-2655-4ccc-b517-1e498012ee1f")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-s55OcG-D.js";import{a as g}from"./sentry-qwy54zvC.js";import{u as j,g as F,h as O,t as w,j as l,N as T}from"./core-CnGMK-sC.js";import{z as r,y as V,a as P,e as A,d as N,f as H,p as R,H as W,g as Y}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-s55OcG-D.js";import{a as g}from"./sentry-qwy54zvC.js";import{u as j,g as F,h as O,t as w,j as l,N as T}from"./core-CnGMK-sC.js";import{z as r,y as V,a as P,e as A,d as N,f as H,p as R,H as W,g as Y}from"./index-D7tfVykC.js";import{eV as Z,LZ as $,M7 as q,L_ as B,fy as G,f_ as J,M3 as K,go as Q,cY as X,M8 as ee,M9 as te}from"./zeni-epic-state-NrbJoBOX.js";import{n as ne}from"./mui-CggbPNN2.js";import{u as se}from"./useDeviceId-DPOieVuC.js";import{f as ae}from"./analyticsHelper-CbsMOq15.js";import{t as ie}from"./getLocaleForTenant-BuGWeb9s.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="c1928785-1b3f-43ba-97c8-9eeb106b2f1c",t._sentryDebugIdIdentifier="sentry-dbid-c1928785-1b3f-43ba-97c8-9eeb106b2f1c")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=F(),m=O(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),b=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>Z(e))),h=l((e=>$(e))),E=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(h.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,h.tenantsInOrder),Q().then((()=>{const e=Y();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(H.Event.loginSuccess,"email",X(o.productSettings))}),2e3))}),[I,S,k,s,o,h,v,a.state,t]);const M=g.useCallback((()=>{m("/signin/auth")}),[m]),U=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),_=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(b==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:_,onCancelVerifyDevice:M});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||f==null||b==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||b==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-s55OcG-D.js";import{a as l}from"./sentry-qwy54zvC.js";import{u as fe,j as n,i as He,g as Qe,h as We,l as P}from"./core-CnGMK-sC.js";import{eV as me,fD as qe,fE as pe,fp as Je,bn as Ke,eU as Xe,fF as ea,fG as aa,fI as ta,fL as na,fM as g,fO as sa,fP as de,fS as oa,fQ as ia,fR as ra,fT as da,cO as ca,fV as la,cU as ua,fo as fa,f_ as ma,f$ as pa,fZ as ba}from"./zeni-epic-state-NrbJoBOX.js";import{a9 as ha,aa as Sa,Q as ga,C as Ea,z as k,w as ka,u as Ca,G as r,i as ya,E as Ia,ab as Ta,T as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as ce,ag as le,L as $a,ah as Ga,ai as ue,d as R,a1 as Ma,v as _,aj as x,ak as Pa}from"./index-
|
|
1
|
+
import{j as V}from"./liveblocks-s55OcG-D.js";import{a as l}from"./sentry-qwy54zvC.js";import{u as fe,j as n,i as He,g as Qe,h as We,l as P}from"./core-CnGMK-sC.js";import{eV as me,fD as qe,fE as pe,fp as Je,bn as Ke,eU as Xe,fF as ea,fG as aa,fI as ta,fL as na,fM as g,fO as sa,fP as de,fS as oa,fQ as ia,fR as ra,fT as da,cO as ca,fV as la,cU as ua,fo as fa,f_ as ma,f$ as pa,fZ as ba}from"./zeni-epic-state-NrbJoBOX.js";import{a9 as ha,aa as Sa,Q as ga,C as Ea,z as k,w as ka,u as Ca,G as r,i as ya,E as Ia,ab as Ta,T as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as ce,ag as le,L as $a,ah as Ga,ai as ue,d as R,a1 as Ma,v as _,aj as x,ak as Pa}from"./index-D7tfVykC.js";import{D as Ra}from"./mui-CggbPNN2.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]="bcc94a11-05ec-4440-a28f-d1639da287b1",f._sentryDebugIdIdentifier="sentry-dbid-bcc94a11-05ec-4440-a28f-d1639da287b1")}catch{}})();const xa=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=Qe(),C=ga(),o=We(),U=Je(),m=fe(),{useFeatureGate:i}=Ea(),B=k.getSignedInUser(),N=Ke(B),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>Xe(e))),L=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[w,j]=l.useState(void 0),A=P("/:tenantEmailDomain/dashboard")!==null,Z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));l.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:_e}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=N||!N&&ve,Ge=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),Q=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),W=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Pe=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:q,isLoading:J,isFetchingMore:K,hasFetchedAll:X,fetchMore:Re}=Ta();l.useEffect((()=>{const e=setTimeout((()=>Re?.()),0);return()=>clearTimeout(e)})),l.useEffect((()=>{if(J===!1&&K===!1&&X===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;j(q.filter((u=>u.roomId===e&&u.readAt==null)).length)}else j(0)}),[J,K,X]),l.useEffect((()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,U.tenantId]),l.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),l.useEffect((()=>{w!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:w},"comments")))}),[w,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),H===!1&&S.push("expense_automation_card");const Ve=_a(),te=n((e=>ia(e,S,h,_e,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Ue=A&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!A&&!Z?void 0:"disabled",Be=l.useMemo((()=>da(s.userRole)),[s.userRole]),Ne=ca(Be),Oe=s?.rewardsLastViewedTime==null,Le=h?.userEmail!=null&&Y.fetchState==="Completed"&&la(Y.notificationSettings,h.userEmail,z,s),se=wa(),je=se&&Aa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=l.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=l.useState(G);l.useEffect((()=>{re(G())}),[G]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(Ra,{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:V.jsx(va,{signedInUser:B,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ne,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:Le,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:H,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";le(a)&&(e=Q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,p=x(c)&&c!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(L!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=ce(a);let p=`/${encodeURIComponent(u)}/`;const M=x(c);c==="home"?p+="dashboard":c==="users_and_roles"?p+="people":Ga(c)?p+="settings/my_profile":ue(c)?p+=`ai-cfo/${c}`:p+=c==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(c),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:je,aiCfoView:O,isOnDashboard:A,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),ja=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&qe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return V.jsx(xa,{...f,...a})};export{ja as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-s55OcG-D.js";import{h as n,n as e}from"./core-CnGMK-sC.js";import{U as i}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-s55OcG-D.js";import{h as n,n as e}from"./core-CnGMK-sC.js";import{U as i}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import"./sentry-qwy54zvC.js";import"./zeni-epic-state-NrbJoBOX.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-s55OcG-D.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-s55OcG-D.js";import lt from"./NotFoundScreen-wlhddpbg.js";import{a as k}from"./sentry-qwy54zvC.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as L}from"./core-CnGMK-sC.js";import{cv as St,fF as Z,eV as J,fT as bt,fM as b,SX as K,fP as m,fE as y,sq as $,xY as It,SY as Ct,fD as Tt,fV as yt,sv as _t,SZ as F,bo as M,fx as w,sz as Y,S_ as At,cH as Et,cA as Nt}from"./zeni-epic-state-NrbJoBOX.js";import{_ as xt,z as Bt,C as wt,G as vt,a0 as Dt,cW as Rt,v as N,a9 as Pt,cX as Gt,aa as Ut,r as Ft}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="35f8dfda-e464-4721-abdd-9702087b2e0e",t._sentryDebugIdIdentifier="sentry-dbid-35f8dfda-e464-4721-abdd-9702087b2e0e")}catch{}})();const $t=(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)}))})),jt=kt((function(t,l){const n=Z(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=J(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(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:x,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,d,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"}})}d==="unread"&&t(Y("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(x(a),t(F([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t($("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(Y("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{d==="read"&&(x(r),t(F([r],M())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),$t(s,x).then((()=>{t(F(s,M())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=Ft(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(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,v]=k.useState(!1),a=S((e=>Z(e))),o=S((e=>J(e))),{useFeatureGate:d}=wt(),{isFeatureEnabled:c}=d(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Mt({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const O=bt(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)),V=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),Q=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),R=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=Rt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:X,isFetchingMore:q,hasFetchedAll:H}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Q.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter((T=>T.roomId===e&&T.readAt==null)).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,C]),k.useEffect((()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const G=_||P===!0||C!==!0||_||P===!0||C!==!0;k.useEffect((()=>{G&&R!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(m({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"&&x===!1&&(v(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&z===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),T=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const U=W.find((rt=>rt.id===f.threadId));return U!=null?{inboxNotification:{...f,threadId:U.id},thread:U}:(q||H===!0||X==null||X(),null)})).filter((f=>f!=null));s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}}),[_,P,q,C,H,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ut(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s($("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(L,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(L,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-s55OcG-D.js";import{a as r}from"./sentry-qwy54zvC.js";import{u as T,g as j,j as o,N as A}from"./core-CnGMK-sC.js";import{Mm as C,eV as L,fL as P,Mn as x,Mo as z,Mp as D,Mq as N,ob as R,Lj as q}from"./zeni-epic-state-NrbJoBOX.js";import{z as h,N as I}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-s55OcG-D.js";import{a as r}from"./sentry-qwy54zvC.js";import{u as T,g as j,j as o,N as A}from"./core-CnGMK-sC.js";import{Mm as C,eV as L,fL as P,Mn as x,Mo as z,Mp as D,Mq as N,ob as R,Lj as q}from"./zeni-epic-state-NrbJoBOX.js";import{z as h,N as I}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="4c80c875-6314-4b23-840f-eaa535d40740",n._sentryDebugIdIdentifier="sentry-dbid-4c80c875-6314-4b23-840f-eaa535d40740")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>L(e))),l=o((e=>P(e))),d=o((e=>e.tenantState.fetchState)),y=o(x),b=o(z),c=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const M=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),u=v??M;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(q(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CxdNyFxC.js → PandLWithForecastRoutes-BoM4q2mR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-s55OcG-D.js";import{h as z,u as H,g as J,i as K,j as d,n as Z,o as Q,p as I}from"./core-CnGMK-sC.js";import{eV as U,se as O,rO as X,MT as v,rJ as T,bs as ee,bn as ae,bY as te,rK as se,MU as oe,MG as C,dH as re,vV as ne,MV as ie,wg as ce,fC as le,fA as de}from"./zeni-epic-state-NrbJoBOX.js";import{z as me,_ as fe,a0 as pe,T as ue,C as M,G as $,x as he,d as w,ap as ge,v as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-s55OcG-D.js";import{h as z,u as H,g as J,i as K,j as d,n as Z,o as Q,p as I}from"./core-CnGMK-sC.js";import{eV as U,se as O,rO as X,MT as v,rJ as T,bs as ee,bn as ae,bY as te,rK as se,MU as oe,MG as C,dH as re,vV as ne,MV as ie,wg as ce,fC as le,fA as de}from"./zeni-epic-state-NrbJoBOX.js";import{z as me,_ as fe,a0 as pe,T as ue,C as M,G as $,x as he,d as w,ap as ge,v as Fe}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import be from"./NotFoundScreen-wlhddpbg.js";import{F as Ie}from"./FeaturePreviewScreen-Di3PuVRR.js";import{a as g}from"./sentry-qwy54zvC.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{u as Te}from"./useInitialThreadRequest-CXnpfTcs.js";import{t as Se}from"./routePaths-CVAI7AUa.js";import{M as ye}from"./MobileAppDrawer-NdU6zrS3.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="10e0a30f-2227-4447-90db-e04f27f848e6",s._sentryDebugIdIdentifier="sentry-dbid-10e0a30f-2227-4447-90db-e04f27f848e6")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=Z((function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(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 m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function P(){const s=z(),e=H(),a=J(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>U(t))),V=y.company?.companyInfo.firstMonthOfFY??1,c=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),A=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):R!=null?f.forecasts.findIndex((b=>b.id===R)):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!k(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}}),[i,p,e,l,c,m,u,O,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=M(),{isFeatureEnabled:j}=N($.isReportsCommentingEnabled),W=Te(j?y?.companyId:void 0,{clearParams:l&&m}),[q,Y]=g.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:q,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:V,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:G,onAskAiCfoClick:_,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d((i=>U(i))),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-s55OcG-D.js";import{MP as ne,eV as Y,kz as G,fC as X,fA as oe,Kh as q,Mt as ie,uS as ke,MQ as N,uH as Pe,v0 as Ee,uW as re,uL as le,u_ as je,uX as ve,MR as de,wH as Le,fm as Te,ge as Ae,MS as M,uP as ce,uO as pe,v3 as Re,c6 as Fe}from"./zeni-epic-state-NrbJoBOX.js";import{m as ue,C as ee,G as z,z as W,i as me,J as ge,I as fe,al as he,am as Oe,F as Ce,o as O,K as ye,a as be,an as Ve,_ as Ze,a0 as Be,x as Ue,d as Se,f as $e,v as He,ao as Me,T as ze}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-s55OcG-D.js";import{MP as ne,eV as Y,kz as G,fC as X,fA as oe,Kh as q,Mt as ie,uS as ke,MQ as N,uH as Pe,v0 as Ee,uW as re,uL as le,u_ as je,uX as ve,MR as de,wH as Le,fm as Te,ge as Ae,MS as M,uP as ce,uO as pe,v3 as Re,c6 as Fe}from"./zeni-epic-state-NrbJoBOX.js";import{m as ue,C as ee,G as z,z as W,i as me,J as ge,I as fe,al as he,am as Oe,F as Ce,o as O,K as ye,a as be,an as Ve,_ as Ze,a0 as Be,x as Ue,d as Se,f as $e,v as He,ao as Me,T as ze}from"./index-D7tfVykC.js";import{D as we,n as J,S as xe}from"./mui-CggbPNN2.js";import se from"./NotFoundScreen-wlhddpbg.js";import{a as d}from"./sentry-qwy54zvC.js";import{u as ae,i as Ke,j as g,h as _e,g as Ge,n as We,o as te,p as H}from"./core-CnGMK-sC.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{M as Qe}from"./MobileAppDrawer-NdU6zrS3.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="acc0961b-cd18-4d5e-8173-c4dba9122819",e._sentryDebugIdIdentifier="sentry-dbid-acc0961b-cd18-4d5e-8173-c4dba9122819")}catch{}})();const Ne={overlayWidth:new Ce(100,100,48)},K=be.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>ne(l))),p=g((l=>Y(l))),P=g((l=>G(l))),{useFeatureGate:D}=ee(),{isFeatureEnabled:I}=D(z.isDebitCardFeatureEnabled),E=X(I,p),L=oe(p),T=q(p),B=ie(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&P&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},A=()=>{V===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(z.isChargeCardFeatureEnabled),v=me(p,j,I),{isCardsHidden:R}=ge(p?.tenantId),y=!v||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:P,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Pe(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:K.discardTitle}),descriptionComponent:a.jsx(Ie,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Xe=J(xe)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import E from"./NotFoundScreen-wlhddpbg.js";import{a as r}from"./sentry-qwy54zvC.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as V,o as z,p as b}from"./core-CnGMK-sC.js";import{eV as B,S$ as h,bq as F,bn as N,ie as O,fx as $}from"./zeni-epic-state-NrbJoBOX.js";import{Q as q,z as I,a0 as Q,cY as Y}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{M as H}from"./MobileAppDrawer-NdU6zrS3.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="2e15c30f-60e3-47f4-be3b-cbf1bbcaffbf",e._sentryDebugIdIdentifier="sentry-dbid-2e15c30f-60e3-47f4-be3b-cbf1bbcaffbf")}catch{}})();const J=V((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(Y),K=()=>{const e=_(),t=v(),c=q(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const d=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),x=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),y=C||x||k,f=r.useCallback(((a,i,T)=>{u(O({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&d.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),d.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||f(a,i,!0),d.current=!0}),[n?.fetchState,f]),j=r.useCallback(((a,i)=>{f(a,i,!1)}),[f]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-s55OcG-D.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-qwy54zvC.js";import{L as dt,bY as Tc,eV as Ac,LZ as Rc,Mr as kl,c6 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-NrbJoBOX.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-5Fz6z6US.js";import{r as un}from"./empty-AGnm4bIq.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BzRjr6sI.js";import{r as Gl}from"./index-b64yysEr.js";import{r as zl}from"./index-CUaM5Y1I.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-CnGMK-sC.js";import{u as Kl,z as Pc,L as Wl,O as Jl,R as Xl,j as Ql,d as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-s55OcG-D.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-qwy54zvC.js";import{L as dt,bY as Tc,eV as Ac,LZ as Rc,Mr as kl,c6 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-NrbJoBOX.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-5Fz6z6US.js";import{r as un}from"./empty-AGnm4bIq.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BzRjr6sI.js";import{r as Gl}from"./index-b64yysEr.js";import{r as zl}from"./index-CUaM5Y1I.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-CnGMK-sC.js";import{u as Kl,z as Pc,L as Wl,O as Jl,R as Xl,j as Ql,d as tf}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{d as Pe}from"./decodeURIComponentSafe-uWfgYCNH.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="3a7fee45-b5a7-4e54-89f8-6a85bddcd424",t._sentryDebugIdIdentifier="sentry-dbid-3a7fee45-b5a7-4e54-89f8-6a85bddcd424")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(d)})(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=(function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d})(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c})(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=(function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1})(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(d){return'"'.concat(d,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){m(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-s55OcG-D.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-s55OcG-D.js";import _ from"./NotFoundScreen-wlhddpbg.js";import{a as p}from"./sentry-qwy54zvC.js";import{h as A,g as E,u as C,j as u,N as D,n as V,o as O,p as b}from"./core-CnGMK-sC.js";import{eV as j,Qh as g,Qx as S,FG as k,EP as U,FF as d,Fw as B,QK as N,FI as W}from"./zeni-epic-state-NrbJoBOX.js";import{z as F,a9 as L,bZ as Q,ag as T,bC as K,b_ as z}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="72a75454-a32a-44cb-9cdf-96fbb29ff265",e._sentryDebugIdIdentifier="sentry-dbid-72a75454-a32a-44cb-9cdf-96fbb29ff265")}catch{}})();const y="reimbursement-approval-rule-update",P=V((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(N(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(L(Q)),Z=({isLoading:e})=>{const o=A(),s=E(),n=C(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(k())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),F.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,$,R)=>{a.endsWith(y)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(P,{currentTenant:l,location:s,navigate:o,...w})},I="reimbursement-approval-rule-update",q=V((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(N(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(L(z)),H=()=>{const e=u((n=>j(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=K(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(Z,{isLoading:s})},J=({isLoading:e})=>{const o=A(),s=E(),n=C(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a)));G();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(k())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),F.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${I}`]:[],eventCallback:(a,$,R)=>{a.endsWith(I)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(x,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-s55OcG-D.js";import{a as m}from"./sentry-qwy54zvC.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-CnGMK-sC.js";import{k$ as q,Qx as w,Qh as x,Fz as V,FL as B,FG as A,FH as E,Qy as j,eV as z,FF as G}from"./zeni-epic-state-NrbJoBOX.js";import{z as P,y as N,B as $,bP as H,ag as L,bC as K,bQ as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-s55OcG-D.js";import{a as m}from"./sentry-qwy54zvC.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-CnGMK-sC.js";import{k$ as q,Qx as w,Qh as x,Fz as V,FL as B,FG as A,FH as E,Qy as j,eV as z,FF as G}from"./zeni-epic-state-NrbJoBOX.js";import{z as P,y as N,B as $,bP as H,ag as L,bC as K,bQ as W}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="c55716a9-89b6-4e19-9251-4670279cee2b",e._sentryDebugIdIdentifier="sentry-dbid-c55716a9-89b6-4e19-9251-4670279cee2b")}catch{}})();function J(){const e=T(),s=m.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));m.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const M=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=L(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const b=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((f=>({type:"user",subType:void 0,userId:f.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((f=>{const y=(S=f.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:f.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);b.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),b},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(H);function X(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g((n=>w(n))),i=g((n=>x(n))),[a,d]=m.useState(!1);if(m.useEffect((()=>{a||(d(!0),s(V(!0)))})),m.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=L(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const f=[];return c.forEach((y=>{const S=y.actorKind?.selectedOption,C=y.selectedRole?.selectedOption;let D=[];S==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((Q=>({type:"user",subType:void 0,userId:Q.userId,idType:"user",isImplicitActor:!1}))));const U=y.action??"require_approval";f.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),f},n=a.amountCriteria,v=a.vendorCriteria,b=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=b?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:b?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(G(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(Z,{}):h.jsx(X,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g((n=>w(n))),i=g((n=>x(n))),[a,d]=m.useState(!1);if(J(),m.useEffect((()=>{a||(d(!0),s(V(!0)))})),m.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import{h as W,u as de,g as Z,i as Y,j as w,N as _,n as K,l as mt,o as ct,p as C}from"./core-CnGMK-sC.js";import{eV as H,QL as ue,c6 as pe,EK as De,kK as dt,EX as oe,EW as re,QM as ut,bn as be,gp as Ue,QN as pt,Nb as bt,kz as Le,Nc as Ae,Nd as gt,ju as ht,Q3 as ft,jJ as St,Ey as It,uc as Rt,jB as yt,Fi as Pe,QO as $e,QP as At,QQ as vt,QR as kt,QS as Ct,QT as Et,F2 as ve,jP as wt,Qc as xt,EY as Bt,EI as Tt,QU as jt,EH as Ft,QV as Dt,EQ as ke,F6 as Ut,F5 as Lt,F1 as Pt,QW as Me,Kh as $t,bq as Mt,ET as _t,FA as Nt,QX as Ot,QY as Qt,Fe as Gt,Fb as Ce,Py as zt,EF as Zt,QZ as _e,G0 as Ee,G8 as Ht,Q_ as Vt,Q$ as G,R0 as Wt,R1 as Ne,R2 as Kt,R3 as Oe,R4 as Qe,Fq as le,bu as qt,bK as ge,cH as he,fC as Ge,fA as ze,R5 as Jt,fx as Xt,PL as Yt,R6 as en,R7 as Ze,PP as tn,Qx as nn,R8 as an,QK as sn,G5 as we,G4 as on,R9 as rn,Ra as ln,Rb as mn,Rc as cn,Rd as dn,Qi as un,FX as pn,F$ as bn,bs as gn,bJ as hn,cB as fn,cp as Sn,bt as In,L$ as Rn,cR as yn,cU as An,cT as vn,cA as kn}from"./zeni-epic-state-NrbJoBOX.js";import{Q as He,m as Ve,C as ee,G as E,z as $,b$ as We,x as te,d as v,aM as xe,o as F,au as X,I as Cn,a as Ke,c0 as En,v as z,a0 as qe,c1 as wn,T as ne,c2 as xn,_ as Bn,F as Tn,B as fe,f as Je,a9 as jn,bn as Fn,a4 as Dn,y as Xe,c3 as Un,i as Ln}from"./index-BWvweS0E.js";import{n as N,S as Pn}from"./mui-CggbPNN2.js";import me from"./NotFoundScreen-Bge2JGwW.js";import{S as Be}from"./SetupPagesScreen-BIZfrXFn.js";import{F as Ye}from"./FeaturePreviewScreen-D3z2gcpi.js";import{a as f}from"./sentry-qwy54zvC.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-c_VzJZE9.js";import{u as et}from"./useInitialThreadRequest-EuACK97s.js";import{D as $n}from"./DrawerScreen-CSMp2A9F.js";import{M as tt}from"./MobileAppDrawer-8wrd6B-7.js";import{R as Mn}from"./ReimbursementApprovalRoutes-CTijKmMu.js";import{FallBackRoute as _n}from"./ScreenRoutes-CkNF9DLW.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./analyticsHelper-CixncN58.js";import"./routePaths-D87yNyzK.js";import"./BusinessVerificationPageScreen-CHlhD1bn.js";import"./ReimbursementApprovalRuleDetailScreen-DIOgjJyZ.js";import"./getLocaleForTenant-C5b46Qyn.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]="b3640aa5-02d0-44a9-97e0-afd1843e2475",e._sentryDebugIdIdentifier="sentry-dbid-b3640aa5-02d0-44a9-97e0-afd1843e2475")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ke.getLocalizedStrings(),On=K((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ke(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ke(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ve(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ve("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(At());const i=nt(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(En);function Te(){const e=W(),t=de(),n=Z(),{reimbursementId:r}=Y(),d=He(),c=Ve(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Z().pathname,j=x.includes("edit"),A=x.includes("reimbursement/new"),[D,B]=f.useState(!1),k=$.getSignedInUser(),I=w((p=>H(p))),g=w((p=>ue(p,r))),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect((()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(De(!1,b,y,r)))}));const M=w((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(k==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(te,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import{h as W,u as de,g as Z,i as Y,j as w,N as _,n as K,l as mt,o as ct,p as C}from"./core-CnGMK-sC.js";import{eV as H,QL as ue,c6 as pe,EK as De,kK as dt,EX as oe,EW as re,QM as ut,bn as be,gp as Ue,QN as pt,Nb as bt,kz as Le,Nc as Ae,Nd as gt,ju as ht,Q3 as ft,jJ as St,Ey as It,uc as Rt,jB as yt,Fi as Pe,QO as $e,QP as At,QQ as vt,QR as kt,QS as Ct,QT as Et,F2 as ve,jP as wt,Qc as xt,EY as Bt,EI as Tt,QU as jt,EH as Ft,QV as Dt,EQ as ke,F6 as Ut,F5 as Lt,F1 as Pt,QW as Me,Kh as $t,bq as Mt,ET as _t,FA as Nt,QX as Ot,QY as Qt,Fe as Gt,Fb as Ce,Py as zt,EF as Zt,QZ as _e,G0 as Ee,G8 as Ht,Q_ as Vt,Q$ as G,R0 as Wt,R1 as Ne,R2 as Kt,R3 as Oe,R4 as Qe,Fq as le,bu as qt,bK as ge,cH as he,fC as Ge,fA as ze,R5 as Jt,fx as Xt,PL as Yt,R6 as en,R7 as Ze,PP as tn,Qx as nn,R8 as an,QK as sn,G5 as we,G4 as on,R9 as rn,Ra as ln,Rb as mn,Rc as cn,Rd as dn,Qi as un,FX as pn,F$ as bn,bs as gn,bJ as hn,cB as fn,cp as Sn,bt as In,L$ as Rn,cR as yn,cU as An,cT as vn,cA as kn}from"./zeni-epic-state-NrbJoBOX.js";import{Q as He,m as Ve,C as ee,G as E,z as $,b$ as We,x as te,d as v,aM as xe,o as F,au as X,I as Cn,a as Ke,c0 as En,v as z,a0 as qe,c1 as wn,T as ne,c2 as xn,_ as Bn,F as Tn,B as fe,f as Je,a9 as jn,bn as Fn,a4 as Dn,y as Xe,c3 as Un,i as Ln}from"./index-D7tfVykC.js";import{n as N,S as Pn}from"./mui-CggbPNN2.js";import me from"./NotFoundScreen-wlhddpbg.js";import{S as Be}from"./SetupPagesScreen-HhCCJlo-.js";import{F as Ye}from"./FeaturePreviewScreen-Di3PuVRR.js";import{a as f}from"./sentry-qwy54zvC.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{u as et}from"./useInitialThreadRequest-CXnpfTcs.js";import{D as $n}from"./DrawerScreen-BPgZ_1JF.js";import{M as tt}from"./MobileAppDrawer-NdU6zrS3.js";import{R as Mn}from"./ReimbursementApprovalRoutes-DfMng3xh.js";import{FallBackRoute as _n}from"./ScreenRoutes-Drpg91zT.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./analyticsHelper-CbsMOq15.js";import"./routePaths-CVAI7AUa.js";import"./BusinessVerificationPageScreen-B4os1LkS.js";import"./ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js";import"./getLocaleForTenant-BuGWeb9s.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]="b3640aa5-02d0-44a9-97e0-afd1843e2475",e._sentryDebugIdIdentifier="sentry-dbid-b3640aa5-02d0-44a9-97e0-afd1843e2475")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ke.getLocalizedStrings(),On=K((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ke(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ke(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ve(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ve("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(At());const i=nt(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(En);function Te(){const e=W(),t=de(),n=Z(),{reimbursementId:r}=Y(),d=He(),c=Ve(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Z().pathname,j=x.includes("edit"),A=x.includes("reimbursement/new"),[D,B]=f.useState(!1),k=$.getSignedInUser(),I=w((p=>H(p))),g=w((p=>ue(p,r))),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect((()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(De(!1,b,y,r)))}));const M=w((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(k==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(te,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|