@zeniai/web-app-ui 5.2.7-dev → 5.2.7-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-BIJ6TmLJ.js → AddressRoutes-K7NAyrAQ.js} +1 -1
- package/dist/assets/{AddressScreen-B4B18718.js → AddressScreen-kANSkpLN.js} +1 -1
- package/dist/assets/{AiCfoScreen-DoAQbbOx.js → AiCfoScreen-BvwhtBVv.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BgdJ81nK.js → BillPayApprovalRoutes-DPwr6aot.js} +1 -1
- package/dist/assets/{BillPayRoutes-BSkmlNP-.js → BillPayRoutes-DY-yFyUM.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BrJsE9Wf.js → BusinessVerificationPageScreen-D1o3vV10.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-HhvNfCCY.js → CardsAiCfoScreen-CLPV9jYw.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BRUAWm_A.js → ChargeCardRoutes-BPpfWG0k.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-h-SBTzhu.js → CompanyPassportScreen-DVEWEDid.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CrTdRYze.js → ConnectionAuthScreen-DHRUvouj.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-B2qgtMDG.js → CustomerOnboardingAuthScreen-X7rtsPNv.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-9iTG5rgG.js → CustomerOnboardingRoutes-Ctp3b97E.js} +1 -1
- package/dist/assets/{DashboardRoutes-Dlp8-AvH.js → DashboardRoutes-CrEPyjq3.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CqHnt2tK.js → DefaultTenantHome-n3uc8DAu.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-qMWvZF55.js → DomesticWireDetailScreen-CAXSGn5x.js} +1 -1
- package/dist/assets/{DrawerScreen-CaKLPeP5.js → DrawerScreen-BVS8mUkg.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-ercGoKOg.js → EntityDetailRoutes-CuTCQbRH.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-NbuloP-n.js → ExpenseAutomationRoutes-BgYCTGtf.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CxbSxzBU.js → FeaturePreviewScreen-Cw4bAxEp.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BpkTy9Hy.js → HubSpotOAuthCallbackScreen-ok0eAsBR.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DhZjHoQv.js → MagicLinkRoutes-tdJK69VW.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-phajga6u.js → MagicLinkSignInScreen-DV__Y9ah.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DXlB_K3l.js → MobileAppDrawer-BS8RaOMH.js} +1 -1
- package/dist/assets/{NotFoundScreen-Cz3neVdz.js → NotFoundScreen-Cs4XTtbb.js} +1 -1
- package/dist/assets/{NotificationRoutes-23TepTm4.js → NotificationRoutes-DFea4_oM.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Coz_pdpy.js → OAuthConsentScreen-DRJKKBw9.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CqA8tmFY.js → PandLWithForecastRoutes-C8S-sqdC.js} +1 -1
- package/dist/assets/{PeopleRoutes-B5GFAMh4.js → PeopleRoutes-DaXc8iH9.js} +1 -1
- package/dist/assets/{PerformanceRoutes-9VWn9OFg.js → PerformanceRoutes-BATp9MxK.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-XIaYFO4N.js → QBOConnectionScreen-DRa0888S.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Bhgby_bm.js → ReimbursementApprovalRoutes-C1d9QvTl.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BQN9V9kd.js → ReimbursementApprovalRuleDetailScreen-DQbofKBt.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CT-xUNjQ.js → ReimbursementRoutes-CnJGGO8s.js} +1 -1
- package/dist/assets/{ReportsRoutes-CQ-YMNr3.js → ReportsRoutes-CIFXVkTx.js} +1 -1
- package/dist/assets/{RewardsRoutes-DzGknDMk.js → RewardsRoutes-DfCkBxLg.js} +1 -1
- package/dist/assets/{ScreenRoutes-B4B5a17S.js → ScreenRoutes-D_u59jTK.js} +2 -2
- package/dist/assets/{SettingsRoutes-DzaddH2T.js → SettingsRoutes--FejGNT-.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DC__s7_X.js → SetupPagesScreen-dOsZbhRG.js} +1 -1
- package/dist/assets/{SignInScreen-CgSXlupS.js → SignInScreen-C17dxjtf.js} +1 -1
- package/dist/assets/{SignOutScreen-CF8WAkOT.js → SignOutScreen-DeEKoT2w.js} +1 -1
- package/dist/assets/{TaskListScreen-nHc85aaE.js → TaskListScreen-DeyX47zW.js} +1 -1
- package/dist/assets/{TaskRoutes-B4XN9lwZ.js → TaskRoutes-B1I_DIBQ.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DR75-AlI.js → TransactionDetailRoutes-Rml-h3Zh.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Cdu4UqbO.js → TransactionDetailScreen-CseiXXfn.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CMQFHyGN.js → TransactionListRoutes-CSkEXmTh.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BadnSvSD.js → TreasuryRoutes-DVvjevwv.js} +1 -1
- package/dist/assets/{VendorsRoutes-Q-LWVNza.js → VendorsRoutes-xn-Quoh9.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-lllyRMhu.js → WiseConfirmationScreen-D5NViDOv.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DNK2PF4a.js → ZeniAccountRoutes-Br-R9e6m.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-qoPclGWB.js → ZeniAccountStatementScreen-C1OGbg3O.js} +1 -1
- package/dist/assets/{analyticsHelper-CuVH_0d-.js → analyticsHelper-DTpcNobE.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D6kQDxGJ.js → getLocaleForTenant-6cRVHcMB.js} +1 -1
- package/dist/assets/{index-inh_AhlJ.js → index-BI0zLowA.js} +5 -5
- package/dist/assets/{routePaths-DVdAEsPQ.js → routePaths-CIgI6dmE.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-kvItrptc.js → useAiCfoDashboardSuggestedQuestionsChips-Cu5rs5_N.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DBmwJ5Ye.js → useAskAiCfoHostNavButtonProps-Dt9FjqgO.js} +1 -1
- package/dist/assets/{useCashManagementBanner-B67UZZ7S.js → useCashManagementBanner-DiCLDHdY.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-CZXEyuQA.js → useChargeCardPusherEvents-BdMUnFQ6.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BABpEztr.js → useEmailConnectResultRefresh-OaU--UoN.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C-5QTneS.js → useInitialThreadRequest-CINmDijc.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-m5dzUQbh.js → withTransactionSidePanel-CxcB1MIS.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-C6RAQzoe.js";import{a as u}from"./sentry-0zOCC74t.js";import{u as y,j as b,n as w,g as A,N}from"./core-BbYLl-V8.js";import{M7 as U,eW as _,g0 as k,M8 as L,oc as R,M9 as z}from"./zeni-epic-state-CPXlKDVV.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-C6RAQzoe.js";import{a as u}from"./sentry-0zOCC74t.js";import{u as y,j as b,n as w,g as A,N}from"./core-BbYLl-V8.js";import{M7 as U,eW as _,g0 as k,M8 as L,oc as R,M9 as z}from"./zeni-epic-state-CPXlKDVV.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{t as P}from"./getLocaleForTenant-6cRVHcMB.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="7f4c54cd-48d4-45d2-8ecf-1269d09beb12",t._sentryDebugIdIdentifier="sentry-dbid-7f4c54cd-48d4-45d2-8ecf-1269d09beb12")}catch{}})();const M=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>U(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(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"&&!L(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(M,{})}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"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-qMWvZF55.js → DomesticWireDetailScreen-CAXSGn5x.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-C6RAQzoe.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-BbYLl-V8.js";import{Qe as k,Ql as _,gi as W,gh as M,gg as X,jx as q,No as J,rH as K,eW as V,PM as D,jv as T,Qf as v,Qo as j,jt as F,jQ as G}from"./zeni-epic-state-CPXlKDVV.js";import{bz as L,n as N,$ as R,z as U,y as Q,r as p,X as S,B as z,bA as Y,o as H,bB as ee,v as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-C6RAQzoe.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-BbYLl-V8.js";import{Qe as k,Ql as _,gi as W,gh as M,gg as X,jx as q,No as J,rH as K,eW as V,PM as D,jv as T,Qf as v,Qo as j,jt as F,jQ as G}from"./zeni-epic-state-CPXlKDVV.js";import{bz as L,n as N,$ as R,z as U,y as Q,r as p,X as S,B as z,bA as Y,o as H,bB as ee,v as te}from"./index-BI0zLowA.js";import{n as O}from"./mui-CdzFMywn.js";import"./sentry-0zOCC74t.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]="18e8fc22-93be-414e-96e2-7f8eaed7b947",e._sentryDebugIdIdentifier="sentry-dbid-18e8fc22-93be-414e-96e2-7f8eaed7b947")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(X(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(L);function Z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((i=>k(i,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-C6RAQzoe.js";import{n as i,E as l,y as c}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-C6RAQzoe.js";import{n as i,E as l,y as c}from"./index-BI0zLowA.js";import{D as p}from"./mui-CdzFMywn.js";import"./sentry-0zOCC74t.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]="2d8fa2af-f8f7-4fc3-b2ef-66bd0ca5ad9e",e._sentryDebugIdIdentifier="sentry-dbid-2d8fa2af-f8f7-4fc3-b2ef-66bd0ca5ad9e")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=i(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=c();return f.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C6RAQzoe.js";import{a as c}from"./sentry-0zOCC74t.js";import{h as A,u as B,g as q,i as G,j as d,N as O,n as F,o as _,p as W}from"./core-BbYLl-V8.js";import{Ow as z,eW as K,NU as M,lA as R,Kp as I,OB as Y,Nn as $,kA as U,Kq as S,NZ as V,N_ as X,Np as Z,No as H}from"./zeni-epic-state-CPXlKDVV.js";import{aX as J,e as L,r as Q,v as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-C6RAQzoe.js";import{a as c}from"./sentry-0zOCC74t.js";import{h as A,u as B,g as q,i as G,j as d,N as O,n as F,o as _,p as W}from"./core-BbYLl-V8.js";import{Ow as z,eW as K,NU as M,lA as R,Kp as I,OB as Y,Nn as $,kA as U,Kq as S,NZ as V,N_ as X,Np as Z,No as H}from"./zeni-epic-state-CPXlKDVV.js";import{aX as J,e as L,r as Q,v as tt}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{d as k}from"./decodeURIComponentSafe-BAc0Xv61.js";import{w as et}from"./withTransactionSidePanel-CxcB1MIS.js";import{f as at,c as nt}from"./routePaths-CIgI6dmE.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.js";import"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import"./TransactionDetailScreen-CseiXXfn.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]="ba5f3aa9-6cce-4fc8-9822-ea028e7af145",a._sentryDebugIdIdentifier="sentry-dbid-ba5f3aa9-6cce-4fc8-9822-ea028e7af145")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:L,isAccountingClassesEnabled:U(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Q(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(J),it=et((function({entityType:a,...t}){const e=A(),o=B(),l=q(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:C,entityIdEncoded:N,entityNameEncoded:v}=G(),r=k(N??""),p=k(v??""),f=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=d((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),x=d((n=>K(n).company?.companyInfo.firstMonthOfFY??1)),u=d((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(R(i)))}),[m,f,i]);const E=d((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,j=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:x,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:j,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(O,{to:b(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Nt({entityType:a}){return s.jsx(_,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Nt as EntityDetailRoutes,Nt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-NbuloP-n.js → ExpenseAutomationRoutes-BgYCTGtf.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-C6RAQzoe.js";import ia from"./NotFoundScreen-
|
|
1
|
+
import{j as I}from"./liveblocks-C6RAQzoe.js";import ia from"./NotFoundScreen-Cs4XTtbb.js";import{a,b as Ht}from"./sentry-0zOCC74t.js";import{n as ze,S as la}from"./mui-CdzFMywn.js";import{u as Ce,h as Qt,g as Qe,j as x,n as ra,i as Dt,o as da,p as Ye}from"./core-BbYLl-V8.js";import{eW as _e,Tc as ua,om as Te,fX as ma,si as pa,ef as ha,fh as Ca,Td as Ft,Te as Fe,p4 as ga,Tf as Sa,pj as fa,oE as Wt,oC as ie,Tg as Xt,Th as Ia,oZ as en,pf as Ea,Ti as tn,ox as ka,rQ as Ta,fI as ke,Tj as Ve,uo as nn,EK as an,Tk as on,Tl as ya,ro as We,Ox as Ut,Oz as ba,kD as va,OA as Aa,kK as wa,c_ as Pa,vE as Xe,oK as sn,pn as Be,p0 as Ra,Tm as xa,Np as _t,No as De,Tn as Vt,k$ as Da,To as Fa,Tp as Ua,Tq as _a,Tr as Va,oR as Ba,pq as Ue,Ts as Oa,Tt as za,Tu as Ma,px as La,kO as ja,kF as $a,Tv as qa,kN as Bt,OH as Ga,Tw as Na,Tx as Ja,rk as Ya,qY as Ka,po as he,qX as Ke,Ty as Za,Tz as Ha,TA as Qa,mi as Wa,bo as Xa,md as Ot,l$ as eo,TB as to,fy as zt,gy as no,ma as ao,xx as oo,TC as so,pY as co,pT as io,pX as lo,pI as ro,TD as uo,fL as cn,p8 as mo,oN as po,fY as Mt,ps as ho,TE as Co,TF as go,pp as ln,TG as So,TH as fo,TI as Io,TJ as Eo,TK as Lt,rw as ko,qP as To,Nn as yo,TL as bo,TM as vo,kM as Ao,TN as wo,Jq as Po,kL as Ro,kA as xo,fK as Do,ql as rn,qH as Fo,pm as jt,pr as Uo,bE as _o,m7 as Vo,m4 as Bo,TO as Oo,pH as $t,qD as qt,qB as zo,TP as Mo,qq as Lo,q6 as jo,qE as $o,TQ as qo,TR as Go,qa as No,TS as Jo,q1 as Yo,q9 as Ko,q7 as Zo,qK as Ho}from"./zeni-epic-state-CPXlKDVV.js";import{$ as Oe,X as Y,e as N,v as ce,V as dn,a0 as un,cZ as Qo,z as Me,c_ as Wo,c$ as Xo,au as ye,d0 as es,aZ as Gt,B as mn,d1 as ts,ar as Ze,a as ns,a9 as as,d2 as os,a4 as ss,d3 as cs,T as is,d4 as ls,d5 as rs,x as ds,I as us,aS as ms,d6 as ps,d7 as hs,be as Cs,E as gs,aV as Ss}from"./index-BI0zLowA.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import{f as Nt,a as fs,b as Is,g as Es,C as ks}from"./TransactionDetailScreen-CseiXXfn.js";import{w as Ts}from"./withTransactionSidePanel-CxcB1MIS.js";import{h as ys,v as bs}from"./routePaths-CIgI6dmE.js";import{g as He}from"./accountMappingHelper-DqWxTQ5l.js";import{D as vs}from"./DrawerScreen-BVS8mUkg.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.js";import"./decodeURIComponentSafe-BAc0Xv61.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="6173e19b-4cd5-4bbb-9818-a0acfda08382",t._sentryDebugIdIdentifier="sentry-dbid-6173e19b-4cd5-4bbb-9818-a0acfda08382")}catch{}})();const As=()=>{const t=Ce(),i=Qt(),P=Qe(),y=x((m=>_e(m))),{useFeatureGate:v}=Oe(),{isFeatureEnabled:r}=v(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:h}=v(Y.aiAuditScorePercentage),k=x((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),c=x((m=>ua(m,y.tenantId))),{isAiCfoAccessEnabled:S,onAskAiCfoClick:g}=pn({mobileExploreReferrer:"Month-End Close Overview"}),R=a.useCallback(((m,V,le=!1)=>{t(Te({tenantId:V,period:{month:m.month,year:m.year},refreshViewInBackground:le}))}),[]),w=a.useCallback((m=>{const V=P.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&N.trackMonthCloseAuditPage(m.month,m.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,V??null),t(ma(y.tenantId,m))}),[y.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),d=k[y.tenantId],C=a.useCallback((()=>{const m=P.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&N.trackMonthCloseAuditPage(d.month,d.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),R(d,y.tenantId,!0)}),[R,d,y.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),M=ce(P.state?.pathnameStackToGoBack,P.pathname),q=a.useCallback((()=>{if(c.monthEndCloseChecks!=null&&d!=null){const m=c.monthEndCloseChecks.monthEndCloseCheckList.find((V=>V.progress<100));if(m!=null)return void i(`./${m.id}/${d.month}-${d.year}`,{state:{pathnameStackToGoBack:M,message:"comingFromOverview"}});i(`./month_end_insights/${d.month}-${d.year}`,{state:{pathnameStackToGoBack:M,message:"comingFromOverview"}})}}),[c.monthEndCloseChecks,d]),{areTenantIdsInSync:u}=dn();return un({isDataReady:c.fetchState==="Completed"}),a.useEffect((()=>{d!=null&&c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&u&&R(d,y.tenantId)}),[R,d,c.fetchState,y.tenantId,u]),a.useEffect((()=>{d!=null&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(pa(d))}),[d,c.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{c.fetchState!=="In-Progress"&&c.fetchState==="Completed"&&C()}),3e5);return()=>clearInterval(m)}),[c.fetchState]),a.useEffect((()=>{if(c.fetchState==="Completed"&&c.monthEndCloseChecks?.auditSummary!=null){const m=P.state?.referrer;N.trackMonthCloseAuditPage(c.selectedPeriod.month,c.selectedPeriod.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[c.fetchState,c.selectedPeriod,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),I.jsx(ws,{children:I.jsx(Qo,{monthEndCloseChecksView:c,isRealtimeInsightsFeatureEnabled:r,onMonthEndCheckClick:m=>{i(`./${m}/${d.month}-${d.year}`,{state:{pathnameStackToGoBack:M,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:w,handleReviewButtonClick:q,onBackClick:()=>{i("../../dashboard")},onReload:C,isAiCfoAccessEnabled:S,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:h})})},ws=ze.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C6RAQzoe.js";import{a as r}from"./sentry-0zOCC74t.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-C6RAQzoe.js";import{a as r}from"./sentry-0zOCC74t.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import f from"./NotFoundScreen-Cs4XTtbb.js";import{h as u,g as b}from"./core-BbYLl-V8.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5a21547d-8d37-447e-91de-3190153d226c",e._sentryDebugIdIdentifier="sentry-dbid-5a21547d-8d37-447e-91de-3190153d226c")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=c(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:m(o),onDemoClick:t,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-0zOCC74t.js";import{u as f,h as l,g as m}from"./core-BbYLl-V8.js";import{hu as p,Mv as g,Mw as _}from"./zeni-epic-state-CPXlKDVV.js";import{u as h,L as b,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-0zOCC74t.js";import{u as f,h as l,g as m}from"./core-BbYLl-V8.js";import{hu as p,Mv as g,Mw as _}from"./zeni-epic-state-CPXlKDVV.js";import{u as h,L as b,z as y}from"./index-BI0zLowA.js";import"./liveblocks-C6RAQzoe.js";import"./recharts-CteGH0cz.js";import"./mui-CdzFMywn.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="7882270d-57cd-4301-9867-67e96e1718ff",e._sentryDebugIdIdentifier="sentry-dbid-7882270d-57cd-4301-9867-67e96e1718ff")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=h(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(b.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-C6RAQzoe.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-BbYLl-V8.js";import{Mo as k,Mp as v,Mq as M,Bs as B,Be as T,Mr as D,Ms as oe,Mt as se,Bi as ie,fz as $,Bp as le,Bm as re}from"./zeni-epic-state-CPXlKDVV.js";import{n as g,o as r,p as de,e as j,m as G,q as ce,r as me,s as pe,v as V,$ as ue,X as he,w as xe,x as ge,y as fe,A as be,B as we,N as Se,_ as ye,S as ke,C as ve,E as je,F as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-C6RAQzoe.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-BbYLl-V8.js";import{Mo as k,Mp as v,Mq as M,Bs as B,Be as T,Mr as D,Ms as oe,Mt as se,Bi as ie,fz as $,Bp as le,Bm as re}from"./zeni-epic-state-CPXlKDVV.js";import{n as g,o as r,p as de,e as j,m as G,q as ce,r as me,s as pe,v as V,$ as ue,X as he,w as xe,x as ge,y as fe,A as be,B as we,N as Se,_ as ye,S as ke,C as ve,E as je,F as $e}from"./index-BI0zLowA.js";import{n as m}from"./mui-CdzFMywn.js";import f from"./NotFoundScreen-Cs4XTtbb.js";import{a as I}from"./sentry-0zOCC74t.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="23ccb60d-b34f-4623-a771-e4be0202eb4c",e._sentryDebugIdIdentifier="sentry-dbid-23ccb60d-b34f-4623-a771-e4be0202eb4c")}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-C6RAQzoe.js";import{a as g}from"./sentry-0zOCC74t.js";import{u as F,g as _,h as O,t as w,j as l,N as T}from"./core-BbYLl-V8.js";import{z as r,y as P,a as V,f as A,e as N,g as W,Y as $,_ as R,j as Y}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C6RAQzoe.js";import{a as g}from"./sentry-0zOCC74t.js";import{u as F,g as _,h as O,t as w,j as l,N as T}from"./core-BbYLl-V8.js";import{z as r,y as P,a as V,f as A,e as N,g as W,Y as $,_ as R,j as Y}from"./index-BI0zLowA.js";import{eW as Z,M9 as q,Mj as B,Ma as G,fz as H,f$ as J,Mf as K,gp as Q,cZ as X,Mk as ee,Ml as te}from"./zeni-epic-state-CPXlKDVV.js";import{n as ne}from"./mui-CdzFMywn.js";import{u as ae}from"./useDeviceId-BcZcktIJ.js";import{f as se}from"./analyticsHelper-DTpcNobE.js";import{t as ie}from"./getLocaleForTenant-6cRVHcMB.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="81ba3dbb-e878-467a-98da-691d23b012c6",t._sentryDebugIdIdentifier="sentry-dbid-81ba3dbb-e878-467a-98da-691d23b012c6")}catch{}})();const z=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function ze(){const t=F(),s=_(),m=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>Z(e))),b=l((e=>q(e))),M=r.getSignedInUser(),v=P().mode;g.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,f)))}),[n,p,t,i,f,a?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),a.zeniSessionId),H(a.userId,a.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),Q().then((()=>{const e=Y();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(W.Event.loginSuccess,"email",X(o.productSettings))}),2e3))}),[I,S,y,a,o,b,v,s.state,t]);const j=g.useCallback((()=>{m("/signin/auth")}),[m]),E=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),U=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx($,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:E,onVerifyOtp:U,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||M!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!z(n,p)||f==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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-C6RAQzoe.js";import{a as c}from"./sentry-0zOCC74t.js";import{u as fe,j as n,i as We,g as Ye,h as qe,l as M}from"./core-BbYLl-V8.js";import{eW as me,fE as Je,fF as pe,fq as Qe,bn as Xe,eV as Ke,fG as ea,fH as aa,fJ as ta,fM as na,fN as g,fP as sa,fQ as de,fT as oa,fR as ia,fS as ra,fU as da,cP as la,fW as ca,cV as ua,fp as fa,f$ as ma,g0 as pa,f_ as ba}from"./zeni-epic-state-CPXlKDVV.js";import{a9 as ha,aa as Sa,x as ga,$ as Ea,z as k,A as ka,u as Ca,X as r,i as ya,h as Ia,ab as Ta,I as _a,c as Aa,ac as wa,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Pa,ai as ue,e as R,a1 as Ga,v as _,aj as x,ak as Ma}from"./index-
|
|
1
|
+
import{j as V}from"./liveblocks-C6RAQzoe.js";import{a as c}from"./sentry-0zOCC74t.js";import{u as fe,j as n,i as We,g as Ye,h as qe,l as M}from"./core-BbYLl-V8.js";import{eW as me,fE as Je,fF as pe,fq as Qe,bn as Xe,eV as Ke,fG as ea,fH as aa,fJ as ta,fM as na,fN as g,fP as sa,fQ as de,fT as oa,fR as ia,fS as ra,fU as da,cP as la,fW as ca,cV as ua,fp as fa,f$ as ma,g0 as pa,f_ as ba}from"./zeni-epic-state-CPXlKDVV.js";import{a9 as ha,aa as Sa,x as ga,$ as Ea,z as k,A as ka,u as Ca,X as r,i as ya,h as Ia,ab as Ta,I as _a,c as Aa,ac as wa,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Pa,ai as ue,e as R,a1 as Ga,v as _,aj as x,ak as Ma}from"./index-BI0zLowA.js";import{D as Ra}from"./mui-CdzFMywn.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]="2a7eaa3e-0510-41b2-98c0-efb7033a772b",f._sentryDebugIdIdentifier="sentry-dbid-2a7eaa3e-0510-41b2-98c0-efb7033a772b")}catch{}})();const xa=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),a=Ye(),C=ga(),o=qe(),N=Qe(),m=fe(),{useFeatureGate:i}=Ea(),B=k.getSignedInUser(),U=Xe(B),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>Ke(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),w=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n((e=>aa(e)));c.useEffect((()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n((e=>e.tenantState)),Ce=n((e=>D.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:_e}=i(r.isExpenseAutomationEnabledV2),W=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Ge=n((e=>g(e).reducedFetchCountState)),Y=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),q=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Me=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:J,isLoading:Q,isFetchingMore:X,hasFetchedAll:K,fetchMore:Re}=Ta();c.useEffect((()=>{const e=setTimeout((()=>Re?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&K===!0)if(s?.companyId!=null&&J!=null){const e=`dashboard_${s.companyId}`;L(J.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,K]),c.useEffect((()=>{y&&!I&&Me.fetchState==="Not-Started"&&N.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,N.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:A},"comments")))}),[A,$.fetchState]);const xe={fetchStatus:Ge,count:Pe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=_a(),te=n((e=>ia(e,S,h,_e,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Ne=w&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!w&&!z?void 0:"disabled",Be=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Be),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&wa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(P);c.useEffect((()=>{re(P())}),[P]);const Ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,He=Da(Ze);return V.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:B,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ne,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:W,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Y===0&&q>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=Y===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ga({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const G=Ma(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const G=x(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Je(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return V.jsx(xa,{...f,...a})};export{La as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-C6RAQzoe.js";import{h as n,n as e}from"./core-BbYLl-V8.js";import{Z as i}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-C6RAQzoe.js";import{h as n,n as e}from"./core-BbYLl-V8.js";import{Z as i}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import"./sentry-0zOCC74t.js";import"./zeni-epic-state-CPXlKDVV.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="d00e6566-d320-4798-96c6-f5fdcb901dfd",o._sentryDebugIdIdentifier="sentry-dbid-d00e6566-d320-4798-96c6-f5fdcb901dfd")}catch{}})();const d=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(d,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-C6RAQzoe.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-C6RAQzoe.js";import lt from"./NotFoundScreen-Cs4XTtbb.js";import{a as k}from"./sentry-0zOCC74t.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 z}from"./core-BbYLl-V8.js";import{cw as St,fG as K,eW as Q,fU as bt,fN as b,T7 as O,fQ as d,fF as y,sC as M,y8 as It,T8 as Tt,fE as Ct,fW as yt,sH as Et,T9 as $,bo as F,fy as x,sL as J,Ta as _t,cI as At,cB as Nt}from"./zeni-epic-state-CPXlKDVV.js";import{V as Bt,z as wt,$ as xt,X as Rt,a0 as Ut,cW as vt,v as N,a9 as Dt,cX as Gt,aa as Pt,r as $t}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="3e7d0b58-1eb3-4258-866f-27a221221a94",t._sentryDebugIdIdentifier="sentry-dbid-3e7d0b58-1eb3-4258-866f-27a221221a94")}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=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(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:B,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(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(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(B(r),t($([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(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Dt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,R]=k.useState(!1),a=S((e=>K(e))),o=S((e=>Q(e))),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Ut({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),U=S((e=>b(e).currentSubTab)),Z=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),v=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=vt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:T,isFetchingMore:D,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:q,isFetchingMore:H,hasFetchedAll:X}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(O(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(E===!1&&T===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[E,T]),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=E||D===!0||T!==!0||E||D===!0||T!==!0;k.useEffect((()=>{G&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[G,v]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&L===!1&&w!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=w.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),_=p.map((f=>f.id)),it=p.map((f=>{const P=W.find((rt=>rt.id===f.threadId));return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(H||X===!0||q==null||q(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[E,D,H,T,X,L,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];U==="all"?_.push("read","unread"):U!=="mentions"&&_.push(U),s(M("task_manager",C,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(z,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(z,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-C6RAQzoe.js";import{a as r}from"./sentry-0zOCC74t.js";import{u as A,g as T,j as o,N as C}from"./core-BbYLl-V8.js";import{My as j,eW as z,fM as P,Mz as x,MA as D,MB as L,MC as R,oc as k,Lv as N}from"./zeni-epic-state-CPXlKDVV.js";import{z as h,H as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-C6RAQzoe.js";import{a as r}from"./sentry-0zOCC74t.js";import{u as A,g as T,j as o,N as C}from"./core-BbYLl-V8.js";import{My as j,eW as z,fM as P,Mz as x,MA as D,MB as L,MC as R,oc as k,Lv as N}from"./zeni-epic-state-CPXlKDVV.js";import{z as h,H as I}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="1312531d-2da9-4422-9276-7e4dcfe0ddbd",n._sentryDebugIdIdentifier="sentry-dbid-1312531d-2da9-4422-9276-7e4dcfe0ddbd")}catch{}})();function ee(){const n=A(),s=T(),{params:t,error:i}=r.useMemo((()=>j(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>z(e))),d=o((e=>P(e))),l=o((e=>e.tenantState.fetchState)),y=o(x),v=o(D),c=o(L),[S,b]=r.useState(null),[E,M]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(l!=="Not-Started"&&l!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,l,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&d.some((U=>U.tenantId===e))?e:d.length===1?d[0].tenantId:null}),[f?.tenantId,d]),u=S??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:l!=="Completed",tenants:d,selectedTenantId:u,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{M("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CqA8tmFY.js → PandLWithForecastRoutes-C8S-sqdC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-C6RAQzoe.js";import{h as z,u as Z,g as X,i as H,j as d,n as J,o as K,p as I}from"./core-BbYLl-V8.js";import{eW as U,sq as R,r_ as Q,N3 as v,rV as S,bs as ee,bn as ae,bZ as te,rW as se,N4 as oe,MS as C,dI as re,w5 as ne,N5 as ie,ws as ce,fD as le,fB as de}from"./zeni-epic-state-CPXlKDVV.js";import{z as me,V as fe,a0 as pe,I as ue,$ as w,X as M,N as he,e as N,ap as ge,v as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-C6RAQzoe.js";import{h as z,u as Z,g as X,i as H,j as d,n as J,o as K,p as I}from"./core-BbYLl-V8.js";import{eW as U,sq as R,r_ as Q,N3 as v,rV as S,bs as ee,bn as ae,bZ as te,rW as se,N4 as oe,MS as C,dI as re,w5 as ne,N5 as ie,ws as ce,fD as le,fB as de}from"./zeni-epic-state-CPXlKDVV.js";import{z as me,V as fe,a0 as pe,I as ue,$ as w,X as M,N as he,e as N,ap as ge,v as Fe}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import be from"./NotFoundScreen-Cs4XTtbb.js";import{F as Ie}from"./FeaturePreviewScreen-Cw4bAxEp.js";import{a as g}from"./sentry-0zOCC74t.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import{u as Se}from"./useInitialThreadRequest-CINmDijc.js";import{t as Te}from"./routePaths-CIgI6dmE.js";import{M as ye}from"./MobileAppDrawer-BS8RaOMH.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="fd6d778f-8e5b-47e2-a6e2-76b530d4e48b",s._sentryDebugIdIdentifier="sentry-dbid-fd6d778f-8e5b-47e2-a6e2-76b530d4e48b")}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})}},ke=J((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:N}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function O(){const s=z(),e=Z(),a=X(),{forecastId:o,tenantEmailDomain:r}=H(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>U(t))),$=y.company?.companyInfo.firstMonthOfFY??1,c=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),k=d((t=>t.profitAndLossState)),A=d((t=>t.reportUIOptionsState.selectedForecast)),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!D(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}}),[i,p,e,l,c,m,u,R,S,F]);const x=ue(),_=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:q}=w(),{isFeatureEnabled:j}=q(M.isReportsCommentingEnabled),V=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[G,Y]=g.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:N,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:V,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d((i=>U(i))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C6RAQzoe.js";import{M$ as ne,eW as Y,kA as M,fD as J,fB as oe,Kt as Q,MF as ie,v2 as ke,N0 as q,uT as Ee,vc as Pe,v6 as re,uX as le,va as ve,v7 as je,N1 as de,wT as Te,fn as Le,gf as Ae,N2 as H,u$ as ce,u_ as pe,vf as Re,c7 as Fe}from"./zeni-epic-state-CPXlKDVV.js";import{n as ue,$ as ee,X as z,z as N,i as me,d as ge,G as fe,al as he,am as Ve,E as Ce,o as V,R as be,a as ye,an as Oe,V as Be,a0 as Ze,N as Ue,e as Se,g as $e,v as _e,ao as He,I as ze}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-C6RAQzoe.js";import{M$ as ne,eW as Y,kA as M,fD as J,fB as oe,Kt as Q,MF as ie,v2 as ke,N0 as q,uT as Ee,vc as Pe,v6 as re,uX as le,va as ve,v7 as je,N1 as de,wT as Te,fn as Le,gf as Ae,N2 as H,u$ as ce,u_ as pe,vf as Re,c7 as Fe}from"./zeni-epic-state-CPXlKDVV.js";import{n as ue,$ as ee,X as z,z as N,i as me,d as ge,G as fe,al as he,am as Ve,E as Ce,o as V,R as be,a as ye,an as Oe,V as Be,a0 as Ze,N as Ue,e as Se,g as $e,v as _e,ao as He,I as ze}from"./index-BI0zLowA.js";import{D as we,n as W,S as De}from"./mui-CdzFMywn.js";import se from"./NotFoundScreen-Cs4XTtbb.js";import{a as d}from"./sentry-0zOCC74t.js";import{u as ae,i as Ge,j as g,h as Ke,g as Me,n as Ne,o as te,p as _}from"./core-BbYLl-V8.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import{M as Xe}from"./MobileAppDrawer-BS8RaOMH.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="7b907e3f-4b98-4e88-bfe3-078208daa13f",e._sentryDebugIdIdentifier="sentry-dbid-7b907e3f-4b98-4e88-bfe3-078208daa13f")}catch{}})();const qe={overlayWidth:new Ce(100,100,48)},G=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=ue(),m=ae(),[O,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ge(),r=g((l=>ne(l))),p=g((l=>Y(l))),E=g((l=>M(l))),{useFeatureGate:x}=ee(),{isFeatureEnabled:I}=x(z.isDebitCardFeatureEnabled),P=J(I,p),T=oe(p),L=Q(p),Z=ie(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(N.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(q()),y()},A=()=>{O===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:v}=x(z.isChargeCardFeatureEnabled),j=me(p,v,I),{isCardsHidden:R}=ge(p?.tenantId),b=!j||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(L))},onCloseClick:A,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(ke(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Je,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(xe,{children:G.discardTitle}),descriptionComponent:a.jsx(Ie,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:o,isEditPopup:!0}):null,a.jsx(Ve,{...s})]})})},Je=W(De)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C6RAQzoe.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-C6RAQzoe.js";import E from"./NotFoundScreen-Cs4XTtbb.js";import{a as r}from"./sentry-0zOCC74t.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-BbYLl-V8.js";import{eW as B,Tb as b,bq as F,bn as N,ig as V,fy as q}from"./zeni-epic-state-CPXlKDVV.js";import{x as W,z as I,a0 as Y,cY as $}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import{M as H}from"./MobileAppDrawer-BS8RaOMH.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.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]="93b572af-140d-4728-9a82-676cd51b388a",e._sentryDebugIdIdentifier="sentry-dbid-93b572af-140d-4728-9a82-676cd51b388a")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=W(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(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),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({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"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-C6RAQzoe.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-0zOCC74t.js";import{L as dt,bZ as Tc,eW as Ac,M9 as Rc,MD as kl,c7 as Tl,f$ as Al,g0 as Rl}from"./zeni-epic-state-CPXlKDVV.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-OnooQQgi.js";import{r as un}from"./empty-BjAZZThl.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-D5xPiPDu.js";import{r as Gl}from"./index-YFIL1B6n.js";import{r as zl}from"./index-BY-tCXtJ.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BbYLl-V8.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,J as Xl,m as Ql,e as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-C6RAQzoe.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-0zOCC74t.js";import{L as dt,bZ as Tc,eW as Ac,M9 as Rc,MD as kl,c7 as Tl,f$ as Al,g0 as Rl}from"./zeni-epic-state-CPXlKDVV.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-OnooQQgi.js";import{r as un}from"./empty-BjAZZThl.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-D5xPiPDu.js";import{r as Gl}from"./index-YFIL1B6n.js";import{r as zl}from"./index-BY-tCXtJ.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BbYLl-V8.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,J as Xl,m as Ql,e as tf}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{d as Pe}from"./decodeURIComponentSafe-BAc0Xv61.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]="8f3bf0bc-4332-491d-ad80-8120c2e208fa",t._sentryDebugIdIdentifier="sentry-dbid-8f3bf0bc-4332-491d-ad80-8120c2e208fa")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(d)})(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=(function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d})(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c})(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=(function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1})(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(d){return'"'.concat(d,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){m(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-C6RAQzoe.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-C6RAQzoe.js";import _ from"./NotFoundScreen-Cs4XTtbb.js";import{a as p}from"./sentry-0zOCC74t.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as F,p as b}from"./core-BbYLl-V8.js";import{eW as j,Qt as g,QJ as S,FS as V,E$ as U,FR as d,FI as $,QW as B,FU as O}from"./zeni-epic-state-CPXlKDVV.js";import{z as N,a9 as L,bZ as Q,ag as T,bC as z,b_ as J}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.js";import{u as K,R as A}from"./ReimbursementApprovalRuleDetailScreen-DQbofKBt.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="286a50a0-4cdf-4b5c-9f44-e1e45a19cbbd",e._sentryDebugIdIdentifier="sentry-dbid-286a50a0-4cdf-4b5c-9f44-e1e45a19cbbd")}catch{}})();const y="reimbursement-approval-rule-update",Z=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(L(Q)),q=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,W,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Z,{currentTenant:l,location:s,navigate:o,...w})},I="reimbursement-approval-rule-update",G=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(O(t,!0))}}}))(L(J)),H=()=>{const e=u((n=>j(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a)));K();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${I}`]:[],eventCallback:(a,W,h)=>{a.endsWith(I)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(F,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-C6RAQzoe.js";import{a as f}from"./sentry-0zOCC74t.js";import{u as w,j as g,h as _,g as O,i as F,n as k}from"./core-BbYLl-V8.js";import{l0 as q,QJ as T,Qt as C,FL as V,FX as B,FS as A,FT as E,QK as j,eW as K,FR as W}from"./zeni-epic-state-CPXlKDVV.js";import{z as P,y as N,B as L,bP as z,ag as Q,bC as J,bQ as X}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-C6RAQzoe.js";import{a as f}from"./sentry-0zOCC74t.js";import{u as w,j as g,h as _,g as O,i as F,n as k}from"./core-BbYLl-V8.js";import{l0 as q,QJ as T,Qt as C,FL as V,FX as B,FS as A,FT as E,QK as j,eW as K,FR as W}from"./zeni-epic-state-CPXlKDVV.js";import{z as P,y as N,B as L,bP as z,ag as Q,bC as J,bQ as X}from"./index-BI0zLowA.js";import"./mui-CdzFMywn.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]="2ae3d963-5796-48f2-b238-911e87c48c85",e._sentryDebugIdIdentifier="sentry-dbid-2ae3d963-5796-48f2-b238-911e87c48c85")}catch{}})();function G(){const e=w(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const H=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(I);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(z);function M(){const e=_(),s=w(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g((n=>T(n))),i=g((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(V(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(L,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,U=y.selectedRole?.selectedOption;let D=[];b==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(($=>({type:"user",subType:void 0,userId:$.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=S?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(X);function ne(){const e=g((t=>K(t))),{isApprovalRulesV3Enabled:s}=J(e?.tenantId);return s?h.jsx(Z,{}):h.jsx(M,{})}function Z(){const e=_(),s=w(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g((n=>T(n))),i=g((n=>C(n))),[a,d]=f.useState(!1);if(G(),f.useEffect((()=>{a||(d(!0),s(V(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(L,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,G as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C6RAQzoe.js";import{h as H,u as de,g as Q,i as Y,j as w,N as _,n as q,l as mt,o as ct,p as C}from"./core-BbYLl-V8.js";import{eW as V,QX as ue,c7 as pe,EW as De,kL as dt,F7 as oe,F6 as re,QY as ut,bn as be,gq as Ue,QZ as pt,Nn as bt,kA as Le,No as ke,Np as gt,jv as ht,Qf as ft,jK as St,EK as It,uo as Rt,jC as yt,Fu as Pe,Q_ as $e,Q$ as kt,R0 as vt,R1 as At,R2 as Ct,R3 as Et,Fe as ve,jQ as wt,Qo as xt,F8 as Bt,EU as Tt,R4 as jt,ET as Ft,R5 as Dt,F0 as Ae,Fi as Ut,Fh as Lt,Fd as Pt,R6 as Me,Kt as $t,bq as Mt,F3 as _t,FM as Nt,R7 as Ot,R8 as Gt,Fq as zt,Fn as Ce,PK as Zt,ER as Qt,R9 as _e,Gc as Ee,Gk as Vt,Ra as Wt,Rb as z,Rc as Ht,Rd as Ne,Re as qt,Rf as Oe,Rg as Ge,FC as le,bu as Kt,bK as ge,cI as he,fD as ze,fB as Ze,Rh as Jt,fy as Xt,PX as Yt,Ri as en,Rj as Qe,P$ as tn,QJ as nn,Rk as an,QW as sn,Gh as we,Gg as on,Rl as rn,Rm as ln,Rn as mn,Ro as cn,Rp as dn,Qu as un,G7 as pn,Gb as bn,bs as gn,bJ as hn,cC as fn,cq as Sn,bt as In,Mb as Rn,cS as yn,cV as kn,cU as vn,cB as An}from"./zeni-epic-state-CPXlKDVV.js";import{x as Ve,n as We,$ as ee,X as E,z as $,b$ as He,N as te,e as v,aM as xe,o as F,au as X,G as Cn,a as qe,c0 as En,v as Z,a0 as Ke,c1 as wn,I as ne,c2 as xn,V as Bn,E as Tn,B as fe,g as Je,a9 as jn,bn as Fn,a4 as Dn,y as Xe,c3 as Un,i as Ln}from"./index-inh_AhlJ.js";import{n as N,S as Pn}from"./mui-CdzFMywn.js";import me from"./NotFoundScreen-Cz3neVdz.js";import{S as Be}from"./SetupPagesScreen-DC__s7_X.js";import{F as Ye}from"./FeaturePreviewScreen-CxbSxzBU.js";import{a as f}from"./sentry-0zOCC74t.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DBmwJ5Ye.js";import{u as et}from"./useInitialThreadRequest-C-5QTneS.js";import{D as $n}from"./DrawerScreen-CaKLPeP5.js";import{M as tt}from"./MobileAppDrawer-DXlB_K3l.js";import{R as Mn}from"./ReimbursementApprovalRoutes-Bhgby_bm.js";import{FallBackRoute as _n}from"./ScreenRoutes-B4B5a17S.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.js";import"./analyticsHelper-CuVH_0d-.js";import"./routePaths-DVdAEsPQ.js";import"./BusinessVerificationPageScreen-BrJsE9Wf.js";import"./ReimbursementApprovalRuleDetailScreen-BQN9V9kd.js";import"./getLocaleForTenant-D6kQDxGJ.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]="26e64ad7-aa81-46b8-9885-a59b289d3aba",e._sentryDebugIdIdentifier="sentry-dbid-26e64ad7-aa81-46b8-9885-a59b289d3aba")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=qe.getLocalizedStrings(),On=q((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ve(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ve("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(kt());const i=nt(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(En);function Te(){const e=H(),t=de(),n=Q(),{reimbursementId:r}=Y(),d=Ve(),c=We(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Q().pathname,j=x.includes("edit"),k=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=$.getSignedInUser(),I=w((p=>V(p))),g=w((p=>ue(p,r))),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect((()=>{(k&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(De(!1,b,y,r)))}));const M=w((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(A==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:c,children:[s.jsx(te,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Qn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Gn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-C6RAQzoe.js";import{h as H,u as de,g as Q,i as Y,j as w,N as _,n as q,l as mt,o as ct,p as C}from"./core-BbYLl-V8.js";import{eW as V,QX as ue,c7 as pe,EW as De,kL as dt,F7 as oe,F6 as re,QY as ut,bn as be,gq as Ue,QZ as pt,Nn as bt,kA as Le,No as ke,Np as gt,jv as ht,Qf as ft,jK as St,EK as It,uo as Rt,jC as yt,Fu as Pe,Q_ as $e,Q$ as kt,R0 as vt,R1 as At,R2 as Ct,R3 as Et,Fe as ve,jQ as wt,Qo as xt,F8 as Bt,EU as Tt,R4 as jt,ET as Ft,R5 as Dt,F0 as Ae,Fi as Ut,Fh as Lt,Fd as Pt,R6 as Me,Kt as $t,bq as Mt,F3 as _t,FM as Nt,R7 as Ot,R8 as Gt,Fq as zt,Fn as Ce,PK as Zt,ER as Qt,R9 as _e,Gc as Ee,Gk as Vt,Ra as Wt,Rb as z,Rc as Ht,Rd as Ne,Re as qt,Rf as Oe,Rg as Ge,FC as le,bu as Kt,bK as ge,cI as he,fD as ze,fB as Ze,Rh as Jt,fy as Xt,PX as Yt,Ri as en,Rj as Qe,P$ as tn,QJ as nn,Rk as an,QW as sn,Gh as we,Gg as on,Rl as rn,Rm as ln,Rn as mn,Ro as cn,Rp as dn,Qu as un,G7 as pn,Gb as bn,bs as gn,bJ as hn,cC as fn,cq as Sn,bt as In,Mb as Rn,cS as yn,cV as kn,cU as vn,cB as An}from"./zeni-epic-state-CPXlKDVV.js";import{x as Ve,n as We,$ as ee,X as E,z as $,b$ as He,N as te,e as v,aM as xe,o as F,au as X,G as Cn,a as qe,c0 as En,v as Z,a0 as Ke,c1 as wn,I as ne,c2 as xn,V as Bn,E as Tn,B as fe,g as Je,a9 as jn,bn as Fn,a4 as Dn,y as Xe,c3 as Un,i as Ln}from"./index-BI0zLowA.js";import{n as N,S as Pn}from"./mui-CdzFMywn.js";import me from"./NotFoundScreen-Cs4XTtbb.js";import{S as Be}from"./SetupPagesScreen-dOsZbhRG.js";import{F as Ye}from"./FeaturePreviewScreen-Cw4bAxEp.js";import{a as f}from"./sentry-0zOCC74t.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-Dt9FjqgO.js";import{u as et}from"./useInitialThreadRequest-CINmDijc.js";import{D as $n}from"./DrawerScreen-BVS8mUkg.js";import{M as tt}from"./MobileAppDrawer-BS8RaOMH.js";import{R as Mn}from"./ReimbursementApprovalRoutes-C1d9QvTl.js";import{FallBackRoute as _n}from"./ScreenRoutes-D_u59jTK.js";import"./recharts-CteGH0cz.js";import"./analytics-CAwmb4Gq.js";import"./plaid-CF_Au40f.js";import"./dnd-DQSp8Rgc.js";import"./stripe-cKAAJElX.js";import"./lottie-MHL8Gjsq.js";import"./lexical-DSV51oa2.js";import"./pdf-DNFehLU8.js";import"./utils-OnooQQgi.js";import"./analyticsHelper-DTpcNobE.js";import"./routePaths-CIgI6dmE.js";import"./BusinessVerificationPageScreen-D1o3vV10.js";import"./ReimbursementApprovalRuleDetailScreen-DQbofKBt.js";import"./getLocaleForTenant-6cRVHcMB.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]="26e64ad7-aa81-46b8-9885-a59b289d3aba",e._sentryDebugIdIdentifier="sentry-dbid-26e64ad7-aa81-46b8-9885-a59b289d3aba")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=qe.getLocalizedStrings(),On=q((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ve(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ve("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(kt());const i=nt(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(En);function Te(){const e=H(),t=de(),n=Q(),{reimbursementId:r}=Y(),d=Ve(),c=We(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Q().pathname,j=x.includes("edit"),k=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=$.getSignedInUser(),I=w((p=>V(p))),g=w((p=>ue(p,r))),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect((()=>{(k&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(De(!1,b,y,r)))}));const M=w((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(A==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:c,children:[s.jsx(te,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Qn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Gn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|