@zeniai/web-app-ui 5.0.95-qa → 5.0.97-dev
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-CGWqKw2A.js +1 -0
- package/dist/assets/AddressScreen-DgW0r12j.js +9 -0
- package/dist/assets/AiCfoScreen-mpMOsrgh.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-DLpMtIRS.js → BillPayApprovalRoutes-CuO1OyTh.js} +1 -1
- package/dist/assets/{BillPayRoutes-B5l3Tw20.js → BillPayRoutes-CVK-SvP3.js} +17 -17
- package/dist/assets/BusinessVerificationPageScreen-BYdF1bHH.js +9 -0
- package/dist/assets/ChargeCardRoutes-BnLL7Oh9.js +71 -0
- package/dist/assets/CompanyPassportScreen-CurP8P_r.js +1 -0
- package/dist/assets/ConnectionAuthScreen-XYG9quUc.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DkpxqvRp.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-XzuPwC7t.js +23 -0
- package/dist/assets/DashboardRoutes-aXE6eRUn.js +20 -0
- package/dist/assets/{DefaultTenantHome-DPWdITeE.js → DefaultTenantHome-D8TLMGvX.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BaXgsKL_.js +18 -0
- package/dist/assets/DrawerScreen-Cl15MV8E.js +1 -0
- package/dist/assets/EntityDetailRoutes-DzGzpMa5.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BcjfN0Ju.js +25 -0
- package/dist/assets/FeaturePreviewScreen-D6uCQjjF.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-B2Lq1erT.js +1 -0
- package/dist/assets/MagicLinkRoutes-Krl3LdoK.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-AmlbZLoQ.js +12 -0
- package/dist/assets/MobileAppDrawer-CIFLBMnG.js +1 -0
- package/dist/assets/NotFoundScreen-6s-CV-uJ.js +1 -0
- package/dist/assets/NotificationRoutes-sNkUDoB9.js +1 -0
- package/dist/assets/OAuthConsentScreen-DnssIj9h.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-e4NHYCVg.js +1 -0
- package/dist/assets/PeopleRoutes-D22bF149.js +22 -0
- package/dist/assets/PerformanceRoutes-CeJDOkS_.js +1 -0
- package/dist/assets/{Preview-DVbW5PS-.js → Preview-CnNge2qE.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DckktUOs.js → QBOConnectionScreen-4k7XqHlG.js} +1 -1
- package/dist/assets/ReferralListScreen-CKP-RqZB.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CWQE-ocg.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BK03a97e.js → ReimbursementApprovalRuleDetailScreen-Dgpqad5D.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BOTzgYhv.js → ReimbursementRoutes-Cd4dr8g5.js} +6 -6
- package/dist/assets/ReportsRoutes-C1JCi0DK.js +1 -0
- package/dist/assets/RewardsRoutes-C04DC-zn.js +1 -0
- package/dist/assets/ScreenRoutes-BdDWctgF.js +2 -0
- package/dist/assets/{SettingsRoutes-DOALXrsx.js → SettingsRoutes-ClBKtlV1.js} +8 -8
- package/dist/assets/{SetupPagesScreen-BYhmd0-N.js → SetupPagesScreen-ISYmAXSw.js} +5 -5
- package/dist/assets/SignInScreen-DbrQdSIc.js +1 -0
- package/dist/assets/SignOutScreen-tN2xKweR.js +9 -0
- package/dist/assets/TaskListScreen-CcxsLxWY.js +9 -0
- package/dist/assets/TaskRoutes-BlNcUUfL.js +9 -0
- package/dist/assets/TransactionDetailRoutes-Bptrg1f9.js +1 -0
- package/dist/assets/TransactionDetailScreen-DxF4bkB2.js +5 -0
- package/dist/assets/TransactionListRoutes-HDLI794m.js +1 -0
- package/dist/assets/TreasuryRoutes-VXqomRCb.js +37 -0
- package/dist/assets/{VendorsRoutes-D8t3eTpL.js → VendorsRoutes-Q2QOh8Cr.js} +21 -21
- package/dist/assets/WiseConfirmationScreen-DrnQduD4.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BhbbjK45.js → ZeniAccountRoutes-B0GIox14.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-DAHwiVMm.js +9 -0
- package/dist/assets/{accountMappingHelper-DdryjbCH.js → accountMappingHelper-Bvkx36I4.js} +1 -1
- package/dist/assets/{analytics-B35UERag.js → analytics-CAylLTML.js} +1 -1
- package/dist/assets/{analyticsHelper-Cnf9wNpk.js → analyticsHelper-CnKhOE0J.js} +1 -1
- package/dist/assets/{core-B20PugrR.js → core-DPuoDz-C.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-HZX6LUOb.js → decodeURIComponentSafe-CoP-62fa.js} +1 -1
- package/dist/assets/{dnd-CTNaOehy.js → dnd-DoKiSnu1.js} +1 -1
- package/dist/assets/{empty-DqPV1QMu.js → empty-CqLohdTd.js} +1 -1
- package/dist/assets/{empty-DbjE3Pml.js → empty-Dya-tSOZ.js} +1 -1
- package/dist/assets/{emptyVideoElement-D5A8Alvf.js → emptyVideoElement-DN0XgSVD.js} +1 -1
- package/dist/assets/epic-nb_4clnc.js +2 -0
- package/dist/assets/getLocaleForTenant-Cv1qkYRT.js +1 -0
- package/dist/assets/{index-Dh7l3Ca4.js → index-8sAtTwXX.js} +1 -1
- package/dist/assets/{index-BJUGjRvu.js → index-BJ1_hb4m.js} +1 -1
- package/dist/assets/{index-Dx-tgz0s.js → index-CIJ8oTsb.js} +1 -1
- package/dist/assets/{index-DwJt1swd.js → index-CiNh7iF3.js} +1 -1
- package/dist/assets/{index-DDN5QRfh.js → index-D00upk1h.js} +2 -2
- package/dist/assets/{index-DODLcfP6.js → index-DFMBbjjX.js} +1 -1
- package/dist/assets/{index-CtCI_jgi.js → index-DPfZNvSx.js} +15801 -15966
- package/dist/assets/{index-qbNk-Sh2.js → index-D_RleLEr.js} +1 -1
- package/dist/assets/{lexical-BDpP_OMn.js → lexical-By4mk6_c.js} +1 -1
- package/dist/assets/{liveblocks-BSDLCmF2.js → liveblocks-oJncKqAM.js} +1 -1
- package/dist/assets/{lottie-DG71PfmK.js → lottie-DF3afs57.js} +1 -1
- package/dist/assets/{mui-BBkBdMVO.js → mui-CvBhrbbU.js} +1 -1
- package/dist/assets/{pathToGoBack-BJj5tqvK.js → pathToGoBack-BsOMzCPN.js} +1 -1
- package/dist/assets/{pdf-Cp8DoYAG.js → pdf-ZStfwNCw.js} +3 -3
- package/dist/assets/{pdf-lib-BqwRJQ00.js → pdf-lib-Cz_8yjsc.js} +1 -1
- package/dist/assets/{plaid-DHvUog4a.js → plaid-B5RWvsAl.js} +1 -1
- package/dist/assets/{pusher-DsZLo3j0.js → pusher-CBx-MkLq.js} +1 -1
- package/dist/assets/{react-DpONCvOo.js → react-B9yLfzkL.js} +1 -1
- package/dist/assets/{react-BPL_4xi4.js → react-BYV_Q7yH.js} +1 -1
- package/dist/assets/{react-BUTkVbbW.js → react-CDIoRxEm.js} +1 -1
- package/dist/assets/{react-zGcoIiO8.js → react-CX37p-_t.js} +1 -1
- package/dist/assets/{react-D4RyndA4.js → react-Cru1b7DY.js} +1 -1
- package/dist/assets/{react-Uu6ZW5p-.js → react-DWAXaztH.js} +1 -1
- package/dist/assets/{recharts-BzjcN9SN.js → recharts-8icy_MRK.js} +2 -2
- package/dist/assets/routePaths-C0C2W8XC.js +1 -0
- package/dist/assets/{sentry-67DqaLi1.js → sentry-Wbq0JKts.js} +1 -1
- package/dist/assets/{url-DgheZiFv.js → url-ByM-m_3z.js} +1 -1
- package/dist/assets/{url-D5ovKX_j.js → url-DJu6Grkr.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js +1 -0
- package/dist/assets/{useDeviceId-CZrGGxHD.js → useDeviceId-B67Wr9jV.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js +1 -0
- package/dist/assets/{useInitialThreadRequest-CHUXHA4e.js → useInitialThreadRequest-OlVGnbEH.js} +1 -1
- package/dist/assets/{utils-C7uJ9upL.js → utils-BQwNg4C5.js} +1 -1
- package/dist/assets/withTransactionSidePanel-D14NyE9e.js +21 -0
- package/dist/assets/zeni-epic-state-DxdjrTbG.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -5
- package/dist/assets/AddressRoutes-CjTHTSuI.js +0 -1
- package/dist/assets/AddressScreen-CqBa6_-n.js +0 -9
- package/dist/assets/AiCfoScreen-BXUvjbhu.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-CSKO8lFK.js +0 -9
- package/dist/assets/ChargeCardRoutes-jWkInVo_.js +0 -71
- package/dist/assets/CompanyPassportScreen-CKvp1ssr.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B4RQUYL_.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BGqU9gPw.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-Dr5zRy1K.js +0 -23
- package/dist/assets/DashboardRoutes-pJhHX-2b.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-SKLAPI0e.js +0 -18
- package/dist/assets/DrawerScreen-D5UV8-Be.js +0 -1
- package/dist/assets/EntityDetailRoutes-gOpFte8h.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-ARewAzCQ.js +0 -25
- package/dist/assets/FeaturePreviewScreen-CWGIZoD1.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-DZdAM3r7.js +0 -1
- package/dist/assets/MagicLinkRoutes-GUUoK2nF.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-Im4VESmI.js +0 -12
- package/dist/assets/MobileAppDrawer-DjZLcHYq.js +0 -1
- package/dist/assets/NotFoundScreen-GGUH6kfI.js +0 -1
- package/dist/assets/NotificationRoutes-BoplnVa2.js +0 -1
- package/dist/assets/OAuthConsentScreen-DxwRtYz2.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-D8O3Fecf.js +0 -1
- package/dist/assets/PeopleRoutes-DreG0KS5.js +0 -22
- package/dist/assets/PerformanceRoutes-BWWDxy3D.js +0 -1
- package/dist/assets/ReferralListScreen-deq5DiBs.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-XhXfCwat.js +0 -1
- package/dist/assets/ReportsRoutes-d5fJ62NK.js +0 -1
- package/dist/assets/RewardsRoutes-C4s9WH-A.js +0 -1
- package/dist/assets/ScreenRoutes-D5644a5x.js +0 -2
- package/dist/assets/SignInScreen-CLFmIoF3.js +0 -1
- package/dist/assets/SignOutScreen-GZOa1gnF.js +0 -9
- package/dist/assets/TaskListScreen-DXLUHaMY.js +0 -9
- package/dist/assets/TaskRoutes-CBpVhxjZ.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BM0mSWXo.js +0 -1
- package/dist/assets/TransactionDetailScreen-Mjv-0Vsi.js +0 -5
- package/dist/assets/TransactionListRoutes-DX4_qMdv.js +0 -1
- package/dist/assets/TreasuryRoutes-33SOS81s.js +0 -37
- package/dist/assets/WiseConfirmationScreen-C9nK-3Oh.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BSfOyBC_.js +0 -9
- package/dist/assets/epic-C05Fn23e.js +0 -2
- package/dist/assets/getLocaleForTenant-DX4sTRBy.js +0 -1
- package/dist/assets/routePaths-Bd-gFJIO.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CjjIkZeq.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CMgniebB.js +0 -1
- package/dist/assets/withTransactionSidePanel-KXh--JtC.js +0 -21
- package/dist/assets/zeni-epic-state-B3AwsZqW.js +0 -13
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{j as l}from"./liveblocks-oJncKqAM.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-DPuoDz-C.js";import{Nc as k,Nj as K,fC as q,fB as M,fA as Q,iz as W,Kk as J,q0 as L,eQ as V,MK as D,ix as T,Nd as S,Nm as F,iv as G,iS as j}from"./zeni-epic-state-DxdjrTbG.js";import{bn as X,Z as N,y as R,z as U,m as Z,p as b,S as v,x as z,bo as Y,o as O,bp as ee,n as te}from"./index-DPfZNvSx.js";import{n as H}from"./mui-CvBhrbbU.js";import"./sentry-Wbq0JKts.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]="63a406e6-3cea-4117-86df-ca3660585eff",e._sentryDebugIdIdentifier="sentry-dbid-63a406e6-3cea-4117-86df-ca3660585eff")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(Q(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(K(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=b(a.state?.pathnameStackToGoBack),c=s.poppedPathname??P();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(F({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=b(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??P(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,{useFeatureGate:r}=R(),i=U.getSignedInUser(),p=h(u=>V(u)),g=Z(),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(_,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:p,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=H.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
height: 100vh;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex: 1 1 auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
+
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
+
`,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=b(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),p=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:p}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=b(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=R(),p=Z(),g=h(u=>V(u)),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:p.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${p.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(_,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,_ as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-oJncKqAM.js";import{Z as l,E as f,m as c}from"./index-DPfZNvSx.js";import{D as b}from"./mui-CvBhrbbU.js";import"./sentry-Wbq0JKts.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]="5f0ed12e-e902-402b-85e7-22752bbd60d8",e._sentryDebugIdIdentifier="sentry-dbid-5f0ed12e-e902-402b-85e7-22752bbd60d8")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),d=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),a=c();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-oJncKqAM.js";import{a as d}from"./sentry-Wbq0JKts.js";import{j as B,h as K,u as q,l as G,g as l,N as F,k as O,n as N,o as W}from"./core-DPuoDz-C.js";import{Lr as _,eQ as H,KQ as L,kC as M,Hp as C,Lw as Q,Kj as R,jC as V,Hq as S,KV as Y,KW as $,Kl as z,Kk as J}from"./zeni-epic-state-DxdjrTbG.js";import{aO as U,d as X,p as Z,n as tt}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import{d as k}from"./decodeURIComponentSafe-CoP-62fa.js";import{w as et}from"./withTransactionSidePanel-D14NyE9e.js";import{e as at,b as nt}from"./routePaths-C0C2W8XC.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.js";import"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import"./TransactionDetailScreen-DxF4bkB2.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]="e6cd6397-a470-4c13-8f5d-170075e5cf55",a._sentryDebugIdIdentifier="sentry-dbid-e6cd6397-a470-4c13-8f5d-170075e5cf55")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=Q(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:R(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Y()),a($()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(C(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=B(),o=K(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:j,entityNameEncoded:w}=G(),r=k(j??""),p=k(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>H(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>L(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(M(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(C(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(x.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 wt({entityType:a}){return s.jsx(N,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{j as C}from"./liveblocks-oJncKqAM.js";import xn from"./NotFoundScreen-6s-CV-uJ.js";import{a,b as Pt}from"./sentry-Wbq0JKts.js";import{n as Fe,S as Rn}from"./mui-CvBhrbbU.js";import{h as ce,j as wt,u as Ge,g as U,k as Dn,l as rt,n as Un,o as Le}from"./core-DPuoDz-C.js";import{eQ as Re,PL as Fn,n0 as Se,fg as Bn,qD as _n,ni as xt,nD as Rt,PM as Dt,nN as Mn,PN as Ut,nb as Vn,q9 as On,e$ as pe,PO as De,sJ as Ft,BU as Bt,PP as _t,PQ as jn,pQ as Qe,Ls as dt,Lu as Ln,jF as zn,Lv as $n,jM as qn,cW as Gn,tM as Ne,no as Mt,nS as Ue,PR as Qn,Kl as ut,Kk as Pe,PS as mt,k1 as Nn,PT as Yn,PU as Jn,PV as Kn,PW as Wn,nv as Hn,ng as ie,nV as we,PX as Zn,PY as Xn,PZ as ea,o0 as ta,jQ as na,jH as aa,P_ as oa,jP as ht,LC as sa,P$ as ca,Q0 as ia,pM as la,pr as ra,nT as ge,pq as ze,Q1 as da,Q2 as ua,lk as ma,bq as ha,lf as pt,l1 as pa,Q3 as ga,gO as gt,fS as Ca,lc as Sa,vF as Ia,Q4 as fa,or as ka,om as Ea,oq as va,ob as ya,Q5 as ba,f2 as Vt,nG as Aa,nr as Ta,fh as Ct,nX as Pa,Q6 as wa,nU as Ot,Q7 as xa,Q8 as Ra,Q9 as Da,Qa as Ua,Qb as St,pY as Fa,ph as Ba,Kj as _a,jO as Ma,Qc as Va,Gq as Oa,jN as ja,jC as La,f1 as za,oS as jt,p9 as $a,nR as It,nW as qa,bE as Ga,l9 as Qa,l6 as Na,Qd as Ya,oa as ft,p7 as kt,p5 as Ja,oX as Ka,oC as Wa,p8 as Ha,Qe as Za,Qf as Xa,oG as eo,Qg as to,ow as no,oF as ao,oD as oo,pc as so}from"./zeni-epic-state-DxdjrTbG.js";import{y as Lt,S as Ce,d as L,n as W,T as zt,cw as co,z as Be,cx as io,aq as xe,cy as lo,aQ as Et,x as $t,cz as ro,an as $e,D as uo,cA as mo,Y as ho,cB as po,R as go,cC as Co,cD as So,v as Io,c as fo,aK as ko,b1 as Eo,E as vo,cE as yo}from"./index-DPfZNvSx.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import{c as vt,C as bo}from"./TransactionDetailScreen-DxF4bkB2.js";import{w as Ao}from"./withTransactionSidePanel-D14NyE9e.js";import{h as To,v as Po}from"./routePaths-C0C2W8XC.js";import{g as qe}from"./accountMappingHelper-Bvkx36I4.js";import{D as wo}from"./DrawerScreen-Cl15MV8E.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.js";import"./decodeURIComponentSafe-CoP-62fa.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]="ab87d9b1-8fd6-43f4-9de5-e0ad8e07edc6",t._sentryDebugIdIdentifier="sentry-dbid-ab87d9b1-8fd6-43f4-9de5-e0ad8e07edc6")}catch{}})();const xo=()=>{const t=ce(),i=wt(),A=Ge(),f=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Fn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,J=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:J}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=W(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=zt();return Gt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=Fe.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
+
`,Do=Pt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:A,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=ce(),u=Be.getSignedInUser(),o=U(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:y,statementUploadChosen:r}=t,B=m[i],h=B?.accountReconEntity.statementMetaData?.statementUploadId,T=(e,n)=>{g(On(e,n.split(".")[0]))},I=e=>{h!=null&&g(Vn({accountId:i,selectedPeriod:y,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(Mn({accountId:i,selectedPeriod:y,payload:e}))},J=e=>{g(Ut({accountId:i,selectedPeriod:y,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),O=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),_=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return B!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:y,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:T,onDeleteFile:I,onSelectSourceType:J,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):_!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(lo,{excludedAccountReconciliation:_,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:O})})}):null}),yt=Fe.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
`,bt=Fe.div`
|
|
13
|
+
flex: 1;
|
|
14
|
+
min-height: 0;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
overflow-x: hidden;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
`;function Uo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:A,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=U(u=>jn(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(ro,{onCloseClick:i,addCustomerRequest:A,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const Fo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Bo,comma:At,space:_o}},dateFormat:Qt}=uo.getLocalizedStrings(),Tt=so,Mo=Dn(function(t,i){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,y={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=pe(t),{selectedTransactionCategorizationTab:B}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:B,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:A,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:A,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:y,navigate:r,onClickCustomerRequest:B,handleEditClick:h,setActivityLogTransactionId:T}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:J}=S.jeSchedules,te=Mt(I),O=Ue(te.start),_=Ue(te.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(I.month,I.year),t(Ba(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const b=()=>t(St(e,n,{fetchState:"Error"}));po(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(P=>{P!=null?t(Fa(e,P)):b()}).catch(b)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ua(e,n)),m!=null&&t(Se({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Da(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?_o+Bo+l+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Ra(e))},onUpdateMissingReceiptsUIState:e=>{t(xa(e))},onFetchMissingReceiptsList:()=>{_!=null&&O!=null&&t(Ot({start:O,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(eo(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Za(e))},onSetBulkUploadCompletedSubTab:e=>{t(Ha(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Wa())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ka(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ja())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(wa())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:s,uiState:{searchString:e}})),_!=null&&O!=null&&t(ge(s,{start:O,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(Pa(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Ta(e))},onSaveReconciliationReview:e=>{t(Aa(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(Vt(e))},handleLogOutClick:()=>{const e=W(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=qe(J.prepaidExpensesAccountList,s.selectedOptions),b=qe(J.fixedAssetsAccountList,l.selectedOptions),P=qe(J.accruedExpensesAccountList,k.selectedOptions),M={selectedPrepaidExpensesAccountIds:p.map(w=>w.accountId),selectedFixedAssetsAccountIds:b.map(w=>w.accountId),selectedAccruedExpensesAccountIds:P.map(w=>w.accountId)};t(ba({data:M}))},onSaveJeAccountSettingsClick:()=>{t(ya())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:b}=n,{allAccountList:P,allClassList:M,allDepreciationAccountList:w}=S.jeSchedules,$=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find(q=>q.id===b?.selectedOption):void 0,Ie={id:$?.zeniId??b?.selectedOption??"",name:$?.name??b?.defaultOptions.find(q=>q.value===b?.selectedOption)?.label??"",logo:$?.logo},fe=p?.selectedOption!=null?P.find(q=>q.qboId===p.selectedOption):void 0,ke=k?.selectedOption!=null?M.find(q=>q.classId===k.selectedOption):void 0,ne=l?.selectedOption!=null?w.find(q=>q.qboId===l.selectedOption):void 0;t(va({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:fe?.accountId,updatedClassId:ke?.classId,updatedAccumulatedDepreciationCategoryID:ne?.accountId,updatedVendor:{id:Ie.id,name:Ie.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ea(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Pe("common"))},onCancelAutoComplete:()=>{t(Pe("common"))}},onPostJESchedule(e,n){t(ka({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(fa())},handleJeScheduleClick:(e,n,s)=>{t(Ia({selectedJEScheduleKey:n}));const l=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(Sa(e,m.companyId,m.tenantId))},onClickCustomerRequest:B,setActivityLogTransactionId:T,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ca())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(ga(e))},onUpdateFileAttachment:e=>{t(pa({files:e}))},previewMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(ma(m.companyId,e,m.tenantId)),L.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,ha().format(Qt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,b,P,M,w,$)=>{t(ua(e,n,s,l,y,k,p,b,P,M,w,$,f))},onCancelAutoComplete:()=>{t(Pe("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),_!=null&&O!=null&&(t(ge(e,{start:O,end:_},!1,!1)),t(da(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&O!=null&&t(ge(e,{start:O,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,b)=>{_!=null&&O!=null&&t(ge(e,{start:O,end:_},!0,s,n,l,k,p,b))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,b,P)=>{t(ra(e,n,s,l,P??null,k,p,!1,b))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:y,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):L.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(la(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(ia({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:M,lineIds:w}=n;p!=null&&t(sa({transactionId:P,customerUpdates:p})),t(ca({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:M,uncategorizedAccounts:y,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ne(k,e,n,s,!0,E,b))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:M,lineIds:w}=n;p!=null&&(t(na({transactionId:P,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(aa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:M,uncategorizedAccounts:y,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ne(k,e,n,s,!0,E,b))):t(oa({selectedTab:l,transactionId:P.id,lineId:w[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{L.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(ta(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ea(e))},updateOperatingExpensesIdsForReview:e=>{t(Xn({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=Po(e.id,e.qboId,i.tenantEmailDomain),s=W(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Zn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(we(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(ie(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ie(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Hn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Wn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Kn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Jn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Nn(l)),t(Yn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,Qe("bill"));const n=W(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Pe("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Qn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,A)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=A;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,y,r)=>{u.onUploadTransactionReceipt(v,S,m,y,r,g.authParams)}}}(t,i,E)})(mo),Vo=Ao(function(t){const i=t.displayName??t.name??"Component",A=Pt.memo(t),f=E=>{const g=ce(),u=function(){const T=ce(),I=U(d=>pe(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{T(De({selectedDrawerAccountId:d}))},[T]),closePanel:a.useCallback(()=>{T(De({selectedDrawerAccountId:void 0}))},[T])}}(),o=U(T=>pe(T).reconciliation),v=U(T=>Re(T)),S=a.useCallback((T,I)=>{g(Ft("expense_automation_reconcile",T,I))},[g]),m=a.useCallback((T,I)=>{const d=v?.companyId;d!=null&&(g(Bt(T,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),y=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Do,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[y,u.isOpen,u.closePanel]),B=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:B,[u.isOpen,u.closePanel,u.selectedAccountId,B]);return C.jsx(Et.Provider,{value:h,children:C.jsx(A,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:A,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=go(),m=Co(),{isOpen:y}=So(),r=wt(),B=Ge(),h=ce(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:I}=qt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=zt(),J=(()=>{const c=U(G=>pe(G)),j=Ge(),{currentSelectedViewFetchState:Y,currentSelectedView:V,selectedPeriod:F}=c,he=$e(V),X=$e(Y.fetchState),be=a.useCallback(G=>{const K=j.state?.referrer;V==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(F.month,F.year,c.transactionView.totalCountByTab.review,0,G,K??null):L.trackTransactionsAutoCategorisedPage(F.month,F.year,c.transactionView.totalCountByTab.autoCategorized,0,G,K??null)),V==="missing_receipts"&&L.trackMissingReceiptsPage(F.month,F.year,G,c.missingReceipts.transactions.length,K??null),V==="je_schedules"&&L.trackMonthCloseScheduleListPage(F.month,F.year,G,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,K??null),V==="flux_analysis"&&L.trackFluxAnalysisPage(F.month,F.year,G,Fo(c.fluxAnalysis),K??null),V==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(F.month,F.year,G,"draft",c.auditSummary.auditScorePercentage,null,K??null)},[F,c]);return a.useEffect(()=>{X===Y.fetchState&&V===he||Y.fetchState!=="Completed"||be(!1)},[V,Y.fetchState,he]),be})(),te=Io(),[O,_]=a.useState(!1),e=U(c=>dt(c)),n=U(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[b,P]=a.useState([]),[M,w]=a.useState(void 0),$=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),w(c)},[d,v,m,S]),Ie=a.useCallback(()=>{m(),w(void 0),d(),I()},[d,I,m]),fe=a.useRef(v);a.useEffect(()=>{v===!0&&fe.current===!1&&(m(),w(void 0),d()),fe.current=v},[d,v,m]);const ke=a.useRef(y);a.useEffect(()=>{y===!0&&ke.current===!1&&(v&&S(!1),w(void 0),E===!0&&f!==!0&&t?.()),ke.current=y},[t,y,v,S,f,E]);const ne=E===!0&&f!==!0,q=a.useRef(ne);a.useEffect(()=>{ne&&!q.current&&(v&&S(!1),m(),w(void 0)),q.current=ne},[v,ne,m,S]);const[Ye,Nt]=a.useState(!1),Je=a.useRef(!1),{selectedTab:Ke}=rt(),{tenantEmailDomain:Yt}=rt(),[_e,We]=a.useState(B.state?.message==="comingFromTransactionDetail"),He=B.state?.message==="comingFromOverview",Jt=fo(),Me=Be.getSignedInUser(),{useDynamicConfig:Kt,useFeatureGate:Ee}=Lt(),{configValue:Wt}=Kt(ko.enableUncategorizedExpenseCategory),H=Wt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=Ee(Ce.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:le}=Ee(Ce.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=Ee(Ce.isTransactionActivityEnabled),{isFeatureEnabled:Ht}=Ee(Ce.isExpenseAutomationCommentingEnabled),Zt=a.useCallback(c=>{const j=Qe(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,j)},[i]),Xt=U(c=>_a(c,"common")),z=U(c=>pe(c)),{monthEndCloseChecksView:N,currentSelectedView:x,selectedPeriod:D,selectedTransactionCategorizationTab:ae,currentSelectedViewBackgroundRefreshFetchState:en,currentSelectedViewFetchState:Z,jeSchedules:Ve,reconciliation:tn}=z;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||$(void 0)},[x,$,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==ae&&(ve.current=ae,x==="transaction_categorization"&&$(void 0)):ve.current=ae},[x,ae,$]);const nn=U(c=>M==null?void 0:Ma(c.transactionState,M)),oe=nn?.qboId,an=U(c=>oe==null?void 0:Va(c,oe));a.useEffect(()=>{oe!=null&&h(Oa(oe))},[h,oe]);const{selectedAccountId:re}=tn,et=$e(Ve.accountSettingsView.saveState.fetchState),on=U(c=>ja(c.accountState,c.accountListState,"accountList")),sn=U(c=>La(c)),de=Ke!=null?za(Ke):x,cn=U(c=>c.entityAutoCompleteState.autoCompleteText.common);if(Gt({isDataReady:Z.fetchState==="Completed"}),Me==null)throw Error("Can't access expense automation screen without signing in...");const tt=Mt(D),ue=Ue(tt.start),me=Ue(tt.end);if(ue==null||me==null)throw Error(`Invalid start - ${ue} and end - ${me} period from given ${D}`);const ln=a.useCallback(()=>{l(!1)},[]),rn=a.useCallback(()=>{p(!0)},[]),dn=a.useCallback(c=>{P(c),p(!1)},[]),un=a.useCallback(()=>{P([])},[]),ye=z.missingReceipts.bulkUpload.phase,nt=z.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{le===!0&&x==="missing_receipts"&&ye==="matching"&&nt!=null&&h(jt({cacheOverride:!0}))},[le,x,ye,nt,h]);const at=Me?.userId,mn=D.month,hn=D.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&le!==!1&&ye==="idle"&&at!=null&&ot!=null&&h($a())},[x,le,ye,at,ot,mn,hn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?_(!0):_(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{de!=null&&x!==de&&h(Vt(de))},[de]),a.useEffect(()=>{Ye!==!1||Z.fetchState!=="Completed"&&Z.fetchState!=="Error"||!R||(Nt(!0),h(It(!1,!1,H)))},[Ye,Z,R,H]),a.useEffect(()=>{!He&&R&&(h(It(!1,!1,H)),h(ie(D,re,!1,!1)))},[D.month,D.year,R,H]);const st=a.useCallback((c=!1,j=!1)=>{const Y={start:ue,end:me};switch(x){case"transaction_categorization":h(ge(ae,Y,c,!_e,void 0,void 0,j,void 0,H)),We(!1);break;case"flux_analysis":h(we(D,c,j,null));break;case"month_end_insights":if(j===!1){const V=new Date(D.year,D.month,0),F=Ga(V.toDateString()).format(Qt.analytics.YYYYDashMMDashDDFormat);h(Qa(!0,n.companyId,n.tenantId,F)),h(Na(n.companyId,n.tenantId))}break;case"je_schedules":h(qa(Y,j));break;case"missing_receipts":h(Ot(Y,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,j));break;default:h(ie(D,re,c,j))}},[x,ue,me,n.companyId,n.tenantId,ae,D,re,_e,We,H]);a.useEffect(()=>{x===de&&Z.fetchState==="Not-Started"&&R&&st(!0)},[Z,ue,me,n.companyId,n.tenantId,R]),a.useEffect(()=>{He||_e||Je.current||en.fetchState==="In-Progress"||Z.fetchState!=="Completed"||(Je.current=!0,st(!0,!0))},[]),a.useEffect(()=>{N.fetchState!=="In-Progress"&&N.fetchState!=="Completed"&&h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!1}))},[N.fetchState,n.tenantId]),a.useEffect(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!0})),h(Ya({companyId:n.companyId})),r("../"))},[z.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,D,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{N.fetchState!=="In-Progress"&&N.fetchState==="Completed"&&h(Se({tenantId:n.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[N.fetchState,n.tenantId,D,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&re==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(ie(D,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,ie,re,D]);const pn=vt();a.useEffect(()=>{const c=(N.monthEndCloseChecks?.monthEndCloseCheckList.find(j=>j.id==="month_end_insights")?.isDisabled??!1)&&!Ze;x!=="month_end_insights"||!c&&N.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,N.monthEndCloseChecks]);const gn=u===!0?g:A,Cn=u===!0||E===!0,Sn=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&Ve.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,Ve.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:c,closeDrawerHandler:j,currentSelectedView:Y})=>{const V=ce();let F,he,X;const be=vt(),G=c.transactionView;let K=()=>{};const{transactions:vn,selectedTransactionId:se,selectedTransactionLineId:Ae,transactionLocalData:yn}=G;if(Y==="transaction_categorization"){const Oe=yn.find(ee=>ee.transactionId===se),Q=vn.find(ee=>ee.id===se),it=Ae!=null?Oe?.transactionReviewLocalData?.lineItemById[Ae]:void 0,lt=it?.account;he=it?.class?.classId,F=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const An=To(se,Q?.typeOfTransaction);Q!=null&&An&&(X={id:se,type:Qe(Q.typeOfTransaction)}),K=()=>{if(se!=null&&Ae!=null&&Q!=null){const ee=G.transactionLocalData.find(Te=>Te.transactionId===se)?.transactionReviewLocalData;if(ee!=null&&Q.lines!=null&&Q.lines.length>0){const Te=ee.lineItemById[Ae];let je=ee.selectedEntity;if(Gn(Q)||(je=Te.selectedEntityLine),je!=null){const Tn=je,Pn={transactionId:{id:Q.id,type:Q.type},transaction:Q,lineIds:Q.lines.map(wn=>wn.id)??[]};V(Ne(Tn,Te.amount.amount,Pn,!1,!0,be))}}}}}const bn=U(Oe=>dt(Oe,void 0,F,he));return{transactionId:X,onSaveVendor:()=>{V(qn(X,void 0,!1,!0))},onSaveSuccess:K,onCancel:()=>{X!=null&&V(Ln({transactionId:X})),V(zn()),V($n()),j()},vendorViewDetails:bn}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{_(!1)},currentSelectedView:x});return Jt?.loggedInUserRoleMap==null?N.fetchState==="Error"?C.jsx(Eo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(wo,{isOpen:k,drawerLeftMargin:new vo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(Oo,{onClick:c=>c.stopPropagation(),children:C.jsx(Uo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&O&&C.jsx(bo,{isOpen:O,transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}),C.jsx(Mo,{navigate:r,location:B,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:Xt},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:le,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:b,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:H,isAccountingClassesEnabled:sn,isCOTEnabled:pn,currentTenant:n,companyId:n.companyId,signedInUser:Me,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?M:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&M!=null?C.jsx(yo,{activityLogView:an,qboId:oe,onClose:()=>$(void 0),selectedTransactionId:M},String(M)):null,uncategorizedAccounts:on,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Yt,trackExpenseAutomationTabAnalytics:J,setActivityLogTransactionId:$,closeSidePanel:Sn,openTransactionPanel:i,sidePanelIsOpen:Cn,sidePanelIsFullView:u!==!0&&f,panelContent:gn,isAiCfoAccessEnabled:T,onAskAiCfoClick:Ie,isExpenseAutomationCommentingEnabled:Ht,onExpenseAutomationCommentingThreadClick:Zt,sidePanelListPercent:u===!0?66:void 0})]})})),Oo=Fe(Rn)`
|
|
22
|
+
display: flex;
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
`;function rs(){return C.jsxs(Un,{children:[C.jsx(Le,{path:"*",element:C.jsx(xo,{})}),C.jsx(Le,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Vo,{})}),C.jsx(Le,{path:"*",element:C.jsx(xn,{})})]})}export{rs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-oJncKqAM.js";import{a as r}from"./sentry-Wbq0JKts.js";import{_ as c,$ as l,a0 as p,p as m}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import f from"./NotFoundScreen-6s-CV-uJ.js";import{j as u,u as b}from"./core-DPuoDz-C.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]="2e827b03-3332-44c2-8c4e-3d6d0e2a5436",e._sentryDebugIdIdentifier="sentry-dbid-2e827b03-3332-44c2-8c4e-3d6d0e2a5436")}catch{}})();const j=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(t.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:a,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./sentry-Wbq0JKts.js";import{h as l,j as f,u as m}from"./core-DPuoDz-C.js";import{gv as p,Jx as g,Jy as _}from"./zeni-epic-state-DxdjrTbG.js";import{u as b,L as h,z as y}from"./index-DPfZNvSx.js";import"./liveblocks-oJncKqAM.js";import"./recharts-8icy_MRK.js";import"./mui-CvBhrbbU.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="38346526-e167-43b6-a777-34fdf3173551",e._sentryDebugIdIdentifier="sentry-dbid-38346526-e167-43b6-a777-34fdf3173551")}catch{}})();function z(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{z as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-oJncKqAM.js";import{l as S,k as x,j as C,u as y,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-DPuoDz-C.js";import{Jq as k,Jr as v,Js as T,zv as z,zh as G,Jt as B,Ju as oe,Jv as se,zl as ie,eR as $,zs as le,zp as re}from"./zeni-epic-state-DxdjrTbG.js";import{Z as g,o as r,r as de,d as j,h as J,k as ce,p as me,s as pe,n as M,y as ue,S as he,q as xe,v as ge,m as be,w as fe,x as we,A as Se,B as ye,C as ke,H as ve,E as je,F as $e}from"./index-DPfZNvSx.js";import{n as m}from"./mui-CvBhrbbU.js";import b from"./NotFoundScreen-6s-CV-uJ.js";import{a as I}from"./sentry-Wbq0JKts.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="6bf61d3c-bb67-40c1-84a8-b2c09b034366",e._sentryDebugIdIdentifier="sentry-dbid-6bf61d3c-bb67-40c1-84a8-b2c09b034366")}catch{}})();const Ie=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(z(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const ze=m.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,Be=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(ze,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(b,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},Me=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,He=m.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
height: 100vh;
|
|
49
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
+
width: 100vw;
|
|
51
|
+
overflow-y: scroll;
|
|
52
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
+
`,Ve=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Je.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,_e=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,Ke=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),H=n.pathname.includes("address"),f=g(),V=ge(),D=be(),w=fe(),_=()=>{V.toggle()},K=E(u=>k(u)),W=E(u=>v(u)),{authParams:q,fetchState:c,billAttachment:U,billFetchState:A,companyName:R,currencySymbol:O,amount:Q}=K,{tenantId:P,userId:L,sessionId:N}=q,{fetchState:Z,internationalBankAccountCreateStatus:X}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(b,{}):Z==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",We(n.pathname),O,Q))(u)}),t.jsxs(He,{windowSize:f,children:[f!=="small"?t.jsx(Me,{onClick:_}):null,t.jsx(_e,{windowSize:f,isAddressPage:H,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ke,{file:U,type:"bill"})}),t.jsx(Ve,{windowSize:f,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(qe,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(b,{})})]})}export{dt as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-oJncKqAM.js";import{a as f}from"./sentry-Wbq0JKts.js";import{h as J,u as O,j as _,q as w,g as l,N as T}from"./core-DPuoDz-C.js";import{z as r,m as V,D as M,e as P,d as A,f as N,V as R,B as q,g as B}from"./index-DPfZNvSx.js";import{eQ as Q,Jb as W,Jl as $,Jc as G,eR as H,fk as K,Jh as X,fJ as Y,cU as Z,Jm as ee,Jn as te}from"./zeni-epic-state-DxdjrTbG.js";import{n as ne}from"./mui-CvBhrbbU.js";import{u as se}from"./useDeviceId-B67Wr9jV.js";import{f as ae}from"./analyticsHelper-CnKhOE0J.js";import{t as ie}from"./getLocaleForTenant-Cv1qkYRT.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="bf4a3588-4be6-43d3-88b3-e4f97d440886",t._sentryDebugIdIdentifier="sentry-dbid-bf4a3588-4be6-43d3-88b3-e4f97d440886")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=J(),a=O(),m=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=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=>W(e)),E=r.getSignedInUser(),v=V().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.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(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),M.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=B();e!=null&&P(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.state,t]);const U=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{De as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as P}from"./liveblocks-oJncKqAM.js";import{a as l}from"./sentry-Wbq0JKts.js";import{h as be,g as s,l as qe,u as Ke,j as ea,i as R}from"./core-DPuoDz-C.js";import{eQ as he,eX as aa,eY as Se,eS as ta,bn as na,f5 as sa,eZ as oa,e_ as ia,f0 as ra,f3 as da,fd as ca,f4 as g,f7 as la,f8 as ue,fb as ua,f9 as fa,fa as ma,fc as pa,cJ as ba,ff as ha,cP as Sa,bv as ga,eP as Ea,fk as ka,fl as Ca,fj as ya}from"./zeni-epic-state-DxdjrTbG.js";import{a3 as Ia,a4 as Ta,v as _a,y as wa,z as k,Z as Aa,a5 as Fa,R as Da,w as va,u as $a,S as r,a6 as Ba,a7 as Ga,c as xa,a as Ra,a8 as Ma,_ as Na,a9 as Pa,aa as Ua,ab as fe,ac as me,L as Va,ad as Oa,ae as pe,d as M,n as w,X as ja,af as N,ag as La}from"./index-DPfZNvSx.js";import{D as za}from"./mui-CvBhrbbU.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="5cf722ec-7c65-41cb-9af4-d8a66aa64445",m._sentryDebugIdIdentifier="sentry-dbid-5cf722ec-7c65-41cb-9af4-d8a66aa64445")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Ke(),C=_a(),o=ea(),U=ta(),p=be(),{useFeatureGate:i}=wa(),V=k.getSignedInUser(),A=na(V),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),j=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,L]=l.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:_e}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));l.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&p(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabledV2),Q=J||X&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:xe}=i(r.isTaskManagerCustomerUserAccessEnabled),Re=A||!A&&xe,Me=n.company!=null&&ca(n.company),_=Ge&&Me,Ne=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),W=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=Ga();l.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),l.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),l.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&U.tenantId!=null&&p(la("task_manager","dashboard"))},[y,U.tenantId]),l.useEffect(()=>{I||B.fetchState!=="Not-Started"||p(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),l.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(p(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),p(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Pe,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const je=xa(),oe=s(e=>fa(e,S,h,J,X,_).fetchState),ie=s(e=>ma(e).fetchState),Le=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=l.useMemo(()=>pa(n.userRole),[n.userRole]),Ye=ba(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ra(),Xe=re&&Ma(t),de=Sa(je?.loggedInUserRoleMap),ce=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=l.useCallback(()=>_&&de&&!k.getTreasuryPopupSeen(a??"")&&ce===!1&&Na(t.pathname)!=="treasury",[_,de,ce,t.pathname,a]),[Je,le]=l.useState(G);l.useEffect(()=>{le(G())},[G]);const Qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Pa(Qe);return P.jsx(za,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:P.jsx(Ua,{signedInUser:V,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Le,isSettings:me(t),isSettingsFeatureEnabled:_e,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:_,treasuryYieldPercentage:We,isTreasuryPopupVisible:Je,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:Q&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=W===0&&q>0?"notifications/comments":"notifications/tasks";me(t)&&(e=W===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=w(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=w(t.state?.pathnameStackToGoBack,t.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(ja(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=w(t.state?.pathnameStackToGoBack,t.pathname),c=e.type,b=N(c)&&c!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=La(e.type);pe(e.type)?(j!=null&&p(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=fe(t);let b=`/${encodeURIComponent(u)}/`;const x=N(c);c==="home"?b+="dashboard":c==="users_and_roles"?b+="people":Oa(c)?b+="settings/my_profile":pe(c)?b+=`ai-cfo/${c}`:b+=c==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(c),o(b,{replace:!0}),h!=null&&(p(ka(e.tenantId)),p(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),le(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Xe,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{p(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Re,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=be(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return P.jsx(Ya,{...m,...t})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-oJncKqAM.js";import{j as i,k as n}from"./core-DPuoDz-C.js";import{N as e}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import"./sentry-Wbq0JKts.js";import"./zeni-epic-state-DxdjrTbG.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="0c8dcb74-2c7d-426d-b2f0-d04ad191873a",o._sentryDebugIdIdentifier="sentry-dbid-0c8dcb74-2c7d-426d-b2f0-d04ad191873a")}catch{}})();const d=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function h(){const o=i();return r.jsx(d,{navigate:o})}export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-oJncKqAM.js";import lt from"./NotFoundScreen-6s-CV-uJ.js";import{a as k}from"./sentry-Wbq0JKts.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as Q}from"./core-DPuoDz-C.js";import{cr as St,eZ as X,eQ as H,fc as bt,f4 as b,PG as Y,f8 as d,eY as y,qX as M,wg as It,PH as Ct,eX as Tt,ff as yt,r0 as Et,PI as $,bq as F,gO as x,r4 as W,PJ as _t,cC as At,cw as Nt}from"./zeni-epic-state-DxdjrTbG.js";import{T as wt,z as Bt,y as xt,S as Pt,ct as Rt,n as N,a3 as Dt,cu as vt,a4 as Gt,p as Ut}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as Ft}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="9508c8dc-0dac-4a96-9ac0-e374f54b69d1",t._sentryDebugIdIdentifier="sentry-dbid-9508c8dc-0dac-4a96-9ac0-e374f54b69d1")}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=X(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:w,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(W("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Y(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(W("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).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=Ut(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ft({isDataReady:!0});const Z=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),K=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=Rt().allUsers,{inboxNotifications:B,isLoading:E,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:J,isFetchingMore:L,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Y(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(E===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[E,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=E||v===!0||C!==!0||E||v===!0||C!==!0;k.useEffect(()=>{G&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,D]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(E===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),_=p.map(f=>f.id),it=p.map(f=>{const U=q.find(rt=>rt.id===f.threadId);return U!=null?{inboxNotification:{...f,threadId:U.id},thread:U}:(L||O===!0||J==null||J(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,v,L,C,O,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",T,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return A.jsxs(gt,{children:[A.jsx(Q,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(Q,{path:"*",element:A.jsx(lt,{})})]})}export{ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-oJncKqAM.js";import{a as r}from"./sentry-Wbq0JKts.js";import{h as T,u as C,g as o,N as J}from"./core-DPuoDz-C.js";import{JA as D,eQ as P,f3 as j,JB as x,JC as z,JD as M,JE as R,mS as k,Iw as L}from"./zeni-epic-state-DxdjrTbG.js";import{z as h,J as I}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="442c15cb-95eb-489c-ba47-ced90ccb5922",n._sentryDebugIdIdentifier="sentry-dbid-442c15cb-95eb-489c-ba47-ced90ccb5922")}catch{}})();function ee(){const n=T(),s=C(),{params:t,error:i}=r.useMemo(()=>D(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),c=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),d=o(M),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,c,n]),r.useEffect(()=>{d!=null&&d!==""&&(window.location.href=d)},[d]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(A=>A.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(L(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-oJncKqAM.js";import{j as Y,h as z,u as J,l as Q,g as d,k as Z,n as H,o as I}from"./core-DPuoDz-C.js";import{eQ as v,qL as R,qj as X,K7 as O,qe as T,bv as ee,bn as ae,bT as te,qf as se,K8 as oe,JV as C,dE as re,ud as ne,K9 as ce,uA as ie,eW as le,eU as de}from"./zeni-epic-state-DxdjrTbG.js";import{z as me,T as fe,c as pe,y as q,S as M,A as ue,d as $,al as he,n as ge}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import Fe from"./NotFoundScreen-6s-CV-uJ.js";import{F as be}from"./FeaturePreviewScreen-D6uCQjjF.js";import{a as g}from"./sentry-Wbq0JKts.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import{u as Te}from"./useInitialThreadRequest-OlVGnbEH.js";import{t as Se}from"./routePaths-C0C2W8XC.js";import{M as ye}from"./MobileAppDrawer-CIFLBMnG.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="3e5cc5a8-9da9-409b-aa1e-d92f3050fbca",s._sentryDebugIdIdentifier="sentry-dbid-3e5cc5a8-9da9-409b-aa1e-d92f3050fbca")}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=Z(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(T(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=ge(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("../../")}}})(he);function U(){const s=Y(),e=z(),a=J(),{forecastId:o,tenantEmailDomain:r}=Q(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),A=d(t=>t.profitAndLossState),k=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Ie({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(O(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,R,T,F]);const D=pe(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=q(),{isFeatureEnabled:j}=_(M.isReportsCommentingEnabled),G=Te(j?y?.companyId:void 0,{clearParams:l&&m}),[K,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:K,handleDrawerToggle:E}),n.jsx(Ae,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(c=>v(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(H,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-oJncKqAM.js";import{K2 as te,eQ as q,jC as H,eW as Y,eU as ne,Ht as J,JI as oe,tl as Ee,K3 as N,t9 as ke,tu as Ie,to as ie,td as re,ts as Pe,tp as je,K4 as le,u$ as Te,K5 as Le,fz as ve,K6 as K,ti as de,tg as ce,tx as Fe,c2 as Ae}from"./zeni-epic-state-DxdjrTbG.js";import{Z as pe,y as X,S as E,z as M,a6 as ue,G as me,ah as ge,ai as Re,E as he,o as R,I as fe,D as Ce,aj as Oe,T as Ve,A as Ue,d as be,f as Ze,n as Be,ak as $e,c as Ke}from"./index-DPfZNvSx.js";import{D as ye,n as W,S as we}from"./mui-CvBhrbbU.js";import ae from"./NotFoundScreen-6s-CV-uJ.js";import{a as r}from"./sentry-Wbq0JKts.js";import{h as ee,l as ze,g as m,j as Ge,u as He,k as Me,n as se,o as $}from"./core-DPuoDz-C.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as _e}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import{M as Qe}from"./MobileAppDrawer-CIFLBMnG.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="7b814be7-fc70-4c81-932c-8198e0d454ca",a._sentryDebugIdIdentifier="sentry-dbid-7b814be7-fc70-4c81-932c-8198e0d454ca")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>q(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=J(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Ye=W(we)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,Se=W(fe.H6Regular)`
|
|
6
|
+
margin-top: ${R.sp7};
|
|
7
|
+
padding-left: ${R.sp8};
|
|
8
|
+
padding-right: ${R.sp8};
|
|
9
|
+
color: ${a=>a.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,De=W(fe.LargeRegularSp)`
|
|
12
|
+
color: ${a=>a.theme.colors.hero};
|
|
13
|
+
padding-left: ${R.sp8};
|
|
14
|
+
padding-right: ${R.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${R.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,Je={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>H(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=J(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,aa=Me(function(a,t){const l=le(a),n=M.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})($e);function Q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=M.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!Y(O,h)&&V,w=J(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));_e({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Qe,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,_)=>{n(K({sortKey:e,sortOrder:_}))},onRowClick:e=>{const _=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(_,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(Q,{})}),s.jsx($,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-oJncKqAM.js";import E from"./NotFoundScreen-6s-CV-uJ.js";import{a as r}from"./sentry-Wbq0JKts.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-DPuoDz-C.js";import{eQ as B,PK as b,bo as F,bn as N,hi as V,gO as K}from"./zeni-epic-state-DxdjrTbG.js";import{v as Q,z as I,cv as $}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as G}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import{M as H}from"./MobileAppDrawer-CIFLBMnG.js";import"./recharts-8icy_MRK.js";import"./analytics-CAylLTML.js";import"./plaid-B5RWvsAl.js";import"./dnd-DoKiSnu1.js";import"./stripe-DMRn4zHo.js";import"./lottie-DF3afs57.js";import"./lexical-By4mk6_c.js";import"./pdf-ZStfwNCw.js";import"./utils-BQwNg4C5.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]="93d748b0-61e6-4c32-a9e8-3202da7e9a82",e._sentryDebugIdIdentifier="sentry-dbid-93d748b0-61e6-4c32-a9e8-3202da7e9a82")}catch{}})();const J=O(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)}}})($),L=()=>{const e=_(),t=v(),c=Q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),g=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=S||k||x,d=r.useCallback((a,i,T)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(g(K({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),f=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-Wbq0JKts.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-oJncKqAM.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Wbq0JKts.js";import{L as dt,bT as Tc,eQ as Ac,Jb as Rc,JF as kl,c2 as Tl,fk as Al,fl as Rl}from"./zeni-epic-state-DxdjrTbG.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,n as Yt,o as ue,p as Dl}from"./utils-BQwNg4C5.js";import{r as un}from"./empty-Dya-tSOZ.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Cz_8yjsc.js";import{r as Gl}from"./index-D_RleLEr.js";import{r as zl}from"./index-CIJ8oTsb.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-DPuoDz-C.js";import{u as Kl,z as Pc,L as Wl,K as Jl,M as Xl,h as Ql,d as tf}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import{d as Pe}from"./decodeURIComponentSafe-CoP-62fa.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]="62e3bdd8-24e5-4a2d-87b9-4b40595c7029",t._sentryDebugIdIdentifier="sentry-dbid-62e3bdd8-24e5-4a2d-87b9-4b40595c7029")}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
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-oJncKqAM.js";import{a as o}from"./sentry-Wbq0JKts.js";import{g as f,j as H,h as L,u as M,k as V}from"./core-DPuoDz-C.js";import{m as W,Z as F,z as R,b3 as z,E as N,T as U,A as $,d as l,f as Q,a3 as q,b4 as Z}from"./index-DPfZNvSx.js";import{e_ as G,eQ as J,Mx as P,My as K,u3 as X,tV as g,f0 as Y,bO as ee,t_ as ae,Mz as re}from"./zeni-epic-state-DxdjrTbG.js";import{D as ne,e as te,n as se,S as oe}from"./mui-CvBhrbbU.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Dp2Xhyb6.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-eIU3TXlQ.js";import{M as ce}from"./MobileAppDrawer-CIFLBMnG.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]="79f2f88a-c51f-4252-ae42-b47c22be1132",e._sentryDebugIdIdentifier="sentry-dbid-79f2f88a-c51f-4252-ae42-b47c22be1132")}catch{}})();const de={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=F();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>G(c));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(z,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,I="refer-and-earn-status-update",pe=V(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ee([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(re({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(q(Z));function Se({isReferralDrawerOpen:e}){const a=H(),r=L(),n=M(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,m]=o.useState(!1),p=R.getSignedInUser(),C=f(t=>J(t)),h=f(t=>P(t)),b=h.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=K([h,w]),{areTenantIdsInSync:d}=U();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(X()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&d&&(u(!0),r(g(!0)))},[b,r,d]),o.useEffect(()=>{!c&&w.fetchState==="Not-Started"&&d&&(x(!0),r(Y(!0)))},[w,r,d]),o.useEffect(()=>{m(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:O}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:y===!0});const _={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx($,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(Q.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{m(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:O,..._})]})}export{Se as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-oJncKqAM.js";import R from"./NotFoundScreen-6s-CV-uJ.js";import{a as p}from"./sentry-Wbq0JKts.js";import{j as C,u as I,h as A,g as u,N as E,k as D,n as k,o as c}from"./core-DPuoDz-C.js";import{eQ as N,Nr as g,NH as S,D0 as T,C9 as V,C$ as m,CS as U,NX as _}from"./zeni-epic-state-DxdjrTbG.js";import{m as $,z as O,x as W,a3 as z,bJ as B,ac as H}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-Dgpqad5D.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]="8f2e3902-e30b-4f44-a9fc-8be5e0aa9d5a",e._sentryDebugIdIdentifier="sentry-dbid-8f2e3902-e30b-4f44-a9fc-8be5e0aa9d5a")}catch{}})();const f="reimbursement-approval-rule-update",J=D(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(_(!1))},onBackClick:()=>{H(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(z(B)),P=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>N(n)),w=$(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),O.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${f}`]:[],eventCallback:(n,Q,x)=>{n.endsWith(f)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(J,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(P,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-oJncKqAM.js";import{a as y}from"./sentry-Wbq0JKts.js";import{j as A,h as w,u as T,l as U,g as b,k as E}from"./core-DPuoDz-C.js";import{NH as D,Nr as C,CV as x,D2 as _,D0 as S,D1 as h,NI as k}from"./zeni-epic-state-DxdjrTbG.js";import{z as B,m as V,x as N,bA as j,ac as F}from"./index-DPfZNvSx.js";import"./mui-CvBhrbbU.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]="eff20c96-40cf-410c-953b-9bc59bb3b89d",e._sentryDebugIdIdentifier="sentry-dbid-eff20c96-40cf-410c-953b-9bc59bb3b89d")}catch{}})();function O(e){return k(e)==null}const $=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const f=[];return p.forEach(u=>{const R=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const m=!!O(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=R.concat(I);f.push({action:u.stepType.selectedOption,actors:v,operator:v.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function J(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=B.getSignedInUser(),l=V(),r=b(p=>D(p)),i=b(p=>C(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(N,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{J as R,O as i};
|