@zeniai/web-app-ui 5.1.51-dev → 5.1.51-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-Ce-3Jhw7.js → AddressRoutes-gPXkxz7s.js} +1 -1
- package/dist/assets/{AddressScreen-BUUFD2sw.js → AddressScreen-DHENiPsE.js} +1 -1
- package/dist/assets/{AiCfoScreen-BNnlPT55.js → AiCfoScreen-BDeqJ8PX.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CInNrMhS.js → BillPayApprovalRoutes-re8xxMBE.js} +1 -1
- package/dist/assets/{BillPayRoutes-DRVXy7kE.js → BillPayRoutes-BKu8tYXF.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Cz8yHsjg.js → BusinessVerificationPageScreen-7ydI8UR9.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-CaiLWTLU.js → CardsAiCfoScreen-QyowC-mN.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BneUma9C.js → ChargeCardRoutes-BbZEL-b5.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DWoq6mXR.js → CompanyPassportScreen-AZhDXSZE.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CT8-mjmO.js → ConnectionAuthScreen-DDij7-L5.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-Bvb-H6kB.js → CustomerOnboardingAuthScreen-DO3NyaR6.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-evT_peP3.js → CustomerOnboardingRoutes-COHKYeEq.js} +1 -1
- package/dist/assets/{DashboardRoutes-BWyE-0Hc.js → DashboardRoutes-B1cE2wJc.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DHX37VDX.js → DefaultTenantHome-DivCz85L.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CiuugoEE.js → DomesticWireDetailScreen-Bx2DINVR.js} +1 -1
- package/dist/assets/{DrawerScreen-DzI09EaZ.js → DrawerScreen-BtLrlXnn.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-C5vKBtdx.js → EntityDetailRoutes-CTo7No6n.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-QRseaMBK.js → ExpenseAutomationRoutes-pmgLYKV-.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-LQn2_3HO.js → FeaturePreviewScreen-9NvuDbvP.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BeylWL-h.js → HubSpotOAuthCallbackScreen-BrjX8V0E.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BSczbLrK.js → MagicLinkRoutes-Dn4g326h.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Dd8yoUFv.js → MagicLinkSignInScreen-CTkVv0M2.js} +1 -1
- package/dist/assets/{MobileAppDrawer-Dos6aPiF.js → MobileAppDrawer-CjoW3Rax.js} +1 -1
- package/dist/assets/{NotFoundScreen-DhKhgQXf.js → NotFoundScreen-FcrdBNP0.js} +1 -1
- package/dist/assets/{NotificationRoutes-Di4tIjQV.js → NotificationRoutes-DE-Z8DSv.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BAC_yIQg.js → OAuthConsentScreen-Swpq9wju.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-C8hCBik3.js → PandLWithForecastRoutes-C3Yczwgv.js} +1 -1
- package/dist/assets/{PeopleRoutes-9gxadS-C.js → PeopleRoutes-ZidIbEdd.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CATOeT7z.js → PerformanceRoutes-VzYGFOXy.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D9SI3hOs.js → QBOConnectionScreen-B8QVReQm.js} +1 -1
- package/dist/assets/{ReferralListScreen-CYFKfVX3.js → ReferralListScreen-Cnd7u4T9.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BzPo26FL.js → ReimbursementApprovalRoutes-DOhkjING.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Dq4iE7Qu.js → ReimbursementApprovalRuleDetailScreen-BgYFphfr.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DQ5VSfjH.js → ReimbursementRoutes-BeD0lwna.js} +1 -1
- package/dist/assets/{ReportsRoutes-Bx4klC09.js → ReportsRoutes-CPI-jy1F.js} +1 -1
- package/dist/assets/{RewardsRoutes-Cd5tFxOd.js → RewardsRoutes-Vdol6ACr.js} +1 -1
- package/dist/assets/{ScreenRoutes-BRlfVBVN.js → ScreenRoutes-B24ySlpK.js} +2 -2
- package/dist/assets/{SettingsRoutes-Cl1dDHc6.js → SettingsRoutes-D7qVKl5_.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CV2uB6tM.js → SetupPagesScreen-DtddTp_T.js} +1 -1
- package/dist/assets/{SignInScreen-BovmFV_F.js → SignInScreen-u3NwSgsj.js} +1 -1
- package/dist/assets/{SignOutScreen-BG35SYwp.js → SignOutScreen-Djs9TXWR.js} +1 -1
- package/dist/assets/{TaskListScreen-D3R7s1AA.js → TaskListScreen-DMgU1v4z.js} +1 -1
- package/dist/assets/{TaskRoutes-B4YKOfNB.js → TaskRoutes-Cmtr7KFm.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DYnfzuyZ.js → TransactionDetailRoutes-CjrDVjtT.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DCUgWZCw.js → TransactionDetailScreen-ABqf1zzA.js} +1 -1
- package/dist/assets/{TransactionListRoutes-D69NliNs.js → TransactionListRoutes-uZihQK3F.js} +1 -1
- package/dist/assets/{TreasuryRoutes-D9fs3Ecf.js → TreasuryRoutes-ZtY_hGM6.js} +1 -1
- package/dist/assets/{VendorsRoutes-B5vPHlE6.js → VendorsRoutes-DcUkIEvd.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BXGKMLxP.js → WiseConfirmationScreen-DYcjQlfc.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-FlMIOWJK.js → ZeniAccountRoutes-Cbm2k-08.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BM5LaChl.js → ZeniAccountStatementScreen-Ciuw5n7i.js} +1 -1
- package/dist/assets/{analyticsHelper-DvY5NpaM.js → analyticsHelper-CvGdvadP.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Cwvzl8db.js → getLocaleForTenant-CAvD8CfA.js} +1 -1
- package/dist/assets/{index-CKi6vsOO.js → index-W83PhAZh.js} +5 -5
- package/dist/assets/{routePaths-DnD95y3h.js → routePaths-stnXzrYV.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CjSpjUTS.js → useAiCfoDashboardSuggestedQuestionsChips-CKfyn0VP.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-vLqybwHr.js → useAskAiCfoHostNavButtonProps-DAlpTVgV.js} +1 -1
- package/dist/assets/{useCashManagementBanner-CrBaeOUK.js → useCashManagementBanner-D8slgHwh.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BqamPVgS.js → useInitialThreadRequest-BDAn-AM4.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Ak3Soyd6.js → withTransactionSidePanel-B9fglQqM.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-DvKPzrwo.js";import{a as u}from"./sentry-Be8twC83.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CQnSJ9vO.js";import{Lw as N,eW as _,fE as U,Lx as k,o5 as R,Ly as z}from"./zeni-epic-state-DKeO4Z0C.js";import{u as j,z as f,L as E,t as I,D as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-DvKPzrwo.js";import{a as u}from"./sentry-Be8twC83.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CQnSJ9vO.js";import{Lw as N,eW as _,fE as U,Lx as k,o5 as R,Ly as z}from"./zeni-epic-state-DKeO4Z0C.js";import{u as j,z as f,L as E,t as I,D as O,b as $}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{t as P}from"./getLocaleForTenant-CAvD8CfA.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="a9170a69-e734-456e-a827-61972c723514",t._sentryDebugIdIdentifier="sentry-dbid-a9170a69-e734-456e-a827-61972c723514")}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=T(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=T(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>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(E.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(E.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.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 T(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-CiuugoEE.js → DomesticWireDetailScreen-Bx2DINVR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-DvKPzrwo.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-CQnSJ9vO.js";import{Pw as k,PD as W,gg as q,gf as K,ge as M,jp as J,MF as L,rp as Q,eW as D,P2 as V,jn as F,Px as S,PG as T,jl as j,jI as G}from"./zeni-epic-state-DKeO4Z0C.js";import{bw as X,K as R,H as N,z as U,m as H,q as p,x as v,B as O,bx as Y,o as Z,by as ee,r as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-DvKPzrwo.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-CQnSJ9vO.js";import{Pw as k,PD as W,gg as q,gf as K,ge as M,jp as J,MF as L,rp as Q,eW as D,P2 as V,jn as F,Px as S,PG as T,jl as j,jI as G}from"./zeni-epic-state-DKeO4Z0C.js";import{bw as X,K as R,H as N,z as U,m as H,q as p,x as v,B as O,bx as Y,o as Z,by as ee,r as te}from"./index-W83PhAZh.js";import{n as z}from"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.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]="1390f7df-5dd4-40fd-abfa-f75350dcf33a",e._sentryDebugIdIdentifier="sentry-dbid-1390f7df-5dd4-40fd-abfa-f75350dcf33a")}catch{}})();const ne=P(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(M(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(W(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-DvKPzrwo.js";import{K as f,A as l,m as c}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-DvKPzrwo.js";import{K as f,A as l,m as c}from"./index-W83PhAZh.js";import{D as b}from"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.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]="ef5ccb0f-9763-4b28-922a-eb2f69741127",e._sentryDebugIdIdentifier="sentry-dbid-ef5ccb0f-9763-4b28-922a-eb2f69741127")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=c();return d.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as d}from"./sentry-Be8twC83.js";import{h as A,u as B,g as G,i as q,j as l,N as M,n as F,o as O,p as R}from"./core-CQnSJ9vO.js";import{NM as _,eW as W,N9 as J,ls as Y,JO as k,NR as $,ME as z,ks as V,JP as S,Ne as H,Nf as K,MG as L,MF as Q}from"./zeni-epic-state-DKeO4Z0C.js";import{aS as U,c as X,q as Z,r as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as d}from"./sentry-Be8twC83.js";import{h as A,u as B,g as G,i as q,j as l,N as M,n as F,o as O,p as R}from"./core-CQnSJ9vO.js";import{NM as _,eW as W,N9 as J,ls as Y,JO as k,NR as $,ME as z,ks as V,JP as S,Ne as H,Nf as K,MG as L,MF as Q}from"./zeni-epic-state-DKeO4Z0C.js";import{aS as U,c as X,q as Z,r as tt}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{d as b}from"./decodeURIComponentSafe-BprI0TcI.js";import{w as et}from"./withTransactionSidePanel-B9fglQqM.js";import{f as at,c as nt}from"./routePaths-stnXzrYV.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import"./TransactionDetailScreen-ABqf1zzA.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]="a7e2a1be-f4fc-4eb1-8eb3-f72383835743",a._sentryDebugIdIdentifier="sentry-dbid-a7e2a1be-f4fc-4eb1-8eb3-f72383835743")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(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(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=b(x??""),f=b(j??""),p=rt(r,f),v=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>W(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>J(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(Y(i)))},[m,p,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,N=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(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:N,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(M,{to:I(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(R,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-QRseaMBK.js → ExpenseAutomationRoutes-pmgLYKV-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-DvKPzrwo.js";import oa from"./NotFoundScreen-
|
|
1
|
+
import{j as h}from"./liveblocks-DvKPzrwo.js";import oa from"./NotFoundScreen-FcrdBNP0.js";import{a as o,b as Jt}from"./sentry-Be8twC83.js";import{n as Ue,S as sa}from"./mui-sKCdI-e6.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-CQnSJ9vO.js";import{eW as Re,Sz as la,of as Ee,fz as ra,s0 as da,ox as Kt,oS as Qt,SA as Ht,p0 as ua,SB as Wt,oq as ma,ry as pa,fj as Ie,SC as De,t_ as Zt,E7 as Xt,SD as en,SE as ha,r6 as Qe,NN as Pt,NP as Sa,kv as ga,NQ as Ca,kC as fa,c_ as Ia,va as He,oD as tn,p5 as Fe,ov as re,SF as Ea,MG as Rt,MF as we,SG as Dt,kT as ka,SH as ya,SI as ba,SJ as Ta,SK as va,oK as Aa,p8 as xe,SL as wa,SM as xa,SN as Pa,pf as Ra,kG as Da,kx as Fa,SO as Ua,kF as Ft,NX as Ba,SP as _a,SQ as Va,r2 as Oa,qG as za,p6 as me,qF as Ne,SR as Ma,SS as ja,ST as La,ma as $a,bq as qa,m5 as Ut,lT as Ga,SU as Na,f9 as Bt,gw as Ja,m2 as Ya,x3 as Ka,SV as Qa,pG as Ha,pB as Wa,pF as Za,pq as Xa,SW as eo,fm as nn,oV as to,oG as no,fA as _t,pa as ao,SX as oo,SY as so,p7 as an,SZ as co,S_ as io,S$ as lo,T0 as ro,T1 as Vt,re as uo,qx as mo,ME as po,T2 as ho,T3 as So,kE as go,T4 as Co,IP as fo,kD as Io,ks as Eo,fl as ko,q3 as on,qp as yo,p4 as Ot,p9 as bo,bE as To,l$ as vo,lY as Ao,T5 as wo,pp as zt,ql as Mt,qj as xo,T6 as Po,q8 as Ro,pQ as Do,qm as Fo,T7 as Uo,T8 as Bo,pU as _o,T9 as Vo,pL as Oo,pT as zo,pR as Mo,qs as jo}from"./zeni-epic-state-DKeO4Z0C.js";import{H as sn,x as X,c as q,r as ne,Y as cn,_ as ln,cX as Lo,z as Be,cY as $o,at as Pe,cZ as qo,aU as jt,B as rn,c_ as Go,aq as Je,D as No,a7 as Jo,c$ as Yo,a2 as Ko,d0 as Qo,X as Ho,d1 as Wo,d2 as Zo,W as Xo,j as es,aN as ts,d3 as ns,d4 as as,b9 as os,A as ss,aQ as cs}from"./index-W83PhAZh.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-ABqf1zzA.js";import{w as us}from"./withTransactionSidePanel-B9fglQqM.js";import{h as ms,v as ps}from"./routePaths-stnXzrYV.js";import{g as Ye}from"./accountMappingHelper-DDqSB3xQ.js";import{D as hs}from"./DrawerScreen-BtLrlXnn.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./decodeURIComponentSafe-BprI0TcI.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]="f6b45a56-81c0-4eb0-b5af-8372c3f4ed86",t._sentryDebugIdIdentifier="sentry-dbid-f6b45a56-81c0-4eb0-b5af-8372c3f4ed86")}catch{}})();const Ss=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:C}=T(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(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]),S=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(S.month,S.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(S,f.tenantId,!0)},[k,S,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ne(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&S!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,S]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{S!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(S,f.tenantId)},[k,S,s.fetchState,f.tenantId,y]),o.useEffect(()=>{S!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(da(S))},[S,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),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(gs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:C,onMonthEndCheckClick:d=>{l(`./${d}/${S.month}-${S.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})})},gs=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{a3 as i,a4 as l,a5 as p,q as f}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{a3 as i,a4 as l,a5 as p,q as f}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import m from"./NotFoundScreen-FcrdBNP0.js";import{h as u,g as b}from"./core-CQnSJ9vO.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]="76cf16b7-b9dc-4e1e-8437-479ed67c5ac2",e._sentryDebugIdIdentifier="sentry-dbid-76cf16b7-b9dc-4e1e-8437-479ed67c5ac2")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),c=r.useCallback(()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:c}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./sentry-Be8twC83.js";import{u,h as l,g as m}from"./core-CQnSJ9vO.js";import{ho as p,LU as g,LV as _}from"./zeni-epic-state-DKeO4Z0C.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as o}from"./sentry-Be8twC83.js";import{u,h as l,g as m}from"./core-CQnSJ9vO.js";import{ho as p,LU as g,LV as _}from"./zeni-epic-state-DKeO4Z0C.js";import{u as b,L as h,z as y}from"./index-W83PhAZh.js";import"./liveblocks-DvKPzrwo.js";import"./recharts-Cv5d-Vxs.js";import"./mui-sKCdI-e6.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="28929437-ef53-4c9d-aefa-6dcb5e18dfff",e._sentryDebugIdIdentifier="sentry-dbid-28929437-ef53-4c9d-aefa-6dcb5e18dfff")}catch{}})();function j(){const e=u(),n=l(),r=m(),{setLoading:i,clearAllLoading:c}=b(),s=o.useRef(!1);return o.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),o.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.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"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const f=y.getActiveTenantForUser();n(f?.tenantEmailDomain!=null?`/${f.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{j as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-CQnSJ9vO.js";import{LN as k,LO as v,LP as T,A_ as A,AM as M,LQ as B,LR as oe,LS as se,AQ as ie,fa as $,AX as le,AU as re}from"./zeni-epic-state-DKeO4Z0C.js";import{K as g,o as r,I as de,c as j,h as G,p as ce,q as me,T as pe,r as H,H as ue,x as he,s as xe,W as ge,m as fe,v as we,B as be,w as Se,M as ye,S as ke,y as ve,A as je,E as $e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-CQnSJ9vO.js";import{LN as k,LO as v,LP as T,A_ as A,AM as M,LQ as B,LR as oe,LS as se,AQ as ie,fa as $,AX as le,AU as re}from"./zeni-epic-state-DKeO4Z0C.js";import{K as g,o as r,I as de,c as j,h as G,p as ce,q as me,T as pe,r as H,H as ue,x as he,s as xe,W as ge,m as fe,v as we,B as be,w as Se,M as ye,S as ke,y as ve,A as je,E as $e}from"./index-W83PhAZh.js";import{n as m}from"./mui-sKCdI-e6.js";import f from"./NotFoundScreen-FcrdBNP0.js";import{a as I}from"./sentry-Be8twC83.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="21494397-11d1-4a0a-84dc-2193166431a5",e._sentryDebugIdIdentifier="sentry-dbid-21494397-11d1-4a0a-84dc-2193166431a5")}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-DvKPzrwo.js";import{a as g}from"./sentry-Be8twC83.js";import{u as U,g as _,h as w,t as M,j as l,N as D}from"./core-CQnSJ9vO.js";import{z as r,m as P,D as V,d as A,c as N,e as W,i as J,M as K,g as R}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-DvKPzrwo.js";import{a as g}from"./sentry-Be8twC83.js";import{u as U,g as _,h as w,t as M,j as l,N as D}from"./core-CQnSJ9vO.js";import{z as r,m as P,D as V,d as A,c as N,e as W,i as J,M as K,g as R}from"./index-W83PhAZh.js";import{eW as Y,Ly as $,LI as q,Lz as B,fa as G,fD as H,LE as Q,gn as X,cY as Z,LJ as ee,LK as te}from"./zeni-epic-state-DKeO4Z0C.js";import{n as ne}from"./mui-sKCdI-e6.js";import{u as se}from"./useDeviceId-KC-rY1dP.js";import{f as ae}from"./analyticsHelper-CvGdvadP.js";import{t as ie}from"./getLocaleForTenant-CAvD8CfA.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="dbba8f06-8405-4759-b566-5545336ee38d",t._sentryDebugIdIdentifier="sentry-dbid-dbba8f06-8405-4759-b566-5545336ee38d")}catch{}})();const z=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function ze(){const t=U(),a=_(),f=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:T,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),b=l(e=>$(e)),E=r.getSignedInUser(),L=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,L,void 0,b.tenantsInOrder),X().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,k,s,o,b,L,a.state,t]);const j=g.useCallback(()=>{f("/signin/auth")},[f]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=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(J,{phoneNumber:T,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(D,{to:e,state:{...a.state,origin:""}})}if(!z(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(K,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-DvKPzrwo.js";import{a as c}from"./sentry-Be8twC83.js";import{u as pe,j as s,i as qe,g as Je,h as Ke,l as P}from"./core-CQnSJ9vO.js";import{eW as he,ff as Qe,fg as Se,f1 as Xe,bn as ea,eV as aa,fh as ta,fi as na,fk as sa,fn as oa,fw as ia,fo as g,fq as ra,fr as ue,fu as da,fs as la,ft as ca,fv as ua,cO as fa,fy as ma,cT as ba,bt as pa,f0 as ha,fD as Sa,fE as ga,fC as Ea}from"./zeni-epic-state-DKeO4Z0C.js";import{a7 as ka,a8 as Ca,W as ya,H as Ia,z as k,v as Ta,u as wa,x as r,a9 as Aa,aa as _a,j as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ma,ae as fe,af as me,L as xa,ag as Pa,ah as be,c as R,$ as Ra,r as A,ai as N,aj as Na}from"./index-
|
|
1
|
+
import{j as V}from"./liveblocks-DvKPzrwo.js";import{a as c}from"./sentry-Be8twC83.js";import{u as pe,j as s,i as qe,g as Je,h as Ke,l as P}from"./core-CQnSJ9vO.js";import{eW as he,ff as Qe,fg as Se,f1 as Xe,bn as ea,eV as aa,fh as ta,fi as na,fk as sa,fn as oa,fw as ia,fo as g,fq as ra,fr as ue,fu as da,fs as la,ft as ca,fv as ua,cO as fa,fy as ma,cT as ba,bt as pa,f0 as ha,fD as Sa,fE as ga,fC as Ea}from"./zeni-epic-state-DKeO4Z0C.js";import{a7 as ka,a8 as Ca,W as ya,H as Ia,z as k,v as Ta,u as wa,x as r,a9 as Aa,aa as _a,j as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ma,ae as fe,af as me,L as xa,ag as Pa,ah as be,c as R,$ as Ra,r as A,ai as N,aj as Na}from"./index-W83PhAZh.js";import{D as Va}from"./mui-sKCdI-e6.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]="277fb9a9-0fb6-44df-9850-8e7ba47b09f3",f._sentryDebugIdIdentifier="sentry-dbid-277fb9a9-0fb6-44df-9850-8e7ba47b09f3")}catch{}})();const Ua=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=qe(),a=Je(),C=ya(),o=Ke(),U=Xe(),m=pe(),{useFeatureGate:i}=Ia(),G=k.getSignedInUser(),_=ea(G),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,O=s(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:W}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,W),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Y=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabledV2),J=q||Z&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Me=n.company!=null&&ia(n.company),w=ve&&Me,xe=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),K=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ve={fetchStatus:Pe,count:xe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),J===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=s(e=>la(e,S,h,q,Z,w).fetchState),ie=s(e=>ca(e).fetchState),Ge=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(Oe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Y.fetchState==="Completed"&&ma(Y.notificationSettings,h.userEmail,W,n),re=Da(),He=re&&va(a),de=ba(Ue?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[We,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Ye=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ze=Ba(Ye);return V.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:V.jsx(Ma,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Ge,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:Ze,isTreasuryPopupVisible:We,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:J&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=K===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.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);be(e.type)?(j!=null&&m(Ea()),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=>{Ee(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:He,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Wa=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ua,{...f,...a})};export{Wa as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-DvKPzrwo.js";import{h as n,n as i}from"./core-CQnSJ9vO.js";import{O as e}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-DvKPzrwo.js";import{h as n,n as i}from"./core-CQnSJ9vO.js";import{O as e}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.js";import"./zeni-epic-state-DKeO4Z0C.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-DvKPzrwo.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-DvKPzrwo.js";import lt from"./NotFoundScreen-FcrdBNP0.js";import{a as k}from"./sentry-Be8twC83.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as Y}from"./core-CQnSJ9vO.js";import{cv as St,fh as O,eW as J,fv as bt,fo as b,Su as Q,fr as d,fg as y,sk as M,xG as It,Sv as Ct,ff as Tt,fy as yt,sp as _t,Sw as $,bq as F,f9 as w,st as K,Sx as At,cH as Et,cA as Nt}from"./zeni-epic-state-DKeO4Z0C.js";import{Y as xt,z as Bt,H as wt,x as vt,_ as Rt,cU as Ut,r as N,a7 as Dt,cV as Gt,a8 as Pt,q as $t}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="0a7b19e9-5938-456c-a175-a99d17a3ccca",t._sentryDebugIdIdentifier="sentry-dbid-0a7b19e9-5938-456c-a175-a99d17a3ccca")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=O(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=J(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,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(K("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")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("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}})}}})(Dt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,v]=k.useState(!1),a=S(e=>O(e)),o=S(e=>J(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const X=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:H,fetchMore:W,isFetchingMore:z,hasFetchedAll:L}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Q(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"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||D===!0||C!==!0||_||D===!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&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&H===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=q.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||L===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,z,C,L,H,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:X,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(Y,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(Y,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{u as T,g as A,j as o,N as j}from"./core-CQnSJ9vO.js";import{LX as C,eW as P,fn as x,LY as z,LZ as D,L_ as M,L$ as R,o5 as k,KU as N}from"./zeni-epic-state-DKeO4Z0C.js";import{z as h,G as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{u as T,g as A,j as o,N as j}from"./core-CQnSJ9vO.js";import{LX as C,eW as P,fn as x,LY as z,LZ as D,L_ as M,L$ as R,o5 as k,KU as N}from"./zeni-epic-state-DKeO4Z0C.js";import{z as h,G as I}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="e7d9ea57-fb47-4ac1-a948-27ede6a044d5",n._sentryDebugIdIdentifier="sentry-dbid-e7d9ea57-fb47-4ac1-a948-27ede6a044d5")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo(()=>C(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[f?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(N(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-C8hCBik3.js → PandLWithForecastRoutes-C3Yczwgv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-DvKPzrwo.js";import{h as z,u as H,g as J,i as Z,j as d,n as K,o as Q,p as I}from"./core-CQnSJ9vO.js";import{eW as M,s8 as P,rI as X,Ms as O,rD as S,bt as ee,bn as ae,bY as te,rE as se,Mt as oe,Mf as C,dJ as re,vD as ne,Mu as ie,v_ as ce,fe as le,fc as de}from"./zeni-epic-state-DKeO4Z0C.js";import{z as me,Y as fe,_ as pe,j as ue,H as U,x as w,w as he,c as $,ao as ge,r as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-DvKPzrwo.js";import{h as z,u as H,g as J,i as Z,j as d,n as K,o as Q,p as I}from"./core-CQnSJ9vO.js";import{eW as M,s8 as P,rI as X,Ms as O,rD as S,bt as ee,bn as ae,bY as te,rE as se,Mt as oe,Mf as C,dJ as re,vD as ne,Mu as ie,v_ as ce,fe as le,fc as de}from"./zeni-epic-state-DKeO4Z0C.js";import{z as me,Y as fe,_ as pe,j as ue,H as U,x as w,w as he,c as $,ao as ge,r as Fe}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import be from"./NotFoundScreen-FcrdBNP0.js";import{F as Ie}from"./FeaturePreviewScreen-9NvuDbvP.js";import{a as g}from"./sentry-Be8twC83.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{u as Se}from"./useInitialThreadRequest-BDAn-AM4.js";import{t as Te}from"./routePaths-stnXzrYV.js";import{M as ye}from"./MobileAppDrawer-CjoW3Rax.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="54890e81-89fc-4a25-be3a-28d07e836494",s._sentryDebugIdIdentifier="sentry-dbid-54890e81-89fc-4a25-be3a-28d07e836494")}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=K(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(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function v(){const s=z(),e=H(),a=J(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>M(t)),_=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),A=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,D?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(e(O(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&&!A(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const k=ue(),W=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:Y}=U(),{isFeatureEnabled:j}=Y(w.isReportsCommentingEnabled),q=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:A,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{E(!0)}})]})}function Ve(){const s=d(i=>M(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DvKPzrwo.js";import{Mo as te,eW as Q,ks as z,fe as J,fc as ne,JS as Y,M2 as oe,uB as Ee,Mp as N,uq as ke,uK as Ie,uE as ie,uu as re,uI as Pe,uF as je,Mq as le,wp as Te,ga as Le,gd as ve,Mr as M,uy as de,ux as ce,uN as Fe,c7 as Ae}from"./zeni-epic-state-DKeO4Z0C.js";import{K as pe,H as X,x as E,z as G,a9 as ue,C as me,ak as ge,al as Re,A as he,o as R,F as fe,D as Ce,am as Oe,Y as Ve,_ as Ue,w as Be,c as be,e as Ze,r as $e,an as Me,j as _e}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import{Mo as te,eW as Q,ks as z,fe as J,fc as ne,JS as Y,M2 as oe,uB as Ee,Mp as N,uq as ke,uK as Ie,uE as ie,uu as re,uI as Pe,uF as je,Mq as le,wp as Te,ga as Le,gd as ve,Mr as M,uy as de,ux as ce,uN as Fe,c7 as Ae}from"./zeni-epic-state-DKeO4Z0C.js";import{K as pe,H as X,x as E,z as G,a9 as ue,C as me,ak as ge,al as Re,A as he,o as R,F as fe,D as Ce,am as Oe,Y as Ve,_ as Ue,w as Be,c as be,e as Ze,r as $e,an as Me,j as _e}from"./index-W83PhAZh.js";import{D as ye,n as H,S as we}from"./mui-sKCdI-e6.js";import ae from"./NotFoundScreen-FcrdBNP0.js";import{a as r}from"./sentry-Be8twC83.js";import{u as ee,i as Ke,j as m,h as ze,g as Ge,n as He,o as se,p as $}from"./core-CQnSJ9vO.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{M as qe}from"./MobileAppDrawer-CjoW3Rax.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="a2ddbae5-d321-4a89-979f-991a84dce7bc",a._sentryDebugIdIdentifier="sentry-dbid-a2ddbae5-d321-4a89-979f-991a84dce7bc")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ke(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),L=ne(u),v=Y(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=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:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,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(Je,{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(Re,{...b})]})})},Je=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-DvKPzrwo.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import E from"./NotFoundScreen-FcrdBNP0.js";import{a as r}from"./sentry-Be8twC83.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as W,o as z,p as b}from"./core-CQnSJ9vO.js";import{eW as B,Sy as h,bo as F,bn as N,i9 as O,f9 as V}from"./zeni-epic-state-DKeO4Z0C.js";import{W as $,z as I,_ as q,cW as G}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{M as J}from"./MobileAppDrawer-CjoW3Rax.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="e2912d87-1d5c-4b18-a4a7-27dd55e75fbb",e._sentryDebugIdIdentifier="sentry-dbid-e2912d87-1d5c-4b18-a4a7-27dd55e75fbb")}catch{}})();const K=W(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),d=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(l),x=C||k||y,c=r.useCallback((a,i,T)=>{u(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-DvKPzrwo.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Be8twC83.js";import{L as dt,bY as Tc,eW as Ac,Ly as Rc,M0 as kl,c7 as Tl,fD as Al,fE as Rl}from"./zeni-epic-state-DKeO4Z0C.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-BcJ2NV01.js";import{r as un}from"./empty-DjW_4H8B.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-C9eLuUx2.js";import{r as Gl}from"./index-BtlQ6O6E.js";import{r as zl}from"./index-DgHQU_66.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-CQnSJ9vO.js";import{u as Kl,z as Pc,L as Wl,J as Jl,N as Xl,h as Ql,c as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-DvKPzrwo.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Be8twC83.js";import{L as dt,bY as Tc,eW as Ac,Ly as Rc,M0 as kl,c7 as Tl,fD as Al,fE as Rl}from"./zeni-epic-state-DKeO4Z0C.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-BcJ2NV01.js";import{r as un}from"./empty-DjW_4H8B.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-C9eLuUx2.js";import{r as Gl}from"./index-BtlQ6O6E.js";import{r as zl}from"./index-DgHQU_66.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-CQnSJ9vO.js";import{u as Kl,z as Pc,L as Wl,J as Jl,N as Xl,h as Ql,c as tf}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{d as Pe}from"./decodeURIComponentSafe-BprI0TcI.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]="396b9d1b-7998-45d0-b957-99aad82b4a15",t._sentryDebugIdIdentifier="sentry-dbid-396b9d1b-7998-45d0-b957-99aad82b4a15")}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-DvKPzrwo.js";import{a as o}from"./sentry-Be8twC83.js";import{j as f,h as V,u as _,g as H,n as W}from"./core-CQnSJ9vO.js";import{m as F,K as M,z as R,bb as N,A as U,Y as $,_ as z,w as Y,c as l,e as q,a7 as K,bc as G}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as o}from"./sentry-Be8twC83.js";import{j as f,h as V,u as _,g as H,n as W}from"./core-CQnSJ9vO.js";import{m as F,K as M,z as R,bb as N,A as U,Y as $,_ as z,w as Y,c as l,e as q,a7 as K,bc as G}from"./index-W83PhAZh.js";import{fi as J,eW as Q,OR as P,OS as X,vt as Z,vj as g,fk as ee,bS as ae,vo as re,OT as ne}from"./zeni-epic-state-DKeO4Z0C.js";import{D as te,e as se,n as oe,S as ie}from"./mui-sKCdI-e6.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{M as ce}from"./MobileAppDrawer-CjoW3Rax.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]="cb78f775-942c-490b-a41b-a3c98885305e",e._sentryDebugIdIdentifier="sentry-dbid-cb78f775-942c-490b-a41b-a3c98885305e")}catch{}})();const de={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=M();if(R.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(N,{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 s}from"./liveblocks-DvKPzrwo.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-DvKPzrwo.js";import _ from"./NotFoundScreen-FcrdBNP0.js";import{a as c}from"./sentry-Be8twC83.js";import{h as E,g as x,u as C,j as u,N as k,n as D,o as z,p as v}from"./core-CQnSJ9vO.js";import{eW as j,PL as S,P$ as h,Fi as V,Eo as U,Fh as d,F5 as B,Qg as N,F8 as K}from"./zeni-epic-state-DKeO4Z0C.js";import{m as T,z as $,B as O,a7 as W,bW as L,af as F,bz as Q,bX as X}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{R as A}from"./ReimbursementApprovalRuleDetailScreen-BgYFphfr.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]="6ca20f84-6583-42ec-9dd4-9ea1d2a1e550",e._sentryDebugIdIdentifier="sentry-dbid-6ca20f84-6583-42ec-9dd4-9ea1d2a1e550")}catch{}})();const w="reimbursement-approval-rule-update",q=D(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(N(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(B(a,!1))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))}}})(W(L)),G=()=>{const e=E(),r=x(),t=C(),[i,a]=c.useState(!1),[o,b]=c.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=T(),l=u(n=>S(n)),f=u(n=>h(n).remiSetupApproverViewUpdateData);if(c.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),c.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(U(!0,!1,!1,!1)))},[i,m,t]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");c.useEffect(()=>{l.allApprovalRules.length===0&&l.fetchState==="Completed"&&(o||(b(!0),t(d())),e("./new"))},[o,l,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${w}`]:[],eventCallback:(n,P,y)=>{n.endsWith(w)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||l.fetchState!=="Completed"&&l.fetchState!=="Error"?s.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(q,{currentTenant:p,location:r,navigate:e,...R})},I="reimbursement-approval-rule-update",H=D(function(e){const r=S(e),t=h(e).remiSetupApproverViewUpdateData,i={};for(const o of Object.values(e.contactState.contactById))o?.id!=null&&(i[o.id]=o.fullName);const a={};for(const o of Object.values(e.classState.classesByKey))o?.classId!=null&&(a[o.classId]=o.className);return{approvalView:r,remiSetupApproverViewUpdateData:t,vendorNamesById:i,departmentNamesById:a}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(N(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(B(a,!0))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))},onReorderRules:a=>{e(K(a,!0))}}})(W(X)),J=()=>{const e=u(t=>j(t)),{isApprovalRulesV3Enabled:r}=Q(e?.tenantId);return r?s.jsx(M,{}):s.jsx(G,{})},M=()=>{const e=E(),r=x(),t=C(),[i,a]=c.useState(!1),[o,b]=c.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=T(),l=u(n=>S(n)),f=u(n=>h(n).remiSetupApproverViewUpdateData);if(c.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),c.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(U(!0,!1,!1,!0)))},[i,m,t]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");c.useEffect(()=>{l.allApprovalRules.length===0&&l.fetchState==="Completed"&&(o||(b(!0),t(d())),e("./new"))},[o,l,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${I}`]:[],eventCallback:(n,P,y)=>{n.endsWith(I)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||l.fetchState!=="Completed"&&l.fetchState!=="Error"?s.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(H,{currentTenant:p,location:r,navigate:e,...R})};function oe(){return s.jsxs(z,{children:[s.jsx(v,{path:"/",element:s.jsx(J,{})}),s.jsx(v,{path:"/new",element:s.jsx(A,{})}),s.jsx(v,{path:"/:approvalRuleId/edit",element:s.jsx(A,{})}),s.jsx(v,{path:"*",element:s.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-DvKPzrwo.js";import{a as y}from"./sentry-Be8twC83.js";import{h as _,u as C,g as O,i as k,j as R,n as F}from"./core-CQnSJ9vO.js";import{P$ as E,PL as T,Fb as V,Fk as j,Fi as A,Fj as w,Q0 as B,eW as L,Fh as W}from"./zeni-epic-state-DKeO4Z0C.js";import{z as N,m as P,B as $,bM as K,af as q,bz as M,bN as Q}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-DvKPzrwo.js";import{a as y}from"./sentry-Be8twC83.js";import{h as _,u as C,g as O,i as k,j as R,n as F}from"./core-CQnSJ9vO.js";import{P$ as E,PL as T,Fb as V,Fk as j,Fi as A,Fj as w,Q0 as B,eW as L,Fh as W}from"./zeni-epic-state-DKeO4Z0C.js";import{z as N,m as P,B as $,bM as K,af as q,bz as M,bN as Q}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.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]="2513eee6-d42a-432e-8c47-77bd303e4b59",e._sentryDebugIdIdentifier="sentry-dbid-2513eee6-d42a-432e-8c47-77bd303e4b59")}catch{}})();const G=F(function(e,s){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",r=o==="approval_create"&&t.allApprovalRules.length!==0;let n=t.allApprovalRules.length===0;return s.approvalRuleId&&(n=t.allApprovalRules.findIndex(p=>p.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:r,isLowerBoundDisabled:n,approvalUpdateActionType:o}},function(e,s){const{navigate:t,approvalUpdateDataView:o,approverViewData:r,approvalRuleId:n}=s,p=o.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const b=[];return v.forEach(u=>{const S=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(m=>{const f=(h=m.value,B(h)==null);var h;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),c=S.concat(I);b.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),b},l={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(p==="approval_create"){const v={criteria:l,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:n,criteria:l,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}})(K);function H(){const e=_(),s=C(),t=O(),{approvalRuleId:o}=k(),r=N.getSignedInUser(),n=P(),p=R(l=>E(l)),i=R(l=>T(l)),[a,d]=y.useState(!1);if(y.useEffect(()=>{a||(d(!0),s(V(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(o!=null?"../../":"../")},[i,o]),r==null)throw Error("Can't access address page without signing in...");return p.approversDetailsFetchStatus.fetchState=="Not-Started"||p.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx($,{fetchState:p.approversDetailsFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):g.jsx(G,{navigate:e,approvalUpdateDataView:p,approvalRuleId:o,approverViewData:i,location:t})}function se(e){return B(e)==null}const J=F(function(e,s){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",r=[],n={};for(const p of Object.values(e.contactState.contactById))p?.id!=null&&(r.push(p.id),n[p.id]=p.fullName);return{localData:t,approvalUpdateActionType:o,allVendorIds:r,vendorNamesById:n,editingRuleId:o==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:T(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:o,approverViewData:r,approvalRuleId:n}=s,p=o.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(f=>{const h=f.actorKind?.selectedOption,U=f.selectedRole?.selectedOption;let D=[];h==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:h==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map(z=>({type:"user",subType:void 0,userId:z.userId,idType:"user",isImplicitActor:!1})));const x=f.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})}),m},l=a.amountCriteria,v=a.vendorCriteria,b=a.departmentCriteria,u={};if(l!=null&&l.comparator.selectedOption!=null){const c=l.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:l.min,max:c==="greater_than"?void 0:l.max}}const S=v?.selection.selectedOptions??[];S.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:S});const I=b?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:b?.operator.selectedOption??"is",departmentIds:I}),p==="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(w(c))}else{const c={approvalRuleId:n,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(p==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(Q);function oe(){const e=R(t=>L(t)),{isApprovalRulesV3Enabled:s}=M(e?.tenantId);return s?g.jsx(X,{}):g.jsx(H,{})}function X(){const e=_(),s=C(),t=O(),{approvalRuleId:o}=k(),r=N.getSignedInUser(),n=P(),p=R(l=>E(l)),i=R(l=>T(l)),[a,d]=y.useState(!1);if(y.useEffect(()=>{a||(d(!0),s(V(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(o!=null?"../../":"../")},[i,o]),r==null)throw Error("Can't access address page without signing in...");return p.approversDetailsFetchStatus.fetchState=="Not-Started"||p.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx($,{fetchState:p.approversDetailsFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):g.jsx(J,{navigate:e,approvalUpdateDataView:p,approvalRuleId:o,approverViewData:i,location:t},o??"new")}export{oe as R,se as i};
|