@zeniai/web-app-ui 5.1.86-dev → 5.1.86-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-CYnGGpGr.js → AddressRoutes-BAumFdCn.js} +1 -1
- package/dist/assets/{AddressScreen-Cgf_DSfy.js → AddressScreen-D7SVDX3c.js} +1 -1
- package/dist/assets/{AiCfoScreen-DK7jWO5l.js → AiCfoScreen-EmNzFNPc.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Bufqh5bf.js → BillPayApprovalRoutes-BzzkHEPT.js} +1 -1
- package/dist/assets/{BillPayRoutes-DQrVntHX.js → BillPayRoutes-DnMAX-YX.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BVO4LcOB.js → BusinessVerificationPageScreen-DpQD4l-0.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BPq182YL.js → CardsAiCfoScreen-DSHeeuCE.js} +1 -1
- package/dist/assets/{ChargeCardRoutes--1Cz6d6F.js → ChargeCardRoutes-DkzvT7cu.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Cr6_STQF.js → CompanyPassportScreen-CoJcQGKl.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DPDyawJA.js → ConnectionAuthScreen-B4dLSs7i.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-CwgXB2Ot.js → CustomerOnboardingAuthScreen-BIm9xkqq.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DBUibBfl.js → CustomerOnboardingRoutes-B2sjgOuO.js} +1 -1
- package/dist/assets/{DashboardRoutes-CWiRUKmL.js → DashboardRoutes-CjrDJBOz.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Q8Gr6wzz.js → DefaultTenantHome-CQ8IAYpL.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Bg4bD2vf.js → DomesticWireDetailScreen-rKHzvtZE.js} +1 -1
- package/dist/assets/{DrawerScreen-ESB0V3An.js → DrawerScreen-BZTg6S18.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BgIcnD30.js → EntityDetailRoutes-DjGSQNLd.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DRdJk7UH.js → ExpenseAutomationRoutes-DI33DOyj.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CPre8DhJ.js → FeaturePreviewScreen-Bz1CevDI.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-D1vja8MF.js → HubSpotOAuthCallbackScreen-C0y7ybcS.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-50BdhE1X.js → MagicLinkRoutes-BjMXN2vg.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-oln-_jh3.js → MagicLinkSignInScreen-x1O7no6I.js} +1 -1
- package/dist/assets/{MobileAppDrawer-CNkPd-0r.js → MobileAppDrawer-lpNkrtqU.js} +1 -1
- package/dist/assets/{NotFoundScreen-C4hj38o6.js → NotFoundScreen-CUq8IV6N.js} +1 -1
- package/dist/assets/{NotificationRoutes-CDTyM5yC.js → NotificationRoutes-DR0YDKwk.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Bfra_k87.js → OAuthConsentScreen-CgDyz3Eq.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CgJVRO_P.js → PandLWithForecastRoutes-C-SRQYdw.js} +1 -1
- package/dist/assets/{PeopleRoutes-DsSKCjjc.js → PeopleRoutes-B_jd3M4f.js} +1 -1
- package/dist/assets/{PerformanceRoutes-5mjMtnxs.js → PerformanceRoutes-C7VQiAN9.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B3-UhwG_.js → QBOConnectionScreen-DLZRPyOd.js} +1 -1
- package/dist/assets/{ReferralListScreen-Dt6a-ZaL.js → ReferralListScreen-BLawll8s.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DJ6r8--7.js → ReimbursementApprovalRoutes-DTCEclxw.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CGou3dCd.js → ReimbursementApprovalRuleDetailScreen-CiKSNPkl.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C1KqmlyM.js → ReimbursementRoutes-DhDmylrI.js} +1 -1
- package/dist/assets/{ReportsRoutes-BTVnfyaM.js → ReportsRoutes-DyS6awe8.js} +1 -1
- package/dist/assets/{RewardsRoutes-DdOKhqcE.js → RewardsRoutes-PA9diy26.js} +1 -1
- package/dist/assets/{ScreenRoutes-CR7u1SOQ.js → ScreenRoutes-CwJ_122X.js} +2 -2
- package/dist/assets/{SettingsRoutes-ZI-PRowa.js → SettingsRoutes-Dy7tUtFi.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CnFtaoyZ.js → SetupPagesScreen-CpFUuHhw.js} +1 -1
- package/dist/assets/{SignInScreen-BoQaZMzp.js → SignInScreen-C1CK8m_4.js} +1 -1
- package/dist/assets/{SignOutScreen-BWN6fg9F.js → SignOutScreen-OZywboxp.js} +1 -1
- package/dist/assets/{TaskListScreen-wwlTbcpO.js → TaskListScreen-BZWhqWJH.js} +1 -1
- package/dist/assets/{TaskRoutes-BZfNRRg-.js → TaskRoutes-FAOuAXjZ.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-75MHva3P.js → TransactionDetailRoutes-DLhEEJGb.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BdRaLDX3.js → TransactionDetailScreen-FfCWFo8j.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BK2uV7qm.js → TransactionListRoutes-DnG3WVX4.js} +1 -1
- package/dist/assets/{TreasuryRoutes-JT_IY3Gx.js → TreasuryRoutes-D1gAeoDF.js} +1 -1
- package/dist/assets/{VendorsRoutes-BS6JrHkM.js → VendorsRoutes-BF7eJLp_.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CrmCNnnU.js → WiseConfirmationScreen-BC2o9haZ.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BPiHmqg-.js → ZeniAccountRoutes-Dw0WkkGS.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DxgFXxRD.js → ZeniAccountStatementScreen-DTExrWEW.js} +1 -1
- package/dist/assets/{analyticsHelper-B2nQzr20.js → analyticsHelper-bvV0MVk_.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DVEihZ-H.js → getLocaleForTenant-Bbp7hRaL.js} +1 -1
- package/dist/assets/{index-DD9OmSLj.js → index-eJLaPt6g.js} +5 -5
- package/dist/assets/{routePaths-BumbtdKN.js → routePaths-KNTYle1Y.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DQzT3CdB.js → useAiCfoDashboardSuggestedQuestionsChips-CUO80fh2.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CSLK93Wz.js → useAskAiCfoHostNavButtonProps-BPAwfNFS.js} +1 -1
- package/dist/assets/{useCashManagementBanner-BNEI8i2V.js → useCashManagementBanner-CcNjlvwE.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-CtFgCR2P.js → useChargeCardPusherEvents-BWY6zedg.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-CMs316dl.js → useEmailConnectResultRefresh-DXMR1wpt.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-B6-oXb8Z.js → useInitialThreadRequest-BHOqqUGj.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-iSi7Lgwj.js → withTransactionSidePanel-C4M7dFPJ.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-4PIBJMyE.js";import{a as u}from"./sentry-CXcgkCeA.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-Ca6G0voE.js";import{LT as U,eX as _,g1 as N,LU as k,o9 as R,LV as z}from"./zeni-epic-state-BIxjj87B.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-4PIBJMyE.js";import{a as u}from"./sentry-CXcgkCeA.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-Ca6G0voE.js";import{LT as U,eX as _,g1 as N,LU as k,o9 as R,LV as z}from"./zeni-epic-state-BIxjj87B.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{t as P}from"./getLocaleForTenant-Bbp7hRaL.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="adf58f1e-84b8-41df-b628-37dd013deb4d",t._sentryDebugIdIdentifier="sentry-dbid-adf58f1e-84b8-41df-b628-37dd013deb4d")}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=$(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}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(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(N(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||(O.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-Bg4bD2vf.js → DomesticWireDetailScreen-rKHzvtZE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-4PIBJMyE.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-Ca6G0voE.js";import{Q1 as k,Q8 as _,gh as q,gg as K,gf as W,ju as X,N8 as J,rt as L,eX as D,Pz as V,js as T,Q2 as S,Qb as j,jq as F,jN as G}from"./zeni-epic-state-BIxjj87B.js";import{bB as M,K as N,C as R,z as U,y as z,q as p,U as v,B as O,bC as Y,o as Q,bD as ee,s as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-4PIBJMyE.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-Ca6G0voE.js";import{Q1 as k,Q8 as _,gh as q,gg as K,gf as W,ju as X,N8 as J,rt as L,eX as D,Pz as V,js as T,Q2 as S,Qb as j,jq as F,jN as G}from"./zeni-epic-state-BIxjj87B.js";import{bB as M,K as N,C as R,z as U,y as z,q as p,U as v,B as O,bC as Y,o as Q,bD as ee,s as te}from"./index-eJLaPt6g.js";import{n as Z}from"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.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]="6c1dbe60-f032-4564-9ec0-39a28fae7037",e._sentryDebugIdIdentifier="sentry-dbid-6c1dbe60-f032-4564-9ec0-39a28fae7037")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,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-4PIBJMyE.js";import{K as f,E as l,y as c}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-4PIBJMyE.js";import{K as f,E as l,y as c}from"./index-eJLaPt6g.js";import{D as p}from"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.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]="d636e153-afe0-43db-9e0f-2ffcb0dec795",e._sentryDebugIdIdentifier="sentry-dbid-d636e153-afe0-43db-9e0f-2ffcb0dec795")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as d}from"./sentry-CXcgkCeA.js";import{h as A,u as B,g as q,i as G,j as l,N as O,n as F,o as K,p as _}from"./core-Ca6G0voE.js";import{Og as z,eX as M,NE as R,lx as W,K9 as k,Ol as X,N7 as Y,kx as $,Ka as S,NJ as J,NK as V,N9 as H,N8 as L}from"./zeni-epic-state-BIxjj87B.js";import{aX as Q,e as U,q as Z,s as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as d}from"./sentry-CXcgkCeA.js";import{h as A,u as B,g as q,i as G,j as l,N as O,n as F,o as K,p as _}from"./core-Ca6G0voE.js";import{Og as z,eX as M,NE as R,lx as W,K9 as k,Ol as X,N7 as Y,kx as $,Ka as S,NJ as J,NK as V,N9 as H,N8 as L}from"./zeni-epic-state-BIxjj87B.js";import{aX as Q,e as U,q as Z,s as tt}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{d as b}from"./decodeURIComponentSafe-BMcEUj25.js";import{w as et}from"./withTransactionSidePanel-C4M7dFPJ.js";import{f as at,c as nt}from"./routePaths-KNTYle1Y.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";import"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import"./TransactionDetailScreen-FfCWFo8j.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]="5a72060f-f346-4430-b463-dd552c2bb908",a._sentryDebugIdIdentifier="sentry-dbid-5a72060f-f346-4430-b463-dd552c2bb908")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=X(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(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(J()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:w}=G(),r=b(x??""),p=b(w??""),f=rt(r,p),N=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),j=l(n=>M(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(W(i)))},[m,f,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(O,{to:I(N.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(K,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DRdJk7UH.js → ExpenseAutomationRoutes-DI33DOyj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-4PIBJMyE.js";import oa from"./NotFoundScreen-
|
|
1
|
+
import{j as h}from"./liveblocks-4PIBJMyE.js";import oa from"./NotFoundScreen-CUq8IV6N.js";import{a as o,b as Nt}from"./sentry-CXcgkCeA.js";import{n as Ue,S as sa}from"./mui-BI3ZId9r.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-Ca6G0voE.js";import{eX as Re,S$ as la,oj as Ee,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as Ea,N9 as Rt,N8 as we,T6 as Dt,kY as ka,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as Eo,fL as ko,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-BIxjj87B.js";import{C as sn,U as X,e as q,s as ae,_ as cn,a0 as ln,c$ as Lo,z as Be,d0 as $o,au as Pe,d1 as qo,aZ as jt,B as rn,d2 as Go,ar as Ne,a as Jo,a9 as No,d3 as Yo,a4 as Ko,d4 as Zo,Z as Ho,d5 as Qo,d6 as Wo,F as Xo,j as es,aS as ts,d7 as ns,d8 as as,be as os,E as ss,aV as cs}from"./index-eJLaPt6g.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-FfCWFo8j.js";import{w as us}from"./withTransactionSidePanel-C4M7dFPJ.js";import{h as ms,v as ps}from"./routePaths-KNTYle1Y.js";import{g as Ye}from"./accountMappingHelper-COLWfB1U.js";import{D as hs}from"./DrawerScreen-BZTg6S18.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";import"./decodeURIComponentSafe-BMcEUj25.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]="bcb3d7e4-76b7-417d-8c23-08e6dffd015c",t._sentryDebugIdIdentifier="sentry-dbid-bcb3d7e4-76b7-417d-8c23-08e6dffd015c")}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(Lo,{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-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{a5 as c,a6 as l,a7 as p,q as b}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{a5 as c,a6 as l,a7 as p,q as b}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import m from"./NotFoundScreen-CUq8IV6N.js";import{h as f,g as u}from"./core-Ca6G0voE.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]="527d9e25-3d01-4280-b0c1-0c01931b4bab",e._sentryDebugIdIdentifier="sentry-dbid-527d9e25-3d01-4280-b0c1-0c01931b4bab")}catch{}})();const _=()=>{const e=f(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},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-CXcgkCeA.js";import{u as l,h as m,g as p}from"./core-Ca6G0voE.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-BIxjj87B.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-CXcgkCeA.js";import{u as l,h as m,g as p}from"./core-Ca6G0voE.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-BIxjj87B.js";import{u as b,L as h,z as y}from"./index-eJLaPt6g.js";import"./liveblocks-4PIBJMyE.js";import"./recharts-D6NnjcYi.js";import"./mui-BI3ZId9r.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="ca071d2d-875c-46d5-a900-da06571bb95a",e._sentryDebugIdIdentifier="sentry-dbid-ca071d2d-875c-46d5-a900-da06571bb95a")}catch{}})();function R(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:u}=b(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-4PIBJMyE.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-Ca6G0voE.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as D,Mc as oe,Md as ie,B2 as se,fA as $,B9 as le,B6 as re}from"./zeni-epic-state-BIxjj87B.js";import{K as g,o as r,n as de,e as j,k as G,p as ce,q as me,r as pe,s as _,C as ue,U as he,v as xe,F as ge,y as fe,w as we,B as be,x as Se,H as ye,S as ke,D as ve,E as je,G as $e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-4PIBJMyE.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-Ca6G0voE.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as D,Mc as oe,Md as ie,B2 as se,fA as $,B9 as le,B6 as re}from"./zeni-epic-state-BIxjj87B.js";import{K as g,o as r,n as de,e as j,k as G,p as ce,q as me,r as pe,s as _,C as ue,U as he,v as xe,F as ge,y as fe,w as we,B as be,x as Se,H as ye,S as ke,D as ve,E as je,G as $e}from"./index-eJLaPt6g.js";import{n as m}from"./mui-BI3ZId9r.js";import f from"./NotFoundScreen-CUq8IV6N.js";import{a as I}from"./sentry-CXcgkCeA.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="8a25754c-f11e-4ca2-9db3-558a4d16fb0f",e._sentryDebugIdIdentifier="sentry-dbid-8a25754c-f11e-4ca2-9db3-558a4d16fb0f")}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-4PIBJMyE.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as M,g as O,h as V,t as _,j as l,N as T}from"./core-Ca6G0voE.js";import{z as r,y as w,a as A,f as P,e as N,g as W,V as $,H,h as R}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-4PIBJMyE.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as M,g as O,h as V,t as _,j as l,N as T}from"./core-Ca6G0voE.js";import{z as r,y as w,a as A,f as P,e as N,g as W,V as $,H,h as R}from"./index-eJLaPt6g.js";import{eX as X,LV as Y,M3 as q,LW as B,fA as G,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-BIxjj87B.js";import{n as ne}from"./mui-BI3ZId9r.js";import{u as se}from"./useDeviceId-BbYF3u-l.js";import{f as ie}from"./analyticsHelper-bvV0MVk_.js";import{t as ae}from"./getLocaleForTenant-Bbp7hRaL.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="0073e5d0-6300-457d-b984-13d3f4b5dd38",t._sentryDebugIdIdentifier="sentry-dbid-0073e5d0-6300-457d-b984-13d3f4b5dd38")}catch{}})();const x=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function xe(){const t=M(),i=O(),m=V(),[y]=_(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=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),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>X(e)),b=l(e=>Y(e)),E=r.getSignedInUser(),v=w().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,a,f)))},[n,p,t,a,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=R();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,k,s,o,b,v,i.state,t]);const U=g.useCallback(()=>{m("/signin/auth")},[m]),j=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!x(n,p)||f==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(H,{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 N}from"./liveblocks-4PIBJMyE.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as fe,j as n,i as Ye,g as We,h as Xe,l as P}from"./core-Ca6G0voE.js";import{eX as me,fF as qe,fG as be,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-BIxjj87B.js";import{a9 as ha,aa as Sa,F as ga,C as Ea,z as k,w as ka,u as Ca,U as r,i as ya,d as Ia,ab as Ta,j as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,e as R,a1 as Ma,s as w,aj as x,ak as Pa}from"./index-
|
|
1
|
+
import{j as N}from"./liveblocks-4PIBJMyE.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as fe,j as n,i as Ye,g as We,h as Xe,l as P}from"./core-Ca6G0voE.js";import{eX as me,fF as qe,fG as be,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-BIxjj87B.js";import{a9 as ha,aa as Sa,F as ga,C as Ea,z as k,w as ka,u as Ca,U as r,i as ya,d as Ia,ab as Ta,j as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,e as R,a1 as Ma,s as w,aj as x,ak as Pa}from"./index-eJLaPt6g.js";import{D as Ra}from"./mui-BI3ZId9r.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]="02407b25-fb44-47a4-8b29-aef7cfd3f263",f._sentryDebugIdIdentifier="sentry-dbid-02407b25-fb44-47a4-8b29-aef7cfd3f263")}catch{}})();const xa=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=We(),C=ga(),o=Xe(),U=Ke(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Qe(V),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=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),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.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:we}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),W=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),X=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:K,isFetchingMore:Q,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&Q===!1&&J===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;L(q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,Q,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))},[A,$.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"),Y===!1&&S.push("expense_automation_card");const Ne=wa(),te=n(e=>ia(e,S,h,we,Te).fetchState),ne=n(e=>ra(e).fetchState),Ue=_&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!_&&!z?void 0:"disabled",Ve=c.useMemo(()=>da(s.userRole),[s.userRole]),Be=la(Ve),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.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:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&X>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&X>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(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",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(pa()),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,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ga(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=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(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-4PIBJMyE.js";import{h as n,n as e}from"./core-Ca6G0voE.js";import{R as i}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-4PIBJMyE.js";import{h as n,n as e}from"./core-Ca6G0voE.js";import{R as i}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.js";import"./zeni-epic-state-BIxjj87B.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}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 mt,m as dt,j as E}from"./liveblocks-4PIBJMyE.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-4PIBJMyE.js";import lt from"./NotFoundScreen-CUq8IV6N.js";import{a as k}from"./sentry-CXcgkCeA.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 q}from"./core-Ca6G0voE.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SW as J,fR as d,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as O,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-BIxjj87B.js";import{_ as xt,z as Bt,C as wt,U as Rt,a0 as Ut,cY as Gt,s as N,a9 as Dt,cZ as vt,aa as Pt,q as Ft}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e",t._sentryDebugIdIdentifier="sentry-dbid-3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e")}catch{}})();const Mt=(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=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(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:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));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(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(O("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({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(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({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(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({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(d({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}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ut({isDataReady:!0});const K=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),U=S(e=>b(e).currentSubTab),Q=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),G=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=Gt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:L,isFetchingMore:X,hasFetchedAll:Z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(J(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(d({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(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&G!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||G!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,G]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=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 P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(X||Z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,X,C,Z,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];U==="all"?A.push("read","unread"):U!=="mentions"&&A.push(U),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:K,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(q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{u as T,g as j,j as o,N as A}from"./core-Ca6G0voE.js";import{Mi as C,eX as N,fN as P,Mj as x,Mk as z,Ml as D,Mm as L,o9 as R,Lf as k}from"./zeni-epic-state-BIxjj87B.js";import{z as h,N as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{u as T,g as j,j as o,N as A}from"./core-Ca6G0voE.js";import{Mi as C,eX as N,fN as P,Mj as x,Mk as z,Ml as D,Mm as L,o9 as R,Lf as k}from"./zeni-epic-state-BIxjj87B.js";import{z as h,N as I}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="d4b3d738-22df-419b-86a9-b3eb4b68f218",n._sentryDebugIdIdentifier="sentry-dbid-d4b3d738-22df-419b-86a9-b3eb4b68f218")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>N(e)),l=o(e=>P(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),u=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(k(a.userId,a.zeniSessionId??void 0,c,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.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CgJVRO_P.js → PandLWithForecastRoutes-C-SRQYdw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-4PIBJMyE.js";import{h as z,u as H,g as K,i as Q,j as d,n as X,o as Z,p as I}from"./core-Ca6G0voE.js";import{eX as U,sc as P,rM as J,MP as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-BIxjj87B.js";import{z as me,_ as fe,a0 as pe,j as ue,C as O,U as w,x as he,e as $,ap as ge,s as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-4PIBJMyE.js";import{h as z,u as H,g as K,i as Q,j as d,n as X,o as Z,p as I}from"./core-Ca6G0voE.js";import{eX as U,sc as P,rM as J,MP as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-BIxjj87B.js";import{z as me,_ as fe,a0 as pe,j as ue,C as O,U as w,x as he,e as $,ap as ge,s as Fe}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import be from"./NotFoundScreen-CUq8IV6N.js";import{F as Ie}from"./FeaturePreviewScreen-Bz1CevDI.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import{u as Se}from"./useInitialThreadRequest-BHOqqUGj.js";import{t as Te}from"./routePaths-KNTYle1Y.js";import{M as ye}from"./MobileAppDrawer-lpNkrtqU.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="aa6b3d09-552f-41a9-9ed1-6e2256a33eff",s._sentryDebugIdIdentifier="sentry-dbid-aa6b3d09-552f-41a9-9ed1-6e2256a33eff")}catch{}})();const T=(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=X(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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(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=Te(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 M(){const s=z(),e=H(),a=K(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),_=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(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:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(J());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)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!k(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const D=ue(),W=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=O(),{isFeatureEnabled:j}=q(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:_,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:W,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ve(){const s=d(i=>U(i)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-4PIBJMyE.js";import{ML as ne,eX as Q,kx as G,fE as Y,fC as oe,Kd as q,Mp as ie,uO as ke,MM as N,uD as Ee,uY as Pe,uS as re,uH as le,uW as je,uT as Le,MN as ce,wD as Te,fo as ve,ge as Oe,MO as H,uL as de,uK as pe,u$ as Ae,c6 as Re}from"./zeni-epic-state-BIxjj87B.js";import{K as ue,C as ee,U as _,z as W,i as me,M as ge,I as fe,al as he,am as Fe,E as Ce,o as F,J as ye,a as be,an as Ve,_ as Ze,a0 as Ue,x as Be,e as Se,g as $e,s as Me,ao as He,j as _e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-4PIBJMyE.js";import{ML as ne,eX as Q,kx as G,fE as Y,fC as oe,Kd as q,Mp as ie,uO as ke,MM as N,uD as Ee,uY as Pe,uS as re,uH as le,uW as je,uT as Le,MN as ce,wD as Te,fo as ve,ge as Oe,MO as H,uL as de,uK as pe,u$ as Ae,c6 as Re}from"./zeni-epic-state-BIxjj87B.js";import{K as ue,C as ee,U as _,z as W,i as me,M as ge,I as fe,al as he,am as Fe,E as Ce,o as F,J as ye,a as be,an as Ve,_ as Ze,a0 as Ue,x as Be,e as Se,g as $e,s as Me,ao as He,j as _e}from"./index-eJLaPt6g.js";import{D as we,n as J,S as xe}from"./mui-BI3ZId9r.js";import se from"./NotFoundScreen-CUq8IV6N.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as ae,i as Ke,j as g,h as ze,g as Ge,n as We,o as te,p as M}from"./core-Ca6G0voE.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import{M as Xe}from"./MobileAppDrawer-lpNkrtqU.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="618acd45-686a-4c10-8228-08ecff87c96d",e._sentryDebugIdIdentifier="sentry-dbid-618acd45-686a-4c10-8228-08ecff87c96d")}catch{}})();const Ne={overlayWidth:new Ce(100,100,48)},K=be.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=Ke(),r=g(l=>ne(l)),p=g(l=>Q(l)),E=g(l=>G(l)),{useFeatureGate:D}=ee(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=Y(I,p),T=oe(p),v=q(p),U=ie(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},O=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map(l=>l.user),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=me(p,j,I),{isCardsHidden:A}=ge(p?.tenantId),y=!L||A,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(v))},onCloseClick:O,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect(()=>{x===!1&&w!=null&&m(ke(w))},[x,w]),c.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:O,children:a.jsxs(Ye,{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(Fe,{...s})]})})},Ye=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-4PIBJMyE.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import _ from"./NotFoundScreen-CUq8IV6N.js";import{a as r}from"./sentry-CXcgkCeA.js";import{h as E,g as v,j as p,i as M,u as U,N as z,n as P,o as F,p as b}from"./core-Ca6G0voE.js";import{eX as O,S_ as h,bq as B,bn as N,ie as V,fz as q}from"./zeni-epic-state-BIxjj87B.js";import{F as X,z as I,a0 as $,c_ as G}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import{M as J}from"./MobileAppDrawer-lpNkrtqU.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="4755f0c7-5f1b-41b2-bdbc-e735e85ba78d",e._sentryDebugIdIdentifier="sentry-dbid-4755f0c7-5f1b-41b2-bdbc-e735e85ba78d")}catch{}})();const K=P(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)}}})(G),L=()=>{const e=E(),t=v(),c=X(),o=p(a=>O(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 f=r.useRef(!1),[S,w]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(F,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(_,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-4PIBJMyE.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CXcgkCeA.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-BIxjj87B.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-DFP_hVXq.js";import{r as un}from"./empty-uy3M1msm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DyNMbFeB.js";import{r as Gl}from"./index-Dcmv7y8l.js";import{r as zl}from"./index-D3FowIif.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Ca6G0voE.js";import{u as Kl,z as Pc,L as Wl,O as Jl,Q as Xl,k as Ql,e as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-4PIBJMyE.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CXcgkCeA.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-BIxjj87B.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-DFP_hVXq.js";import{r as un}from"./empty-uy3M1msm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DyNMbFeB.js";import{r as Gl}from"./index-Dcmv7y8l.js";import{r as zl}from"./index-D3FowIif.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Ca6G0voE.js";import{u as Kl,z as Pc,L as Wl,O as Jl,Q as Xl,k as Ql,e as tf}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{d as Pe}from"./decodeURIComponentSafe-BMcEUj25.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]="4b4c349c-fe8f-4796-a523-53b1e1868fad",t._sentryDebugIdIdentifier="sentry-dbid-4b4c349c-fe8f-4796-a523-53b1e1868fad")}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,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as o}from"./sentry-CXcgkCeA.js";import{j as f,h as L,u as V,g as _,n as F}from"./core-Ca6G0voE.js";import{y as N,K as W,z as P,bg as K,E as M,_ as U,a0 as $,x as z,e as l,g as X,a9 as q,bh as G}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as o}from"./sentry-CXcgkCeA.js";import{j as f,h as L,u as V,g as _,n as F}from"./core-Ca6G0voE.js";import{y as N,K as W,z as P,bg as K,E as M,_ as U,a0 as $,x as z,e as l,g as X,a9 as q,bh as G}from"./index-eJLaPt6g.js";import{fI as J,eX as Q,Pm as R,Pn as Y,vH as Z,vx as g,fK as ee,bS as re,vC as ae,Po as ne}from"./zeni-epic-state-BIxjj87B.js";import{D as te,e as se,n as oe,S as ie}from"./mui-BI3ZId9r.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BPAwfNFS.js";import{M as de}from"./MobileAppDrawer-lpNkrtqU.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]="4b5ddc7f-f475-4c48-9f57-e711c9f3e7bf",e._sentryDebugIdIdentifier="sentry-dbid-4b5ddc7f-f475-4c48-9f57-e711c9f3e7bf")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=N(),n=W();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>J(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(K,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-4PIBJMyE.js";import O from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-4PIBJMyE.js";import O from"./NotFoundScreen-CUq8IV6N.js";import{a as p}from"./sentry-CXcgkCeA.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as W,p as g}from"./core-Ca6G0voE.js";import{eX as E,Qg as b,Qw as S,FC as V,EL as U,FB as d,Fs as B,QJ as L,FE as _}from"./zeni-epic-state-BIxjj87B.js";import{z as N,a9 as $,b$ as Q,ag as T,bE as z,c0 as J}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.js";import{u as K,R as I}from"./ReimbursementApprovalRuleDetailScreen-CiKSNPkl.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]="d6bf0d1f-456c-4b46-9c34-8ad07c47a6ef",e._sentryDebugIdIdentifier="sentry-dbid-d6bf0d1f-456c-4b46-9c34-8ad07c47a6ef")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!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"))}}})($(Q)),q=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=b(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(j)&&e(L(!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(_(t,!0))}}})($(J)),H=()=>{const e=u(n=>E(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(W,{children:[r.jsx(g,{path:"/",element:r.jsx(H,{})}),r.jsx(g,{path:"/new",element:r.jsx(I,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(I,{})}),r.jsx(g,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-4PIBJMyE.js";import{a as f}from"./sentry-CXcgkCeA.js";import{u as T,j as y,h as _,g as O,i as k,n as F}from"./core-Ca6G0voE.js";import{kZ as Q,Qw as w,Qg as x,Fv as V,FH as B,FC as A,FD as E,Qx as j,eX as z,FB as H}from"./zeni-epic-state-BIxjj87B.js";import{z as N,y as P,B as $,bR as K,ag as q,bE as W,bS as X}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-4PIBJMyE.js";import{a as f}from"./sentry-CXcgkCeA.js";import{u as T,j as y,h as _,g as O,i as k,n as F}from"./core-Ca6G0voE.js";import{kZ as Q,Qw as w,Qg as x,Fv as V,FH as B,FC as A,FD as E,Qx as j,eX as z,FB as H}from"./zeni-epic-state-BIxjj87B.js";import{z as N,y as P,B as $,bR as K,ag as q,bE as W,bS as X}from"./index-eJLaPt6g.js";import"./mui-BI3ZId9r.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]="fed57c16-2569-4f85-ad6c-338af56ab260",e._sentryDebugIdIdentifier="sentry-dbid-fed57c16-2569-4f85-ad6c-338af56ab260")}catch{}})();function Z(){const e=T(),s=f.useRef(!1),t=y(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=y(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Q({})))},[p,t,e])}const G=F(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=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach(u=>{const R=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(m=>{const g=(b=m.value,j(b)==null);var b;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}}),c=R.concat(I);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),S},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("../")}}})(K);function J(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=y(n=>w(n)),i=y(n=>x(n)),[a,d]=f.useState(!1);if(f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.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(G,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const M=F(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=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(g=>{const b=g.actorKind?.selectedOption,C=g.selectedRole?.selectedOption;let D=[];b==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map(L=>({type:"user",subType:void 0,userId:L.userId,idType:"user",isImplicitActor:!1})));const U=g.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,S=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 R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=S?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),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(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(X);function ne(){const e=y(t=>z(t)),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(J,{})}function Y(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=y(n=>w(n)),i=y(n=>x(n)),[a,d]=f.useState(!1);if(Z(),f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.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},p??"new")}export{ne as R,pe as i,Z as u};
|