@zeniai/web-app-ui 5.2.17-dev → 5.2.17-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-B2KIG7En.js → AddressRoutes-C9ePPZTc.js} +1 -1
- package/dist/assets/{AddressScreen-BRHUGjlq.js → AddressScreen-Ba-VvOjK.js} +1 -1
- package/dist/assets/{AiCfoScreen-HMy5Y7Mq.js → AiCfoScreen-BVHcwn1-.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-ClKax7IT.js → BillPayApprovalRoutes-GlLqvwOB.js} +1 -1
- package/dist/assets/{BillPayRoutes-BChpGQL2.js → BillPayRoutes-CC8ojAoZ.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BwMN9nGs.js → BusinessVerificationPageScreen-BZk1AoM_.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-DO_y52lp.js → CardsAiCfoScreen-DdtKtE2m.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Dv5pDzqZ.js → ChargeCardRoutes-CEOawkX4.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DpirfeBa.js → CompanyPassportScreen-DpwDdQJT.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-rOB6ynUK.js → ConnectionAuthScreen-4wK0rBPz.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-C98l4ZVS.js → CustomerOnboardingAuthScreen-C6JuurfT.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-D_6fNZiA.js → CustomerOnboardingRoutes-Dxrd_oMn.js} +1 -1
- package/dist/assets/{DashboardRoutes-Cp_J4k4_.js → DashboardRoutes-CgelQ0B8.js} +1 -1
- package/dist/assets/{DefaultTenantHome-D0bfOiik.js → DefaultTenantHome-D6efsYE9.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CEzBRH9X.js → DomesticWireDetailScreen-CQmjKCQc.js} +1 -1
- package/dist/assets/{DrawerScreen-CTCbWuBb.js → DrawerScreen-D1JpfIY3.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-8jxY5Riu.js → EntityDetailRoutes-Dzsfy19y.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BLGJhe2d.js → ExpenseAutomationRoutes-Qm3X_H6K.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BYw0siNX.js → FeaturePreviewScreen-BKTS5XLx.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-D5JpfjXx.js → HubSpotOAuthCallbackScreen-BDz3Agei.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DJ8XQppN.js → MagicLinkRoutes-Cn1P1SX6.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Pc9aSzuu.js → MagicLinkSignInScreen-CB996C-0.js} +1 -1
- package/dist/assets/{MobileAppDrawer-C850zeFL.js → MobileAppDrawer-hdYoVCXp.js} +1 -1
- package/dist/assets/{NotFoundScreen-D8y3QSjF.js → NotFoundScreen-B6nbKEPc.js} +1 -1
- package/dist/assets/{NotificationRoutes-CgDlCmJS.js → NotificationRoutes-Ds6eCL2b.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BHm1bSWe.js → OAuthConsentScreen-Ba0wA_HU.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CxkAljmn.js → PandLWithForecastRoutes-BBHF28-E.js} +1 -1
- package/dist/assets/{PeopleRoutes-Cwuko2wK.js → PeopleRoutes-DXDqmyhJ.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Cpl-d1r4.js → PerformanceRoutes-BaKOjCPx.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BlMcHgbG.js → QBOConnectionScreen-CCcDJEqP.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-nJxxaKUX.js → ReimbursementApprovalRoutes-62K0ZFMF.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DXovejDg.js → ReimbursementApprovalRuleDetailScreen-Dgh8Yquq.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-41mQ1voL.js → ReimbursementRoutes-DoahH0o8.js} +1 -1
- package/dist/assets/{ReportsRoutes-CPxhUqlo.js → ReportsRoutes-BRx0lkFY.js} +1 -1
- package/dist/assets/{RewardsRoutes-BXExREiG.js → RewardsRoutes-CXoqy3I2.js} +1 -1
- package/dist/assets/{ScreenRoutes-DBgtMxcS.js → ScreenRoutes-BYtpyV-M.js} +2 -2
- package/dist/assets/{SettingsRoutes-C3VXjgEl.js → SettingsRoutes-CmZf5R1j.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BX3zI3tV.js → SetupPagesScreen-D2lEnwjt.js} +1 -1
- package/dist/assets/{SignInScreen-DYVSrH1Q.js → SignInScreen-BoIjGUSc.js} +1 -1
- package/dist/assets/{SignOutScreen-D8IS2BPQ.js → SignOutScreen-CwtCC2I_.js} +1 -1
- package/dist/assets/{TaskListScreen-DbBL-EqC.js → TaskListScreen-B0fkcObi.js} +1 -1
- package/dist/assets/{TaskRoutes-CP206xuh.js → TaskRoutes-DpRNRovH.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-8oHAjr2u.js → TransactionDetailRoutes-B4V40VOl.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Bfy3N_JT.js → TransactionDetailScreen-Dyormtjy.js} +1 -1
- package/dist/assets/{TransactionListRoutes-C46bH8Mo.js → TransactionListRoutes-BHh4uWIi.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CzmHsChK.js → TreasuryRoutes-BdMeVeBd.js} +1 -1
- package/dist/assets/{VendorsRoutes-CUyxWOUM.js → VendorsRoutes-xEmDK5qc.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-lyjRGpZ9.js → WiseConfirmationScreen-CogkOQi0.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-8seJMANR.js → ZeniAccountRoutes-X8MXJuIg.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-D_5y24R6.js → ZeniAccountStatementScreen-rGHf8AJK.js} +1 -1
- package/dist/assets/{analyticsHelper-BZTNTJma.js → analyticsHelper-CBp9b8VI.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Bpp7IHaZ.js → getLocaleForTenant-BhD_5oG2.js} +1 -1
- package/dist/assets/{index-CbGX11uA.js → index-qYSCKekz.js} +5 -5
- package/dist/assets/{routePaths-BYuMJjxP.js → routePaths-TA66BJgf.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-7YoEarS7.js → useAiCfoDashboardSuggestedQuestionsChips-DqLJLw_b.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DuEP5Klm.js → useAskAiCfoHostNavButtonProps-yAJW2Zxp.js} +1 -1
- package/dist/assets/{useCashManagementBanner-_9igQwqA.js → useCashManagementBanner-Dbz53g9T.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-DCjAMeeL.js → useChargeCardPusherEvents-CFucNvvU.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BTnBt-Sy.js → useEmailConnectResultRefresh-DnMJ5jdi.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BMuxer3t.js → useInitialThreadRequest-BeFUEHq1.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-MO-qZsKE.js → withTransactionSidePanel-DIWgh7V_.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-BqtYq8PY.js";import{a as u}from"./sentry-BtWdTNDK.js";import{u as y,j as b,n as w,g as A,N as k}from"./core-4nWRIid2.js";import{Mp as N,e$ as _,g5 as U,Mq as L,ok as R,Mr as z}from"./zeni-epic-state-Brhydpej.js";import{u as $,z as f,L as T,t as I,a as j,b as O}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-BqtYq8PY.js";import{a as u}from"./sentry-BtWdTNDK.js";import{u as y,j as b,n as w,g as A,N as k}from"./core-4nWRIid2.js";import{Mp as N,e$ as _,g5 as U,Mq as L,ok as R,Mr as z}from"./zeni-epic-state-Brhydpej.js";import{u as $,z as f,L as T,t as I,a as j,b as O}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{t as P}from"./getLocaleForTenant-BhD_5oG2.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="f4117c89-affc-4976-9d6c-f382572d2ce1",t._sentryDebugIdIdentifier="sentry-dbid-f4117c89-affc-4976-9d6c-f382572d2ce1")}catch{}})();const q=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=O(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=$(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!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||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(q,{})}const M=["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 M)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-CEzBRH9X.js → DomesticWireDetailScreen-CQmjKCQc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BqtYq8PY.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-4nWRIid2.js";import{Qz as k,QG as _,gn as J,gm as W,gl as Y,jF as q,NG as K,rR as L,e$ as D,Q5 as V,jD as j,QA as v,QJ as F,jB as G,jY as T}from"./zeni-epic-state-Brhydpej.js";import{bz as M,J as R,w as N,z as U,E as z,v as p,i as S,C as Q,bA as X,o as O,bB as ee,x as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-BqtYq8PY.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-4nWRIid2.js";import{Qz as k,QG as _,gn as J,gm as W,gl as Y,jF as q,NG as K,rR as L,e$ as D,Q5 as V,jD as j,QA as v,QJ as F,jB as G,jY as T}from"./zeni-epic-state-Brhydpej.js";import{bz as M,J as R,w as N,z as U,E as z,v as p,i as S,C as Q,bA as X,o as O,bB as ee,x as te}from"./index-qYSCKekz.js";import{n as Z}from"./mui-ChRNPf14.js";import"./sentry-BtWdTNDK.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]="dbd96fa0-b496-4bf5-a774-7c048aace9e7",e._sentryDebugIdIdentifier="sentry-dbid-dbd96fa0-b496-4bf5-a774-7c048aace9e7")}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(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(Y(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((c=>k(c,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BqtYq8PY.js";import{J as l,G as c,E as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-BqtYq8PY.js";import{J as l,G as c,E as f}from"./index-qYSCKekz.js";import{D as p}from"./mui-ChRNPf14.js";import"./sentry-BtWdTNDK.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]="a9db073a-25eb-4a7d-9307-cd57c4a62335",e._sentryDebugIdIdentifier="sentry-dbid-a9db073a-25eb-4a7d-9307-cd57c4a62335")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=l(),s=o?.valuePx(a)??b.drawerLeftMargin.valuePx(a),d=f();return i.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:n})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as d}from"./sentry-BtWdTNDK.js";import{h as A,u as B,g as G,i as N,j as l,N as q,n as F,o as _,p as $}from"./core-4nWRIid2.js";import{OO as H,e$ as K,Oa as M,lI as R,KH as k,OT as W,NF as Y,kI as z,KI as S,Of as V,Og as X,NH as J,NG as L}from"./zeni-epic-state-Brhydpej.js";import{aX as Q,e as U,v as Z,x as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as d}from"./sentry-BtWdTNDK.js";import{h as A,u as B,g as G,i as N,j as l,N as q,n as F,o as _,p as $}from"./core-4nWRIid2.js";import{OO as H,e$ as K,Oa as M,lI as R,KH as k,OT as W,NF as Y,kI as z,KI as S,Of as V,Og as X,NH as J,NG as L}from"./zeni-epic-state-Brhydpej.js";import{aX as Q,e as U,v as Z,x as tt}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{d as I}from"./decodeURIComponentSafe-B-9vw5Be.js";import{w as et}from"./withTransactionSidePanel-DIWgh7V_.js";import{f as at,c as nt}from"./routePaths-TA66BJgf.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import"./TransactionDetailScreen-Dyormtjy.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]="afb5a497-5d68-44bc-8488-710640d37763",a._sentryDebugIdIdentifier="sentry-dbid-afb5a497-5d68-44bc-8488-710640d37763")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:O,entityNameEncoded:x}=N(),r=I(O??""),p=I(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>K(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const E=l((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??D,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:b(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Ot({entityType:a}){return s.jsx(_,{children:s.jsx($,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Ot as EntityDetailRoutes,Ot as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BLGJhe2d.js → ExpenseAutomationRoutes-Qm3X_H6K.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-BqtYq8PY.js";import ua from"./NotFoundScreen-
|
|
1
|
+
import{j as S}from"./liveblocks-BqtYq8PY.js";import ua from"./NotFoundScreen-B6nbKEPc.js";import{a,b as nn}from"./sentry-BtWdTNDK.js";import{n as Ge,S as ma}from"./mui-ChRNPf14.js";import{u as ke,h as an,g as st,j as D,n as pa,i as Vt,o as ha,p as et}from"./core-4nWRIid2.js";import{e$ as Me,Tx as ga,ou as we,g0 as Ca,ss as Sa,Ty as tt,fD as Le,Tz as Ot,el as fa,fm as Ia,TA as zt,TB as Oe,pc as ka,TC as Ea,pp as ba,oM as on,oK as re,TD as sn,TE as ya,p5 as cn,ps as Ta,TF as ln,oF as va,r_ as Pa,fN as Ae,TG as je,uy as rn,EU as dn,TH as un,TI as Aa,ry as ct,OP as Mt,OR as wa,kL as Ra,OS as xa,kS as Da,c$ as Ua,vO as it,oS as mn,px as $e,p8 as Fa,TJ as _a,NH as Lt,NG as Ve,TK as jt,l7 as Ba,TL as Va,TM as Oa,TN as za,TO as Ma,oZ as La,pA as ze,TP as ja,TQ as $a,TR as qa,pH as Ga,kW as Na,kN as Ja,TS as Ya,kV as $t,P0 as Ka,TT as Za,TU as Ha,ru as Qa,r6 as Wa,py as Ie,r5 as nt,TV as Xa,TW as eo,TX as to,mq as no,bo as ao,ml as qt,m7 as oo,TY as so,gD as co,mi as io,xH as lo,TZ as ro,q6 as uo,q1 as mo,q5 as po,pS as ho,T_ as go,fQ as pn,pg as Co,oV as So,g1 as Gt,pC as fo,T$ as Io,U0 as ko,pz as hn,U1 as Eo,U2 as bo,U3 as yo,U4 as To,U5 as Nt,rG as vo,qZ as Po,NF as Ao,U6 as wo,U7 as Ro,kU as xo,U8 as Do,JI as Uo,kT as Fo,kI as _o,fP as Bo,qv as gn,qR as Vo,pw as Jt,pB as Oo,bE as zo,mf as Mo,mc as Lo,U9 as jo,pR as Yt,qN as Kt,qL as $o,Ua as qo,qA as Go,qg as No,qO as Jo,Ub as Yo,Uc as Ko,qk as Zo,Ud as Ho,qb as Qo,qj as Wo,qh as Xo,qU as es}from"./zeni-epic-state-Brhydpej.js";import{w as qe,i as Y,e as G,x as le,_ as Cn,a0 as Sn,cZ as ts,z as Ne,c_ as Zt,c$ as ns,d0 as as,d1 as os,au as Re,d2 as ss,aZ as Ht,C as fn,d3 as cs,ar as at,a as is,a9 as ls,d4 as rs,a4 as ds,d5 as us,Y as ms,d6 as ps,d7 as hs,A as gs,D as Cs,aS as Ss,d8 as fs,d9 as Is,be as ks,G as Es,aV as bs}from"./index-qYSCKekz.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import{f as Qt,a as ys,b as Ts,g as vs,C as Ps}from"./TransactionDetailScreen-Dyormtjy.js";import{w as As}from"./withTransactionSidePanel-DIWgh7V_.js";import{h as ws,v as Rs}from"./routePaths-TA66BJgf.js";import{g as ot}from"./accountMappingHelper-Cg1rcuy8.js";import{D as xs}from"./DrawerScreen-D1JpfIY3.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./decodeURIComponentSafe-B-9vw5Be.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]="d315bbf5-853d-450e-a282-0b5956682d10",t._sentryDebugIdIdentifier="sentry-dbid-d315bbf5-853d-450e-a282-0b5956682d10")}catch{}})();const Ds=()=>{const t=ke(),s=an(),R=st(),y=D((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=D((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=D((m=>ga(m,y.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=In({mobileExploreReferrer:"Month-End Close Overview"}),x=a.useCallback(((m,O,te=!1)=>{t(we({tenantId:O,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),T=a.useCallback((m=>{const O=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,O??null),t(Ca(y.tenantId,m))}),[y.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[y.tenantId],h=a.useCallback((()=>{const m=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(r.month,r.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),x(r,y.tenantId,!0)}),[x,r,y.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=le(R.state?.pathnameStackToGoBack,R.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((O=>O.progress<100));if(m!=null)return void s(`./${m.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,r]),{areTenantIdsInSync:u}=Cn();return Sn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&x(r,y.tenantId)}),[x,r,l.fetchState,y.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Sa(r))}),[r,l.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&h()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),a.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=R.state?.referrer;G.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Us,{children:S.jsx(ts,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:T,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Us=Ge.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{a5 as i,a6 as l,a7 as p,v as f}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{a5 as i,a6 as l,a7 as p,v as f}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import m from"./NotFoundScreen-B6nbKEPc.js";import{h as b,g as u}from"./core-4nWRIid2.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]="c70580bc-4af3-4de4-ac46-b35ae2a6be4d",e._sentryDebugIdIdentifier="sentry-dbid-c70580bc-4af3-4de4-ac46-b35ae2a6be4d")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-BtWdTNDK.js";import{u,h as l,g as m}from"./core-4nWRIid2.js";import{hz as p,MN as g,MO as _}from"./zeni-epic-state-Brhydpej.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-BtWdTNDK.js";import{u,h as l,g as m}from"./core-4nWRIid2.js";import{hz as p,MN as g,MO as _}from"./zeni-epic-state-Brhydpej.js";import{u as b,L as h,z as y}from"./index-qYSCKekz.js";import"./liveblocks-BqtYq8PY.js";import"./recharts-UIIeT-6j.js";import"./mui-ChRNPf14.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="cedaf845-2fef-4ad4-9061-fcf1b9651295",e._sentryDebugIdIdentifier="sentry-dbid-cedaf845-2fef-4ad4-9061-fcf1b9651295")}catch{}})();function R(){const e=u(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),f=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&f!=null){const t=JSON.parse(f);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}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BqtYq8PY.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as N,N as te,o as ne,p}from"./core-4nWRIid2.js";import{MG as k,MH as v,MI as M,BC as B,Bo as T,MJ as D,MK as oe,ML as se,Bs as ie,fE as $,Bz as le,Bw as re}from"./zeni-epic-state-Brhydpej.js";import{J as g,o as r,r as de,e as j,m as G,s as ce,v as me,O as pe,x as H,w as ue,i as he,y as xe,A as ge,E as fe,B as we,C as be,Z as Se,Q as ye,S as ke,F as ve,G as je,H as $e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-BqtYq8PY.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as N,N as te,o as ne,p}from"./core-4nWRIid2.js";import{MG as k,MH as v,MI as M,BC as B,Bo as T,MJ as D,MK as oe,ML as se,Bs as ie,fE as $,Bz as le,Bw as re}from"./zeni-epic-state-Brhydpej.js";import{J as g,o as r,r as de,e as j,m as G,s as ce,v as me,O as pe,x as H,w as ue,i as he,y as xe,A as ge,E as fe,B as we,C as be,Z as Se,Q as ye,S as ke,F as ve,G as je,H as $e}from"./index-qYSCKekz.js";import{n as m}from"./mui-ChRNPf14.js";import f from"./NotFoundScreen-B6nbKEPc.js";import{a as I}from"./sentry-BtWdTNDK.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="b245afc9-ada8-4ea7-97c7-75c36a326dca",e._sentryDebugIdIdentifier="sentry-dbid-b245afc9-ada8-4ea7-97c7-75c36a326dca")}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-BqtYq8PY.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as F,g as _,h as O,t as w,j as l,N as x}from"./core-4nWRIid2.js";import{z as r,E as P,a as V,f as A,e as N,h as $,n as B,Q,k as R}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-BqtYq8PY.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as F,g as _,h as O,t as w,j as l,N as x}from"./core-4nWRIid2.js";import{z as r,E as P,a as V,f as A,e as N,h as $,n as B,Q,k as R}from"./index-qYSCKekz.js";import{e$ as W,Mr as q,MB as G,Ms as H,fE as J,g4 as K,Mx as X,gu as Y,c_ as Z,MC as ee,MD as te}from"./zeni-epic-state-Brhydpej.js";import{n as ne}from"./mui-ChRNPf14.js";import{u as ae}from"./useDeviceId-BVGc_c85.js";import{f as se}from"./analyticsHelper-CBp9b8VI.js";import{t as ie}from"./getLocaleForTenant-BhD_5oG2.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="26bf91bf-a9b5-41ac-a73a-cb6ccfc5f161",t._sentryDebugIdIdentifier="sentry-dbid-26bf91bf-a9b5-41ac-a73a-cb6ccfc5f161")}catch{}})();const C=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Ce(){const t=F(),s=_(),m=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:c,twoFAPhoneNumber:D,magicLinkEmail:d,verifyDeviceFetchState:E,resendVerifyDeviceOTPFetchState:M}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),b=l((e=>q(e))),T=r.getSignedInUser(),v=P().mode;f.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,g)))}),[n,p,t,i,g,a?.zeniSessionId]),f.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),a.zeniSessionId),J(a.userId,a.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),Y().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[h,S,y,a,o,b,v,s.state,t]);const z=f.useCallback((()=>{m("/signin/auth")}),[m]),U=f.useCallback((()=>{i!=null&&c!=null&&d!=null&&t(ee(i,d,c))}),[i,c,t,d]),j=f.useCallback((e=>{i!=null&&n!=null&&d!=null&&c!=null&&t(te(e,i,d,c))}),[i,n,t,d,c]);if(I==="Completed"&&c!=null)return u.jsx(B,{phoneNumber:D,verifyOtpFetchState:E.fetchState,resendVerifyDeviceOTPFetchState:M,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:z});if(h==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||T!=null){const e=s.state?.origin??"/";return u.jsx(x,{to:e,state:{...s.state,origin:""}})}if(!C(n,p)||g==null||I==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(x,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(Q,{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 B}from"./liveblocks-BqtYq8PY.js";import{a as c}from"./sentry-BtWdTNDK.js";import{u as fe,j as n,i as We,g as He,h as Je,l as R}from"./core-4nWRIid2.js";import{e$ as me,fJ as Ke,fK as pe,fv as Qe,bn as Xe,e_ as qe,fL as ea,fM as aa,fO as ta,fR as na,fS as g,fU as sa,fV as de,fY as oa,fW as ia,fX as ra,fZ as da,cQ as la,f$ as ca,cW as ua,fu as fa,g4 as ma,g5 as pa,g3 as ba}from"./zeni-epic-state-Brhydpej.js";import{a9 as ha,aa as Sa,A as ga,w as Ea,z as k,B as ka,u as Ca,i as r,d as ya,R as Ia,ab as Ta,D as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as $a,ah as xa,ai as ue,e as G,a1 as Ma,x as _,aj as P,ak as Ra}from"./index-
|
|
1
|
+
import{j as B}from"./liveblocks-BqtYq8PY.js";import{a as c}from"./sentry-BtWdTNDK.js";import{u as fe,j as n,i as We,g as He,h as Je,l as R}from"./core-4nWRIid2.js";import{e$ as me,fJ as Ke,fK as pe,fv as Qe,bn as Xe,e_ as qe,fL as ea,fM as aa,fO as ta,fR as na,fS as g,fU as sa,fV as de,fY as oa,fW as ia,fX as ra,fZ as da,cQ as la,f$ as ca,cW as ua,fu as fa,g4 as ma,g5 as pa,g3 as ba}from"./zeni-epic-state-Brhydpej.js";import{a9 as ha,aa as Sa,A as ga,w as Ea,z as k,B as ka,u as Ca,i as r,d as ya,R as Ia,ab as Ta,D as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as $a,ah as xa,ai as ue,e as G,a1 as Ma,x as _,aj as P,ak as Ra}from"./index-qYSCKekz.js";import{D as Ga}from"./mui-ChRNPf14.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]="141e3a32-ae66-4913-9711-f2175b9c3bae",f._sentryDebugIdIdentifier="sentry-dbid-141e3a32-ae66-4913-9711-f2175b9c3bae")}catch{}})();const Pa=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),a=He(),C=ga(),o=Je(),V=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),L=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[w,j]=c.useState(void 0),A=R("/:tenantEmailDomain/dashboard")!==null,Z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));c.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:_e}=i(r.isExpenseAutomationEnabledV2),W=Ia(),{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,xe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),H=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Re=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:Ge}=Ta();c.useEffect((()=>{const e=setTimeout((()=>Ge?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;j(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else j(0)}),[Q,X,q]),c.useEffect((()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,V.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{w!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:w},"comments")))}),[w,$.fetchState]);const Pe={fetchStatus:Me,count:xe},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 Be=_a(),te=n((e=>ia(e,S,h,_e,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Ve=A&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!A&&!Z?void 0:"disabled",Ne=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Ne),Oe=s?.rewardsLastViewedTime==null,Le=h?.userEmail!=null&&Y.fetchState==="Completed"&&ca(Y.notificationSettings,h.userEmail,z,s),se=wa(),je=se&&Aa(a),oe=ua(Be?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=c.useState(x);c.useEffect((()=>{re(x())}),[x]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return B.jsx(Ga,{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:B.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:Le,notificationCountDetails:Pe,isExpenseAutomationEnabledForUser:W,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=H===0&&J>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=H===0&&J>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(G.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=P(l)&&l!=="command_center";if(P(e.type)&&E[s.tenantId]!=null&&G.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ra(e.type);ue(e.type)?(L!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=P(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":xa(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":M?"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;G.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:je,aiCfoView:O,isOnDashboard:A,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),ja=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return B.jsx(Pa,{...f,...a})};export{ja as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BqtYq8PY.js";import{h as n,n as e}from"./core-4nWRIid2.js";import{U as i}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-BqtYq8PY.js";import{h as n,n as e}from"./core-4nWRIid2.js";import{U as i}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import"./sentry-BtWdTNDK.js";import"./zeni-epic-state-Brhydpej.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as ct,a as mt,n as dt,j as E}from"./liveblocks-BqtYq8PY.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{m as ct,a as mt,n as dt,j as E}from"./liveblocks-BqtYq8PY.js";import lt from"./NotFoundScreen-B6nbKEPc.js";import{a as k}from"./sentry-BtWdTNDK.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as q}from"./core-4nWRIid2.js";import{cx as St,fL as H,e$ as K,fZ as bt,fS as b,Ts as O,fV as d,fK as y,sM as F,yi as It,Tt,fJ as Ct,f$ as yt,sR as _t,Tu as $,bo as M,fD as w,sV as z,Tv as At,cJ as Et,cC as Nt}from"./zeni-epic-state-Brhydpej.js";import{_ as xt,z as Bt,w as wt,i as Rt,a0 as vt,cW as Dt,x as N,a9 as Pt,cX as Ut,aa as Gt,v as $t}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="28619c7e-9778-4597-a9c8-fe1bcb49fc90",t._sentryDebugIdIdentifier="sentry-dbid-28619c7e-9778-4597-a9c8-fe1bcb49fc90")}catch{}})();const Ft=(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=H(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=K(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(z("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t($([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(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(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(F("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(z("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(x(r),t($([r],M())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Ft(s,x).then((()=>{t($(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S((e=>H(e))),o=S((e=>K(e))),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Mt({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const Q=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),v=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),D=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=Dt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:L,isLoading:W,fetchMore:J,isFetchingMore:X,hasFetchedAll:Z}=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((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,D]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&W===!1&&B!=null&&L!=null){const e=`dashboard_${o.companyId}`,p=B.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const G=L.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(X||Z===!0||J==null||J(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,X,T,Z,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];v==="all"?A.push("read","unread"):v!=="mentions"&&A.push(v),s(F("task_manager",C,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{u as T,g as A,j as o,N as R}from"./core-4nWRIid2.js";import{MQ as j,e$ as C,fR as P,MR as x,MS as z,MT as D,MU as L,ok as N,LN as k}from"./zeni-epic-state-Brhydpej.js";import{z as h,M as I}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-BqtYq8PY.js";import{a as r}from"./sentry-BtWdTNDK.js";import{u as T,g as A,j as o,N as R}from"./core-4nWRIid2.js";import{MQ as j,e$ as C,fR as P,MR as x,MS as z,MT as D,MU as L,ok as N,LN as k}from"./zeni-epic-state-Brhydpej.js";import{z as h,M as I}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="a8e0b81d-2257-4d8c-bcb7-43630c5dd631",n._sentryDebugIdIdentifier="sentry-dbid-a8e0b81d-2257-4d8c-bcb7-43630c5dd631")}catch{}})();function ee(){const n=T(),s=A(),{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(),m=o((e=>C(e))),l=o((e=>P(e))),d=o((e=>e.tenantState.fetchState)),b=o(x),y=o(z),c=o(D),[S,v]=r.useState(null),[E,M]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const U=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((_=>_.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(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.")}}}):f.jsx(R,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CxkAljmn.js → PandLWithForecastRoutes-BBHF28-E.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BqtYq8PY.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-4nWRIid2.js";import{e$ as U,sA as R,s8 as X,Nl as v,s3 as S,bs as ee,bn as ae,bZ as te,s4 as se,Nm as oe,N8 as C,dL as re,wf as ne,Nn as ce,wC as ie,fI as le,fG as de}from"./zeni-epic-state-Brhydpej.js";import{z as me,_ as fe,a0 as pe,D as ue,w,i as N,Z as he,e as M,ap as ge,x as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-BqtYq8PY.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-4nWRIid2.js";import{e$ as U,sA as R,s8 as X,Nl as v,s3 as S,bs as ee,bn as ae,bZ as te,s4 as se,Nm as oe,N8 as C,dL as re,wf as ne,Nn as ce,wC as ie,fI as le,fG as de}from"./zeni-epic-state-Brhydpej.js";import{z as me,_ as fe,a0 as pe,D as ue,w,i as N,Z as he,e as M,ap as ge,x as Fe}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import be from"./NotFoundScreen-B6nbKEPc.js";import{F as Ie}from"./FeaturePreviewScreen-BKTS5XLx.js";import{a as g}from"./sentry-BtWdTNDK.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import{u as Se}from"./useInitialThreadRequest-BeFUEHq1.js";import{t as Te}from"./routePaths-TA66BJgf.js";import{M as ye}from"./MobileAppDrawer-hdYoVCXp.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="3e5fa4ad-958f-4b79-a5aa-ee910c33c0c8",s._sentryDebugIdIdentifier="sentry-dbid-3e5fa4ad-958f-4b79-a5aa-ee910c33c0c8")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=K((function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(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(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(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,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),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=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>U(t))),$=y.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),A=d((t=>t.reportUIOptionsState.selectedForecast)),D=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,E,P)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}}),[c,p,e,l,i,m,u,R,S,F]);const k=ue(),B=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:L}=G(N.isReportsCommentingEnabled),W=Se(L?y?.companyId:void 0,{clearParams:l&&m}),[Y,Z]=g.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(xe,{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:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BqtYq8PY.js";import{Nh as oe,e$ as J,kI as H,fI as Q,fG as ie,KL as ee,MX as re,vc as ke,Ni as Y,v1 as ve,vm as Ee,vg as le,v5 as ce,vk as Pe,vh as je,Nj as de,x1 as Le,fs as Te,gk as Ae,Nk as _,v9 as pe,v8 as ue,vp as Re,c7 as Fe}from"./zeni-epic-state-Brhydpej.js";import{J as me,w as ae,i as G,z as K,d as ge,g as fe,I as he,al as Ce,am as Oe,G as ye,o as O,K as be,a as M,an as Ve,_ as Ze,a0 as Be,Z as Ue,e as Se,h as $e,x as ze,ao as _e,D as Ge}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-BqtYq8PY.js";import{Nh as oe,e$ as J,kI as H,fI as Q,fG as ie,KL as ee,MX as re,vc as ke,Ni as Y,v1 as ve,vm as Ee,vg as le,v5 as ce,vk as Pe,vh as je,Nj as de,x1 as Le,fs as Te,gk as Ae,Nk as _,v9 as pe,v8 as ue,vp as Re,c7 as Fe}from"./zeni-epic-state-Brhydpej.js";import{J as me,w as ae,i as G,z as K,d as ge,g as fe,I as he,al as Ce,am as Oe,G as ye,o as O,K as be,a as M,an as Ve,_ as Ze,a0 as Be,Z as Ue,e as Se,h as $e,x as ze,ao as _e,D as Ge}from"./index-qYSCKekz.js";import{D as we,n as N,S as xe}from"./mui-ChRNPf14.js";import te from"./NotFoundScreen-B6nbKEPc.js";import{a as c}from"./sentry-BtWdTNDK.js";import{u as se,i as He,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-4nWRIid2.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import{M as Xe}from"./MobileAppDrawer-hdYoVCXp.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="15c1a0fc-ba67-480c-98f3-5fc84b414dea",e._sentryDebugIdIdentifier="sentry-dbid-15c1a0fc-ba67-480c-98f3-5fc84b414dea")}catch{}})();const qe={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=He(),r=g((l=>oe(l))),p=g((l=>J(l))),v=g((l=>H(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(G.isDebitCardFeatureEnabled),E=Q(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),b()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(G.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:R}=fe(p?.tenantId),y=!j||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Qe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Qe=N(xe)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-BqtYq8PY.js";import E from"./NotFoundScreen-B6nbKEPc.js";import{a as r}from"./sentry-BtWdTNDK.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-4nWRIid2.js";import{e$ as B,Tw as b,bq as F,bn as N,il as V,fD as $}from"./zeni-epic-state-Brhydpej.js";import{A as q,z as I,a0 as Y,cY as G}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import{M as J}from"./MobileAppDrawer-hdYoVCXp.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.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]="0fd05386-003a-4fce-9f9c-675eb25395a1",e._sentryDebugIdIdentifier="sentry-dbid-0fd05386-003a-4fce-9f9c-675eb25395a1")}catch{}})();const K=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)}}}))(G),L=()=>{const e=_(),t=v(),c=q(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),D=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(d),x=C||D||k,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:R}=H({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:A,onAskAiCfoClick:R})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-BqtYq8PY.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BtWdTNDK.js";import{L as dt,bZ as Tc,e$ as Ac,Mr as Rc,MV as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-Brhydpej.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-BGj88Dzy.js";import{r as un}from"./empty-dwCpPdyI.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-xuF5byC3.js";import{r as Gl}from"./index-DmHtkhiK.js";import{r as zl}from"./index-ot86Rern.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-4nWRIid2.js";import{u as Kl,z as Pc,L as Wl,N as Jl,T as Xl,m as Ql,e as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-BqtYq8PY.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BtWdTNDK.js";import{L as dt,bZ as Tc,e$ as Ac,Mr as Rc,MV as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-Brhydpej.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-BGj88Dzy.js";import{r as un}from"./empty-dwCpPdyI.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-xuF5byC3.js";import{r as Gl}from"./index-DmHtkhiK.js";import{r as zl}from"./index-ot86Rern.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-4nWRIid2.js";import{u as Kl,z as Pc,L as Wl,N as Jl,T as Xl,m as Ql,e as tf}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{d as Pe}from"./decodeURIComponentSafe-B-9vw5Be.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]="1f3d7c37-3dfb-46f6-9dc3-b822c7f222e9",t._sentryDebugIdIdentifier="sentry-dbid-1f3d7c37-3dfb-46f6-9dc3-b822c7f222e9")}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-BqtYq8PY.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-BqtYq8PY.js";import _ from"./NotFoundScreen-B6nbKEPc.js";import{a as p}from"./sentry-BtWdTNDK.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as W,p as g}from"./core-4nWRIid2.js";import{e$ as I,QO as b,R2 as S,G0 as V,F9 as U,F$ as d,FS as $,Rf as B,G2 as F}from"./zeni-epic-state-Brhydpej.js";import{z as N,a9 as L,bZ as G,ag as T,bC as z,b_ as K}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.js";import{u as Q,R as A}from"./ReimbursementApprovalRuleDetailScreen-Dgh8Yquq.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]="7768e317-ad5b-4e01-8e46-fc30afeed881",e._sentryDebugIdIdentifier="sentry-dbid-7768e317-ad5b-4e01-8e46-fc30afeed881")}catch{}})();const y="reimbursement-approval-rule-update",Z=k((function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(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(G)),q=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>b(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,O,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})},j="reimbursement-approval-rule-update",H=k((function(e){const o=b(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(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(F(t,!0))}}}))(L(K)),J=()=>{const e=u((n=>I(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=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>b(a)));Q();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}.${j}`]:[],eventCallback:(a,O,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(g,{path:"/",element:r.jsx(J,{})}),r.jsx(g,{path:"/new",element:r.jsx(A,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(g,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as b}from"./liveblocks-BqtYq8PY.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as T,j as y,h as O,g as _,i as V,n as k}from"./core-4nWRIid2.js";import{l8 as L,R2 as w,QO as C,FV as F,G5 as B,G0 as A,G1 as E,R3 as j,e$ as Q,F$ as z}from"./zeni-epic-state-Brhydpej.js";import{z as P,E as N,C as $,bP as K,ag as q,bC as W,bQ as H}from"./index-
|
|
1
|
+
import{j as b}from"./liveblocks-BqtYq8PY.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as T,j as y,h as O,g as _,i as V,n as k}from"./core-4nWRIid2.js";import{l8 as L,R2 as w,QO as C,FV as F,G5 as B,G0 as A,G1 as E,R3 as j,e$ as Q,F$ as z}from"./zeni-epic-state-Brhydpej.js";import{z as P,E as N,C as $,bP as K,ag as q,bC as W,bQ as H}from"./index-qYSCKekz.js";import"./mui-ChRNPf14.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]="1c68969a-1d48-4cf6-9d83-94b96bc64b90",e._sentryDebugIdIdentifier="sentry-dbid-1c68969a-1d48-4cf6-9d83-94b96bc64b90")}catch{}})();function J(){const e=T(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const M=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(K);function X(){const e=O(),s=T(),t=_(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser: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((g=>{const S=g.actorKind?.selectedOption,U=g.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((G=>({type:"user",subType:void 0,userId:G.userId,idType:"user",isImplicitActor:!1}))));const x=g.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.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(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=y((t=>Q(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(X,{})}function Z(){const e=O(),s=T(),t=_(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BqtYq8PY.js";import{h as J,u as de,g as H,i as X,j as w,N as _,n as Q,l as ct,o as dt,p as C}from"./core-4nWRIid2.js";import{e$ as V,Rg as ue,c7 as pe,F4 as Ue,kT as ut,Fh as oe,Fg as re,Rh as pt,bn as be,gv as Le,Ri as bt,NF as gt,kI as Pe,NG as Ae,NH as ht,jD as ft,QA as St,jS as Rt,EU as It,uy as yt,jK as At,FE as $e,Rj as Me,Rk as kt,Rl as vt,Rm as Ct,Rn as Et,Ro as wt,Fo as ke,jY as xt,QJ as Bt,Fi as Tt,F2 as Ft,Rp as Dt,F1 as jt,Rq as Ut,Fa as ve,Fs as Lt,Fr as Pt,Fn as $t,Rr as _e,KL as Mt,bq as _t,Fd as Nt,FW as Gt,Rs as Ot,Rt as zt,FA as Zt,Fx as Ce,Q3 as Ht,E$ as Vt,Ru as Ne,Gm as Ee,Gu as Wt,Rv as Jt,Rw as z,Rx as Qt,Ry as Ge,Rz as qt,RA as Oe,RB as ze,FM as le,bu as Kt,bK as ge,cJ as he,fI as Ze,fG as He,RC as Yt,fD as Xt,Qg as en,RD as tn,RE as Ve,Qk as nn,R2 as an,RF as sn,Rf as on,Gr as we,Gq as rn,RG as ln,RH as mn,RI as cn,RJ as dn,RK as un,QP as pn,Gh as bn,Gl as gn,bs as hn,bJ as fn,cD as Sn,cr as Rn,bt as In,Mt as yn,cT as An,cW as kn,cV as vn,cC as Cn}from"./zeni-epic-state-Brhydpej.js";import{A as We,J as Je,w as ee,i as E,z as P,b$ as Qe,Z as te,e as k,aM as xe,o as D,au as Y,I as En,a as qe,c0 as wn,x as Z,a0 as Ke,c1 as xn,D as ne,c2 as Bn,_ as Tn,G as Fn,C as fe,h as Ye,a9 as Dn,bn as jn,a4 as Un,E as Xe,c3 as Ln,d as Pn}from"./index-CbGX11uA.js";import{n as N,S as $n}from"./mui-ChRNPf14.js";import me from"./NotFoundScreen-D8y3QSjF.js";import{S as Be}from"./SetupPagesScreen-BX3zI3tV.js";import{F as et}from"./FeaturePreviewScreen-BYw0siNX.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DuEP5Klm.js";import{u as tt}from"./useInitialThreadRequest-BMuxer3t.js";import{D as Mn}from"./DrawerScreen-CTCbWuBb.js";import{M as nt}from"./MobileAppDrawer-C850zeFL.js";import{R as _n}from"./ReimbursementApprovalRoutes-nJxxaKUX.js";import{FallBackRoute as Nn}from"./ScreenRoutes-DBgtMxcS.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./analyticsHelper-BZTNTJma.js";import"./routePaths-BYuMJjxP.js";import"./BusinessVerificationPageScreen-BwMN9nGs.js";import"./ReimbursementApprovalRuleDetailScreen-DXovejDg.js";import"./getLocaleForTenant-Bpp7IHaZ.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]="85fcf059-ebf4-41ec-a636-d39f3467912a",e._sentryDebugIdIdentifier="sentry-dbid-85fcf059-ebf4-41ec-a636-d39f3467912a")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=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"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=qe.getLocalizedStrings(),On=Q((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(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=gt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.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:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ve(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ve(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ke(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(ke("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(kt());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(wn);function Fe(){const e=J(),t=de(),n=H(),{reimbursementId:r}=X(),d=We(),c=Je(),[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=H().pathname,F=x.includes("edit"),A=x.includes("reimbursement/new"),[j,B]=f.useState(!1),v=P.getSignedInUser(),R=w((p=>V(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(A&&!j||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(v==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Qe,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:k,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(Hn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,v?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,v?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Jn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BqtYq8PY.js";import{h as J,u as de,g as H,i as X,j as w,N as _,n as Q,l as ct,o as dt,p as C}from"./core-4nWRIid2.js";import{e$ as V,Rg as ue,c7 as pe,F4 as Ue,kT as ut,Fh as oe,Fg as re,Rh as pt,bn as be,gv as Le,Ri as bt,NF as gt,kI as Pe,NG as Ae,NH as ht,jD as ft,QA as St,jS as Rt,EU as It,uy as yt,jK as At,FE as $e,Rj as Me,Rk as kt,Rl as vt,Rm as Ct,Rn as Et,Ro as wt,Fo as ke,jY as xt,QJ as Bt,Fi as Tt,F2 as Ft,Rp as Dt,F1 as jt,Rq as Ut,Fa as ve,Fs as Lt,Fr as Pt,Fn as $t,Rr as _e,KL as Mt,bq as _t,Fd as Nt,FW as Gt,Rs as Ot,Rt as zt,FA as Zt,Fx as Ce,Q3 as Ht,E$ as Vt,Ru as Ne,Gm as Ee,Gu as Wt,Rv as Jt,Rw as z,Rx as Qt,Ry as Ge,Rz as qt,RA as Oe,RB as ze,FM as le,bu as Kt,bK as ge,cJ as he,fI as Ze,fG as He,RC as Yt,fD as Xt,Qg as en,RD as tn,RE as Ve,Qk as nn,R2 as an,RF as sn,Rf as on,Gr as we,Gq as rn,RG as ln,RH as mn,RI as cn,RJ as dn,RK as un,QP as pn,Gh as bn,Gl as gn,bs as hn,bJ as fn,cD as Sn,cr as Rn,bt as In,Mt as yn,cT as An,cW as kn,cV as vn,cC as Cn}from"./zeni-epic-state-Brhydpej.js";import{A as We,J as Je,w as ee,i as E,z as P,b$ as Qe,Z as te,e as k,aM as xe,o as D,au as Y,I as En,a as qe,c0 as wn,x as Z,a0 as Ke,c1 as xn,D as ne,c2 as Bn,_ as Tn,G as Fn,C as fe,h as Ye,a9 as Dn,bn as jn,a4 as Un,E as Xe,c3 as Ln,d as Pn}from"./index-qYSCKekz.js";import{n as N,S as $n}from"./mui-ChRNPf14.js";import me from"./NotFoundScreen-B6nbKEPc.js";import{S as Be}from"./SetupPagesScreen-D2lEnwjt.js";import{F as et}from"./FeaturePreviewScreen-BKTS5XLx.js";import{a as f}from"./sentry-BtWdTNDK.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-yAJW2Zxp.js";import{u as tt}from"./useInitialThreadRequest-BeFUEHq1.js";import{D as Mn}from"./DrawerScreen-D1JpfIY3.js";import{M as nt}from"./MobileAppDrawer-hdYoVCXp.js";import{R as _n}from"./ReimbursementApprovalRoutes-62K0ZFMF.js";import{FallBackRoute as Nn}from"./ScreenRoutes-BYtpyV-M.js";import"./recharts-UIIeT-6j.js";import"./analytics-CP-wGaZJ.js";import"./plaid-j-SLH4pe.js";import"./dnd-DPx0nGIt.js";import"./stripe-cKAAJElX.js";import"./lottie-C6mBeCcV.js";import"./lexical-Dce73siJ.js";import"./pdf-CHegScPw.js";import"./utils-BGj88Dzy.js";import"./analyticsHelper-CBp9b8VI.js";import"./routePaths-TA66BJgf.js";import"./BusinessVerificationPageScreen-BZk1AoM_.js";import"./ReimbursementApprovalRuleDetailScreen-Dgh8Yquq.js";import"./getLocaleForTenant-BhD_5oG2.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]="85fcf059-ebf4-41ec-a636-d39f3467912a",e._sentryDebugIdIdentifier="sentry-dbid-85fcf059-ebf4-41ec-a636-d39f3467912a")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=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"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=qe.getLocalizedStrings(),On=Q((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(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=gt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.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:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ve(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ve(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ke(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(ke("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(kt());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(wn);function Fe(){const e=J(),t=de(),n=H(),{reimbursementId:r}=X(),d=We(),c=Je(),[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=H().pathname,F=x.includes("edit"),A=x.includes("reimbursement/new"),[j,B]=f.useState(!1),v=P.getSignedInUser(),R=w((p=>V(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(A&&!j||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(v==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Qe,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:k,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(Hn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,v?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,v?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Jn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|