@zeniai/web-app-ui 5.1.62-dev → 5.1.62-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-DvuqFlm5.js → AddressRoutes-CZL5IIDj.js} +1 -1
- package/dist/assets/{AddressScreen-D7DCNUGo.js → AddressScreen-CxOVTdB3.js} +1 -1
- package/dist/assets/{AiCfoScreen-Bv6DgXwH.js → AiCfoScreen-Ufyr17L2.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DxIJLeU6.js → BillPayApprovalRoutes-COMjZNBM.js} +1 -1
- package/dist/assets/{BillPayRoutes-CxAjptk9.js → BillPayRoutes-ycYrxG7k.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-HLhTZBjl.js → BusinessVerificationPageScreen-BSOfMkHj.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BQXIEsXX.js → CardsAiCfoScreen-BofarOgC.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CF9hoDo5.js → ChargeCardRoutes-iiwF-L1o.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Dd-P8T6z.js → CompanyPassportScreen-N6HtNLO2.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BWQPD0qS.js → ConnectionAuthScreen-GiDrTcJ9.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-BycVZ7K6.js → CustomerOnboardingAuthScreen-CIo2QvBW.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-B4tFhrDj.js → CustomerOnboardingRoutes-C39jSTCn.js} +1 -1
- package/dist/assets/{DashboardRoutes-uPgpLI1W.js → DashboardRoutes-dFcQ-Udv.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Bhp_uriR.js → DefaultTenantHome-CiIQC--y.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-YZRErnfJ.js → DomesticWireDetailScreen-Cv3GFhdJ.js} +1 -1
- package/dist/assets/{DrawerScreen-BqYmVuny.js → DrawerScreen-Dz_Ifi-A.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DbpAgwXS.js → EntityDetailRoutes-CGqc-n2O.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-ChVJkArc.js → ExpenseAutomationRoutes-iUGrHrmT.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-kp5WtNsg.js → FeaturePreviewScreen-CdQFs282.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BAfTUuIq.js → HubSpotOAuthCallbackScreen-Crp8q0ZQ.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CGh8IMWW.js → MagicLinkRoutes-BPzX2NJX.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BFMyglUM.js → MagicLinkSignInScreen-BoA-7inn.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BuakBUGx.js → MobileAppDrawer-cGG4tefr.js} +1 -1
- package/dist/assets/{NotFoundScreen-AsC21qGx.js → NotFoundScreen-DmxmtGfC.js} +1 -1
- package/dist/assets/{NotificationRoutes-B06j6V42.js → NotificationRoutes-DRjXwQc4.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-B6euKfvQ.js → OAuthConsentScreen-HR6-AToH.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DfEV7guz.js → PandLWithForecastRoutes-COEiLMeU.js} +1 -1
- package/dist/assets/{PeopleRoutes-qz_hXV4C.js → PeopleRoutes-CQ7KgSTF.js} +1 -1
- package/dist/assets/{PerformanceRoutes-v5FcQW2N.js → PerformanceRoutes-CUptxU2M.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Cx74YOuE.js → QBOConnectionScreen-MiEEvzBf.js} +1 -1
- package/dist/assets/{ReferralListScreen-G8WgDfU8.js → ReferralListScreen-BqOgHlgl.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-yvcY1FyR.js → ReimbursementApprovalRoutes-CuEZag2r.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js → ReimbursementApprovalRuleDetailScreen-DSLe2MhL.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-vHQ3hpWm.js → ReimbursementRoutes--RsJPCEP.js} +1 -1
- package/dist/assets/{ReportsRoutes-DIUc8s5q.js → ReportsRoutes-uT5eAJf1.js} +1 -1
- package/dist/assets/{RewardsRoutes-lnm6cAkX.js → RewardsRoutes-DNPQGfAV.js} +1 -1
- package/dist/assets/{ScreenRoutes-CAtz09zv.js → ScreenRoutes-BEMAKpuY.js} +2 -2
- package/dist/assets/{SettingsRoutes-B4g8CJnG.js → SettingsRoutes-DqieIzNx.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BkPb95y9.js → SetupPagesScreen-Pz567UQO.js} +1 -1
- package/dist/assets/{SignInScreen-Dhh5qz65.js → SignInScreen-DPJ9eMik.js} +1 -1
- package/dist/assets/{SignOutScreen-3sXSL_QM.js → SignOutScreen-BmbWt3Pd.js} +1 -1
- package/dist/assets/{TaskListScreen-DGOHeeuZ.js → TaskListScreen-Chd2rxBe.js} +1 -1
- package/dist/assets/{TaskRoutes-CDomkVrp.js → TaskRoutes-DXfXoaYF.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BXwhj2nX.js → TransactionDetailRoutes-Dko7BvP2.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DUZV5JDK.js → TransactionDetailScreen-B7KMTXiT.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CDDcflri.js → TransactionListRoutes-MalhqO-o.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CZyF8G2k.js → TreasuryRoutes-BJIzvR2Q.js} +1 -1
- package/dist/assets/{VendorsRoutes-B0mGOZoL.js → VendorsRoutes-45nX3W2c.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-B3-wTx7l.js → WiseConfirmationScreen-CWe-skzP.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BeZsG6M5.js → ZeniAccountRoutes-DWsFxkzK.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CU5lpB3Y.js → ZeniAccountStatementScreen-BqtUjZCP.js} +1 -1
- package/dist/assets/{analyticsHelper-CQXeRvKo.js → analyticsHelper-MomIUc09.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C55KVru2.js → getLocaleForTenant-DBZLLRpQ.js} +1 -1
- package/dist/assets/{index-DsVH62ZK.js → index-BsmcHa9A.js} +5 -5
- package/dist/assets/{routePaths-Dq5U7lhs.js → routePaths-ieN8hn7m.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BzB3gTK8.js → useAiCfoDashboardSuggestedQuestionsChips-Ber5T8-o.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-uVGdd0zj.js → useAskAiCfoHostNavButtonProps-5Ek-t3F9.js} +1 -1
- package/dist/assets/{useCashManagementBanner-BB3WgTJ-.js → useCashManagementBanner-B0ma2Yzx.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BOkZNaGv.js → useChargeCardPusherEvents-RkbvNufi.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-FRZ2xd4V.js → useEmailConnectResultRefresh-CiHOFzmr.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D9ebiXdA.js → useInitialThreadRequest-Dr9FuJUY.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-iGXE6khP.js → withTransactionSidePanel-C15NQsNY.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-evjZPqs_.js";import{a as u}from"./sentry-CCZGmBkl.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-DmAftQ4g.js";import{LR as N,eW as _,f$ as R,LS as U,o7 as k,LT as z}from"./zeni-epic-state-vtQ66nN6.js";import{u as O,z as f,L as T,t as I,O as $,b as j}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-evjZPqs_.js";import{a as u}from"./sentry-CCZGmBkl.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-DmAftQ4g.js";import{LR as N,eW as _,f$ as R,LS as U,o7 as k,LT as z}from"./zeni-epic-state-vtQ66nN6.js";import{u as O,z as f,L as T,t as I,O as $,b as j}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{t as P}from"./getLocaleForTenant-DBZLLRpQ.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="3b50d821-589c-4a01-b747-dcaf08ff4190",t._sentryDebugIdIdentifier="sentry-dbid-3b50d821-589c-4a01-b747-dcaf08ff4190")}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=j(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}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(R(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"&&!U(i))&&t(k(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||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["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"],G={"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 q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-YZRErnfJ.js → DomesticWireDetailScreen-Cv3GFhdJ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-evjZPqs_.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-DmAftQ4g.js";import{P_ as k,Q5 as W,gf as q,ge as Q,gd as L,js as J,N6 as K,rr as M,eW as V,Pw as D,jq as T,P$ as S,Q8 as j,jo as F,jL as G}from"./zeni-epic-state-vtQ66nN6.js";import{bz as X,Z as N,W as R,z as U,m as Z,p,U as v,B as _,bA as Y,o as z,bB as ee,q as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-evjZPqs_.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-DmAftQ4g.js";import{P_ as k,Q5 as W,gf as q,ge as Q,gd as L,js as J,N6 as K,rr as M,eW as V,Pw as D,jq as T,P$ as S,Q8 as j,jo as F,jL as G}from"./zeni-epic-state-vtQ66nN6.js";import{bz as X,Z as N,W as R,z as U,m as Z,p,U as v,B as _,bA as Y,o as z,bB as ee,q as te}from"./index-BsmcHa9A.js";import{n as O}from"./mui-PcDpEhsm.js";import"./sentry-CCZGmBkl.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]="be9600b2-28b7-4949-8a4a-60c9aacc5feb",e._sentryDebugIdIdentifier="sentry-dbid-be9600b2-28b7-4949-8a4a-60c9aacc5feb")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(Q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(W(n,a,o))}}})(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-evjZPqs_.js";import{Z as f,y as l,m as c}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-evjZPqs_.js";import{Z as f,y as l,m as c}from"./index-BsmcHa9A.js";import{D as p}from"./mui-PcDpEhsm.js";import"./sentry-CCZGmBkl.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]="9996a4f2-8bda-486e-9d31-afd7ccfdb1f8",e._sentryDebugIdIdentifier="sentry-dbid-9996a4f2-8bda-486e-9d31-afd7ccfdb1f8")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),s=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-evjZPqs_.js";import{a as d}from"./sentry-CCZGmBkl.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 W,p as _}from"./core-DmAftQ4g.js";import{Oe as z,eW as K,NC as M,lv as R,K7 as I,Oj as V,N5 as Y,kv as $,K8 as S,NH as H,NI as J,N7 as L,N6 as Q}from"./zeni-epic-state-vtQ66nN6.js";import{aV as U,c as X,p as Z,q as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{a as d}from"./sentry-CCZGmBkl.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 W,p as _}from"./core-DmAftQ4g.js";import{Oe as z,eW as K,NC as M,lv as R,K7 as I,Oj as V,N5 as Y,kv as $,K8 as S,NH as H,NI as J,N7 as L,N6 as Q}from"./zeni-epic-state-vtQ66nN6.js";import{aV as U,c as X,p as Z,q as tt}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{d as k}from"./decodeURIComponentSafe-C70tsXnj.js";import{w as et}from"./withTransactionSidePanel-C15NQsNY.js";import{f as at,c as nt}from"./routePaths-ieN8hn7m.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import"./TransactionDetailScreen-B7KMTXiT.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]="a036777d-bd32-4cdf-a93f-8baf12839a35",a._sentryDebugIdIdentifier="sentry-dbid-a036777d-bd32-4cdf-a93f-8baf12839a35")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=V(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,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(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();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(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:v,entityNameEncoded:N}=G(),r=k(v??""),p=k(N??""),f=rt(r,p),j=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>M(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(R(i)))},[m,f,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,x=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:x,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(O,{to:b(j.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(W,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-ChVJkArc.js → ExpenseAutomationRoutes-iUGrHrmT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-evjZPqs_.js";import oa from"./NotFoundScreen-
|
|
1
|
+
import{j as h}from"./liveblocks-evjZPqs_.js";import oa from"./NotFoundScreen-DmxmtGfC.js";import{a as o,b as Jt}from"./sentry-CCZGmBkl.js";import{n as Ue,S as sa}from"./mui-PcDpEhsm.js";import{u as pe,h as Yt,g as We,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-DmAftQ4g.js";import{eW as Re,S_ as la,oh as Ee,fW as ra,s2 as da,oz as Wt,oU as Ht,S$ as Kt,p2 as ua,T0 as Qt,os as ma,rA as pa,fG as Ie,T1 as De,u9 as Zt,Es as Xt,T2 as en,T3 as ha,r8 as He,Of as Pt,Oh as ga,ky as Ca,Oi as Sa,kF as fa,cZ as Ia,vl as Ke,oF as tn,p7 as Fe,ox as de,T4 as Ea,N7 as Rt,N6 as we,T5 as Dt,kW as ka,T6 as Ta,T7 as ya,T8 as ba,T9 as va,oM as Aa,pa as xe,Ta as wa,Tb as xa,Tc as Pa,ph as Ra,kJ as Da,kA as Fa,Td as Ua,kI as Ft,Op as Ba,Te as Oa,Tf as Va,r4 as _a,qI as za,p8 as me,qH as Ne,Tg as Ma,Th as ja,Ti as La,md as $a,bo as qa,m8 as Ut,lW as Ga,Tj as Na,fw as Bt,gv as Ja,m5 as Ya,xe as Wa,Tk as Ha,pI as Ka,pD as Qa,pH as Za,ps as Xa,Tl as eo,fJ as nn,oX as to,oI as no,fX as Ot,pc as ao,Tm as oo,Tn as so,p9 as an,To as co,Tp as io,Tq as lo,Tr as ro,Ts as Vt,rg as uo,qz as mo,N5 as po,Tt as ho,Tu as go,kH as Co,Tv as So,J8 as fo,kG as Io,kv as Eo,fI as ko,q5 as on,qr as To,p6 as _t,pb as yo,bE as bo,m2 as vo,l$ as Ao,Tw as wo,pr as zt,qn as Mt,ql as xo,Tx as Po,qa as Ro,pS as Do,qo as Fo,Ty as Uo,Tz as Bo,pW as Oo,TA as Vo,pN as _o,pV as zo,pT as Mo,qu as jo}from"./zeni-epic-state-vtQ66nN6.js";import{W as sn,U as X,c as q,q as ae,X as cn,_ as ln,cY as Lo,z as Be,cZ as $o,au as Pe,c_ as qo,aX as jt,B as rn,c$ as Go,ar as Je,O as No,a7 as Jo,d0 as Yo,a2 as Wo,d1 as Ho,V as Ko,d2 as Qo,d3 as Zo,v as Xo,I as es,aQ as ts,d4 as ns,d5 as as,bc as os,y as ss,aT as cs}from"./index-BsmcHa9A.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-B7KMTXiT.js";import{w as us}from"./withTransactionSidePanel-C15NQsNY.js";import{h as ms,v as ps}from"./routePaths-ieN8hn7m.js";import{g as Ye}from"./accountMappingHelper-CSvCSQoY.js";import{D as hs}from"./DrawerScreen-Dz_Ifi-A.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./decodeURIComponentSafe-C70tsXnj.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]="1593365f-de63-43d7-964e-e5ab336cb0ed",t._sentryDebugIdIdentifier="sentry-dbid-1593365f-de63-43d7-964e-e5ab336cb0ed")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=We(),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-evjZPqs_.js";import{a as r}from"./sentry-CCZGmBkl.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{a as r}from"./sentry-CCZGmBkl.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import c from"./NotFoundScreen-DmxmtGfC.js";import{h as u,g as b}from"./core-DmAftQ4g.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]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},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-CCZGmBkl.js";import{u as f,h as l,g as m}from"./core-DmAftQ4g.js";import{hr as p,Md as g,Me as b}from"./zeni-epic-state-vtQ66nN6.js";import{u as _,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-CCZGmBkl.js";import{u as f,h as l,g as m}from"./core-DmAftQ4g.js";import{hr as p,Md as g,Me as b}from"./zeni-epic-state-vtQ66nN6.js";import{u as _,L as h,z as y}from"./index-BsmcHa9A.js";import"./liveblocks-evjZPqs_.js";import"./recharts-CgEqsrFw.js";import"./mui-PcDpEhsm.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="ecfed5e1-955d-492b-bd39-551dfbc5f527",e._sentryDebugIdIdentifier="sentry-dbid-ecfed5e1-955d-492b-bd39-551dfbc5f527")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:u}=_(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,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 t}from"./liveblocks-evjZPqs_.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-DmAftQ4g.js";import{M6 as k,M7 as v,M8 as F,B9 as B,AX as T,M9 as A,Ma as oe,Mb as ie,A$ as se,fx as $,B6 as le,B3 as re}from"./zeni-epic-state-vtQ66nN6.js";import{Z as g,o as r,j as de,c as j,i as G,k as ce,p as me,r as pe,q as H,W as ue,U as he,s as xe,v as ge,m as fe,w as be,B as we,x as Se,D as ye,S as ke,H as ve,y as je,A as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-evjZPqs_.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-DmAftQ4g.js";import{M6 as k,M7 as v,M8 as F,B9 as B,AX as T,M9 as A,Ma as oe,Mb as ie,A$ as se,fx as $,B6 as le,B3 as re}from"./zeni-epic-state-vtQ66nN6.js";import{Z as g,o as r,j as de,c as j,i as G,k as ce,p as me,r as pe,q as H,W as ue,U as he,s as xe,v as ge,m as fe,w as be,B as we,x as Se,D as ye,S as ke,H as ve,y as je,A as $e}from"./index-BsmcHa9A.js";import{n as m}from"./mui-PcDpEhsm.js";import f from"./NotFoundScreen-DmxmtGfC.js";import{a as I}from"./sentry-CCZGmBkl.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="cd6936ec-5fb6-48b9-bf57-8085de64907b",e._sentryDebugIdIdentifier="sentry-dbid-cd6936ec-5fb6-48b9-bf57-8085de64907b")}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-evjZPqs_.js";import{a as g}from"./sentry-CCZGmBkl.js";import{u as j,g as O,h as _,t as w,j as l,N as T}from"./core-DmAftQ4g.js";import{z as r,m as P,O as V,d as A,c as N,e as W,F as R,D as X,g as Z}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-evjZPqs_.js";import{a as g}from"./sentry-CCZGmBkl.js";import{u as j,g as O,h as _,t as w,j as l,N as T}from"./core-DmAftQ4g.js";import{z as r,m as P,O as V,d as A,c as N,e as W,F as R,D as X,g as Z}from"./index-BsmcHa9A.js";import{eW as $,LT as q,M1 as B,LU as G,fx as H,f_ as J,LZ as K,gm as Q,cX as Y,M2 as ee,M3 as te}from"./zeni-epic-state-vtQ66nN6.js";import{n as ne}from"./mui-PcDpEhsm.js";import{u as ae}from"./useDeviceId-DGJPBja9.js";import{f as se}from"./analyticsHelper-MomIUc09.js";import{t as ie}from"./getLocaleForTenant-DBZLLRpQ.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="d0d5a8a8-03b3-4195-bae5-abe71323d401",t._sentryDebugIdIdentifier="sentry-dbid-d0d5a8a8-03b3-4195-bae5-abe71323d401")}catch{}})();const x=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function xe(){const t=j(),s=O(),f=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,a?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),a.zeniSessionId),H(a.userId,a.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=Z();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Y(o.productSettings))},2e3))},[I,S,y,a,o,b,v,s.state,t]);const F=g.useCallback(()=>{f("/signin/auth")},[f]),M=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),U=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:D,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:M,onVerifyOtp:U,onCancelVerifyDevice:F});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!x(n,p)||m==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(X,{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-evjZPqs_.js";import{a as c}from"./sentry-CCZGmBkl.js";import{u as me,j as n,i as qe,g as Ke,h as Qe,l as G}from"./core-DmAftQ4g.js";import{eW as be,fC as Je,fD as pe,fo as Xe,bn as ea,eV as aa,fE as ta,fF as na,fH as sa,fK as oa,fT as ia,fL as g,fN as ra,fO as le,fR as da,fP as la,fQ as ca,fS as ua,cN as fa,fV as ma,cS as ba,fn as pa,f_ as ha,f$ as Sa,fZ as ga}from"./zeni-epic-state-vtQ66nN6.js";import{a7 as Ea,a8 as Ca,v as ka,W as ya,z as C,w as Ia,u as Ta,U as r,a9 as wa,n as _a,aa as Aa,I as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ga,ag as Ma,ah as fe,c as M,$ as Ra,q as _,ai as R,aj as Na}from"./index-
|
|
1
|
+
import{j as N}from"./liveblocks-evjZPqs_.js";import{a as c}from"./sentry-CCZGmBkl.js";import{u as me,j as n,i as qe,g as Ke,h as Qe,l as G}from"./core-DmAftQ4g.js";import{eW as be,fC as Je,fD as pe,fo as Xe,bn as ea,eV as aa,fE as ta,fF as na,fH as sa,fK as oa,fT as ia,fL as g,fN as ra,fO as le,fR as da,fP as la,fQ as ca,fS as ua,cN as fa,fV as ma,cS as ba,fn as pa,f_ as ha,f$ as Sa,fZ as ga}from"./zeni-epic-state-vtQ66nN6.js";import{a7 as Ea,a8 as Ca,v as ka,W as ya,z as C,w as Ia,u as Ta,U as r,a9 as wa,n as _a,aa as Aa,I as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ga,ag as Ma,ah as fe,c as M,$ as Ra,q as _,ai as R,aj as Na}from"./index-BsmcHa9A.js";import{D as Va}from"./mui-PcDpEhsm.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]="decc3649-bac9-4e3c-b5e0-5171b495fe91",f._sentryDebugIdIdentifier="sentry-dbid-decc3649-bac9-4e3c-b5e0-5171b495fe91")}catch{}})();const Ua=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=qe(),a=Ke(),k=ka(),o=Qe(),V=Xe(),m=me(),{useFeatureGate:i}=ya(),U=C.getSignedInUser(),P=ea(U),s=n(e=>be(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),L=O.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[A,j]=c.useState(void 0),F=G("/:tenantEmailDomain/dashboard")!==null,z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:W}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,W),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),Y=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=C.getSignedInUser(),v=n(e=>e.tenantState),ke=n(e=>v.fetchState==="Completed"?oa(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),Z=_a(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=P||!P&&$e,xe=s.company!=null&&ia(s.company),w=ve&&xe,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:J,isFetchingMore:X,hasFetchedAll:ee,fetchMore:Ne}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(J===!1&&X===!1&&ee===!0)if(s?.companyId!=null&&Q!=null){const e=`dashboard_${s.companyId}`;j(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[J,X,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:A},"comments")))},[A,$.fetchState]);const Ve={fetchStatus:Me,count:Ge},ae=t!=null?C.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Z===!1&&S.push("expense_automation_card");const Ue=Fa(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),Pe=F&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!F&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),Le=fa(Oe),je=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Y.fetchState==="Completed"&&ma(Y.notificationSettings,h.userEmail,W,s),oe=Da(),He=oe&&va(a),ie=ba(Ue?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!C.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[We,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const Ye=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ze=Ba(Ye);return N.jsx(Va,{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(xa,{signedInUser:U,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?ke:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:Pe,isSettings:ue(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:H,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:Ze,isTreasuryPopupVisible:We,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:Z,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=q===0&&K>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=q===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(M.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),!he)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&M.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 x=Na(e.type);fe(e.type)?(L!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{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=>{Se(Ga.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let b=`/${encodeURIComponent(u)}/`;const x=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":fe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{C.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{k.toggle()},isAiCfo:He,aiCfoView:O,isOnDashboard:F,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Wa=f=>{const d=me(),t=n(k=>be(k)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,o)=>{Ca(o)&&Je(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Ua,{...f,...a})};export{Wa as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-evjZPqs_.js";import{h as r,n}from"./core-DmAftQ4g.js";import{M as i}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-evjZPqs_.js";import{h as r,n}from"./core-DmAftQ4g.js";import{M as i}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import"./sentry-CCZGmBkl.js";import"./zeni-epic-state-vtQ66nN6.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="59e35ec1-38d4-48f4-8af2-c43da8d96945",o._sentryDebugIdIdentifier="sentry-dbid-59e35ec1-38d4-48f4-8af2-c43da8d96945")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-evjZPqs_.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-evjZPqs_.js";import lt from"./NotFoundScreen-DmxmtGfC.js";import{a as k}from"./sentry-CCZGmBkl.js";import{h as ft,g as ut,i as ht,u as pt,j as g,n as kt,o as St,p as Y}from"./core-DmAftQ4g.js";import{cu as gt,fE as J,eW as O,fS as bt,fL as b,SV as K,fO as d,fD as y,sm as M,xR as It,SW as Ct,fC as Tt,fV as yt,sr as _t,SX as $,bo as F,fw as w,sv as H,SY as Et,cG as At,cz as Nt}from"./zeni-epic-state-vtQ66nN6.js";import{X as xt,z as Bt,W as wt,U as Rt,_ as Dt,cV as Ut,q as N,a7 as vt,cW as Gt,a8 as Pt,p as $t}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="0a40ef1b-aaf0-464a-8860-56ae5755d807",t._sentryDebugIdIdentifier="sentry-dbid-0a40ef1b-aaf0-464a-8860-56ae5755d807")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const S=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(S).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:S}=l,i=b(t),s=O(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,S,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:S,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(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(S)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(S)&&(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(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(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(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t($([r],F())))})).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($(s,F())),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=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:S}=xt(),i=gt(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=g(e=>J(e)),o=g(e=>O(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Q=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=g(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=g(e=>b(e).currentTab),D=g(e=>b(e).currentSubTab),Z=g(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=g(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=g(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=g(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:W,isLoading:q,fetchMore:z,isFetchingMore:L,hasFetchedAll:X}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.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"&&S&&s(M("task_manager","dashboard",["read","unread"]))},[S]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||v===!0||C!==!0||_||v===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),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&&q===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||X===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,v,L,C,X,q,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 E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s(M("task_manager",T,E,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(St,{children:[A.jsx(Y,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(Y,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-evjZPqs_.js";import{a as r}from"./sentry-CCZGmBkl.js";import{u as T,g as j,j as o,N as A}from"./core-DmAftQ4g.js";import{Mg as C,eW as P,fK as x,Mh as z,Mi as D,Mj as L,Mk as R,o7 as k,Ld as N}from"./zeni-epic-state-vtQ66nN6.js";import{z as h,G as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-evjZPqs_.js";import{a as r}from"./sentry-CCZGmBkl.js";import{u as T,g as j,j as o,N as A}from"./core-DmAftQ4g.js";import{Mg as C,eW as P,fK as x,Mh as z,Mi as D,Mj as L,Mk as R,o7 as k,Ld as N}from"./zeni-epic-state-vtQ66nN6.js";import{z as h,G as I}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="030f1ff5-f95d-4cd3-8cee-679acfd5f960",n._sentryDebugIdIdentifier="sentry-dbid-030f1ff5-f95d-4cd3-8cee-679acfd5f960")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),v=o(D),c=o(L),[S,E]=r.useState(null),[b,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[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(k(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);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]),u=S??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:E,approveError:b??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-DfEV7guz.js → PandLWithForecastRoutes-COEiLMeU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-evjZPqs_.js";import{h as z,u as J,g as K,i as X,j as d,n as Z,o as H,p as I}from"./core-DmAftQ4g.js";import{eW as U,sa as P,rK as Q,MN as M,rF as S,bs as ee,bn as ae,bY as te,rG as se,MO as oe,MA as C,dJ as re,vO as ne,MP as ie,w9 as ce,fB as le,fz as de}from"./zeni-epic-state-vtQ66nN6.js";import{z as me,X as fe,_ as pe,I as ue,W as v,U as w,x as he,c as $,ao as be,q as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-evjZPqs_.js";import{h as z,u as J,g as K,i as X,j as d,n as Z,o as H,p as I}from"./core-DmAftQ4g.js";import{eW as U,sa as P,rK as Q,MN as M,rF as S,bs as ee,bn as ae,bY as te,rG as se,MO as oe,MA as C,dJ as re,vO as ne,MP as ie,w9 as ce,fB as le,fz as de}from"./zeni-epic-state-vtQ66nN6.js";import{z as me,X as fe,_ as pe,I as ue,W as v,U as w,x as he,c as $,ao as be,q as Fe}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import ge from"./NotFoundScreen-DmxmtGfC.js";import{F as Ie}from"./FeaturePreviewScreen-CdQFs282.js";import{a as b}from"./sentry-CCZGmBkl.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import{u as Se}from"./useInitialThreadRequest-Dr9FuJUY.js";import{t as Te}from"./routePaths-ieN8hn7m.js";import{M as ye}from"./MobileAppDrawer-cGG4tefr.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="fdf230db-0987-40a7-b0ca-a8e7079db18b",s._sentryDebugIdIdentifier="sentry-dbid-fdf230db-0987-40a7-b0ca-a8e7079db18b")}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=Z(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(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("../../")}}})(be);function R(){const s=z(),e=J(),a=K(),{forecastId:o,tenantEmailDomain:r}=X(),[i,p]=b.useState(!1),[m,u]=b.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),N=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:W}=Ce({mobileExploreReferrer:"Forecast"});b.useEffect(()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,O)=>L!=null?f.forecasts.findIndex(g=>g.id===L):O!=null?f.forecasts.findIndex(g=>g.id===O):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(M(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(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=v(),{isFeatureEnabled:j}=q(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[V,Y]=b.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:N,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:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(i=>U(i)),{useFeatureGate:e}=v(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(H,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(ge,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-evjZPqs_.js";import{MJ as te,eW as X,kv as K,fB as q,fz as ne,Kb as Q,Mn as oe,uM as Ee,MK as N,uB as ke,uV as Ie,uP as ie,uF as re,uT as Pe,uQ as je,ML as le,wA as Le,fl as Te,gc as ve,MM as $,uJ as de,uI as ce,uY as Fe,c6 as Ae}from"./zeni-epic-state-vtQ66nN6.js";import{Z as pe,W as Y,U as E,z as W,a9 as ue,C as me,ak as ge,al as Oe,y as he,o as O,E as fe,O as Ce,am as Re,X as Ve,_ as Ue,x as Be,c as be,e as Ze,q as Me,an as $e,I as _e}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{MJ as te,eW as X,kv as K,fB as q,fz as ne,Kb as Q,Mn as oe,uM as Ee,MK as N,uB as ke,uV as Ie,uP as ie,uF as re,uT as Pe,uQ as je,ML as le,wA as Le,fl as Te,gc as ve,MM as $,uJ as de,uI as ce,uY as Fe,c6 as Ae}from"./zeni-epic-state-vtQ66nN6.js";import{Z as pe,W as Y,U as E,z as W,a9 as ue,C as me,ak as ge,al as Oe,y as he,o as O,E as fe,O as Ce,am as Re,X as Ve,_ as Ue,x as Be,c as be,e as Ze,q as Me,an as $e,I as _e}from"./index-BsmcHa9A.js";import{D as ye,n as H,S as we}from"./mui-PcDpEhsm.js";import ae from"./NotFoundScreen-DmxmtGfC.js";import{a as r}from"./sentry-CCZGmBkl.js";import{u as ee,i as ze,j as m,h as Ke,g as We,n as He,o as se,p as M}from"./core-DmAftQ4g.js";import{u as Ge}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import{M as Je}from"./MobileAppDrawer-cGG4tefr.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="dde75b9f-e99c-4cba-a707-9c29914bc9c7",a._sentryDebugIdIdentifier="sentry-dbid-dde75b9f-e99c-4cba-a707-9c29914bc9c7")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>K(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),T=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Oe,{...b})]})})},qe=H(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-evjZPqs_.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import E from"./NotFoundScreen-DmxmtGfC.js";import{a as r}from"./sentry-CCZGmBkl.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-DmAftQ4g.js";import{eW as B,SZ as b,bq as F,bn as N,ic as V,fw as q}from"./zeni-epic-state-vtQ66nN6.js";import{v as W,z as I,_ as X,cX as Z}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{u as $}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import{M as G}from"./MobileAppDrawer-cGG4tefr.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.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]="7245dc51-ddf2-4516-92bc-767823167f44",e._sentryDebugIdIdentifier="sentry-dbid-7245dc51-ddf2-4516-92bc-767823167f44")}catch{}})();const H=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Z),J=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(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=F(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}=$({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-evjZPqs_.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CCZGmBkl.js";import{L as dt,bY as Tc,eW as Ac,LT as Rc,Ml as kl,c6 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-vtQ66nN6.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--mWNe9J7.js";import{r as un}from"./empty-CDCfsLV4.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CU5FhbnZ.js";import{r as Gl}from"./index-EyTFjAAZ.js";import{r as zl}from"./index-DniSRtks.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DmAftQ4g.js";import{u as Kl,z as Pc,L as Wl,J as Jl,K as Xl,i as Ql,c as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-evjZPqs_.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CCZGmBkl.js";import{L as dt,bY as Tc,eW as Ac,LT as Rc,Ml as kl,c6 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-vtQ66nN6.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--mWNe9J7.js";import{r as un}from"./empty-CDCfsLV4.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CU5FhbnZ.js";import{r as Gl}from"./index-EyTFjAAZ.js";import{r as zl}from"./index-DniSRtks.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DmAftQ4g.js";import{u as Kl,z as Pc,L as Wl,J as Jl,K as Xl,i as Ql,c as tf}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{d as Pe}from"./decodeURIComponentSafe-C70tsXnj.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]="10fdb429-6ec2-4132-b97f-61cdd49a9b5b",t._sentryDebugIdIdentifier="sentry-dbid-10fdb429-6ec2-4132-b97f-61cdd49a9b5b")}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-evjZPqs_.js";import{a as o}from"./sentry-CCZGmBkl.js";import{j as f,h as L,u as _,g as F,n as V}from"./core-DmAftQ4g.js";import{m as W,Z as z,z as P,be as M,y as N,X as U,_ as $,x as X,c as l,e as q,a7 as Z,bf as G}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{a as o}from"./sentry-CCZGmBkl.js";import{j as f,h as L,u as _,g as F,n as V}from"./core-DmAftQ4g.js";import{m as W,Z as z,z as P,be as M,y as N,X as U,_ as $,x as X,c as l,e as q,a7 as Z,bf as G}from"./index-BsmcHa9A.js";import{fF as J,eW as K,Pj as R,Pk as Q,vE as Y,vu as g,fH as ee,bS as ae,vz as re,Pl as ne}from"./zeni-epic-state-vtQ66nN6.js";import{D as te,e as se,n as oe,S as ie}from"./mui-PcDpEhsm.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-5Ek-t3F9.js";import{M as ce}from"./MobileAppDrawer-cGG4tefr.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]="9c11f605-c27a-4a80-b676-bd08165c1fdf",e._sentryDebugIdIdentifier="sentry-dbid-9c11f605-c27a-4a80-b676-bd08165c1fdf")}catch{}})();const de={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=z();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>J(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(M,{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-evjZPqs_.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-evjZPqs_.js";import _ from"./NotFoundScreen-DmxmtGfC.js";import{a as p}from"./sentry-CCZGmBkl.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as F,p as b}from"./core-DmAftQ4g.js";import{eW as I,Qd as S,Qt as g,FA as V,EJ as U,Fz as d,Fq as B,QH as L,FC as O}from"./zeni-epic-state-vtQ66nN6.js";import{z as N,a7 as T,bZ as Q,af as $,bC as z,b_ as q}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.js";import{u as H,R as A}from"./ReimbursementApprovalRuleDetailScreen-DSLe2MhL.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]="8de84aec-aa26-4801-86e1-bf9c6019223a",e._sentryDebugIdIdentifier="sentry-dbid-8de84aec-aa26-4801-86e1-bf9c6019223a")}catch{}})();const y="reimbursement-approval-rule-update",J=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:g(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{$(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"))}}})(T(Q)),K=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>S(a)),v=u(a=>g(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||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,W,R)=>{a.endsWith(y)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(J,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",Z=k(function(e){const o=S(e),s=g(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:()=>{$(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(O(t,!0))}}})(T(q)),G=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(K,{isLoading:s})},M=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>S(a));H();const v=u(a=>g(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||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,W,R)=>{a.endsWith(j)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Z,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(F,{children:[r.jsx(b,{path:"/",element:r.jsx(G,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as b}from"./liveblocks-evjZPqs_.js";import{a as f}from"./sentry-CCZGmBkl.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-DmAftQ4g.js";import{kX as L,Qt as w,Qd as C,Ft as V,FF as B,FA as A,FB as E,Qu as j,eW as z,Fz as W}from"./zeni-epic-state-vtQ66nN6.js";import{z as P,m as N,B as Q,bP as K,af as $,bC as X,bQ as G}from"./index-
|
|
1
|
+
import{j as b}from"./liveblocks-evjZPqs_.js";import{a as f}from"./sentry-CCZGmBkl.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-DmAftQ4g.js";import{kX as L,Qt as w,Qd as C,Ft as V,FF as B,FA as A,FB as E,Qu as j,eW as z,Fz as W}from"./zeni-epic-state-vtQ66nN6.js";import{z as P,m as N,B as Q,bP as K,af as $,bC as X,bQ as G}from"./index-BsmcHa9A.js";import"./mui-PcDpEhsm.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]="f508ecbd-bc24-41e4-8e12-23eb16b10570",e._sentryDebugIdIdentifier="sentry-dbid-f508ecbd-bc24-41e4-8e12-23eb16b10570")}catch{}})();function H(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const J=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach(u=>{const I=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),R=u.actors.selectedNonUsers.map(m=>{const y=(S=m.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=I.concat(R);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),h},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 M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>C(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"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(y=>{const S=y.actorKind?.selectedOption,U=y.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=h?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(G);function ne(){const e=g(t=>z(t)),{isApprovalRulesV3Enabled:s}=X(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(M,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>C(n)),[a,d]=f.useState(!1);if(H(),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"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
|