@zeniai/web-app-ui 5.2.16-dev → 5.2.16-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-f609Ttdc.js → AddressRoutes-CvVopZml.js} +1 -1
- package/dist/assets/{AddressScreen-DnnIRcHN.js → AddressScreen-DWZ3m1W6.js} +1 -1
- package/dist/assets/{AiCfoScreen-CjlYW9BA.js → AiCfoScreen-DiSXwSAy.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-D6R35wEu.js → BillPayApprovalRoutes-Bzj_wN2N.js} +1 -1
- package/dist/assets/{BillPayRoutes-CAVdOoQ5.js → BillPayRoutes-Bf6AaWgJ.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-2yzgn_dq.js → BusinessVerificationPageScreen-DFVMEcvH.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BqGSzxio.js → CardsAiCfoScreen-CvKPSEX_.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DwSiYhNV.js → ChargeCardRoutes-B_kWsesI.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-6gSkpDjZ.js → CompanyPassportScreen-D3CNonob.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Ck4Gxy8V.js → ConnectionAuthScreen-BN3ff9tH.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-IhYlyAOK.js → CustomerOnboardingAuthScreen-DlKfeAMx.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-D9rEFGOH.js → CustomerOnboardingRoutes-fNU7A_X6.js} +1 -1
- package/dist/assets/{DashboardRoutes-uvzfWzIm.js → DashboardRoutes-vwFGyOnq.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BeV69g9G.js → DefaultTenantHome-COmsVe67.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C-5bE-Xl.js → DomesticWireDetailScreen-Bmq0Ta-G.js} +1 -1
- package/dist/assets/{DrawerScreen-BL40QyXA.js → DrawerScreen-CFNs8DOc.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CnjAhdib.js → EntityDetailRoutes-BhHCRnyf.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CjC0R383.js → ExpenseAutomationRoutes-Bcbqp-xi.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DAIgYjjb.js → FeaturePreviewScreen-CQa-Dzig.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-Bwh56-e_.js → HubSpotOAuthCallbackScreen-yv2-7Ea8.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-wKih3lqk.js → MagicLinkRoutes-DSjPLdSb.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-7uBJWOza.js → MagicLinkSignInScreen-D_r-xHBU.js} +1 -1
- package/dist/assets/{MobileAppDrawer-QMY9Y_6M.js → MobileAppDrawer-CcKlE5IP.js} +1 -1
- package/dist/assets/{NotFoundScreen-Bjgm3Cgg.js → NotFoundScreen-DlOrYovK.js} +1 -1
- package/dist/assets/{NotificationRoutes-DQXiQJ75.js → NotificationRoutes-gyrenPAq.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BgywNNMG.js → OAuthConsentScreen-1d0A0tZs.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CRmbuHlA.js → PandLWithForecastRoutes-DjhLwT7A.js} +1 -1
- package/dist/assets/{PeopleRoutes-Br3c54zD.js → PeopleRoutes-B4_xTiyk.js} +1 -1
- package/dist/assets/{PerformanceRoutes-D8GxMw7x.js → PerformanceRoutes-DylBZUt_.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CBR0AZz1.js → QBOConnectionScreen-TnPId4Sm.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-COdNraf8.js → ReimbursementApprovalRoutes-POVUD6sL.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-m4OK96Pp.js → ReimbursementApprovalRuleDetailScreen-DdpFdkik.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CC1LJLL_.js → ReimbursementRoutes-CEVKaVBL.js} +1 -1
- package/dist/assets/{ReportsRoutes-BSnn6sLO.js → ReportsRoutes-B1TQ9Bhd.js} +1 -1
- package/dist/assets/{RewardsRoutes-CzaqvCYC.js → RewardsRoutes-DfP429d0.js} +1 -1
- package/dist/assets/{ScreenRoutes-BT39k7R-.js → ScreenRoutes-B4XnnElP.js} +2 -2
- package/dist/assets/{SettingsRoutes-BW92o1e1.js → SettingsRoutes-Cwng1-zQ.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CmqcI8Pt.js → SetupPagesScreen-DFoSoY9W.js} +1 -1
- package/dist/assets/{SignInScreen-Db_yZc64.js → SignInScreen-e-dzxuhM.js} +1 -1
- package/dist/assets/{SignOutScreen-CNV5EZSB.js → SignOutScreen-zX0f3nhU.js} +1 -1
- package/dist/assets/{TaskListScreen-YoPRLTQT.js → TaskListScreen-DDBul9iH.js} +1 -1
- package/dist/assets/{TaskRoutes-Dl6VRn1s.js → TaskRoutes-8qo7Ls7z.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BiZAv8du.js → TransactionDetailRoutes-djuKroPk.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DrsbGFZL.js → TransactionDetailScreen-D5r3-Mgi.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CWvS2zXP.js → TransactionListRoutes-DZo7bIuR.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BWDCDIwg.js → TreasuryRoutes-Dicm3fpM.js} +1 -1
- package/dist/assets/{VendorsRoutes-D5S2XjMm.js → VendorsRoutes-CSBYzvJD.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Q0J40ioP.js → WiseConfirmationScreen-Cq4Two3C.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-D0ZCvv0b.js → ZeniAccountRoutes-BZkpbBgO.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BQINO3hW.js → ZeniAccountStatementScreen-CrIZG1fJ.js} +1 -1
- package/dist/assets/{analyticsHelper-DjBKxGVt.js → analyticsHelper-H9dml3jr.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DBW7UyHp.js → getLocaleForTenant-CqG7z-4D.js} +1 -1
- package/dist/assets/{index-BzrRJ8WV.js → index-DQqz4S7_.js} +5 -5
- package/dist/assets/{routePaths-iBgwsr_r.js → routePaths-BU7xzRci.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BjjheFLZ.js → useAiCfoDashboardSuggestedQuestionsChips-C3L5nQ7N.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DGvHpWY7.js → useAskAiCfoHostNavButtonProps-C8xAByz8.js} +1 -1
- package/dist/assets/{useCashManagementBanner-DUUI_7bK.js → useCashManagementBanner-7vax8nj5.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-Dl4aF9Gu.js → useChargeCardPusherEvents-t2lV6Mj_.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C_fGcTHu.js → useEmailConnectResultRefresh-GsUIcf-d.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BaClMW9n.js → useInitialThreadRequest-DA5ML13t.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Dkd_LZWk.js → withTransactionSidePanel-ZD8SIzTb.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-bqFl_SVp.js";import{a as u}from"./sentry-Bj_fC7Ll.js";import{u as y,j as b,n as w,g as A,N}from"./core-Bnb5S7eF.js";import{Mf as U,eZ as _,g3 as k,Mg as L,oi as R,Mh as z}from"./zeni-epic-state-GXytJkko.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-bqFl_SVp.js";import{a as u}from"./sentry-Bj_fC7Ll.js";import{u as y,j as b,n as w,g as A,N}from"./core-Bnb5S7eF.js";import{Mf as U,eZ as _,g3 as k,Mg as L,oi as R,Mh as z}from"./zeni-epic-state-GXytJkko.js";import{u as O,z as f,L as T,t as I,O as j,b as $}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{t as P}from"./getLocaleForTenant-CqG7z-4D.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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-5bE-Xl.js → DomesticWireDetailScreen-Bmq0Ta-G.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-bqFl_SVp.js";import{h as y,g as C,j as h,n as A,i as P}from"./core-Bnb5S7eF.js";import{Qp as k,Qw as _,gl as W,gk as q,gj as X,jD as J,Nw as K,rP as L,eZ as D,PX as V,jB as j,Qq as v,Qz as T,jz as F,jW as G}from"./zeni-epic-state-GXytJkko.js";import{bz as M,p as N,y as R,z,E as U,v as p,d as S,B as Z,bA as Y,o as O,bB as ee,w as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-bqFl_SVp.js";import{h as y,g as C,j as h,n as A,i as P}from"./core-Bnb5S7eF.js";import{Qp as k,Qw as _,gl as W,gk as q,gj as X,jD as J,Nw as K,rP as L,eZ as D,PX as V,jB as j,Qq as v,Qz as T,jz as F,jW as G}from"./zeni-epic-state-GXytJkko.js";import{bz as M,p as N,y as R,z,E as U,v as p,d as S,B as Z,bA as Y,o as O,bB as ee,w as te}from"./index-DQqz4S7_.js";import{n as Q}from"./mui-BAFflVdx.js";import"./sentry-Bj_fC7Ll.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]="aee0c512-c7ac-4453-aa28-51e5eebeaf11",e._sentryDebugIdIdentifier="sentry-dbid-aee0c512-c7ac-4453-aa28-51e5eebeaf11")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(X(n,"BillPayVendor"))},onResendOtp:n=>{e(q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=y(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-bqFl_SVp.js";import{p as c,G as l,E as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-bqFl_SVp.js";import{p as c,G as l,E as f}from"./index-DQqz4S7_.js";import{D as p}from"./mui-BAFflVdx.js";import"./sentry-Bj_fC7Ll.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]="80e3218f-9929-4339-ad0a-c2cd6ce40066",e._sentryDebugIdIdentifier="sentry-dbid-80e3218f-9929-4339-ad0a-c2cd6ce40066")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=c(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-bqFl_SVp.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{h as j,u as A,g as N,i as B,j as d,N as q,n as F,o as _,p as K}from"./core-Bnb5S7eF.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as k,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-GXytJkko.js";import{aX as L,g as Q,v as U,w as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-bqFl_SVp.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{h as j,u as A,g as N,i as B,j as d,N as q,n as F,o as _,p as K}from"./core-Bnb5S7eF.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as k,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-GXytJkko.js";import{aX as L,g as Q,v as U,w as tt}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{d as b}from"./decodeURIComponentSafe-IB5WoVjO.js";import{w as et}from"./withTransactionSidePanel-ZD8SIzTb.js";import{f as at,c as nt}from"./routePaths-BU7xzRci.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";import"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import"./TransactionDetailScreen-D5r3-Mgi.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]="1dacf1bb-caf9-416c-89f4-ec72b872b049",a._sentryDebugIdIdentifier="sentry-dbid-1dacf1bb-caf9-416c-89f4-ec72b872b049")}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)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=j(),o=A(),l=N(),[m,T]=c.useState(!1),[h,g]=c.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:w}=B(),r=b(x??""),f=b(w??""),p=rt(r,f),v=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},D=d((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),G=d((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=d((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(W(i)))}),[m,p,i]);const E=d((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??D,O=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:O,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:I(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(_,{children:s.jsx(K,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-CjC0R383.js → ExpenseAutomationRoutes-Bcbqp-xi.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-bqFl_SVp.js";import ua from"./NotFoundScreen-
|
|
1
|
+
import{j as S}from"./liveblocks-bqFl_SVp.js";import ua from"./NotFoundScreen-DlOrYovK.js";import{a,b as nn}from"./sentry-Bj_fC7Ll.js";import{n as Ge,S as ma}from"./mui-BAFflVdx.js";import{u as ke,h as an,g as st,j as D,n as pa,i as Vt,o as ha,p as et}from"./core-Bnb5S7eF.js";import{eZ as Me,Tn as ga,os as we,f_ as Ca,sq as Sa,To as tt,fB as Le,Tp as Ot,ei as fa,fk as Ia,Tq as zt,Tr as Oe,pa as ka,Ts as Ea,pr as Ta,oK as on,oI as re,Tt as sn,Tu as ba,p3 as cn,pl as ya,Tv as ln,oD as va,rY as Pa,fL as Ae,Tw as je,uw as rn,ES as dn,Tx as un,Ty as Aa,rw as ct,OF as Mt,OH as wa,kJ as Ra,OI as xa,kQ as Da,c_ as Fa,vM as it,oQ as mn,pv as $e,p6 as _a,Tz as Ua,Nx as Lt,Nw as Ve,TA as jt,l5 as Ba,TB as Va,TC as Oa,TD as za,TE as Ma,oX as La,py as ze,TF as ja,TG as $a,TH as qa,pF as Ga,kU as Na,kL as Ja,TI as Ya,kT as $t,OS as Ka,TJ as Qa,TK as Za,rs as Ha,r4 as Wa,pw as Ie,r3 as nt,TL as Xa,TM as eo,TN as to,mo as no,bo as ao,mj as qt,m5 as oo,TO as so,gB as co,mg as io,xF as lo,TP as ro,q4 as uo,p$ as mo,q3 as po,pQ as ho,TQ as go,fO as pn,pe as Co,oT as So,f$ as Gt,pA as fo,TR as Io,TS as ko,px as hn,TT as Eo,TU as To,TV as bo,TW as yo,TX as Nt,rE as vo,qX as Po,Nv as Ao,TY as wo,TZ as Ro,kS as xo,T_ as Do,Jy as Fo,kR as _o,kG as Uo,fN as Bo,qt as gn,qP as Vo,pu as Jt,pz as Oo,bE as zo,md as Mo,ma as Lo,T$ as jo,pP as Yt,qL as Kt,qJ as $o,U0 as qo,qy as Go,qe as No,qM as Jo,U1 as Yo,U2 as Ko,qi as Qo,U3 as Zo,q9 as Ho,qh as Wo,qf as Xo,qS as es}from"./zeni-epic-state-GXytJkko.js";import{y as qe,d as Y,g as G,w as le,_ as Cn,a0 as Sn,cZ as ts,z as Ne,c_ as Qt,c$ as ns,d0 as as,d1 as os,au as Re,d2 as ss,aZ as Zt,B as fn,d3 as cs,ar as at,O as is,a9 as ls,d4 as rs,a4 as ds,d5 as us,Z as ms,d6 as ps,d7 as hs,x as gs,f as Cs,aS as Ss,d8 as fs,d9 as Is,be as ks,G as Es,aV as Ts}from"./index-DQqz4S7_.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import{f as Ht,a as bs,b as ys,g as vs,C as Ps}from"./TransactionDetailScreen-D5r3-Mgi.js";import{w as As}from"./withTransactionSidePanel-ZD8SIzTb.js";import{h as ws,v as Rs}from"./routePaths-BU7xzRci.js";import{g as ot}from"./accountMappingHelper-DvHt_faU.js";import{D as xs}from"./DrawerScreen-CFNs8DOc.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";import"./decodeURIComponentSafe-IB5WoVjO.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]="b86ecd23-703e-4c6f-8b80-f9fa86550e32",t._sentryDebugIdIdentifier="sentry-dbid-b86ecd23-703e-4c6f-8b80-f9fa86550e32")}catch{}})();const Ds=()=>{const t=ke(),s=an(),R=st(),b=D((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=D((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=D((m=>ga(m,b.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=In({mobileExploreReferrer:"Month-End Close Overview"}),x=a.useCallback(((m,O,te=!1)=>{t(we({tenantId:O,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),y=a.useCallback((m=>{const O=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,O??null),t(Ca(b.tenantId,m))}),[b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[b.tenantId],h=a.useCallback((()=>{const m=R.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(r.month,r.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),x(r,b.tenantId,!0)}),[x,r,b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=le(R.state?.pathnameStackToGoBack,R.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((O=>O.progress<100));if(m!=null)return void s(`./${m.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,r]),{areTenantIdsInSync:u}=Cn();return Sn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&x(r,b.tenantId)}),[x,r,l.fetchState,b.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Sa(r))}),[r,l.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&h()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),a.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=R.state?.referrer;G.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Fs,{children:S.jsx(ts,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Fs=Ge.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-bqFl_SVp.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{a5 as i,a6 as l,a7 as p,v as f}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-bqFl_SVp.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{a5 as i,a6 as l,a7 as p,v as f}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import m from"./NotFoundScreen-DlOrYovK.js";import{h as b,g as u}from"./core-Bnb5S7eF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c70580bc-4af3-4de4-ac46-b35ae2a6be4d",e._sentryDebugIdIdentifier="sentry-dbid-c70580bc-4af3-4de4-ac46-b35ae2a6be4d")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Bj_fC7Ll.js";import{u as l,h as f,g as m}from"./core-Bnb5S7eF.js";import{hx as p,MD as g,ME as b}from"./zeni-epic-state-GXytJkko.js";import{u as _,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-Bj_fC7Ll.js";import{u as l,h as f,g as m}from"./core-Bnb5S7eF.js";import{hx as p,MD as g,ME as b}from"./zeni-epic-state-GXytJkko.js";import{u as _,L as h,z as y}from"./index-DQqz4S7_.js";import"./liveblocks-bqFl_SVp.js";import"./recharts-B3FaT6ex.js";import"./mui-BAFflVdx.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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-bqFl_SVp.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-Bnb5S7eF.js";import{Mw as k,Mx as v,My as M,BA as B,Bm as T,Mz as A,MA as oe,MB as ie,Bq as se,fC as $,Bx as le,Bu as re}from"./zeni-epic-state-GXytJkko.js";import{p as g,o as r,q as de,g as j,n as G,r as ce,v as me,F as pe,w as V,y as ue,d as he,N as xe,x as ge,E as fe,A as we,B as be,D as Se,V as ye,S as ke,I as ve,G as je,H as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-bqFl_SVp.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-Bnb5S7eF.js";import{Mw as k,Mx as v,My as M,BA as B,Bm as T,Mz as A,MA as oe,MB as ie,Bq as se,fC as $,Bx as le,Bu as re}from"./zeni-epic-state-GXytJkko.js";import{p as g,o as r,q as de,g as j,n as G,r as ce,v as me,F as pe,w as V,y as ue,d as he,N as xe,x as ge,E as fe,A as we,B as be,D as Se,V as ye,S as ke,I as ve,G as je,H as $e}from"./index-DQqz4S7_.js";import{n as m}from"./mui-BAFflVdx.js";import f from"./NotFoundScreen-DlOrYovK.js";import{a as I}from"./sentry-Bj_fC7Ll.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="3f4b9deb-5700-49e9-8f60-97d9147ba19e",e._sentryDebugIdIdentifier="sentry-dbid-3f4b9deb-5700-49e9-8f60-97d9147ba19e")}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-bqFl_SVp.js";import{a as g}from"./sentry-Bj_fC7Ll.js";import{u as F,g as O,h as _,t as w,j as l,N as C}from"./core-Bnb5S7eF.js";import{z as r,E as V,O as P,h as A,g as N,j as Z,C as R,V as W,m as $}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-bqFl_SVp.js";import{a as g}from"./sentry-Bj_fC7Ll.js";import{u as F,g as O,h as _,t as w,j as l,N as C}from"./core-Bnb5S7eF.js";import{z as r,E as V,O as P,h as A,g as N,j as Z,C as R,V as W,m as $}from"./index-DQqz4S7_.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-GXytJkko.js";import{n as ne}from"./mui-BAFflVdx.js";import{u as se}from"./useDeviceId-CnUmsNEA.js";import{f as ie}from"./analyticsHelper-H9dml3jr.js";import{t as ae}from"./getLocaleForTenant-CqG7z-4D.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="45fdd94b-f7ea-4386-803d-553bcb052699",t._sentryDebugIdIdentifier="sentry-dbid-45fdd94b-f7ea-4386-803d-553bcb052699")}catch{}})();const T=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Te(){const t=F(),i=O(),m=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),b=l((e=>B(e))),E=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,f)))}),[n,p,t,a,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),X().then((()=>{const e=$();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(Z.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,y,s,o,b,v,i.state,t]);const M=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))}),[a,d,t,c]),U=g.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))}),[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:U,onCancelVerifyDevice:M});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(C,{to:e,state:{...i.state,origin:""}})}if(!T(n,p)||f==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(C,{to:e,state:{...i.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-bqFl_SVp.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-Bnb5S7eF.js";import{eZ as me,fH as Ke,fI as be,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 ba,g1 as pa}from"./zeni-epic-state-GXytJkko.js";import{a9 as ha,aa as Sa,x as ga,y as Ea,z as k,A as ka,u as Ca,d as r,i as ya,c 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 $a,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-bqFl_SVp.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-Bnb5S7eF.js";import{eZ as me,fH as Ke,fI as be,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 ba,g1 as pa}from"./zeni-epic-state-GXytJkko.js";import{a9 as ha,aa as Sa,x as ga,y as Ea,z as k,A as ka,u as Ca,d as r,i as ya,c 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 $a,ah as Pa,ai as ue,g as x,a1 as Ma,w,aj as R,ak as Ga}from"./index-DQqz4S7_.js";import{D as xa}from"./mui-BAFflVdx.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]="3b3267bd-53a3-4dc6-bedf-b450704b410e",f._sentryDebugIdIdentifier="sentry-dbid-3b3267bd-53a3-4dc6-bedf-b450704b410e")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),B=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),pe=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),$e=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)),$=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"&&B.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,B.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))}),[A,$.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)),Be=_&&(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:Be,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),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ga(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;x.trackCompanySwitch(p.companyId,p.companyName,p.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:$e,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(be({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-bqFl_SVp.js";import{h as n,n as e}from"./core-Bnb5S7eF.js";import{U as i}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-bqFl_SVp.js";import{h as n,n as e}from"./core-Bnb5S7eF.js";import{U as i}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import"./sentry-Bj_fC7Ll.js";import"./zeni-epic-state-GXytJkko.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-bqFl_SVp.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-bqFl_SVp.js";import lt from"./NotFoundScreen-DlOrYovK.js";import{a as k}from"./sentry-Bj_fC7Ll.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-Bnb5S7eF.js";import{cw as St,fJ as q,eZ as H,fX as bt,fQ as b,Ti as Q,fT as d,fI as y,sK as M,yg as It,Tj as Tt,fH as Ct,fZ as yt,sP as _t,Tk as $,bo as F,fB as x,sT as X,Tl as Et,cI as At,cB as Bt}from"./zeni-epic-state-GXytJkko.js";import{_ as Nt,z as wt,y as xt,d as Rt,a0 as vt,cW as Dt,w as B,a9 as Pt,cX as Ut,aa as Gt,v as $t}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="3fe790a8-5f3b-4c71-b88d-7383590e1fbd",t._sentryDebugIdIdentifier="sentry-dbid-3fe790a8-5f3b-4c71-b88d-7383590e1fbd")}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,m,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"}})}m==="unread"&&t(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(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(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(X("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(N(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,N).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=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:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});vt({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)),v=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),D=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=Dt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:z,hasFetchedAll:J}=mt({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(d({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(d({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=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,D]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&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)),E=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(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,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 E=[];v==="all"?E.push("read","unread"):v!=="mentions"&&E.push(v),s(M("task_manager",C,E,!0))}}}},nt=dt();return A.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 A.jsxs(gt,{children:[A.jsx(K,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(K,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-bqFl_SVp.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{u as T,g as A,j as o,N as P}from"./core-Bnb5S7eF.js";import{MG as j,eZ as C,fP as D,MH as R,MI as x,MJ as z,MK as L,oi as k,LD as N}from"./zeni-epic-state-GXytJkko.js";import{z as h,R as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-bqFl_SVp.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{u as T,g as A,j as o,N as P}from"./core-Bnb5S7eF.js";import{MG as j,eZ as C,fP as D,MH as R,MI as x,MJ as z,MK as L,oi as k,LD as N}from"./zeni-epic-state-GXytJkko.js";import{z as h,R as I}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="93af4a2f-5c59-4e36-9e91-e0fee9ad7270",n._sentryDebugIdIdentifier="sentry-dbid-93af4a2f-5c59-4e36-9e91-e0fee9ad7270")}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]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>C(e))),l=o((e=>D(e))),d=o((e=>e.tenantState.fetchState)),y=o(R),v=o(x),u=o(z),[S,E]=r.useState(null),[b,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const M=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=S??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:E,approveError:b??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(N(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CRmbuHlA.js → PandLWithForecastRoutes-DjhLwT7A.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-bqFl_SVp.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-Bnb5S7eF.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-GXytJkko.js";import{z as me,_ as fe,a0 as pe,f as ue,y as w,d as M,D as he,g as N,ap as ge,w as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-bqFl_SVp.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-Bnb5S7eF.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-GXytJkko.js";import{z as me,_ as fe,a0 as pe,f as ue,y as w,d as M,D as he,g as N,ap as ge,w as Fe}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import be from"./NotFoundScreen-DlOrYovK.js";import{F as Ie}from"./FeaturePreviewScreen-CQa-Dzig.js";import{a as g}from"./sentry-Bj_fC7Ll.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import{u as ye}from"./useInitialThreadRequest-DA5ML13t.js";import{t as Se}from"./routePaths-BU7xzRci.js";import{M as Te}from"./MobileAppDrawer-CcKlE5IP.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="7c15481a-9098-44b6-90e9-c1695e236748",s._sentryDebugIdIdentifier="sentry-dbid-7c15481a-9098-44b6-90e9-c1695e236748")}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=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),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)),D=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(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&&!D(i.forecasts[t].id)&&F&&e(y(i.forecasts[t].id))}}),[c,p,e,l,i,m,u,R,y,F]);const x=ue(),B=x?.loggedInUserRole!=null&&ee(x.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:D,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(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-bqFl_SVp.js";import{N7 as oe,eZ as Q,kG as H,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 ce,vi as Pe,vf as je,N9 as de,w$ as Le,fq as Te,gi as Ae,Na as G,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-GXytJkko.js";import{p as me,y as ae,d as _,z as K,i as ge,e as fe,K as he,al as Ce,am as Fe,G as be,o as F,M as ye,O as M,an as Ve,_ as Ze,a0 as Be,D as Ue,g as Se,j as $e,w as ze,ao as Ge,f as _e}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-bqFl_SVp.js";import{N7 as oe,eZ as Q,kG as H,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 ce,vi as Pe,vf as je,N9 as de,w$ as Le,fq as Te,gi as Ae,Na as G,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-GXytJkko.js";import{p as me,y as ae,d as _,z as K,i as ge,e as fe,K as he,al as Ce,am as Fe,G as be,o as F,M as ye,O as M,an as Ve,_ as Ze,a0 as Be,D as Ue,g as Se,j as $e,w as ze,ao as Ge,f as _e}from"./index-DQqz4S7_.js";import{D as we,n as N,S as xe}from"./mui-BAFflVdx.js";import te from"./NotFoundScreen-DlOrYovK.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{u as se,i as He,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-Bnb5S7eF.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import{M as qe}from"./MobileAppDrawer-CcKlE5IP.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="f45a0dcf-e94b-4c97-90a3-bec38fc4b975",e._sentryDebugIdIdentifier="sentry-dbid-f45a0dcf-e94b-4c97-90a3-bec38fc4b975")}catch{}})();const Je={overlayWidth:new be(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=He(),r=g((l=>oe(l))),p=g((l=>Q(l))),E=g((l=>H(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"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),y()},A=()=>{V===!0?S(!0):C()},$=d.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),b=!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:b,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:v,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):ve(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width: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-bqFl_SVp.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-bqFl_SVp.js";import E from"./NotFoundScreen-DlOrYovK.js";import{a as r}from"./sentry-Bj_fC7Ll.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 h}from"./core-Bnb5S7eF.js";import{eZ as O,Tm as b,bq as F,bn as N,ij as V,fB as q}from"./zeni-epic-state-GXytJkko.js";import{x as Y,z as I,a0 as Z,cY as $}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import{M as H}from"./MobileAppDrawer-CcKlE5IP.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="c0335fcd-deb3-4ce0-9be1-75a517b26323",e._sentryDebugIdIdentifier="sentry-dbid-c0335fcd-deb3-4ce0-9be1-75a517b26323")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Y(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),x=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),j=C||x||k,d=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),D=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),j?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-bqFl_SVp.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Bj_fC7Ll.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-GXytJkko.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-BKBg63lI.js";import{r as un}from"./empty-BXrJtoVu.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Sz3Y8uGi.js";import{r as Gl}from"./index-B9FzYJpE.js";import{r as zl}from"./index-gZ-YqOdE.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Bnb5S7eF.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,T as Xl,n as Ql,g as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-bqFl_SVp.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Bj_fC7Ll.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-GXytJkko.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-BKBg63lI.js";import{r as un}from"./empty-BXrJtoVu.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Sz3Y8uGi.js";import{r as Gl}from"./index-B9FzYJpE.js";import{r as zl}from"./index-gZ-YqOdE.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Bnb5S7eF.js";import{u as Kl,z as Pc,L as Wl,Q as Jl,T as Xl,n as Ql,g as tf}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{d as Pe}from"./decodeURIComponentSafe-IB5WoVjO.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]="99165218-5556-418a-b30c-4e97216ec8e2",t._sentryDebugIdIdentifier="sentry-dbid-99165218-5556-418a-b30c-4e97216ec8e2")}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-bqFl_SVp.js";import F from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-bqFl_SVp.js";import F from"./NotFoundScreen-DlOrYovK.js";import{a as p}from"./sentry-Bj_fC7Ll.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-Bnb5S7eF.js";import{eZ as I,QE as g,QU as S,F_ as V,F7 as U,FZ as d,FQ as B,R5 as L,G0 as W}from"./zeni-epic-state-GXytJkko.js";import{z as N,a9 as T,bZ as Q,ag as _,bC as Z,b_ as z}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.js";import{u as G,R as A}from"./ReimbursementApprovalRuleDetailScreen-DdpFdkik.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]="e82c7b15-9d62-454f-8e52-736eb8f73244",e._sentryDebugIdIdentifier="sentry-dbid-e82c7b15-9d62-454f-8e52-736eb8f73244")}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:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{_(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(Q)),q=({isLoading:e})=>{const o=E(),s=x(),a=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>g(n))),v=u((n=>S(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!1)))}),[t,f,e,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(n,$,h)=>{n.endsWith(y)&&h.onApprovalRulesEventReceived(n)}};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,a={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(a[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:a,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{_(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(T(z)),J=()=>{const e=u((a=>I(a))),{isApprovalRulesV3Enabled:o,isLoading:s}=Z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=E(),s=x(),a=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>g(n)));G();const v=u((n=>S(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!0)))}),[t,f,e,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(n,$,h)=>{n.endsWith(j)&&h.onApprovalRulesEventReceived(n)}};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-bqFl_SVp.js";import{a as f}from"./sentry-Bj_fC7Ll.js";import{u as w,j as y,h as x,g as O,i as V,n as k}from"./core-Bnb5S7eF.js";import{l6 as L,QU as T,QE as U,FT as F,G3 as B,F_ as A,F$ as E,QV as j,eZ as Z,FZ as z}from"./zeni-epic-state-GXytJkko.js";import{z as P,E as N,B as $,bP as G,ag as Q,bC as K,bQ as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-bqFl_SVp.js";import{a as f}from"./sentry-Bj_fC7Ll.js";import{u as w,j as y,h as x,g as O,i as V,n as k}from"./core-Bnb5S7eF.js";import{l6 as L,QU as T,QE as U,FT as F,G3 as B,F_ as A,F$ as E,QV as j,eZ as Z,FZ as z}from"./zeni-epic-state-GXytJkko.js";import{z as P,E as N,B as $,bP as G,ag as Q,bC as K,bQ as W}from"./index-DQqz4S7_.js";import"./mui-BAFflVdx.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]="466537f1-f59a-4dec-ae0f-fcece0c27357",e._sentryDebugIdIdentifier="sentry-dbid-466537f1-f59a-4dec-ae0f-fcece0c27357")}catch{}})();function H(){const e=w(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const J=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((m=>{const g=(b=m.value,j(b)==null);var b;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=I.concat(R);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}=V(),o=P.getSignedInUser(),l=N(),r=y((n=>T(n))),i=y((n=>U(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?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=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((g=>{const b=g.actorKind?.selectedOption,C=g.selectedRole?.selectedOption;let D=[];b==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const _=g.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 I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=y((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}=V(),o=P.getSignedInUser(),l=N(),r=y((n=>T(n))),i=y((n=>U(n))),[a,d]=f.useState(!1);if(H(),f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?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-bqFl_SVp.js";import{h as q,u as de,g as V,i as Y,j as w,N as _,n as Q,l as ct,o as dt,p as C}from"./core-Bnb5S7eF.js";import{eZ as H,R6 as ue,c7 as pe,F2 as Ue,kR as ut,Ff as oe,Fe as re,R7 as pt,bn as be,gt as Le,R8 as bt,Nv as gt,kG as Pe,Nw as ve,Nx as ht,jB as ft,Qq as St,jQ as Rt,ES as It,uw as yt,jI as vt,FC as $e,R9 as Me,Ra as kt,Rb as At,Rc as Ct,Rd as Et,Re as wt,Fm as ke,jW as xt,Qz as Bt,Fg as Tt,F0 as jt,Rf as Ft,E$ as Dt,Rg as Ut,F8 as Ae,Fq as Lt,Fp as Pt,Fl as $t,Rh as _e,KB as Mt,bq as _t,Fb as Nt,FU as Gt,Ri as Ot,Rj as zt,Fy as Zt,Fv as Ce,PV as Vt,EZ as Ht,Rk as Ne,Gk as Ee,Gs as Wt,Rl as qt,Rm as z,Rn as Qt,Ro as Ge,Rp as Kt,Rq as Oe,Rr as ze,FK as le,bu as Jt,bK as ge,cI as he,fG as Ze,fE as Ve,Rs as Xt,fB as Yt,Q6 as en,Rt as tn,Ru as He,Qa as nn,QU as an,Rv as sn,R5 as on,Gp as we,Go as rn,Rw as ln,Rx as mn,Ry as cn,Rz as dn,RA as un,QF 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-GXytJkko.js";import{x as We,p as qe,y as ee,d as E,z as P,b$ as Qe,D 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,G as jn,B as fe,j as Xe,a9 as Fn,bn as Dn,a4 as Un,E as Ye,c3 as Ln,i as Pn}from"./index-BzrRJ8WV.js";import{n as N,S as $n}from"./mui-BAFflVdx.js";import me from"./NotFoundScreen-Bjgm3Cgg.js";import{S as Be}from"./SetupPagesScreen-CmqcI8Pt.js";import{F as et}from"./FeaturePreviewScreen-DAIgYjjb.js";import{a as f}from"./sentry-Bj_fC7Ll.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import{u as tt}from"./useInitialThreadRequest-BaClMW9n.js";import{D as Mn}from"./DrawerScreen-BL40QyXA.js";import{M as nt}from"./MobileAppDrawer-QMY9Y_6M.js";import{R as _n}from"./ReimbursementApprovalRoutes-COdNraf8.js";import{FallBackRoute as Nn}from"./ScreenRoutes-BT39k7R-.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";import"./analyticsHelper-DjBKxGVt.js";import"./routePaths-iBgwsr_r.js";import"./BusinessVerificationPageScreen-2yzgn_dq.js";import"./ReimbursementApprovalRuleDetailScreen-m4OK96Pp.js";import"./getLocaleForTenant-DBW7UyHp.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]="717c5c88-053b-454a-94c8-d5a05fc9296e",e._sentryDebugIdIdentifier="sentry-dbid-717c5c88-053b-454a-94c8-d5a05fc9296e")}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=V(),{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=V().pathname,j=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=P.getSignedInUser(),R=w((p=>H(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(Vn,{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(Hn,{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-bqFl_SVp.js";import{h as q,u as de,g as V,i as Y,j as w,N as _,n as Q,l as ct,o as dt,p as C}from"./core-Bnb5S7eF.js";import{eZ as H,R6 as ue,c7 as pe,F2 as Ue,kR as ut,Ff as oe,Fe as re,R7 as pt,bn as be,gt as Le,R8 as bt,Nv as gt,kG as Pe,Nw as ve,Nx as ht,jB as ft,Qq as St,jQ as Rt,ES as It,uw as yt,jI as vt,FC as $e,R9 as Me,Ra as kt,Rb as At,Rc as Ct,Rd as Et,Re as wt,Fm as ke,jW as xt,Qz as Bt,Fg as Tt,F0 as jt,Rf as Ft,E$ as Dt,Rg as Ut,F8 as Ae,Fq as Lt,Fp as Pt,Fl as $t,Rh as _e,KB as Mt,bq as _t,Fb as Nt,FU as Gt,Ri as Ot,Rj as zt,Fy as Zt,Fv as Ce,PV as Vt,EZ as Ht,Rk as Ne,Gk as Ee,Gs as Wt,Rl as qt,Rm as z,Rn as Qt,Ro as Ge,Rp as Kt,Rq as Oe,Rr as ze,FK as le,bu as Jt,bK as ge,cI as he,fG as Ze,fE as Ve,Rs as Xt,fB as Yt,Q6 as en,Rt as tn,Ru as He,Qa as nn,QU as an,Rv as sn,R5 as on,Gp as we,Go as rn,Rw as ln,Rx as mn,Ry as cn,Rz as dn,RA as un,QF 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-GXytJkko.js";import{x as We,p as qe,y as ee,d as E,z as P,b$ as Qe,D 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,G as jn,B as fe,j as Xe,a9 as Fn,bn as Dn,a4 as Un,E as Ye,c3 as Ln,i as Pn}from"./index-DQqz4S7_.js";import{n as N,S as $n}from"./mui-BAFflVdx.js";import me from"./NotFoundScreen-DlOrYovK.js";import{S as Be}from"./SetupPagesScreen-DFoSoY9W.js";import{F as et}from"./FeaturePreviewScreen-CQa-Dzig.js";import{a as f}from"./sentry-Bj_fC7Ll.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-C8xAByz8.js";import{u as tt}from"./useInitialThreadRequest-DA5ML13t.js";import{D as Mn}from"./DrawerScreen-CFNs8DOc.js";import{M as nt}from"./MobileAppDrawer-CcKlE5IP.js";import{R as _n}from"./ReimbursementApprovalRoutes-POVUD6sL.js";import{FallBackRoute as Nn}from"./ScreenRoutes-B4XnnElP.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";import"./analyticsHelper-H9dml3jr.js";import"./routePaths-BU7xzRci.js";import"./BusinessVerificationPageScreen-DFVMEcvH.js";import"./ReimbursementApprovalRuleDetailScreen-DdpFdkik.js";import"./getLocaleForTenant-CqG7z-4D.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]="717c5c88-053b-454a-94c8-d5a05fc9296e",e._sentryDebugIdIdentifier="sentry-dbid-717c5c88-053b-454a-94c8-d5a05fc9296e")}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=V(),{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=V().pathname,j=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=P.getSignedInUser(),R=w((p=>H(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(Vn,{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(Hn,{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;
|