@zeniai/web-app-ui 5.2.14-dev → 5.2.14-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-C5ICjwhT.js → AddressRoutes-DpL0AFgf.js} +1 -1
- package/dist/assets/{AddressScreen-DqXE5RDJ.js → AddressScreen-vfbZQ8IJ.js} +1 -1
- package/dist/assets/{AiCfoScreen-Bq9qNM-U.js → AiCfoScreen-CXh_Msfw.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Cgsqt2XF.js → BillPayApprovalRoutes-BtIAcI70.js} +1 -1
- package/dist/assets/{BillPayRoutes-D8ICOArG.js → BillPayRoutes-IGbJLx9e.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DlMhX3L_.js → BusinessVerificationPageScreen-YZ8HV6ZO.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-evFd6UUn.js → CardsAiCfoScreen-CtlFalCK.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-czvHDNab.js → ChargeCardRoutes-D5RwKtuA.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CzLA5zCy.js → CompanyPassportScreen-CLIUaKnq.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-VR4MFOhW.js → ConnectionAuthScreen-BC1A1vLv.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-B7Anpyxh.js → CustomerOnboardingAuthScreen-p0YtWw1K.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-CeoeigLq.js → CustomerOnboardingRoutes-cwu-Tdz_.js} +1 -1
- package/dist/assets/{DashboardRoutes-522JIWbO.js → DashboardRoutes-eo5bBebP.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CBA28Llo.js → DefaultTenantHome-hN6xKUei.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C-1bKP7r.js → DomesticWireDetailScreen-B3xL-JF2.js} +1 -1
- package/dist/assets/{DrawerScreen-DAMt3OKh.js → DrawerScreen-D9iKOMtR.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CGG59Jmf.js → EntityDetailRoutes-CiYlohhA.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DcYqfqSi.js → ExpenseAutomationRoutes-Dwvz_iW2.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-IYXzvJjG.js → FeaturePreviewScreen-s3Vp54dP.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-LTrYsA2J.js → HubSpotOAuthCallbackScreen-Dfdai8yG.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DzdDjge4.js → MagicLinkRoutes-B9ocY9la.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CC54CnuQ.js → MagicLinkSignInScreen-DPX4jd-D.js} +1 -1
- package/dist/assets/{MobileAppDrawer-7KFASJmR.js → MobileAppDrawer-zOj9FdCe.js} +1 -1
- package/dist/assets/{NotFoundScreen-1FWTFg5q.js → NotFoundScreen-BUTiP4R3.js} +1 -1
- package/dist/assets/{NotificationRoutes-CLLE6idd.js → NotificationRoutes-1pWXvJma.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-D4soKi0X.js → OAuthConsentScreen-BPaiUj7h.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CLOwX80d.js → PandLWithForecastRoutes-NBWVQC3h.js} +1 -1
- package/dist/assets/{PeopleRoutes-RKPAQcdN.js → PeopleRoutes-CLNbH5xH.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BL-ag8V3.js → PerformanceRoutes-BSfxQLbr.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Doubr8Lv.js → QBOConnectionScreen-C74uxhh_.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CuXrRY6O.js → ReimbursementApprovalRoutes-BPKjFZxh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CxT_ZU1Q.js → ReimbursementApprovalRuleDetailScreen-BxwMtMxD.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B9v1csuM.js → ReimbursementRoutes-FFTqDLD2.js} +1 -1
- package/dist/assets/{ReportsRoutes-CYYBopNx.js → ReportsRoutes-9W0p6Lya.js} +1 -1
- package/dist/assets/{RewardsRoutes-DQ-aEUje.js → RewardsRoutes-CRlPlndV.js} +1 -1
- package/dist/assets/{ScreenRoutes-3ZRh9969.js → ScreenRoutes-nLpBg7A5.js} +2 -2
- package/dist/assets/{SettingsRoutes-CLHJHv6D.js → SettingsRoutes-Qph7SFpV.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D-KjoZ4s.js → SetupPagesScreen-BKdx-uAP.js} +1 -1
- package/dist/assets/{SignInScreen-DzUQQLWX.js → SignInScreen-Ci0IgHAA.js} +1 -1
- package/dist/assets/{SignOutScreen-CrFXavCN.js → SignOutScreen-X4KjNVza.js} +1 -1
- package/dist/assets/{TaskListScreen-D1GJ72DV.js → TaskListScreen-D6IETmcD.js} +1 -1
- package/dist/assets/{TaskRoutes-BShsttwI.js → TaskRoutes-h0bmRs3S.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-NBFzTv3J.js → TransactionDetailRoutes-jM0nexAU.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BXByY28g.js → TransactionDetailScreen-fRW89NFJ.js} +1 -1
- package/dist/assets/{TransactionListRoutes-ClVpGZj3.js → TransactionListRoutes-DvFnObzs.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CmxZydJL.js → TreasuryRoutes-CA5R7Rfo.js} +1 -1
- package/dist/assets/{VendorsRoutes-caL_MoH5.js → VendorsRoutes-D92Qn8lw.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C_2P8pKj.js → WiseConfirmationScreen-tXGY6zhr.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-3mgFL_9o.js → ZeniAccountRoutes-BHdZYuyZ.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-B27kJkJn.js → ZeniAccountStatementScreen-DyRW5BgC.js} +1 -1
- package/dist/assets/{analyticsHelper-BaOtwD25.js → analyticsHelper-DFsb6qRL.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C5iVY_JU.js → getLocaleForTenant-BK33tgnz.js} +1 -1
- package/dist/assets/{index-CdzL9szH.js → index-24dzDu8E.js} +5 -5
- package/dist/assets/{routePaths-CHhQNN3M.js → routePaths-Bty2j8lo.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-rxliwAgH.js → useAiCfoDashboardSuggestedQuestionsChips-dGXlt22_.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-fe0P1a5j.js → useAskAiCfoHostNavButtonProps-DG7vn-Xl.js} +1 -1
- package/dist/assets/{useCashManagementBanner-BT0je4k3.js → useCashManagementBanner-Y_B1najt.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BbwX5V1a.js → useChargeCardPusherEvents-BcvA45YR.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BeuZj6XY.js → useEmailConnectResultRefresh-Bp3LBWrf.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-E7aaQNIx.js → useInitialThreadRequest-D3N5n5MK.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-B_GhVWS9.js → withTransactionSidePanel-Cu9CJKJJ.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-0jcT8Dx_.js";import{a as u}from"./sentry-Cix5j_Oe.js";import{u as y,j as b,n as w,g as A,N}from"./core-DrRun-Wp.js";import{Mf as U,eZ as _,g3 as k,Mg as L,oi as R,Mh as z}from"./zeni-epic-state-D1OApLJ3.js";import{u as O,z as f,L as T,t as I,O as j,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-0jcT8Dx_.js";import{a as u}from"./sentry-Cix5j_Oe.js";import{u as y,j as b,n as w,g as A,N}from"./core-DrRun-Wp.js";import{Mf as U,eZ as _,g3 as k,Mg as L,oi as R,Mh as z}from"./zeni-epic-state-D1OApLJ3.js";import{u as O,z as f,L as T,t as I,O as j,b as $}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{t as P}from"./getLocaleForTenant-BK33tgnz.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="629357ad-2f1f-43ad-9e60-676a80845bdc",t._sentryDebugIdIdentifier="sentry-dbid-629357ad-2f1f-43ad-9e60-676a80845bdc")}catch{}})();const M=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>U(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(M,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-C-1bKP7r.js → DomesticWireDetailScreen-B3xL-JF2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-0jcT8Dx_.js";import{h as y,g as C,j as h,n as A,i as B}from"./core-DrRun-Wp.js";import{Qm as k,Qt as _,gl as W,gk as J,gj as q,jD as K,Nw as L,rP as M,eZ as D,PU as V,jB as j,Qn as S,Qw as T,jz as F,jW as G}from"./zeni-epic-state-D1OApLJ3.js";import{bz as X,J as N,A as R,z as U,y as z,s as p,c as v,C as Z,bA as Y,o as O,bB as ee,w as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-0jcT8Dx_.js";import{h as y,g as C,j as h,n as A,i as B}from"./core-DrRun-Wp.js";import{Qm as k,Qt as _,gl as W,gk as J,gj as q,jD as K,Nw as L,rP as M,eZ as D,PU as V,jB as j,Qn as S,Qw as T,jz as F,jW as G}from"./zeni-epic-state-D1OApLJ3.js";import{bz as X,J as N,A as R,z as U,y as z,s as p,c as v,C as Z,bA as Y,o as O,bB as ee,w as te}from"./index-24dzDu8E.js";import{n as Q}from"./mui-BCzMCgwZ.js";import"./sentry-Cix5j_Oe.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]="51d65557-d0bc-478c-916f-5c80fe2d81b2",e._sentryDebugIdIdentifier="sentry-dbid-51d65557-d0bc-478c-916f-5c80fe2d81b2")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=y(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-0jcT8Dx_.js";import{J as c,H as f,y as l}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-0jcT8Dx_.js";import{J as c,H as f,y as l}from"./index-24dzDu8E.js";import{D as b}from"./mui-BCzMCgwZ.js";import"./sentry-Cix5j_Oe.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]="319c5930-e5fb-4b9b-9fc6-117cfd4193ad",e._sentryDebugIdIdentifier="sentry-dbid-319c5930-e5fb-4b9b-9fc6-117cfd4193ad")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=c(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=l();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-0jcT8Dx_.js";import{a as d}from"./sentry-Cix5j_Oe.js";import{h as v,u as A,g as N,i as B,j as l,N as q,n as F,o as _,p as K}from"./core-DrRun-Wp.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as I,OJ as Y,Nv as $,kG as J,Ky as S,O5 as V,O6 as X,Nx as Z,Nw as H}from"./zeni-epic-state-D1OApLJ3.js";import{aX as L,g as Q,s as U,w as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-0jcT8Dx_.js";import{a as d}from"./sentry-Cix5j_Oe.js";import{h as v,u as A,g as N,i as B,j as l,N as q,n as F,o as _,p as K}from"./core-DrRun-Wp.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as I,OJ as Y,Nv as $,kG as J,Ky as S,O5 as V,O6 as X,Nx as Z,Nw as H}from"./zeni-epic-state-D1OApLJ3.js";import{aX as L,g as Q,s as U,w as tt}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{d as k}from"./decodeURIComponentSafe-BqXEXApE.js";import{w as et}from"./withTransactionSidePanel-Cu9CJKJJ.js";import{f as at,c as nt}from"./routePaths-Bty2j8lo.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";import"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import"./TransactionDetailScreen-fRW89NFJ.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]="a725d084-b0e1-45e6-99af-dc1b3afae94d",a._sentryDebugIdIdentifier="sentry-dbid-a725d084-b0e1-45e6-99af-dc1b3afae94d")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:J(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(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=v(),o=A(),c=N(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:w}=B(),r=k(x??""),p=k(w??""),f=rt(r,p),G=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),O=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(W(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??D,j=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:O,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:j,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:b(G.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 xt({entityType:a}){return s.jsx(_,{children:s.jsx(K,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DcYqfqSi.js → ExpenseAutomationRoutes-Dwvz_iW2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-0jcT8Dx_.js";import da from"./NotFoundScreen-
|
|
1
|
+
import{j as S}from"./liveblocks-0jcT8Dx_.js";import da from"./NotFoundScreen-BUTiP4R3.js";import{a,b as tn}from"./sentry-Cix5j_Oe.js";import{n as Ge,S as ua}from"./mui-BCzMCgwZ.js";import{u as ke,h as nn,g as st,j as x,n as ma,i as Bt,o as pa,p as et}from"./core-DrRun-Wp.js";import{eZ as Me,Tk as ha,os as we,f_ as ga,sq as Ca,Tl as tt,fB as Le,Tm as Vt,ei as Sa,fk as fa,Tn as Ot,To as Oe,pa as Ia,Tp as ka,pr as Ea,oK as an,oI as re,Tq as on,Tr as Ta,p3 as sn,pl as ba,Ts as cn,oD as ya,rY as va,fL as Ae,Tt as je,uw as ln,ES as rn,Tu as dn,Tv as Pa,rw as ct,OF as zt,OH as Aa,kJ as wa,OI as Ra,kQ as xa,c_ as Da,vM as it,oQ as un,pv as $e,p6 as Fa,Tw as _a,Nx as Mt,Nw as Ve,Tx as Lt,l5 as Ua,Ty as Ba,Tz as Va,TA as Oa,TB as za,oX as Ma,py as ze,TC as La,TD as ja,TE as $a,pF as qa,kU as Ga,kL as Na,TF as Ja,kT as jt,OP as Ya,TG as Ka,TH as Qa,rs as Za,r4 as Ha,pw as Ie,r3 as nt,TI as Wa,TJ as Xa,TK as eo,mo as to,bo as no,mj as $t,m5 as ao,TL as oo,gB as so,mg as co,xF as io,TM as lo,q4 as ro,p$ as uo,q3 as mo,pQ as po,TN as ho,fO as mn,pe as go,oT as Co,f$ as qt,pA as So,TO as fo,TP as Io,px as pn,TQ as ko,TR as Eo,TS as To,TT as bo,TU as Gt,rE as yo,qX as vo,Nv as Po,TV as Ao,TW as wo,kS as Ro,TX as xo,Jy as Do,kR as Fo,kG as _o,fN as Uo,qt as hn,qP as Bo,pu as Nt,pz as Vo,bE as Oo,md as zo,ma as Mo,TY as Lo,pP as Jt,qL as Yt,qJ as jo,TZ as $o,qy as qo,qe as Go,qM as No,T_ as Jo,T$ as Yo,qi as Ko,U0 as Qo,q9 as Zo,qh as Ho,qf as Wo,qS as Xo}from"./zeni-epic-state-D1OApLJ3.js";import{A as qe,c as Y,g as G,w as le,_ as gn,a0 as Cn,cZ as es,z as Ne,c_ as Kt,c$ as ts,d0 as ns,d1 as as,au as Re,d2 as os,aZ as Qt,C as Sn,d3 as ss,ar as at,O as cs,a9 as is,d4 as ls,a4 as rs,d5 as ds,Z as us,d6 as ms,d7 as ps,S as hs,f as gs,aS as Cs,d8 as Ss,d9 as fs,be as Is,H as ks,aV as Es}from"./index-24dzDu8E.js";import{u as fn}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import{f as Zt,a as Ts,b as bs,g as ys,C as vs}from"./TransactionDetailScreen-fRW89NFJ.js";import{w as Ps}from"./withTransactionSidePanel-Cu9CJKJJ.js";import{h as As,v as ws}from"./routePaths-Bty2j8lo.js";import{g as ot}from"./accountMappingHelper-B0l8lAeR.js";import{D as Rs}from"./DrawerScreen-D9iKOMtR.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";import"./decodeURIComponentSafe-BqXEXApE.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]="46e86b10-42d1-4255-9256-9404b5434e2c",t._sentryDebugIdIdentifier="sentry-dbid-46e86b10-42d1-4255-9256-9404b5434e2c")}catch{}})();const xs=()=>{const t=ke(),s=nn(),w=st(),b=x((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=x((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=x((m=>ha(m,b.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=fn({mobileExploreReferrer:"Month-End Close Overview"}),R=a.useCallback(((m,V,te=!1)=>{t(we({tenantId:V,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),y=a.useCallback((m=>{const V=w.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,V??null),t(ga(b.tenantId,m))}),[b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[b.tenantId],h=a.useCallback((()=>{const m=w.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),R(r,b.tenantId,!0)}),[R,r,b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=le(w.state?.pathnameStackToGoBack,w.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((V=>V.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}=gn();return Cn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&R(r,b.tenantId)}),[R,r,l.fetchState,b.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Ca(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=w.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(Ds,{children:S.jsx(es,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Ds=Ge.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-0jcT8Dx_.js";import{a as r}from"./sentry-Cix5j_Oe.js";import{a5 as i,a6 as l,a7 as p,s as d}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-0jcT8Dx_.js";import{a as r}from"./sentry-Cix5j_Oe.js";import{a5 as i,a6 as l,a7 as p,s as d}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import m from"./NotFoundScreen-BUTiP4R3.js";import{h as u,g as b}from"./core-DrRun-Wp.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]="6a5c7a1c-cf7f-40e6-99b9-63f1853bff19",e._sentryDebugIdIdentifier="sentry-dbid-6a5c7a1c-cf7f-40e6-99b9-63f1853bff19")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=d(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:f}):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-Cix5j_Oe.js";import{u as l,h as f,g as m}from"./core-DrRun-Wp.js";import{hx as p,MD as g,ME as b}from"./zeni-epic-state-D1OApLJ3.js";import{u as _,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-Cix5j_Oe.js";import{u as l,h as f,g as m}from"./core-DrRun-Wp.js";import{hx as p,MD as g,ME as b}from"./zeni-epic-state-D1OApLJ3.js";import{u as _,L as h,z as y}from"./index-24dzDu8E.js";import"./liveblocks-0jcT8Dx_.js";import"./recharts-BJColP3b.js";import"./mui-BCzMCgwZ.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="3dd5c1ed-f33b-4032-9e7e-e8a6b1b794cf",e._sentryDebugIdIdentifier="sentry-dbid-3dd5c1ed-f33b-4032-9e7e-e8a6b1b794cf")}catch{}})();function M(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-0jcT8Dx_.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-DrRun-Wp.js";import{Mw as k,Mx as v,My as F,BA as B,Bm as T,Mz as A,MA as oe,MB as se,Bq as ie,fC as $,Bx as le,Bu as de}from"./zeni-epic-state-D1OApLJ3.js";import{J as g,o as d,r as re,g as j,p as G,D as ce,s as me,v as pe,w as V,A as ue,c as he,x as xe,S as ge,y as fe,B as we,C as be,E as Se,V as ye,G as ke,Y as ve,H as je,I as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-0jcT8Dx_.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-DrRun-Wp.js";import{Mw as k,Mx as v,My as F,BA as B,Bm as T,Mz as A,MA as oe,MB as se,Bq as ie,fC as $,Bx as le,Bu as de}from"./zeni-epic-state-D1OApLJ3.js";import{J as g,o as d,r as re,g as j,p as G,D as ce,s as me,v as pe,w as V,A as ue,c as he,x as xe,S as ge,y as fe,B as we,C as be,E as Se,V as ye,G as ke,Y as ve,H as je,I as $e}from"./index-24dzDu8E.js";import{n as m}from"./mui-BCzMCgwZ.js";import f from"./NotFoundScreen-BUTiP4R3.js";import{a as I}from"./sentry-Cix5j_Oe.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="290d42f9-f654-4788-a0e4-ac829d1dd421",e._sentryDebugIdIdentifier="sentry-dbid-290d42f9-f654-4788-a0e4-ac829d1dd421")}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-0jcT8Dx_.js";import{a as g}from"./sentry-Cix5j_Oe.js";import{u as U,g as O,h as _,t as w,j as l,N as T}from"./core-DrRun-Wp.js";import{z as r,y as V,O as P,h as A,g as N,j as Z,F as R,V as W,m as $}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-0jcT8Dx_.js";import{a as g}from"./sentry-Cix5j_Oe.js";import{u as U,g as O,h as _,t as w,j as l,N as T}from"./core-DrRun-Wp.js";import{z as r,y as V,O as P,h as A,g as N,j as Z,F as R,V as W,m as $}from"./index-24dzDu8E.js";import{eZ as q,Mh as B,Mr as G,Mi as H,fC as J,g2 as K,Mn as Q,gs as X,cZ as Y,Ms as ee,Mt as te}from"./zeni-epic-state-D1OApLJ3.js";import{n as ne}from"./mui-BCzMCgwZ.js";import{u as se}from"./useDeviceId-34Upzybn.js";import{f as ae}from"./analyticsHelper-DFsb6qRL.js";import{t as ie}from"./getLocaleForTenant-BK33tgnz.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="10fe2dc9-8c4f-4d6c-9559-6794964bdaca",t._sentryDebugIdIdentifier="sentry-dbid-10fe2dc9-8c4f-4d6c-9559-6794964bdaca")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=O(),m=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),y=l((e=>B(e))),M=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(y.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),X().then((()=>{const e=$();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(Z.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,b,s,o,y,v,a.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),F=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||M!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-0jcT8Dx_.js";import{a as c}from"./sentry-Cix5j_Oe.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-DrRun-Wp.js";import{eZ as me,fH as Ke,fI as pe,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as la,fZ as ca,cV as ua,fs as fa,g2 as ma,g3 as pa,g1 as ba}from"./zeni-epic-state-D1OApLJ3.js";import{a9 as ha,aa as Sa,S as ga,A as Ea,z as k,B as ka,u as Ca,c as r,d as ya,i as Ia,ab as Ta,f as wa,a as Aa,ac as _a,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as Ba,ah as Pa,ai as ue,g as x,a1 as Ma,w,aj as R,ak as Ga}from"./index-
|
|
1
|
+
import{j as V}from"./liveblocks-0jcT8Dx_.js";import{a as c}from"./sentry-Cix5j_Oe.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-DrRun-Wp.js";import{eZ as me,fH as Ke,fI as pe,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as la,fZ as ca,cV as ua,fs as fa,g2 as ma,g3 as pa,g1 as ba}from"./zeni-epic-state-D1OApLJ3.js";import{a9 as ha,aa as Sa,S as ga,A as Ea,z as k,B as ka,u as Ca,c as r,d as ya,i as Ia,ab as Ta,f as wa,a as Aa,ac as _a,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as Ba,ah as Pa,ai as ue,g as x,a1 as Ma,w,aj as R,ak as Ga}from"./index-24dzDu8E.js";import{D as xa}from"./mui-BCzMCgwZ.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]="fa865b67-408a-42fd-91c7-810ad4535117",f._sentryDebugIdIdentifier="sentry-dbid-fa865b67-408a-42fd-91c7-810ad4535117")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),$=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))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=G("/:tenantEmailDomain/dashboard")!==null,Z=G("/:tenantEmailDomain/reports")!==null,I=G("/: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:we}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=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),Be=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),W=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Ge=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),B=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:xe}=Ta();c.useEffect((()=>{const e=setTimeout((()=>xe?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,q]),c.useEffect((()=>{y&&!I&&Ge.fetchState==="Not-Started"&&$.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,$.tenantId]),c.useEffect((()=>{I||B.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{A!=null&&B.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:A},"comments")))}),[A,B.fetchState]);const Re={fetchStatus:Me,count:Pe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),H===!1&&S.push("expense_automation_card");const Ve=wa(),te=n((e=>ia(e,S,h,we,Te).fetchState)),ne=n((e=>ra(e).fetchState)),$e=_&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!_&&!Z?void 0:"disabled",Ne=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Ne),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&Y.fetchState==="Completed"&&ca(Y.notificationSettings,h.userEmail,z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=c.useState(P);c.useEffect((()=>{re(P())}),[P]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(xa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:$e,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&J>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&x.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=Ga(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${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(Ba.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=R(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":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;x.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-0jcT8Dx_.js";import{h as r,n}from"./core-DrRun-Wp.js";import{W as i}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-0jcT8Dx_.js";import{h as r,n}from"./core-DrRun-Wp.js";import{W as i}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import"./sentry-Cix5j_Oe.js";import"./zeni-epic-state-D1OApLJ3.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="57c66330-e90a-42a0-92cf-4e53bf44289b",o._sentryDebugIdIdentifier="sentry-dbid-57c66330-e90a-42a0-92cf-4e53bf44289b")}catch{}})();const a=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-0jcT8Dx_.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-0jcT8Dx_.js";import lt from"./NotFoundScreen-BUTiP4R3.js";import{a as k}from"./sentry-Cix5j_Oe.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 K}from"./core-DrRun-Wp.js";import{cw as St,fJ as q,eZ as H,fX as bt,fQ as b,Tf as Q,fT as m,fI as y,sK as M,yg as It,Tg as Tt,fH as Ct,fZ as yt,sP as _t,Th as $,bo as F,fB as x,sT as X,Ti as At,cI as Et,cB as Bt}from"./zeni-epic-state-D1OApLJ3.js";import{_ as Nt,z as wt,A as xt,c as Rt,a0 as Dt,cW as Pt,w as B,a9 as vt,cX as Ut,aa as Gt,s as $t}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="1a9b637f-c5ce-4daa-84f7-a7fd6dd38691",t._sentryDebugIdIdentifier="sentry-dbid-1a9b637f-c5ce-4daa-84f7-a7fd6dd38691")}catch{}})();const Mt=(t,l)=>new Promise(((n,u)=>{const g=t.map((i=>new Promise((s=>{l(i),s()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((i=>{u(i)}))})),jt=kt((function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,d,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}d==="unread"&&t(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(N(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const d=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(X("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{d==="read"&&(N(r),t($([r],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,N).then((()=>{t($(s,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(vt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Nt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[N,R]=k.useState(!1),a=S((e=>q(e))),o=S((e=>H(e))),{useFeatureGate:d}=xt(),{isFeatureEnabled:c}=d(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const O=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)),D=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),P=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=Pt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:T,isFetchingMore:v,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:z,hasFetchedAll:J}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter((C=>C.roomId===e&&C.readAt==null)).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=_||v===!0||T!==!0||_||v===!0||T!==!0;k.useEffect((()=>{U&&P!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):U||P!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))}),[U,P]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&L===!1&&w!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=w.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(z||J===!0||Z==null||Z(),null)})).filter((f=>f!=null));s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,v,z,T,J,L,w?.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=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s(M("task_manager",C,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,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(K,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(K,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-0jcT8Dx_.js";import{a as r}from"./sentry-Cix5j_Oe.js";import{u as T,g as A,j as o,N as P}from"./core-DrRun-Wp.js";import{MG as j,eZ as C,fP as D,MH as x,MI as z,MJ as L,MK as N,oi as R,LD as k}from"./zeni-epic-state-D1OApLJ3.js";import{z as h,N as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-0jcT8Dx_.js";import{a as r}from"./sentry-Cix5j_Oe.js";import{u as T,g as A,j as o,N as P}from"./core-DrRun-Wp.js";import{MG as j,eZ as C,fP as D,MH as x,MI as z,MJ as L,MK as N,oi as R,LD as k}from"./zeni-epic-state-D1OApLJ3.js";import{z as h,N as I}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="4ecfaa19-78a4-4895-b509-0dd3caa97cb2",n._sentryDebugIdIdentifier="sentry-dbid-4ecfaa19-78a4-4895-b509-0dd3caa97cb2")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o((e=>C(e))),l=o((e=>D(e))),d=o((e=>e.tenantState.fetchState)),y=o(x),b=o(z),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const M=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(k(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CLOwX80d.js → PandLWithForecastRoutes-NBWVQC3h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-0jcT8Dx_.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-DrRun-Wp.js";import{eZ as U,sy as R,s6 as X,Nb as v,s1 as y,bs as ee,bn as ae,bZ as te,s2 as se,Nc as oe,M_ as C,dI as re,wd as ne,Nd as ce,wA as ie,fG as le,fE as de}from"./zeni-epic-state-D1OApLJ3.js";import{z as me,_ as fe,a0 as pe,f as ue,A as w,c as M,E as he,g as N,ap as ge,w as be}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-0jcT8Dx_.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-DrRun-Wp.js";import{eZ as U,sy as R,s6 as X,Nb as v,s1 as y,bs as ee,bn as ae,bZ as te,s2 as se,Nc as oe,M_ as C,dI as re,wd as ne,Nd as ce,wA as ie,fG as le,fE as de}from"./zeni-epic-state-D1OApLJ3.js";import{z as me,_ as fe,a0 as pe,f as ue,A as w,c as M,E as he,g as N,ap as ge,w as be}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import Fe from"./NotFoundScreen-BUTiP4R3.js";import{F as Ie}from"./FeaturePreviewScreen-s3Vp54dP.js";import{a as g}from"./sentry-Cix5j_Oe.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import{u as ye}from"./useInitialThreadRequest-D3N5n5MK.js";import{t as Se}from"./routePaths-Bty2j8lo.js";import{M as Te}from"./MobileAppDrawer-zOj9FdCe.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="86c2ac9b-eb69-4d65-88fd-33b4e3efe413",s._sentryDebugIdIdentifier="sentry-dbid-86c2ac9b-eb69-4d65-88fd-33b4e3efe413")}catch{}})();const S=(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})}},Ae=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:N}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(y(a)),S(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=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=be(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(),T=d((t=>U(t))),$=T.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),A=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&b)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex((F=>F.id===L)):P!=null?f.forecasts.findIndex((F=>F.id===P)):f.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&b&&e(y(i.forecasts[t].id))}}),[c,p,e,l,i,m,u,R,y,b]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:E}=G(M.isReportsCommentingEnabled),W=ye(E?T?.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:N,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(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(Fe,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-0jcT8Dx_.js";import{N7 as oe,eZ as Q,kG as G,fG as X,fE as ie,KB as ee,MN as re,va as ke,N8 as Y,u$ as Ee,vk as ve,ve as le,v3 as de,vi as Pe,vf as je,N9 as ce,w$ as Le,fq as Te,gi as Ae,Na as H,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-D1OApLJ3.js";import{J as me,A as ae,c as _,z as K,d as ge,e as fe,K as he,al as Ce,am as Fe,H as ye,o as F,M as be,O as M,an as Ve,_ as Ze,a0 as Be,E as Ue,g as we,j as $e,w as ze,ao as He,f as _e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-0jcT8Dx_.js";import{N7 as oe,eZ as Q,kG as G,fG as X,fE as ie,KB as ee,MN as re,va as ke,N8 as Y,u$ as Ee,vk as ve,ve as le,v3 as de,vi as Pe,vf as je,N9 as ce,w$ as Le,fq as Te,gi as Ae,Na as H,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-D1OApLJ3.js";import{J as me,A as ae,c as _,z as K,d as ge,e as fe,K as he,al as Ce,am as Fe,H as ye,o as F,M as be,O as M,an as Ve,_ as Ze,a0 as Be,E as Ue,g as we,j as $e,w as ze,ao as He,f as _e}from"./index-24dzDu8E.js";import{D as Se,n as N,S as xe}from"./mui-BCzMCgwZ.js";import te from"./NotFoundScreen-BUTiP4R3.js";import{a as d}from"./sentry-Cix5j_Oe.js";import{u as se,i as Ge,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-DrRun-Wp.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import{M as qe}from"./MobileAppDrawer-zOj9FdCe.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="1df1ba9c-aea1-42b7-bfe1-d6ed47d524ae",e._sentryDebugIdIdentifier="sentry-dbid-1df1ba9c-aea1-42b7-bfe1-d6ed47d524ae")}catch{}})();const Je={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,w]=d.useState(!1),{userId:S}=Ge(),r=g((l=>oe(l))),p=g((l=>Q(l))),E=g((l=>G(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),v=X(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!v&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.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?w(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(_.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:O}=fe(p?.tenantId),y=!j||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:v,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(de(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):ve(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return d.useEffect((()=>{x===!1&&S!=null&&m(ke(S))}),[x,S]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{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(Fe,{...s})]})})},Xe=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-0jcT8Dx_.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-0jcT8Dx_.js";import E from"./NotFoundScreen-BUTiP4R3.js";import{a as r}from"./sentry-Cix5j_Oe.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as B,p as b}from"./core-DrRun-Wp.js";import{eZ as O,Tj as h,bq as F,bn as N,ij as V,fB as q}from"./zeni-epic-state-D1OApLJ3.js";import{S as Y,z as I,a0 as Z,cY as $}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import{M as H}from"./MobileAppDrawer-zOj9FdCe.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="31618829-2671-466e-be31-b4985647b8de",e._sentryDebugIdIdentifier="sentry-dbid-31618829-2671-466e-be31-b4985647b8de")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Y(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:u}=M(),f=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),j=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(d),x=C||j||k,l=r.useCallback(((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(f(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0}),[n?.fetchState,l]),D=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-0jcT8Dx_.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Cix5j_Oe.js";import{L as dt,bZ as Tc,eZ as Ac,Mh as Rc,ML as kl,c7 as Tl,g2 as Al,g3 as Rl}from"./zeni-epic-state-D1OApLJ3.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-CvfvTDv6.js";import{r as un}from"./empty-BxU8KR-q.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-gor9sGMc.js";import{r as Gl}from"./index-BJ6_cpY3.js";import{r as zl}from"./index-2hIX2kLH.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DrRun-Wp.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,R as Xl,p as Ql,g as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-0jcT8Dx_.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Cix5j_Oe.js";import{L as dt,bZ as Tc,eZ as Ac,Mh as Rc,ML as kl,c7 as Tl,g2 as Al,g3 as Rl}from"./zeni-epic-state-D1OApLJ3.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-CvfvTDv6.js";import{r as un}from"./empty-BxU8KR-q.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-gor9sGMc.js";import{r as Gl}from"./index-BJ6_cpY3.js";import{r as zl}from"./index-2hIX2kLH.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DrRun-Wp.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,R as Xl,p as Ql,g as tf}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{d as Pe}from"./decodeURIComponentSafe-BqXEXApE.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]="f79f3a5a-3dfa-4735-a05f-a1efc68dbce2",t._sentryDebugIdIdentifier="sentry-dbid-f79f3a5a-3dfa-4735-a05f-a1efc68dbce2")}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-0jcT8Dx_.js";import F from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-0jcT8Dx_.js";import F from"./NotFoundScreen-BUTiP4R3.js";import{a as p}from"./sentry-Cix5j_Oe.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as O,p as b}from"./core-DrRun-Wp.js";import{eZ as I,QB as g,QR as S,F_ as V,F7 as U,FZ as c,FQ as B,R2 as L,G0 as W}from"./zeni-epic-state-D1OApLJ3.js";import{z as N,a9 as T,bZ as Q,ag as _,bC as Z,b_ as z}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{u as G,R as A}from"./ReimbursementApprovalRuleDetailScreen-BxwMtMxD.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]="ba488a7b-1f2a-49d3-b755-d1b8d0021a05",e._sentryDebugIdIdentifier="sentry-dbid-ba488a7b-1f2a-49d3-b755-d1b8d0021a05")}catch{}})();const y="reimbursement-approval-rule-update",K=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{_(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(c(t)),s(`./${t}/edit`)):(e(c()),s("./new"))}}}))(T(Q)),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))),d=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(m||(R(!0),n(c())),o("./new"))}),[m,d,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,$,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(K,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",H=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{_(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(c(t)),s(`./${t}/edit`)):(e(c()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(T(z)),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))),d=u((a=>g(a)));G();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((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(m||(R(!0),n(c())),o("./new"))}),[m,d,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,$,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(O,{children:[r.jsx(b,{path:"/",element:r.jsx(J,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-0jcT8Dx_.js";import{a as f}from"./sentry-Cix5j_Oe.js";import{u as w,j as g,h as x,g as O,i as k,n as F}from"./core-DrRun-Wp.js";import{l6 as L,QR as T,QB as C,FT as V,G3 as B,F_ as A,F$ as E,QS as j,eZ as Z,FZ as z}from"./zeni-epic-state-D1OApLJ3.js";import{z as P,y as N,C as $,bP as G,ag as Q,bC as K,bQ as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-0jcT8Dx_.js";import{a as f}from"./sentry-Cix5j_Oe.js";import{u as w,j as g,h as x,g as O,i as k,n as F}from"./core-DrRun-Wp.js";import{l6 as L,QR as T,QB as C,FT as V,G3 as B,F_ as A,F$ as E,QS as j,eZ as Z,FZ as z}from"./zeni-epic-state-D1OApLJ3.js";import{z as P,y as N,C as $,bP as G,ag as Q,bC as K,bQ as W}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.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]="404d32c1-ff02-4b09-868e-1706e52d22a1",e._sentryDebugIdIdentifier="sentry-dbid-404d32c1-ff02-4b09-868e-1706e52d22a1")}catch{}})();function H(){const e=w(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const J=F((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(I);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(G);function M(){const e=x(),s=w(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=g((n=>T(n))),i=g((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(V(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const X=F((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,U=y.selectedRole?.selectedOption;let D=[];b==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const _=y.action??"require_approval";m.push({action:_,actors:D,operator:D.length>1?_==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=S?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>Z(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(M,{})}function Y(){const e=x(),s=w(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=g((n=>T(n))),i=g((n=>C(n))),[a,d]=f.useState(!1);if(H(),f.useEffect((()=>{a||(d(!0),s(V(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-0jcT8Dx_.js";import{h as Q,u as de,g as H,i as Y,j as w,N as _,n as q,l as ct,o as dt,p as C}from"./core-DrRun-Wp.js";import{eZ as V,R3 as ue,c7 as pe,F2 as Ue,kR as ut,Ff as oe,Fe as re,R4 as pt,bn as be,gt as Le,R5 as bt,Nv as gt,kG as Pe,Nw as ve,Nx as ht,jB as ft,Qn as St,jQ as Rt,ES as It,uw as yt,jI as vt,FC as $e,R6 as Me,R7 as kt,R8 as At,R9 as Ct,Ra as Et,Rb as wt,Fm as ke,jW as xt,Qw as Bt,Fg as Tt,F0 as jt,Rc as Ft,E$ as Dt,Rd as Ut,F8 as Ae,Fq as Lt,Fp as Pt,Fl as $t,Re as _e,KB as Mt,bq as _t,Fb as Nt,FU as Gt,Rf as Ot,Rg as zt,Fy as Zt,Fv as Ce,PS as Ht,EZ as Vt,Rh as Ne,Gk as Ee,Gs as Wt,Ri as Qt,Rj as z,Rk as qt,Rl as Ge,Rm as Kt,Rn as Oe,Ro as ze,FK as le,bu as Jt,bK as ge,cI as he,fG as Ze,fE as He,Rp as Xt,fB as Yt,Q3 as en,Rq as tn,Rr as Ve,Q7 as nn,QR as an,Rs as sn,R2 as on,Gp as we,Go as rn,Rt as ln,Ru as mn,Rv as cn,Rw as dn,Rx as un,QC as pn,Gf as bn,Gj as gn,bs as hn,bJ as fn,cC as Sn,cq as Rn,bt as In,Mj as yn,cS as vn,cV as kn,cU as An,cB as Cn}from"./zeni-epic-state-D1OApLJ3.js";import{S as We,J as Qe,A as ee,c as E,z as P,b$ as qe,E as te,g as k,aM as xe,o as F,au as X,K as En,O as Ke,c0 as wn,w as Z,a0 as Je,c1 as xn,f as ne,c2 as Bn,_ as Tn,H as jn,C as fe,j as Xe,a9 as Fn,bn as Dn,a4 as Un,y as Ye,c3 as Ln,d as Pn}from"./index-CdzL9szH.js";import{n as N,S as $n}from"./mui-BCzMCgwZ.js";import me from"./NotFoundScreen-1FWTFg5q.js";import{S as Be}from"./SetupPagesScreen-D-KjoZ4s.js";import{F as et}from"./FeaturePreviewScreen-IYXzvJjG.js";import{a as f}from"./sentry-Cix5j_Oe.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-fe0P1a5j.js";import{u as tt}from"./useInitialThreadRequest-E7aaQNIx.js";import{D as Mn}from"./DrawerScreen-DAMt3OKh.js";import{M as nt}from"./MobileAppDrawer-7KFASJmR.js";import{R as _n}from"./ReimbursementApprovalRoutes-CuXrRY6O.js";import{FallBackRoute as Nn}from"./ScreenRoutes-3ZRh9969.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";import"./analyticsHelper-BaOtwD25.js";import"./routePaths-CHhQNN3M.js";import"./BusinessVerificationPageScreen-DlMhX3L_.js";import"./ReimbursementApprovalRuleDetailScreen-CxT_ZU1Q.js";import"./getLocaleForTenant-C5iVY_JU.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]="9478d8d2-48f7-4e3e-adc0-f4f544191fc6",e._sentryDebugIdIdentifier="sentry-dbid-9478d8d2-48f7-4e3e-adc0-f4f544191fc6")}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}}}=Ke.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:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics: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(Ae(!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(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(jt({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(At({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(vt(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(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function je(){const e=Q(),t=de(),n=H(),{reimbursementId:r}=Y(),d=We(),c=Qe(),[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,j=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=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((()=>{(v&&!D||j&&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(A==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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload: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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Qn,{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-0jcT8Dx_.js";import{h as Q,u as de,g as H,i as Y,j as w,N as _,n as q,l as ct,o as dt,p as C}from"./core-DrRun-Wp.js";import{eZ as V,R3 as ue,c7 as pe,F2 as Ue,kR as ut,Ff as oe,Fe as re,R4 as pt,bn as be,gt as Le,R5 as bt,Nv as gt,kG as Pe,Nw as ve,Nx as ht,jB as ft,Qn as St,jQ as Rt,ES as It,uw as yt,jI as vt,FC as $e,R6 as Me,R7 as kt,R8 as At,R9 as Ct,Ra as Et,Rb as wt,Fm as ke,jW as xt,Qw as Bt,Fg as Tt,F0 as jt,Rc as Ft,E$ as Dt,Rd as Ut,F8 as Ae,Fq as Lt,Fp as Pt,Fl as $t,Re as _e,KB as Mt,bq as _t,Fb as Nt,FU as Gt,Rf as Ot,Rg as zt,Fy as Zt,Fv as Ce,PS as Ht,EZ as Vt,Rh as Ne,Gk as Ee,Gs as Wt,Ri as Qt,Rj as z,Rk as qt,Rl as Ge,Rm as Kt,Rn as Oe,Ro as ze,FK as le,bu as Jt,bK as ge,cI as he,fG as Ze,fE as He,Rp as Xt,fB as Yt,Q3 as en,Rq as tn,Rr as Ve,Q7 as nn,QR as an,Rs as sn,R2 as on,Gp as we,Go as rn,Rt as ln,Ru as mn,Rv as cn,Rw as dn,Rx as un,QC as pn,Gf as bn,Gj as gn,bs as hn,bJ as fn,cC as Sn,cq as Rn,bt as In,Mj as yn,cS as vn,cV as kn,cU as An,cB as Cn}from"./zeni-epic-state-D1OApLJ3.js";import{S as We,J as Qe,A as ee,c as E,z as P,b$ as qe,E as te,g as k,aM as xe,o as F,au as X,K as En,O as Ke,c0 as wn,w as Z,a0 as Je,c1 as xn,f as ne,c2 as Bn,_ as Tn,H as jn,C as fe,j as Xe,a9 as Fn,bn as Dn,a4 as Un,y as Ye,c3 as Ln,d as Pn}from"./index-24dzDu8E.js";import{n as N,S as $n}from"./mui-BCzMCgwZ.js";import me from"./NotFoundScreen-BUTiP4R3.js";import{S as Be}from"./SetupPagesScreen-BKdx-uAP.js";import{F as et}from"./FeaturePreviewScreen-s3Vp54dP.js";import{a as f}from"./sentry-Cix5j_Oe.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DG7vn-Xl.js";import{u as tt}from"./useInitialThreadRequest-D3N5n5MK.js";import{D as Mn}from"./DrawerScreen-D9iKOMtR.js";import{M as nt}from"./MobileAppDrawer-zOj9FdCe.js";import{R as _n}from"./ReimbursementApprovalRoutes-BPKjFZxh.js";import{FallBackRoute as Nn}from"./ScreenRoutes-nLpBg7A5.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.js";import"./analyticsHelper-DFsb6qRL.js";import"./routePaths-Bty2j8lo.js";import"./BusinessVerificationPageScreen-YZ8HV6ZO.js";import"./ReimbursementApprovalRuleDetailScreen-BxwMtMxD.js";import"./getLocaleForTenant-BK33tgnz.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]="9478d8d2-48f7-4e3e-adc0-f4f544191fc6",e._sentryDebugIdIdentifier="sentry-dbid-9478d8d2-48f7-4e3e-adc0-f4f544191fc6")}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}}}=Ke.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:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics: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(Ae(!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(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(jt({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(At({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(vt(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(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function je(){const e=Q(),t=de(),n=H(),{reimbursementId:r}=Y(),d=We(),c=Qe(),[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,j=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=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((()=>{(v&&!D||j&&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(A==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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload: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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Qn,{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;
|