@zeniai/web-app-ui 5.1.46-dev → 5.1.47-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-D_PJZStE.js +1 -0
- package/dist/assets/AddressScreen-BNSulfP2.js +9 -0
- package/dist/assets/AiCfoScreen-BRmtRqLo.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-DSwN963F.js +1 -0
- package/dist/assets/{BillPayRoutes-UlCXMjZ_.js → BillPayRoutes-BKFIhw4T.js} +33 -33
- package/dist/assets/BusinessVerificationPageScreen-Bh75FXTZ.js +9 -0
- package/dist/assets/ChargeCardRoutes-DuJHL5ER.js +71 -0
- package/dist/assets/{CompanyPassportScreen-Jd7RmMxP.js → CompanyPassportScreen-DDjqyMwX.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-BbpPecK9.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CFfHRYF8.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BeYw23eY.js → CustomerOnboardingRoutes-D6zOpJxc.js} +5 -5
- package/dist/assets/{DashboardRoutes-BKrnUTFX.js → DashboardRoutes-DtoX2bSV.js} +4 -4
- package/dist/assets/DefaultTenantHome-BZ2NPVTh.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-lyPlKl3e.js +18 -0
- package/dist/assets/DrawerScreen-D_M_HR61.js +1 -0
- package/dist/assets/EntityDetailRoutes-CDYJ8kN1.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-ClyCvyOU.js +25 -0
- package/dist/assets/FeaturePreviewScreen-pifRlvMk.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-Dp-z4HfA.js +1 -0
- package/dist/assets/MagicLinkRoutes-BcW2etLk.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CPn8LjKM.js +12 -0
- package/dist/assets/MobileAppDrawer-CMqrUzty.js +1 -0
- package/dist/assets/NotFoundScreen-BWmMemx_.js +1 -0
- package/dist/assets/{NotificationRoutes-DkowgBJj.js → NotificationRoutes-B1UVibHD.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CfqHAduS.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DUIhGSTU.js +1 -0
- package/dist/assets/PeopleRoutes-BCWUNMRP.js +22 -0
- package/dist/assets/PerformanceRoutes-DdabGxr6.js +1 -0
- package/dist/assets/{Preview-DkidNz3z.js → Preview-CgleC3zF.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DwoHkIu2.js → QBOConnectionScreen-PJhN_FwV.js} +1 -1
- package/dist/assets/ReferralListScreen-CiOu2vwF.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-orETMU81.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BtppAsqY.js → ReimbursementApprovalRuleDetailScreen-D19M7wpr.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-eiz8xheE.js → ReimbursementRoutes-B37DKpue.js} +9 -9
- package/dist/assets/ReportsRoutes-5ZVRpu4r.js +1 -0
- package/dist/assets/RewardsRoutes-DU8RtihJ.js +1 -0
- package/dist/assets/ScreenRoutes-CkJR8wCv.js +2 -0
- package/dist/assets/{SettingsRoutes-BI4dN7RS.js → SettingsRoutes-BG5-7X8p.js} +8 -8
- package/dist/assets/{SetupPagesScreen-D-neLjJM.js → SetupPagesScreen-DEbuiMhl.js} +5 -5
- package/dist/assets/SignInScreen-BQVRUain.js +1 -0
- package/dist/assets/SignOutScreen-CmoYzsXw.js +9 -0
- package/dist/assets/TaskListScreen-BJsKOwed.js +9 -0
- package/dist/assets/TaskRoutes-D99eqt35.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DTfcZe3C.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Bshs2g2Z.js → TransactionDetailScreen-DTpKVJNQ.js} +2 -2
- package/dist/assets/TransactionListRoutes-C0KioFUU.js +1 -0
- package/dist/assets/{TreasuryRoutes-CNbtiHFp.js → TreasuryRoutes-9IHrvCFk.js} +6 -6
- package/dist/assets/{VendorsRoutes-C5KKIVE-.js → VendorsRoutes-DcKzo6Bg.js} +27 -27
- package/dist/assets/WiseConfirmationScreen-DjrOQ8Bz.js +12 -0
- package/dist/assets/ZeniAccountRoutes-CBfR1pgu.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-B8cfC_y6.js +9 -0
- package/dist/assets/{accountMappingHelper-cmIw559z.js → accountMappingHelper-B6MS-2MI.js} +1 -1
- package/dist/assets/{analytics-DORMe8dT.js → analytics-PD1ubuhk.js} +1 -1
- package/dist/assets/{analyticsHelper-aSqJwcvL.js → analyticsHelper-DugMUcaM.js} +1 -1
- package/dist/assets/{core-D95G1COY.js → core-CBQNMmNB.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-BLmfpdcW.js → decodeURIComponentSafe-CTFTZ79i.js} +1 -1
- package/dist/assets/{dnd-BXlaBlTc.js → dnd-Z3xBQUdM.js} +1 -1
- package/dist/assets/empty-DKpVzxls.js +1 -0
- package/dist/assets/{empty-BE68b5E4.js → empty-JWZ-J0Ml.js} +1 -1
- package/dist/assets/{emptyVideoElement-NX2rx7EQ.js → emptyVideoElement-B-sm92eo.js} +1 -1
- package/dist/assets/epic-BKJlIWaw.js +2 -0
- package/dist/assets/getLocaleForTenant-D7ZwJ2SM.js +1 -0
- package/dist/assets/{index-C8tyyalR.js → index-C6g7x9Xf.js} +15593 -17927
- package/dist/assets/{index-CruHx9g6.js → index-CFJnQx3u.js} +1 -1
- package/dist/assets/{index-CnP5hpUl.js → index-CWc-abgd.js} +1 -1
- package/dist/assets/{empty-BTAxEJiS.js → index-CjTANTHH.js} +1 -1
- package/dist/assets/{index-B_Cirr74.js → index-DQvz9Cq_.js} +2 -2
- package/dist/assets/{index-cIfsvMlJ.js → index-Df5QM9aG.js} +1 -1
- package/dist/assets/index-DtpzPOK-.js +1 -0
- package/dist/assets/{index-BjNhU8qP.js → index-I7xJZYV9.js} +1 -1
- package/dist/assets/{index-BUmr5maU.css → index-R6GjjTB3.css} +1 -1
- package/dist/assets/{lexical-D90cNSQE.js → lexical-Pu0UU7Gm.js} +1 -1
- package/dist/assets/{liveblocks-8SEYIom7.js → liveblocks-Dn3WlYDG.js} +1 -1
- package/dist/assets/{lottie-DGqwGfHh.js → lottie-CyQvfguW.js} +1 -1
- package/dist/assets/{mui-jqvOLufq.js → mui-BaxUp1f6.js} +1 -1
- package/dist/assets/{pathToGoBack-Csr3Iao-.js → pathToGoBack-C0RVd60M.js} +1 -1
- package/dist/assets/{pdf-CMafEn8a.js → pdf-BdzM5lLL.js} +4 -4
- package/dist/assets/{pdf-lib-C0lYQdSO.js → pdf-lib-Ho0i9gSn.js} +1 -1
- package/dist/assets/{plaid-BvitY7vM.js → plaid-CkikokYa.js} +1 -1
- package/dist/assets/{pusher-DVRirJfe.js → pusher-HxHyQmjg.js} +1 -1
- package/dist/assets/{react-DOyz-DAB.js → react-C-w13vuR.js} +1 -1
- package/dist/assets/{react-DJ_69eFR.js → react-CcMSfEsT.js} +1 -1
- package/dist/assets/{react-C-4UGOsg.js → react-D0UgoMvf.js} +1 -1
- package/dist/assets/{react-CAXdypQs.js → react-gdz5Za5l.js} +1 -1
- package/dist/assets/{react-DADgee2G.js → react-hQHX2Hwu.js} +1 -1
- package/dist/assets/{react-CVOHOwD-.js → react-y7uOpsli.js} +1 -1
- package/dist/assets/{recharts-B5BD4Kau.js → recharts-cF7j6WPE.js} +1 -1
- package/dist/assets/{routePaths-STLgTv0l.js → routePaths-DlNlbaAA.js} +1 -1
- package/dist/assets/{sentry-Bpr6hwv_.js → sentry-BBtxjqBH.js} +1 -1
- package/dist/assets/{url-83NdFFZ3.js → url-Da29OSrT.js} +1 -1
- package/dist/assets/{url-tRs_qG1D.js → url-jngClEHC.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BfufDhKS.js → useAiCfoDashboardSuggestedQuestionsChips-D_Q4HzQ3.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C_v5Otmr.js +1 -0
- package/dist/assets/{useDeviceId-DNdkDSci.js → useDeviceId-B1_7g90r.js} +1 -1
- package/dist/assets/useInitialThreadRequest-CKOaiR-a.js +1 -0
- package/dist/assets/{utils-kj_q6fLI.js → utils-DGbjXCxQ.js} +2 -2
- package/dist/assets/{withTransactionSidePanel-CyTjTf4e.js → withTransactionSidePanel-DFqH5ga0.js} +4 -4
- package/dist/assets/{zeni-epic-state-BnmnEdbj.js → zeni-epic-state-kigW-Vb1.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Bu1wLdr9.js +0 -1
- package/dist/assets/AddressScreen-DyCQJjNT.js +0 -9
- package/dist/assets/AiCfoScreen-DpYulm6L.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-BiuKI-Rl.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-fLqoQmHN.js +0 -9
- package/dist/assets/CardsAiCfoScreen-D49SttU_.js +0 -14
- package/dist/assets/ChargeCardRoutes-lr8bIl57.js +0 -71
- package/dist/assets/ConnectionAuthScreen-JILvaDGY.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BM-quSNh.js +0 -1
- package/dist/assets/DefaultTenantHome-C4xFfbR_.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DN6hsoHQ.js +0 -18
- package/dist/assets/DrawerScreen-C3rL34Nr.js +0 -1
- package/dist/assets/EntityDetailRoutes-B6x-jsr1.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Cs8BXmkZ.js +0 -25
- package/dist/assets/FeaturePreviewScreen-Bq9eSSz9.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-B3oZEnMP.js +0 -1
- package/dist/assets/MagicLinkRoutes-Bvtkhcw0.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-RvwdSqqO.js +0 -12
- package/dist/assets/MobileAppDrawer-D8HOXn7v.js +0 -1
- package/dist/assets/NotFoundScreen-0h0DiOvj.js +0 -1
- package/dist/assets/OAuthConsentScreen-MNbkNl_v.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DXEDmlZd.js +0 -1
- package/dist/assets/PeopleRoutes-CsAbJBHX.js +0 -22
- package/dist/assets/PerformanceRoutes-8SJwQoaV.js +0 -1
- package/dist/assets/ReferralListScreen-DAUAqg4I.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DxtKouwg.js +0 -1
- package/dist/assets/ReportsRoutes-_Zdg3F2x.js +0 -1
- package/dist/assets/RewardsRoutes-UFPd_8TA.js +0 -1
- package/dist/assets/ScreenRoutes-BoQ6iXAM.js +0 -2
- package/dist/assets/SignInScreen-qgS7vG1A.js +0 -1
- package/dist/assets/SignOutScreen-BbyO1zZV.js +0 -9
- package/dist/assets/TaskListScreen-CVeALlL0.js +0 -9
- package/dist/assets/TaskRoutes-Gx5x8B3t.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Dngsr6y1.js +0 -1
- package/dist/assets/TransactionListRoutes-Bg_zUk5Q.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Bqy3cyw-.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CDeXOkOl.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-DE1cm9kp.js +0 -9
- package/dist/assets/epic-K6OBBbJr.js +0 -2
- package/dist/assets/getLocaleForTenant-HT8Btw6T.js +0 -1
- package/dist/assets/index-DLVDaPoM.js +0 -1
- package/dist/assets/index-DMreRMIr.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CE4sjmcs.js +0 -1
- package/dist/assets/useInitialThreadRequest-DzF6un_U.js +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-8SEYIom7.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-D95G1COY.js";import{P6 as k,Pd as q,gc as J,gb as M,ga as W,jm as K,Mf as L,rm as Q,eT as V,OE as D,jk as T,P7 as S,Pg as F,ji as j,jF as G}from"./zeni-epic-state-BnmnEdbj.js";import{bw as X,J as R,f as N,z as U,m as O,p,c as v,B as Z,bx as Y,o as z,by as ee,q as te}from"./index-C8tyyalR.js";import{n as H}from"./mui-jqvOLufq.js";import"./sentry-Bpr6hwv_.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]="15e25a78-3da4-41eb-bcaf-a8579a708508",e._sentryDebugIdIdentifier="sentry-dbid-15e25a78-3da4-41eb-bcaf-a8579a708508")}catch{}})();const ne=P(null,function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(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=P(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(G(s))},onSaveHandler:s=>{e(j(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??A();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=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??A(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function me({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=B(),d=e??s,{useFeatureGate:r}=N(),i=U.getSignedInUser(),b=h(u=>V(u)),g=O(),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=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 m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:f.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:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const A=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},fe=(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,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,"ach",t,n)}function ve(e,t,n){return $(e,"domestic",t,n)}function ge(e,t,n){return $(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 ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ce=P(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(G(r))},onSaveHandler:r=>{e(j(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??E();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),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??E(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=N(),b=O(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=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 m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${b.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:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{me as A,xe as D,_ as V,fe as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-8SEYIom7.js";import{J as l,y as c,m as f}from"./index-C8tyyalR.js";import{D as b}from"./mui-jqvOLufq.js";import"./sentry-Bpr6hwv_.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]="793cfb95-c09a-4b69-beab-9f863397b87e",e._sentryDebugIdIdentifier="sentry-dbid-793cfb95-c09a-4b69-beab-9f863397b87e")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=f();return d.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as d}from"./sentry-Bpr6hwv_.js";import{h as A,u as B,g as G,i as q,j as l,N,n as F,o as O,p as R}from"./core-D95G1COY.js";import{Nm as _,eT as J,ML as W,lp as Y,Jo as I,Nr as $,Me as z,kp as L,Jp as S,MQ as Q,MR as V,Mg as H,Mf as K}from"./zeni-epic-state-BnmnEdbj.js";import{aS as U,d as X,p as Z,q as tt}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{d as k}from"./decodeURIComponentSafe-BLmfpdcW.js";import{w as et}from"./withTransactionSidePanel-CyTjTf4e.js";import{f as at,c as nt}from"./routePaths-STLgTv0l.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";import"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import"./TransactionDetailScreen-Bshs2g2Z.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]="3a1adf11-eda6-415a-aa1a-b7da927ca19c",a._sentryDebugIdIdentifier="sentry-dbid-3a1adf11-eda6-415a-aa1a-b7da927ca19c")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:L(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(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(K("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Q()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:w,entityNameEncoded:x}=q(),r=k(w??""),p=k(x??""),u=rt(r,p),M=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),j=l(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>W(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(N,{to:C(M.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(O,{children:s.jsx(R,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-8SEYIom7.js";import oa from"./NotFoundScreen-0h0DiOvj.js";import{a as o,b as Jt}from"./sentry-Bpr6hwv_.js";import{n as Ue,S as sa}from"./mui-jqvOLufq.js";import{u as pe,h as Yt,g as Qe,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-D95G1COY.js";import{eT as Re,S5 as la,oc as Ee,fv as ra,rZ as da,ou as Qt,oP as Kt,S6 as Zt,oZ as ua,S7 as Ht,on as ma,rv as pa,ff as Ie,S8 as De,tX as Wt,DL as Xt,S9 as en,Sa as ha,r3 as Ke,Nn as Pt,Np as Sa,ks as ga,Nq as Ca,kz as fa,cW as Ia,v7 as Ze,oA as tn,p2 as Fe,os as re,Sb as Ea,Mg as Rt,Mf as we,Sc as Dt,kQ as ka,Sd as ya,Se as ba,Sf as va,Sg as Ta,oH as Aa,p5 as xe,Sh as wa,Si as xa,Sj as Pa,pc as Ra,kD as Da,ku as Fa,Sk as Ua,kC as Ft,Nx as Ba,Sl as Va,Sm as Oa,q$ as _a,qD as za,p3 as me,qC as Ne,Sn as Ma,So as ja,Sp as La,m7 as $a,bq as qa,m2 as Ut,lQ as Ga,Sq as Na,hC as Bt,gs as Ja,l$ as Ya,x0 as Qa,Sr as Ka,pD as Za,py as Ha,pC as Wa,pn as Xa,Ss as eo,fi as nn,oS as to,oD as no,fw as Vt,p7 as ao,St as oo,Su as so,p4 as an,Sv as co,Sw as io,Sx as lo,Sy as ro,Sz as Ot,rb as uo,qu as mo,Me as po,SA as ho,SB as So,kB as go,SC as Co,Ip as fo,kA as Io,kp as Eo,fh as ko,q0 as on,qm as yo,p1 as _t,p6 as bo,bE as vo,lY as To,lV as Ao,SD as wo,pm as zt,qi as Mt,qg as xo,SE as Po,q5 as Ro,pN as Do,qj as Fo,SF as Uo,SG as Bo,pR as Vo,SH as Oo,pI as _o,pQ as zo,pO as Mo,qp as jo}from"./zeni-epic-state-BnmnEdbj.js";import{f as sn,c as X,d as q,q as ne,X as cn,_ as ln,cQ as Lo,z as Be,cR as $o,at as Pe,cS as qo,aU as jt,B as rn,cT as Go,aq as Je,O as No,a7 as Jo,cU as Yo,a2 as Qo,cV as Ko,V as Zo,cW as Ho,cX as Wo,E as Xo,A as es,aN as ts,cY as ns,cZ as as,b9 as os,y as ss,aQ as cs}from"./index-C8tyyalR.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-Bshs2g2Z.js";import{w as us}from"./withTransactionSidePanel-CyTjTf4e.js";import{h as ms,v as ps}from"./routePaths-STLgTv0l.js";import{g as Ye}from"./accountMappingHelper-cmIw559z.js";import{D as hs}from"./DrawerScreen-C3rL34Nr.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";import"./decodeURIComponentSafe-BLmfpdcW.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]="dd6715f9-e8b2-425f-a1a5-a33619721f87",t._sentryDebugIdIdentifier="sentry-dbid-dd6715f9-e8b2-425f-a1a5-a33619721f87")}catch{}})();const Ss=()=>{const t=pe(),l=Yt(),B=Qe(),f=x(d=>Re(d)),{useFeatureGate:v}=sn(),{isFeatureEnabled:C}=v(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=v(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),T=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),S=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(S.month,S.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(S,f.tenantId,!0)},[k,S,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ne(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&S!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,S]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{S!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(S,f.tenantId)},[k,S,s.fetchState,f.tenantId,y]),o.useEffect(()=>{S!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(da(S))},[S,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:C,onMonthEndCheckClick:d=>{l(`./${d}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:T,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Ue.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
|
-
`,Cs=Jt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:v})=>{const C=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:k,statementUploadChosen:T}=t,S=u[l],m=S?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{C(pa(e,n.split(".")[0]))},E=e=>{m!=null&&C(ma({accountId:l,selectedPeriod:k,fileId:e,statementUploadId:m}))},y=()=>{C(Zt({statementUploadChosen:!1}))},d=e=>{C(ua({accountId:l,selectedPeriod:k,payload:e}))},G=e=>{C(Ht({accountId:l,selectedPeriod:k,localData:{accountSource:e}}))},ee=o.useCallback(()=>{C(Qt({accountId:l}))},[C,l]),z=o.useCallback(()=>{C(Kt({accountId:l}))},[C,l]),O=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return S!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx($o,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:S,monthYearPeriod:k,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:v,onEditFileName:P,onDeleteFile:E,onSelectSourceType:G,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:T,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:ee})})}):O!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx(qo,{excludedAccountReconciliation:O,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:z})})}):null}),$t=Ue.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,qt=Ue.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 fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const v=Be.getSignedInUser();if(v==null)throw Error("Can't access Customer Request page without signing in...");const C=x(r=>ha(r,t,v));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:C.fetchState==="In-Progress"||C.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:C.companyMonthEndReportTemplatesData,bulletPoints:C.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Es,comma:Gt,space:ks}},dateFormat:pn}=No.getLocalizedStrings(),Nt=jo,ys=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:C,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,k={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},T=Ie(t),{selectedTransactionCategorizationTab:S}=T;return{expenseAutomationViewSelector:T,bulkUploadSelector:I===!0?T.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:k,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Qo}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:S,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:C,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:v,isUncategorizedExpenseCategoryEnabled:C,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:k,navigate:T,onClickCustomerRequest:S,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:E,currentSelectedView:y,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(E),z=Fe(ee.start),O=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(E.month,E.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,b,g)=>{t(Ot(e,n,{fetchState:"In-Progress"}));const A=()=>t(Ot(e,n,{fetchState:"Error"}));Ko(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,g,n,c,i,b).then(V=>{V!=null?t(uo(e,V)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(Ee({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?ks+Es+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{O!=null&&z!=null&&t(an({start:z,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(_o({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Oo(e))},onConfirmBulkUploadMatch:(e,n,c,i,b)=>{t(Vo(e,n,c,i,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Nt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Nt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ne({selectedTab:c,uiState:{searchString:e}})),O!=null&&z!=null&&t(me(c,{start:z,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(C))},onClose:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0})),T("../")},onBack:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ne(I.state?.pathnameStackToGoBack,I.pathname);T("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:b}=n,g=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),V=Ye(G.accruedExpensesAccountList,b.selectedOptions),R={selectedPrepaidExpensesAccountIds:g.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:V.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:b,scheduleExpenseCategory:g,vendor:A}=n,{allAccountList:V,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(J=>J.id===A?.selectedOption):void 0,ae={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(J=>J.value===A?.selectedOption)?.label??"",logo:j?.logo},oe=g?.selectedOption!=null?V.find(J=>J.qboId===g.selectedOption):void 0,Ve=b?.selectedOption!=null?R.find(J=>J.classId===b.selectedOption):void 0,Oe=i?.selectedOption!=null?D.find(J=>J.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:Ve?.classId,updatedAccumulatedDepreciationCategoryID:Oe?.accountId,updatedVendor:{id:ae.id,name:ae.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ha(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Za({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ka())},handleJeScheduleClick:(e,n,c)=>{t(Qa({selectedJEScheduleKey:n}));const i=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:S,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ja())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Na(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,b,g,A,V,R,D,j,ae,oe)=>{t(La(e,n,c,i,k,b,g,A,V,R,D,j,ae,oe))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),O!=null&&z!=null&&(t(me(e,{start:z,end:O},!1,!1)),t(ja(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),O!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n})),O!=null&&z!=null&&t(me(e,{start:z,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,b,g,A)=>{O!=null&&z!=null&&t(me(e,{start:z,end:O},!0,c,n,i,b,g,A))},resetTransactionCategorizationLocalData:(e,n,c,i,b,g,A,V)=>{t(za(e,n,c,i,V??null,b,g,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,b)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:k,updatedVendor:b,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(E.month,E.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(E.month,E.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(_a(e,n,c,C))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Oa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,b,g,A)=>{const{transactionId:V,transaction:R,lineIds:D}=n;g!=null&&t(Ba({transactionId:V,customerUpdates:g})),t(Va({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedCustomer:g,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(Ze({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:v,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,b,g,A)=>{const{transactionId:V,transaction:R,lineIds:D}=n;g!=null&&(t(Da({transactionId:V,vendorUpdates:{name:g.name,id:g.id?g.id:void 0}})),t(Fa({vendorId:g.id?g.id:void 0,localData:{vendorName:g.name,vendorId:g.id?g.id:void 0}}))),g?.id?(t(Ft({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedVendor:g,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(Ze({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:v,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:V.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(E,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:E}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ne(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:E}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(E,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ht({accountId:e,selectedPeriod:E,localData:{accountSource:"bank_statement"}})),t(Zt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(E,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ta({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ba({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(ka(i)),t(ya({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ke("bill"));const n=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{T(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ea({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Qt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Kt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||y!=="reconciliation"||t(re(E,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...v}=B;return function(C,r,I){return{...C,...r,...I,onUploadTransactionReceipt:(s,p,u,k,T)=>{r.onUploadTransactionReceipt(s,p,u,k,T,C.authParams)}}}(t,l,v)})(Jo(Yo)),bs=us(function(t){const l=t.displayName??t.name??"Component",B=Jt.memo(t),f=v=>{const C=pe(),r=function(){const P=pe(),E=x(y=>Ie(y).reconciliation.selectedDrawerAccountId);return{isOpen:E!=null,selectedAccountId:E,openPanel:o.useCallback(y=>{P(De({selectedDrawerAccountId:y}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,E)=>{C(Wt("expense_automation_reconcile",P,E))},[C]),u=o.useCallback((P,E)=>{const y=s?.companyId;y!=null&&(C(Xt(P,y,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",E)),C(en({accountId:E,connectionInProgress:!0})))},[C,s?.companyId]),k=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Cs,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),T=o.useMemo(()=>({reconPanelContent:k,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[k,r.isOpen,r.closePanel]),S=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:S,[r.isOpen,r.closePanel,r.selectedAccountId,S]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...v,...T})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:v,reconPanelContent:C,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Zo(),u=Ho(),{isOpen:k}=Wo(),T=Yt(),S=Qe(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:E}=dn({mobileExploreReferrer:"Transaction categorization"}),y=o.useCallback(()=>{v===!0&&f!==!0&&t?.()},[t,v,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(N=>Ie(N)),U=Qe(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:w}=a,H=Je($),Y=Je(L.fetchState),Z=o.useCallback(N=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,N,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,N,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,N,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,N,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,N,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,N,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===L.fetchState&&$===H||L.fetchState!=="Completed"||Z(!1)},[$,L.fetchState,H]),Z})(),ee=Xo(),[z,O]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[b,g]=o.useState(!1),[A,V]=o.useState([]),[R,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),ae=R?.contentType==="activity"?R.detail.transactionId:void 0,oe=o.useCallback(a=>{a!=null?(s&&p(!1),u(),y(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[y,s,u,p]),Ve=o.useCallback(a=>{s&&p(!1),u(),y(),D({contentType:"transfer",detail:a})},[y,s,u,p]),Oe=o.useCallback(()=>{u(),j(),y(),E()},[y,j,E,u]),J=o.useRef(s);o.useEffect(()=>{s===!0&&J.current===!1&&(u(),j(),y()),J.current=s},[y,j,s,u]);const He=o.useRef(k);o.useEffect(()=>{k===!0&&He.current===!1&&(s&&p(!1),j(),v===!0&&f!==!0&&t?.()),He.current=k},[j,t,k,s,p,f,v]);const ke=v===!0&&f!==!0,We=o.useRef(ke);o.useEffect(()=>{ke&&!We.current&&(s&&p(!1),u(),j()),We.current=ke},[j,s,ke,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:Sn}=xt(),[_e,nt]=o.useState(S.state?.message==="comingFromTransactionDetail"),at=S.state?.message==="comingFromOverview",gn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Cn,useFeatureGate:se}=sn(),{configValue:fn}=Cn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=se(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=se(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=se(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=se(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=se(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:En}=se(X.isProjectsTransactionsEnabled),{isFeatureEnabled:kn}=se(X.isJEScheduleCOTEnabled),yn=o.useCallback(a=>{const U=Ke(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),bn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:vn,paymentAccountNames:Tn}=x(a=>ho(a.accountState)),An=x(a=>So(a.classState)),{monthEndCloseChecksView:K,currentSelectedView:F,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ce,jeSchedules:Le,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const de=ls(Pn,()=>{const a=[],U=ut.current,L=dt.current,$=L!=null&&U!=null?L[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const H of Object.values($.transactionReviewLocalDataById)){const Y=H?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const Z of Object.values(Y)){const N=Z?.account;N?.accountId!=null&&a.push(N.accountId)}}const w=it.current;for(const H of w)for(const Y of H.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&v!==!0||oe(void 0)},[F,oe,v]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,ye=`${je}|${Rn}`,be=o.useRef(null);o.useEffect(()=>{be.current!==null?be.current!==ye&&(be.current=ye,F==="transaction_categorization"&&j()):be.current=ye},[j,F,ye]);const Dn=x(a=>ae==null?void 0:go(a.transactionState,ae)),ie=Dn?.qboId,mt=x(a=>ie==null?void 0:Co(a,ie));o.useEffect(()=>{ie!=null&&m(fo(ie))},[m,ie]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:St}=M.transactionView,gt=o.useCallback(a=>rs(m,a),[m]),Ct=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:ie,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:St,onClose:()=>D(null),onCreateTransfer:gt,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,ie,pt,ht,St,gt]),Fn=Ct!=null,{selectedAccountId:Se}=xn,ft=Je(Le.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>Eo(a)),ge=tt!=null?ko(tt):F,Vn=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ce.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Ce=Fe(It.start),fe=Fe(It.end);if(Ce==null||fe==null)throw Error(`Invalid start - ${Ce} and end - ${fe} period from given ${_}`);const On=o.useCallback(()=>{i(!1)},[]),_n=o.useCallback(()=>{g(!0)},[]),zn=o.useCallback(a=>{V(a),g(!1)},[]),Mn=o.useCallback(()=>{V([])},[]),ve=M.missingReceipts.bulkUpload.phase,Et=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&ve==="matching"&&Et!=null&&m(on({cacheOverride:!0}))},[he,F,ve,Et,m]);const kt=ze?.userId,jn=_.month,Ln=_.year,yt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&ve==="idle"&&kt!=null&&yt!=null&&m(yo())},[F,he,ve,kt,yt,jn,Ln,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{ge!=null&&F!==ge&&m(nn(ge))},[ge]),o.useEffect(()=>{Xe!==!1||ce.fetchState!=="Completed"&&ce.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,te)))},[Xe,ce,d,te]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,te)),m(re(_,Se,!1,!1)))},[_.month,_.year,d,te]);const bt=o.useCallback((a=!1,U=!1)=>{const L={start:Ce,end:fe};switch(F){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(_,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(_.year,_.month,0),w=vo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(To(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(bo(L,U));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(re(_,Se,a,U))}},[F,Ce,fe,n.companyId,n.tenantId,je,_,Se,_e,nt,te]);o.useEffect(()=>{F===ge&&ce.fetchState==="Not-Started"&&d&&bt(!0)},[ce,Ce,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||wn.fetchState==="In-Progress"||ce.fetchState!=="Completed"||(et.current=!0,bt(!0,!0))},[]),o.useEffect(()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[K.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),T("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[K.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&Se==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(re(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,re,Se,_]);const $n=Lt();o.useEffect(()=>{const a=(K.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&K.monthEndCloseChecks?.reportEmailSentDate==null||T("../")},[F,K.monthEndCloseChecks]);const qn=r===!0?C:B,Gn=r===!0||v===!0,Nn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,Le.accountSettingsView.saveState.fetchState,zt]);const{transactionId:vt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Qn,vendorViewDetails:Kn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let H,Y,Z;const N=Lt(),W=a.transactionView;let Tt=()=>{};const{transactions:Hn,selectedTransactionId:ue,selectedTransactionLineId:Te,transactionLocalData:Wn}=W;if(L==="transaction_categorization"){const $e=Wn.find(le=>le.transactionId===ue),Q=Hn.find(le=>le.id===ue),At=Te!=null?$e?.transactionReviewLocalData?.lineItemById[Te]:void 0,wt=At?.account;Y=At?.class?.classId,H=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,Q?.typeOfTransaction);Q!=null&&ea&&(Z={id:ue,type:Ke(Q.typeOfTransaction)}),Tt=()=>{if(ue!=null&&Te!=null&&Q!=null){const le=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(le!=null&&Q.lines!=null&&Q.lines.length>0){const Ae=le.lineItemById[Te];let qe=le.selectedEntity;if(Ia(Q)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:Q.id,type:Q.type},transaction:Q,lineIds:Q.lines.map(aa=>aa.id)??[]};w(Ze({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,H,Y));return{transactionId:Z,onSaveVendor:()=>{w(fa(Z,void 0,!1,!0))},onSaveSuccess:Tt,onCancel:()=>{Z!=null&&w(Sa({transactionId:Z})),w(ga()),w(Ca()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{O(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Zn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,L)=>{L.onReconciliationPusherEventReceived(a)}};return gn?.loggedInUserRoleMap==null?K.fetchState==="Error"?h.jsx(os,{onGoHome:()=>T("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:b,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{g(!1)},children:h.jsx(vs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>g(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),vt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:vt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Qn,vendorViewDetails:Kn}),h.jsx(ys,{...Zn,navigate:T,location:S,themeState:ee,categoryOptions:vn,classesForFilters:An,accountsForFilters:Tn,vendorSearchAutoCompleteData:{autoCompleteText:Vn,entityAutoCompleteView:bn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:En,isCOTEnabled:$n,isJEScheduleCOTEnabled:kn,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:Ct,onOpenTransferRightPanel:st===!0?Ve:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:_n,handleEditClick:On,tenantEmailDomain:Sn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:oe,closeSidePanel:Nn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:yn,sidePanelListPercent:r===!0?66:void 0}),de.showPopup&&de.popupType!=null&&h.jsx(cs,{popupType:de.popupType,currencySymbol:de.currencySymbol,onSubmit:de.handleSubmit,onDismiss:de.handleDismiss})]})})),vs=Ue(sa)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function Qs(){return h.jsxs(ia,{children:[h.jsx(Ge,{path:"*",element:h.jsx(Ss,{})}),h.jsx(Ge,{path:"/:selectedTab/:selectedPeriod/*",element:h.jsx(bs,{})}),h.jsx(Ge,{path:"*",element:h.jsx(oa,{})})]})}export{Qs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import c from"./NotFoundScreen-0h0DiOvj.js";import{h as u,g as b}from"./core-D95G1COY.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]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-Bpr6hwv_.js";import{u as f,h as l,g as m}from"./core-D95G1COY.js";import{hk as p,Lu as b,Lv as g}from"./zeni-epic-state-BnmnEdbj.js";import{u as _,L as h,z as y}from"./index-C8tyyalR.js";import"./liveblocks-8SEYIom7.js";import"./recharts-B5BD4Kau.js";import"./mui-jqvOLufq.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="6aff55b9-d5b3-420c-9116-bf42be16a2ee",e._sentryDebugIdIdentifier="sentry-dbid-6aff55b9-d5b3-420c-9116-bf42be16a2ee")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=_(),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,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-8SEYIom7.js";import{i as S,n as g,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-D95G1COY.js";import{Ln as k,Lo as v,Lp as T,AS as A,AE as G,Lq as B,Lr as oe,Ls as se,AI as ie,f6 as $,AP as le,AM as re}from"./zeni-epic-state-BnmnEdbj.js";import{J as x,o as r,k as de,d as j,j as M,S as ce,p as me,n as pe,q as V,f as ue,c as he,r as ge,E as xe,m as fe,s as be,B as we,N as Se,R as ye,v as ke,w as ve,y as je,C as $e}from"./index-C8tyyalR.js";import{n as m}from"./mui-jqvOLufq.js";import f from"./NotFoundScreen-0h0DiOvj.js";import{a as I}from"./sentry-Bpr6hwv_.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="dc1bb1df-3be3-42be-a9a9-fa869ad07633",e._sentryDebugIdIdentifier="sentry-dbid-dc1bb1df-3be3-42be-a9a9-fa869ad07633")}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=g(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=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=g(function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Le();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 t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const Le=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},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}),ze=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=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(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=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{windowSize:n,children:a.jsx(Ne,{location:t,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=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(ge);function Ge(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Me={containerWidth:new je(100,58)},Ve=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
|
-
`,_e=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
|
-
`,He=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Me.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
|
-
`,Ke=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
|
-
`,We=g(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),_=n.pathname.includes("address"),b=x(),H=xe(),D=fe(),w=be(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:q,fetchState:c,billAttachment:J,billFetchState:L,companyName:R,currencySymbol:O,amount:Q}=W,{tenantId:P,userId:z,sessionId:N}=q,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))},[w,c,s,o,d,t]),I.useEffect(()=>{w&&c==="Completed"&&($(z,N,P),l!=null&&t(re(l)))},[c,w,z,N,P,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&L==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),O,Q))(u)}),a.jsxs(_e,{windowSize:b,children:[b!=="small"?a.jsx(Ve,{onClick:K}):null,a.jsx(Ke,{windowSize:b,isAddressPage:_,children:L==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:J,type:"bill"})}),a.jsx(He,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(qe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-8SEYIom7.js";import{a as g}from"./sentry-Bpr6hwv_.js";import{u as F,g as _,h as w,t as M,j as l,N as T}from"./core-D95G1COY.js";import{z as r,m as P,O as V,e as A,d as N,g as R,K,R as W,h as $}from"./index-C8tyyalR.js";import{eT as q,L8 as B,Li as G,L9 as H,f6 as J,fz as Q,Le as X,gj as Y,cU as Z,Lj as ee,Lk as te}from"./zeni-epic-state-BnmnEdbj.js";import{n as ne}from"./mui-jqvOLufq.js";import{u as se}from"./useDeviceId-DNdkDSci.js";import{f as ie}from"./analyticsHelper-aSqJwcvL.js";import{t as ae}from"./getLocaleForTenant-HT8Btw6T.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="53e75574-ce07-4f6c-87a5-201780501422",t._sentryDebugIdIdentifier="sentry-dbid-53e75574-ce07-4f6c-87a5-201780501422")}catch{}})();const z=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function ze(){const t=F(),i=_(),f=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),L=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)),k=l(e=>B(e)),j=r.getSignedInUser(),b=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&a!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,m)))},[n,p,t,a,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&L!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ae(o)),ie(s,o,b,void 0,k.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(R.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,L,s,o,k,b,i.state,t]);const E=g.useCallback(()=>{f("/signin/auth")},[f]),O=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),U=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(K,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:O,onVerifyOtp:U,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||j!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!z(n,p)||m==null||I==="Error"){const e=i.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
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{ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-8SEYIom7.js";import{a as c}from"./sentry-Bpr6hwv_.js";import{u as pe,j as s,i as Ke,g as We,h as Je,l as M}from"./core-D95G1COY.js";import{eT as he,fb as Qe,fc as Se,e_ as Xe,bn as ea,eS as aa,fd as ta,fe as na,fg as sa,fj as oa,fs as ia,fk as g,fm as ra,fn as ue,fq as da,fo as la,fp as ca,fr as ua,cK as fa,fu as ma,cP as ba,bt as pa,eZ as ha,fz as Sa,fA as ga,fy as Ea}from"./zeni-epic-state-BnmnEdbj.js";import{a7 as ka,a8 as Ca,E as ya,f as Ia,z as k,s as Ta,u as wa,c as r,a9 as Aa,aa as _a,A as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Pa,ag as Ma,ah as be,d as R,$ as Ra,q as A,ai as N,aj as Na}from"./index-C8tyyalR.js";import{D as Ua}from"./mui-jqvOLufq.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="c39731a1-f890-450b-ba91-abfd3faf5abf",f._sentryDebugIdIdentifier="sentry-dbid-c39731a1-f890-450b-ba91-abfd3faf5abf")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ke(),a=We(),C=ya(),o=Je(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),j=k.getSignedInUser(),_=ea(j),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,x=s(e=>aa(e)),O=x.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,Z),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),q=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:H}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),W=K||H&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Pe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),J=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,K,H,w).fetchState),ie=s(e=>ca(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ua(n.userRole),[n.userRole]),Oe=fa(xe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&q.fetchState==="Completed"&&ma(q.notificationSettings,h.userEmail,Z,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[Ze,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Ba(qe);return U.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ga,{signedInUser:j,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:Oe,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",O??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Na(e.type);be(e.type)?(O!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Ee(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:x,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Za=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Za as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-8SEYIom7.js";import{h as r,n}from"./core-D95G1COY.js";import{I as i}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import"./sentry-Bpr6hwv_.js";import"./zeni-epic-state-BnmnEdbj.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="a91be54e-6c13-4a77-b876-d2a39d3636be",o._sentryDebugIdIdentifier="sentry-dbid-a91be54e-6c13-4a77-b876-d2a39d3636be")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-8SEYIom7.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{u as T,g as A,j as o,N as j}from"./core-D95G1COY.js";import{Lx as x,eT as z,fj as C,Ly as P,Lz as D,LA as M,LB as R,o2 as k,Ku as N}from"./zeni-epic-state-BnmnEdbj.js";import{z as h,F as I}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="1dc10ae9-bfe1-4399-9381-30c20f7fd30c",n._sentryDebugIdIdentifier="sentry-dbid-1dc10ae9-bfe1-4399-9381-30c20f7fd30c")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>x(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>z(e)),l=o(e=>C(e)),d=o(e=>e.tenantState.fetchState),y=o(P),v=o(D),c=o(M),[S,b]=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(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-8SEYIom7.js";import{h as z,u as X,g as Z,i as H,j as d,n as J,o as K,p as I}from"./core-D95G1COY.js";import{eT as v,s5 as P,rF as Q,M2 as M,rA as T,bt as ee,bn as ae,bU as te,rB as se,M3 as oe,LR as C,dG as re,vA as ne,M4 as ce,vX as ie,fa as le,f8 as de}from"./zeni-epic-state-BnmnEdbj.js";import{z as fe,X as me,_ as pe,A as ue,f as O,c as $,N as he,d as w,ao as Fe,q as ge}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import be from"./NotFoundScreen-0h0DiOvj.js";import{F as Ie}from"./FeaturePreviewScreen-Bq9eSSz9.js";import{a as F}from"./sentry-Bpr6hwv_.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{u as Te}from"./useInitialThreadRequest-DzF6un_U.js";import{t as Se}from"./routePaths-STLgTv0l.js";import{M as ye}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="29c4f4f3-4c04-4913-8ebb-4fd3fed67f33",s._sentryDebugIdIdentifier="sentry-dbid-29c4f4f3-4c04-4913-8ebb-4fd3fed67f33")}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=J(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(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 f=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{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("../../")}}})(Fe);function U(){const s=z(),e=X(),a=Z(),{forecastId:o,tenantEmailDomain:r}=H(),[c,p]=F.useState(!1),[f,u]=F.useState(!1),h=fe.getSignedInUser(),y=d(t=>v(t)),N=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(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:g}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:G}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!c&&g)p(!0),l||e(Q());else if(l&&!f){u(!0);const t=((m,E,R)=>E!=null?m.forecasts.findIndex(b=>b.id===E):R!=null?m.forecasts.findIndex(b=>b.id===R):m.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(M(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)&&g&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,f,u,P,T,g]);const D=ue(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=O(),{isFeatureEnabled:L}=q($.isReportsCommentingEnabled),W=Te(L?y?.companyId:void 0,{clearParams:l&&f}),[Y,V]=F.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:N,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:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:G,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>v(c)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import{L_ as te,eT as X,kp as H,fa as J,f8 as ne,Js as Q,LE as oe,uy as Ee,L$ as N,un as ke,uH as Ie,uB as ie,ur as re,uF as Pe,uC as je,M0 as le,wm as Le,g6 as Te,g9 as ve,M1 as _,uv as de,uu as ce,uK as Fe,c3 as Ae}from"./zeni-epic-state-BnmnEdbj.js";import{J as pe,f as Y,c as E,z as K,a9 as ue,D as me,ak as ge,al as Oe,y as he,o as O,Q as fe,O as Ce,am as Re,X as Ve,_ as Ue,N as Be,d as be,g as Ze,q as $e,an as _e,A as ze}from"./index-C8tyyalR.js";import{D as ye,n as M,S as we}from"./mui-jqvOLufq.js";import ae from"./NotFoundScreen-0h0DiOvj.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{u as ee,i as Ge,j as m,h as He,g as Ke,n as Me,o as se,p as $}from"./core-D95G1COY.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as qe}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="4a8feed8-8bb0-465e-8baf-7e105082cdd0",a._sentryDebugIdIdentifier="sentry-dbid-4a8feed8-8bb0-465e-8baf-7e105082cdd0")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>H(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),T=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,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(Je,{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(Oe,{...b})]})})},Je=M(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=M(fe.H6Regular)`
|
|
6
|
-
margin-top: ${O.sp7};
|
|
7
|
-
padding-left: ${O.sp8};
|
|
8
|
-
padding-right: ${O.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=M(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${O.sp8};
|
|
14
|
-
padding-right: ${O.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${O.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>X(i)),u=m(i=>H(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),T=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{R===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),L=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,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:L===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.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(Re,{...b})]})})},ea=M(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=K.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(_({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(_({searchText:o}))}}}})(_e);function q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=Ke(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>X(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:R}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!J(R,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(_({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),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(_({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=ze();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{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import E from"./NotFoundScreen-0h0DiOvj.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{h as _,g as v,j as p,i as M,u as P,N as U,n as z,o as O,p as h}from"./core-D95G1COY.js";import{eT as B,S4 as b,bo as F,bn as N,i6 as V,hC as $}from"./zeni-epic-state-BnmnEdbj.js";import{E as q,z as I,_ as G,cP as H}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as K}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="77c72e01-204a-40a3-ab5b-332fc8a24da9",e._sentryDebugIdIdentifier="sentry-dbid-77c72e01-204a-40a3-ab5b-332fc8a24da9")}catch{}})();const L=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(H),Q=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f($({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"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as o}from"./sentry-Bpr6hwv_.js";import{j as f,h as _,u as H,g as N,n as V}from"./core-D95G1COY.js";import{m as F,J as M,z as R,bb as W,y as U,X as $,_ as q,N as z,d as l,g as X,a7 as J,bc as G}from"./index-C8tyyalR.js";import{fe as K,eT as Q,Or as P,Os as Y,vq as Z,vg as p,fg as ee,bO as ae,vl as re,Ot as ne}from"./zeni-epic-state-BnmnEdbj.js";import{D as te,e as se,n as oe,S as ie}from"./mui-jqvOLufq.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as de}from"./MobileAppDrawer-D8HOXn7v.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]="e6da206e-d956-47ca-a8c7-d5a4be83538e",e._sentryDebugIdIdentifier="sentry-dbid-e6da206e-d956-47ca-a8c7-d5a4be83538e")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>K(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=V(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([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(ne({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(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(p(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(p(!0,!0))}}})(J(G));function be({isReferralDrawerOpen:e}){const a=_(),r=H(),n=N(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=R.getSignedInUser(),h=f(t=>Q(t)),m=f(t=>P(t)),v=m.fetchState,g=f(t=>t.referralViewState.rewardsPlanFetchState),y=Y([m,g]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&c&&(u(!0),r(p(!0)))},[v,r,c]),o.useEffect(()=>{!d&&g.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[g,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),b=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});q({isDataReady:y===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:b}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...L})]})}export{be as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-8SEYIom7.js";import R from"./NotFoundScreen-0h0DiOvj.js";import{a as p}from"./sentry-Bpr6hwv_.js";import{h as x,g as I,u as A,j as u,N as C,n as k,o as D,p as c}from"./core-D95G1COY.js";import{eT as T,Pl as S,PB as g,ET as V,E0 as P,ES as m,EJ as U,PS as _}from"./zeni-epic-state-BnmnEdbj.js";import{m as B,z as $,B as N,a7 as O,bS as W,af as z}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-BtppAsqY.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]="e05cba10-d128-4a5e-9ae0-444ad235738e",e._sentryDebugIdIdentifier="sentry-dbid-e05cba10-d128-4a5e-9ae0-444ad235738e")}catch{}})();const d="reimbursement-approval-rule-update",J=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:g(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(O(W)),q=()=>{const e=x(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),v=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=B(),i=u(n=>S(n)),b=u(n=>g(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{b?.updateStatus.fetchState==="Completed"&&a(V())},[b]),p.useEffect(()=>{l||v!=="Not-Started"||(s(!0),a(P(!0)))},[l,v,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,F,E)=>{n.endsWith(d)&&E.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(C,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(J,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(q,{})}),t.jsx(c,{path:"/new",element:t.jsx(h,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-8SEYIom7.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as H}from"./core-D95G1COY.js";import{eT as M,fp as I,LD as Te,kp as J,qK as X,rz as A,kd as Re,jh as Le,uW as Z,rE as Oe,bt as Ae,LE as Fe,bn as ke,w3 as De,LF as Ee,LG as je,uO as Pe,LH as Y,LI as Me,LJ as ve,LK as Be,LL as Ve,LM as S,LN as F,LO as k,LP as N,LQ as D,LR as E,dG as Ue,vL as xe,vz as q,vA as $,vR as ze,vE as K,vX as Ge,LS as He,LT as Ye,LU as Ne,LV as qe,LW as $e,fa as Ke,f8 as Qe}from"./zeni-epic-state-BnmnEdbj.js";import{M as We,T as Je,U as Xe,V as Ze,J as ea,f as ee,c as j,z as ae,X as aa,A as sa,a as ta,Y as oa,_ as na,N as ra,d as P,g as ia,$ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import fa from"./NotFoundScreen-0h0DiOvj.js";import{F as ma}from"./FeaturePreviewScreen-Bq9eSSz9.js";import{a as _}from"./sentry-Bpr6hwv_.js";import{u as ua}from"./useInitialThreadRequest-DzF6un_U.js";import{t as Q,a as W,b as _a}from"./routePaths-STLgTv0l.js";import{M as ha}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="70515587-d602-4f4f-8117-883140122593",e._sentryDebugIdIdentifier="sentry-dbid-70515587-d602-4f4f-8117-883140122593")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(K({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(K(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(Z())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ze(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>M(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>J(n)),L=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":L&&s(Z());break;case"balance_sheet":s(Le(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,L]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:L,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ke(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(H,{path:"/",element:p.jsx(Ca,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-8SEYIom7.js";import{f as j,z as w,aN as y,N as E,d as p,g as F,c_ as P,c as L}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import m from"./NotFoundScreen-0h0DiOvj.js";import{a as d}from"./sentry-Bpr6hwv_.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as u}from"./core-D95G1COY.js";import{eT as z,SI as C,P0 as Y,SJ as S,vq as q,fg as G,SK as J,vo as K}from"./zeni-epic-state-BnmnEdbj.js";import{R as x}from"./ReferralListScreen-DAUAqg4I.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";import"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import"./MobileAppDrawer-D8HOXn7v.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]="d8fb2552-ec9d-430c-a9ed-3e38dce9dc21",e._sentryDebugIdIdentifier="sentry-dbid-d8fb2552-ec9d-430c-a9ed-3e38dce9dc21")}catch{}})();const O=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(S()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(K())},onUpdateInviteFormLocalData:s=>{e(J({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),v=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),N=Y(D);d.useEffect(()=>{e(S()),r?.rewardsLastViewedTime==null&&i===!1&&(e(q()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[l.fetchState,e]);const k=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(I=>I.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:_,currentTenant:r,companyName:k,userName:v,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{ue as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BKrnUTFX.js","assets/sentry-Bpr6hwv_.js","assets/core-D95G1COY.js","assets/zeni-epic-state-BnmnEdbj.js","assets/index-C8tyyalR.js","assets/mui-jqvOLufq.js","assets/analytics-DORMe8dT.js","assets/utils-kj_q6fLI.js","assets/withTransactionSidePanel-CyTjTf4e.js","assets/useAskAiCfoHostNavButtonProps-CE4sjmcs.js","assets/TransactionDetailScreen-Bshs2g2Z.js","assets/decodeURIComponentSafe-BLmfpdcW.js","assets/routePaths-STLgTv0l.js","assets/NotFoundScreen-0h0DiOvj.js","assets/useInitialThreadRequest-DzF6un_U.js","assets/analyticsHelper-aSqJwcvL.js","assets/CompanyPassportScreen-Jd7RmMxP.js","assets/MobileAppDrawer-D8HOXn7v.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BfufDhKS.js","assets/FeaturePreviewScreen-Bq9eSSz9.js","assets/ReferralListScreen-DAUAqg4I.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-UlCXMjZ_.js","assets/AddressScreen-DyCQJjNT.js","assets/DomesticWireDetailScreen-DN6hsoHQ.js","assets/DrawerScreen-C3rL34Nr.js","assets/SetupPagesScreen-D-neLjJM.js","assets/BusinessVerificationPageScreen-fLqoQmHN.js","assets/BillPayApprovalRoutes-BiuKI-Rl.js","assets/ReimbursementApprovalRuleDetailScreen-BtppAsqY.js","assets/getLocaleForTenant-HT8Btw6T.js","assets/ReimbursementRoutes-eiz8xheE.js","assets/ReimbursementApprovalRoutes-DxtKouwg.js","assets/TransactionListRoutes-Bg_zUk5Q.js","assets/ZeniAccountStatementScreen-DE1cm9kp.js","assets/SettingsRoutes-BI4dN7RS.js","assets/accountMappingHelper-cmIw559z.js","assets/QBOConnectionScreen-DwoHkIu2.js","assets/empty-BE68b5E4.js","assets/index-CruHx9g6.js","assets/url-tRs_qG1D.js","assets/index-DLVDaPoM.js","assets/ReportsRoutes-_Zdg3F2x.js","assets/ChargeCardRoutes-lr8bIl57.js","assets/PeopleRoutes-CsAbJBHX.js","assets/ExpenseAutomationRoutes-Cs8BXmkZ.js","assets/TreasuryRoutes-CNbtiHFp.js","assets/VendorsRoutes-C5KKIVE-.js","assets/pathToGoBack-Csr3Iao-.js","assets/ZeniAccountRoutes-CDeXOkOl.js","assets/AddressRoutes-Bu1wLdr9.js","assets/PandLWithForecastRoutes-DXEDmlZd.js","assets/CustomerOnboardingRoutes-BeYw23eY.js","assets/TransactionDetailRoutes-Dngsr6y1.js","assets/EntityDetailRoutes-B6x-jsr1.js","assets/NotificationRoutes-DkowgBJj.js","assets/PerformanceRoutes-8SJwQoaV.js","assets/RewardsRoutes-UFPd_8TA.js","assets/TaskRoutes-Gx5x8B3t.js","assets/TaskListScreen-CVeALlL0.js","assets/AiCfoScreen-DpYulm6L.js","assets/CardsAiCfoScreen-D49SttU_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as a,bn as ls,eT as cs,fa as ds,f8 as ms,f9 as us,gf as _s,e_ as Es,cQ as Ae,cy as ps,fq as As,cq as xs,bE as gs,bq as Is,fv as Ts,v as js,L9 as hs,bt as Us,La as bs,bG as Hs,fs as Rs,bF as Ds,bs as ys,cm as fs,Lb as Cs,Lc as vs,cN as Os,cP as Ps,cO as Fs,cx as Ls,cD as ks,o2 as xe,f6 as ge,gp as Bs,fz as Ie,gm as Te,gn as je,fA as Vs}from"./zeni-epic-state-BnmnEdbj.js";import{j as e}from"./liveblocks-8SEYIom7.js";import{a as v}from"./sentry-Bpr6hwv_.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-D95G1COY.js";import{m as zs,u as Gs,z as H,f as $s,a as qs,x as Ys,c as L,A as Ws,L as k,O as Ue,t as _,P as Qs,d as se,l}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{f as be}from"./analyticsHelper-aSqJwcvL.js";import{t as Js}from"./getLocaleForTenant-HT8Btw6T.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="e9d34ce0-6fa9-4478-86d3-bb4d0edce042",i._sentryDebugIdIdentifier="sentry-dbid-e9d34ce0-6fa9-4478-86d3-bb4d0edce042")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-BKrnUTFX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-UlCXMjZ_.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-eiz8xheE.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-Bg_zUk5Q.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-BI4dN7RS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-_Zdg3F2x.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-lr8bIl57.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-CsAbJBHX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-Cs8BXmkZ.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-CNbtiHFp.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-C5KKIVE-.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CDeXOkOl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-_Zdg3F2x.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-Bu1wLdr9.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-CsAbJBHX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-DXEDmlZd.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-BeYw23eY.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-C5KKIVE-.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-Dngsr6y1.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-B6x-jsr1.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-BKrnUTFX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Re=l(()=>a(()=>import("./BillPayRoutes-UlCXMjZ_.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-BI4dN7RS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>a(()=>import("./ReimbursementRoutes-eiz8xheE.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-CDeXOkOl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-CNbtiHFp.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-Bg_zUk5Q.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-lr8bIl57.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-DkowgBJj.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-8SJwQoaV.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-Cs8BXmkZ.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-UFPd_8TA.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-Gx5x8B3t.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-DpYulm6L.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-D49SttU_.js"),__vite__mapDeps([61,1,2,3,7,4,5,6,21]))),D=l(()=>a(()=>import("./NotFoundScreen-0h0DiOvj.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-CVeALlL0.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),y=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),J=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=qs(),ve=Ys(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&J,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=P(L.isTreasuryEnabled),{isFeatureEnabled:Be}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,q=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=Be||ne||!!Ve||!!q||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:K}=P(L.isAiCfoFileUploadEnabled),Y=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ws(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{f(k.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&y!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=xs(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,y]),v.useEffect(()=>{N||(Ce(!0),f(k.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s){if(ge(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(W&&is){B(Ie(s));const Q=H.getSignedInUserTenantWithId(s);Q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),W&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)));if(W){se.identify(m.userId,{tenant_id:s});const Q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(k.TENANT_FETCHING),B(Vs(m.userId,s,m.zeniSessionId))),Q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(m.userId,m.zeniSessionId)))}}(h,p,r,y,j,f,U))},[y,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(k.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,Y.tenantsBaseInOrder))},[Y,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&f(k.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(k.TENANT_FETCHING),Z(k.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,y,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},b)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,qe=bs(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,We=r.company!=null&&Rs(r.company),Qe=ke&&We===!0&&!C,Je=le&&Ds(E?.loggedInUserRoleMap),Ke=ce&&ys(E?.loggedInUserRoleMap),Xe=_e&&fs(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=ks(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Qe&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||qe===!0||es===!0||ss===!0;return H.isSignedIn()?y==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||J&&!re)&&Ye===!1&&u===!1&&q===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||J?N&&r?.userRole&&u!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:q})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Je||ue||Xe||Ke?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(ba,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(D,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-8SEYIom7.js";import{a as u,b as T,q as A}from"./sentry-Bpr6hwv_.js";import{u as z,h as D,j as d,g as j,N as M,n as O}from"./core-D95G1COY.js";import{u as P,z as s,m as F,d as E,O as _,e as B,g as N,Z as V,h as $,i as q,j as v}from"./index-C8tyyalR.js";import{eT as J,L8 as W,L9 as Z,f6 as G,fz as H,Le as K,gj as Q,cU as R,Lf as b,Lg as X,Lh as Y,bU as y}from"./zeni-epic-state-BnmnEdbj.js";import"./mui-jqvOLufq.js";import{u as ee}from"./useDeviceId-DNdkDSci.js";import{f as te}from"./analyticsHelper-aSqJwcvL.js";import{t as ne}from"./getLocaleForTenant-HT8Btw6T.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="af97f395-c75c-4cb1-8e6e-28f4859dbcc3",t._sentryDebugIdIdentifier="sentry-dbid-af97f395-c75c-4cb1-8e6e-28f4859dbcc3")}catch{}})();const ie=O(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),c=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:U,accountUnlockTime:h}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),k=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>J(e)),I=d(e=>W(e)),m=j(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[L.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Z(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then(()=>{const e=$();e!=null&&B(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as n}from"./sentry-Bpr6hwv_.js";import{u,g as m,h as g,N as p}from"./core-D95G1COY.js";import{z as c,B as b,t as y,d,g as h}from"./index-C8tyyalR.js";import{go as x,gp as I,Lw as w}from"./zeni-epic-state-BnmnEdbj.js";import{n as j}from"./mui-jqvOLufq.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="e146c5c1-24ba-4ba7-b54a-fd7a92612698",e._sentryDebugIdIdentifier="sentry-dbid-e146c5c1-24ba-4ba7-b54a-fd7a92612698")}catch{}})();function q(){const e=u(),t=m(),a=g(),i=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),y.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.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
|
-
`;export{q as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-8SEYIom7.js";import{a as D}from"./sentry-Bpr6hwv_.js";import{h as _,u as v,g as H,j as G,i as K,n as z}from"./core-D95G1COY.js";import{z as F,f as V,c as p,_ as W,N as Z,d as q,g as M,d1 as O,q as g,p as Q}from"./index-C8tyyalR.js";import{eT as X,SP as R,Ih as C,SQ as x,SL as Y,HF as I,SR as J,HN as y,H7 as aa,Ii as E,SS as B,hC as ea,I8 as ta,Id as sa,I0 as oa,H_ as w,Ie as na,HX as ia,ST as la,SU as ra,SV as ka,SW as ca,SX as T,ef as da,SY as ua,SZ as pa}from"./zeni-epic-state-BnmnEdbj.js";import{n as Ta}from"./mui-jqvOLufq.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as ga}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="694da913-39fb-4bdb-9a2b-2f7328b4baa0",e._sentryDebugIdIdentifier="sentry-dbid-694da913-39fb-4bdb-9a2b-2f7328b4baa0")}catch{}})();const fa=Ta.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-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
|
-
`,ba=z(function(e,t){const o=R(e,t.isTaskTemplatesEnabled),{taskGroupId:k}=t,n=k!=null&&k!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(k))})).filter(l=>l.tasks.length>0)}:o,d=Y(e),i=F.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:k,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=k,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c}})},onReloadTasks:()=>{e(C(!0,d))},onTabChange:a=>{e(ca(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=S(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(C(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ha(l,a);e(I({taskDetailLocalData:s}));const c=S(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(c,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(E({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(E({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(y(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(y(a,[s]))},handleNewTaskInitialization:a=>{if(e(I({taskDetailLocalData:{...J,name:a}})),t.localData.defaultTaskGroupId!=null){const s=S(i,t.localData.defaultTaskGroupId),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(O);function ja(){const e=_(),t=v(),o=H(),k=F.getSignedInUser(),n=G(r=>X(r)),{taskGroupId:d}=K(),{useFeatureGate:i}=V(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:c}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,N]=D.useState(!1),b=G(r=>R(r,l)),h=G(r=>r.taskGroupState),m=b.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:j}=ma({mobileExploreReferrer:"Task Checklist"});if(W({isDataReady:m==="Completed"}),D.useEffect(()=>{t(C(!1,l))},[n?.tenantId,t,l]),D.useEffect(()=>{m==="Completed"&&t(x({taskGroupById:h.taskGroupById}))},[m,h.taskGroupById]),k==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[m==="Completed"?u.jsx(Z,{analytics:q,onLoad:r=>(U=>U.trackPageLoaded(M.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{N(r)}}),u.jsx(ba,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:h,localData:b.localData,uiState:b.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:c,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:j})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,S=(e,t)=>`/${e}/tasks/new/${t}`,ha=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{ja as default};
|