@zeniai/web-app-ui 5.1.58-qa → 5.1.59-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-1t80Lwwm.js +1 -0
- package/dist/assets/AddressScreen-fWJCm4zs.js +9 -0
- package/dist/assets/AiCfoScreen-RA-P0Ele.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-Bv9HP5Ed.js +1 -0
- package/dist/assets/BillPayRoutes-DM71-NMQ.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-9FWcKpyL.js +9 -0
- package/dist/assets/CardsAiCfoScreen-CJUAzHrT.js +14 -0
- package/dist/assets/ChargeCardRoutes-BKCoQWOu.js +71 -0
- package/dist/assets/CompanyPassportScreen-Z-knYrxv.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Cev1gkS_.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-GZfWR-j7.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BTm1Abhx.js +30 -0
- package/dist/assets/DashboardRoutes-wMhkTYla.js +20 -0
- package/dist/assets/DefaultTenantHome-ClYhyRXO.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Cl_7XBwW.js +18 -0
- package/dist/assets/DrawerScreen-DqnvN1tq.js +1 -0
- package/dist/assets/EntityDetailRoutes-Dy54l33K.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BAwf_5XR.js +25 -0
- package/dist/assets/FeaturePreviewScreen-DCDhII3I.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-rLAbttjN.js +1 -0
- package/dist/assets/MagicLinkRoutes-B-PPv0PR.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-DlEpGGzi.js +12 -0
- package/dist/assets/MobileAppDrawer-CDYOk1Tu.js +1 -0
- package/dist/assets/NotFoundScreen-DTvgxtkb.js +1 -0
- package/dist/assets/NotificationRoutes-ye5VX3PS.js +1 -0
- package/dist/assets/OAuthConsentScreen-DF7q2wgy.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DZnjcm2C.js +1 -0
- package/dist/assets/PeopleRoutes-Cshc61GL.js +22 -0
- package/dist/assets/PerformanceRoutes-UE1AlGRc.js +1 -0
- package/dist/assets/{Preview-KE8R1SN3.js → Preview-COCp1vn_.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CGgBpuke.js → QBOConnectionScreen-ClD_YrtC.js} +1 -1
- package/dist/assets/ReferralListScreen-BQiDRb4Q.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-B02Z7OIU.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CrNxSCRL.js +1 -0
- package/dist/assets/{ReimbursementRoutes-MbRZIHuu.js → ReimbursementRoutes-BDTp98VH.js} +12 -12
- package/dist/assets/ReportsRoutes-utyUVcdp.js +1 -0
- package/dist/assets/RewardsRoutes-B0tydv2M.js +1 -0
- package/dist/assets/ScreenRoutes-C_5gtCcR.js +2 -0
- package/dist/assets/SettingsRoutes-CItpcp8o.js +57 -0
- package/dist/assets/SetupPagesScreen-Cb_h1N2q.js +29 -0
- package/dist/assets/SignInScreen-DayaVPul.js +1 -0
- package/dist/assets/SignOutScreen-DfnourF6.js +9 -0
- package/dist/assets/TaskListScreen-DVU-iHmP.js +9 -0
- package/dist/assets/TaskRoutes-DECOOPQm.js +9 -0
- package/dist/assets/TransactionDetailRoutes-Ln9HzXsS.js +1 -0
- package/dist/assets/TransactionDetailScreen-qgLSqSNT.js +5 -0
- package/dist/assets/TransactionListRoutes-BqwHG3AV.js +1 -0
- package/dist/assets/TreasuryRoutes-DxBKr4aJ.js +37 -0
- package/dist/assets/{VendorsRoutes-BjMVmZbA.js → VendorsRoutes-BvKCtUVO.js} +26 -26
- package/dist/assets/WiseConfirmationScreen-DGdciAcq.js +12 -0
- package/dist/assets/ZeniAccountRoutes-4nzGey-r.js +73 -0
- package/dist/assets/ZeniAccountStatementScreen-C-juTt6c.js +9 -0
- package/dist/assets/{accountMappingHelper-B_qiWmeW.js → accountMappingHelper-BFxOrTVK.js} +1 -1
- package/dist/assets/{analytics-BUNQWYXz.js → analytics-BToIaEuE.js} +1 -1
- package/dist/assets/{analyticsHelper-DNuTbD5B.js → analyticsHelper-DE1SyLO3.js} +1 -1
- package/dist/assets/{core-C8Y7fm3n.js → core-CJUY0MOY.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-pK1yrQsS.js → decodeURIComponentSafe-BXzU7C-M.js} +1 -1
- package/dist/assets/dnd-LV5QvpgJ.js +6 -0
- package/dist/assets/{empty-CTn7RkAu.js → empty-BrON4VTN.js} +1 -1
- package/dist/assets/{index-DhPN3gNQ.js → empty-DZsqgfyL.js} +1 -1
- package/dist/assets/{emptyVideoElement-BE2d8kYR.js → emptyVideoElement-D28OtmxE.js} +1 -1
- package/dist/assets/epic-DUxvu9Sx.js +2 -0
- package/dist/assets/getLocaleForTenant-BxE1cnSw.js +1 -0
- package/dist/assets/index-3T7v0Kjw.js +1 -0
- package/dist/assets/{index-CyWBxegb.js → index-6y2Ha7q4.js} +1 -1
- package/dist/assets/{index-C_oqefR-.js → index-7lEXxVMw.js} +1 -1
- package/dist/assets/{index-C3-objML.js → index-B2ukUPdb.js} +44600 -39007
- package/dist/assets/{index-DjeTRCsF.js → index-BUVIqiRA.js} +1 -1
- package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
- package/dist/assets/{index-eBlD3uTi.js → index-CQBukgOK.js} +1 -1
- package/dist/assets/index-LSEqxgWI.js +1 -0
- package/dist/assets/{index-Cv6pmWIm.js → index-N--zv7t4.js} +2 -2
- package/dist/assets/{lexical-CPmqnx9k.js → lexical-Cmpx8sPR.js} +1 -1
- package/dist/assets/{liveblocks-fDjf6Tur.js → liveblocks-qa_6WStS.js} +1 -1
- package/dist/assets/{lottie-DmArr_jQ.js → lottie-zGjtu-Uw.js} +1 -1
- package/dist/assets/{mui-Ky-KJxLh.js → mui-CkYYTJAV.js} +1 -1
- package/dist/assets/{pathToGoBack-9QBEItSt.js → pathToGoBack-BPCNomFS.js} +1 -1
- package/dist/assets/{pdf-NvioK7wV.js → pdf-CZjXUklc.js} +3 -3
- package/dist/assets/{pdf-lib-6uw_qC-k.js → pdf-lib-1-yXS4qt.js} +1 -1
- package/dist/assets/{plaid-D50ZkdQf.js → plaid-1xV6OFdB.js} +1 -1
- package/dist/assets/{pusher-CAUUsTgW.js → pusher-D2ak7eHg.js} +1 -1
- package/dist/assets/{react-C7YWBeDO.js → react-BQ9185Ee.js} +1 -1
- package/dist/assets/{react-CzlxEg73.js → react-BSs2nIas.js} +1 -1
- package/dist/assets/{react-CHUA3ysh.js → react-BihdrB0K.js} +1 -1
- package/dist/assets/{react-BX04XLg-.js → react-CBo1BYNF.js} +1 -1
- package/dist/assets/{react-DsRQdKTx.js → react-COkOWomn.js} +1 -1
- package/dist/assets/{react-BzVo9cuE.js → react-CVnQTP0R.js} +1 -1
- package/dist/assets/{recharts-CgIjuHOA.js → recharts-D3JK2Byj.js} +3 -3
- package/dist/assets/{routePaths-B8EWQXPr.js → routePaths-DbnM8jAc.js} +1 -1
- package/dist/assets/{sentry-DjzU4p1F.js → sentry-BTf2Dtmp.js} +1 -1
- package/dist/assets/{url-mCw4Y0mb.js → url-CnoP6Bkx.js} +1 -1
- package/dist/assets/{url-DBETAWzw.js → url-DbiWYN-9.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-C9aknKEV.js +1 -0
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DDzinN2F.js → useAskAiCfoHostNavButtonProps-DUCZkKew.js} +1 -1
- package/dist/assets/useCashManagementBanner-Bqm1UKHq.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-Bxg7wg9x.js +1 -0
- package/dist/assets/{useDeviceId-DBHwhChu.js → useDeviceId-D5q7Ex2B.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BGSh8M-E.js +1 -0
- package/dist/assets/useInitialThreadRequest-CcPLE3h6.js +1 -0
- package/dist/assets/{utils-Djk4rnCT.js → utils-Bd6aVUzu.js} +2 -2
- package/dist/assets/withTransactionSidePanel-RlHJMQ4A.js +21 -0
- package/dist/assets/zeni-epic-state-Da9EwYbz.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-CPX14XSj.js +0 -1
- package/dist/assets/AddressScreen-V8qhbu9d.js +0 -9
- package/dist/assets/AiCfoScreen-B2v4oX4h.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-B6jqtEYg.js +0 -1
- package/dist/assets/BillPayRoutes-CKtJupU-.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-DO1Qhw6D.js +0 -9
- package/dist/assets/ChargeCardRoutes-BHdVO9a5.js +0 -71
- package/dist/assets/CompanyPassportScreen-DkvfpbMw.js +0 -1
- package/dist/assets/ConnectionAuthScreen-DaGPpRPO.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CD5LwsDH.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-CTpQNO2Q.js +0 -23
- package/dist/assets/DashboardRoutes-jRDsqXRC.js +0 -20
- package/dist/assets/DefaultTenantHome-_pdrgccv.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-CCXVWOri.js +0 -18
- package/dist/assets/DrawerScreen-B7V2OyqL.js +0 -1
- package/dist/assets/EntityDetailRoutes-DfRfi9XQ.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-cFT1NB2O.js +0 -25
- package/dist/assets/FeaturePreviewScreen-2R9FJdWJ.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-rd4Kj3vC.js +0 -1
- package/dist/assets/MagicLinkRoutes-BO0Lexxe.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BAuy3KLO.js +0 -12
- package/dist/assets/MobileAppDrawer-DIls_BW2.js +0 -1
- package/dist/assets/NotFoundScreen-D4Av36kV.js +0 -1
- package/dist/assets/NotificationRoutes-lCQFJz0z.js +0 -1
- package/dist/assets/OAuthConsentScreen-COgy1n70.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Bkidve9i.js +0 -1
- package/dist/assets/PeopleRoutes-B7wvEYYp.js +0 -22
- package/dist/assets/PerformanceRoutes-CjXTt9vm.js +0 -1
- package/dist/assets/ReferralListScreen-BA5RvLF7.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-BGkN9M7Q.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-6mUow2wt.js +0 -1
- package/dist/assets/ReportsRoutes-BBKUYNc0.js +0 -1
- package/dist/assets/RewardsRoutes-BbXQsLmk.js +0 -1
- package/dist/assets/ScreenRoutes-BxoMc-Es.js +0 -2
- package/dist/assets/SettingsRoutes-DLxDXOLE.js +0 -57
- package/dist/assets/SetupPagesScreen-DLtasQoq.js +0 -29
- package/dist/assets/SignInScreen-CJnKhy_P.js +0 -1
- package/dist/assets/SignOutScreen-DNLOQn_i.js +0 -9
- package/dist/assets/TaskListScreen-G6lL0uD5.js +0 -9
- package/dist/assets/TaskRoutes-DQA7zeTW.js +0 -9
- package/dist/assets/TransactionDetailRoutes-yWhhHCBD.js +0 -1
- package/dist/assets/TransactionDetailScreen-gAhskOIn.js +0 -5
- package/dist/assets/TransactionListRoutes-CzgCZLFm.js +0 -1
- package/dist/assets/TreasuryRoutes-BmIGoFg4.js +0 -37
- package/dist/assets/WiseConfirmationScreen-Co4RuLhn.js +0 -12
- package/dist/assets/ZeniAccountRoutes-C_Otg4hI.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-BbupcIsJ.js +0 -9
- package/dist/assets/dnd-RzzQg6oJ.js +0 -6
- package/dist/assets/empty-Bs_WirIs.js +0 -1
- package/dist/assets/epic-CPnluZX0.js +0 -2
- package/dist/assets/getLocaleForTenant-CYgluMQL.js +0 -1
- package/dist/assets/index-BCOcxjVj.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DN1K5TAQ.js +0 -1
- package/dist/assets/useInitialThreadRequest-X7WpfR49.js +0 -1
- package/dist/assets/withTransactionSidePanel-BvWwtSm-.js +0 -21
- package/dist/assets/zeni-epic-state-DvHgUD1-.js +0 -13
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-fDjf6Tur.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-C8Y7fm3n.js";import{NW as k,O1 as q,fF as W,fE as X,fD as J,iE as L,L3 as Q,qB as K,eQ as V,Ns as D,iC as F,NX as S,O4 as T,iA as G,iX as j}from"./zeni-epic-state-DvHgUD1-.js";import{bw as M,J as N,s as R,z as U,m as O,p as b,U as v,B as Z,bx as Y,o as z,by as ee,q as te}from"./index-C3-objML.js";import{n as H}from"./mui-Ky-KJxLh.js";import"./sentry-DjzU4p1F.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]="fc1d7aec-94a5-4306-9e81-981a96e7d3fd",e._sentryDebugIdIdentifier="sentry-dbid-fc1d7aec-94a5-4306-9e81-981a96e7d3fd")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(L(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Q("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(J(n,"BillPayVendor"))},onResendOtp:n=>{e(X(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(M);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(d=>k(d,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=b(a.state?.pathnameStackToGoBack),d=s.poppedPathname??B();n(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=b(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??B(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:d}=P(),c=e??s,{useFeatureGate:r}=R(),i=U.getSignedInUser(),p=h(u=>V(u)),g=O(),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:d}),l.jsx(oe,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:p,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const B=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=H.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,de=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:c}=d;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(T({data:i}))},onCancel:()=>{(()=>{const r=b(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,r,n),p=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:p}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=b(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:d}=P(),c=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=R(),p=O(),g=h(u=>V(u)),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:p.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${p.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:d}),l.jsx(de,{location:a,navigate:n,billId:d,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,_ as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-fDjf6Tur.js";import{J as f,A as l,m as c}from"./index-C3-objML.js";import{D as b}from"./mui-Ky-KJxLh.js";import"./sentry-DjzU4p1F.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]="55f76821-2be0-486b-a7fc-493ddb9425df",e._sentryDebugIdIdentifier="sentry-dbid-55f76821-2be0-486b-a7fc-493ddb9425df")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),a=c();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-fDjf6Tur.js";import{a as d}from"./sentry-DjzU4p1F.js";import{h as B,u as G,g as q,i as L,j as l,N as F,n as M,o as N,p as _}from"./core-C8Y7fm3n.js";import{Ma as z,eQ as O,Lz as H,kH as R,I9 as I,Mf as W,L2 as Y,jH as $,Ia as P,LE as Q,LF as V,L4 as J,L3 as K}from"./zeni-epic-state-DvHgUD1-.js";import{aS as U,c as X,p as Z,q as tt}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import{d as S}from"./decodeURIComponentSafe-pK1yrQsS.js";import{w as et}from"./withTransactionSidePanel-BvWwtSm-.js";import{f as at,c as nt}from"./routePaths-B8EWQXPr.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.js";import"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import"./TransactionDetailScreen-gAhskOIn.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]="bdaf522b-ba80-4e9f-bed4-27b2820b6953",a._sentryDebugIdIdentifier="sentry-dbid-bdaf522b-ba80-4e9f-bed4-27b2820b6953")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(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??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(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(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=L(),r=S(j??""),p=S(w??""),f=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>H(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(R(i)))},[m,f,i]);const E=l(n=>n.trendState.fetchState),b=u?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),b!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:b})))},[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:k(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-fDjf6Tur.js";import aa from"./NotFoundScreen-D4Av36kV.js";import{a as o,b as Nt}from"./sentry-DjzU4p1F.js";import{n as Fe,S as oa}from"./mui-Ky-KJxLh.js";import{u as pe,h as Jt,g as Ye,j as w,n as sa,i as wt,o as ca,p as qe}from"./core-C8Y7fm3n.js";import{eQ as xe,QE as ia,np as Ee,fk as la,rc as ra,nH as Yt,o0 as Kt,QF as Ht,oa as da,QG as Zt,nA as ua,qK as ma,f4 as Ie,QH as De,tb as Wt,Cw as Xt,QI as en,QJ as pa,qi as Ke,Mb as Pt,Md as ha,jK as ga,Me as Ca,jR as Sa,cU as fa,uo as He,nN as tn,of as Ue,nF as le,QK as Ia,L4 as xt,L3 as Re,QL as Dt,k6 as Ea,QM as ka,QN as ya,QO as ba,QP as va,nU as Ta,oi as we,QQ as Aa,QR as Ra,QS as wa,op as Pa,jV as xa,jM as Da,QT as Ua,jU as Ut,Ml as Fa,QU as Ba,QV as Va,qe as Oa,pS as _a,og as me,pR as Ge,QW as Ma,QX as za,QY as ja,lp as La,bo as $a,lk as Ft,l6 as Qa,QZ as qa,gU as Bt,fV as Ga,lh as Na,wh as Ja,Q_ as Ya,oQ as Ka,oL as Ha,oP as Za,oA as Wa,Q$ as Xa,f7 as nn,o3 as eo,nQ as to,fl as Vt,ok as no,R0 as ao,R1 as oo,oh as an,R2 as so,R3 as co,R4 as io,R5 as lo,R6 as Ot,qq as ro,pJ as uo,L2 as mo,R7 as po,R8 as ho,jT as go,R9 as Co,Ha as So,jS as fo,jH as Io,f6 as Eo,pg as on,pB as ko,oe as _t,oj as yo,bE as bo,le as vo,lb as To,Ra as Ao,oz as Mt,px as zt,pv as Ro,Rb as wo,p1 as Po,o$ as xo,py as Do,Rc as Uo,Rd as Fo,p5 as Bo,Re as Vo,oV as Oo,p4 as _o,p2 as Mo,pE as zo}from"./zeni-epic-state-DvHgUD1-.js";import{s as sn,U as ne,c as Q,q as te,Y as cn,_ as ln,cG as jo,z as Be,cH as Lo,at as Pe,cI as $o,aU as jt,B as rn,cJ as Qo,aq as Ne,D as qo,a7 as Go,cK as No,a2 as Jo,cL as Yo,X as Ko,cM as Ho,cN as Zo,H as Wo,k as Xo,aN as es,cO as ts,cP as ns,b9 as as,A as os,aQ as ss}from"./index-C3-objML.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{f as Lt,a as cs,b as is,g as ls,C as rs}from"./TransactionDetailScreen-gAhskOIn.js";import{w as ds}from"./withTransactionSidePanel-BvWwtSm-.js";import{h as us,v as ms}from"./routePaths-B8EWQXPr.js";import{g as Je}from"./accountMappingHelper-B_qiWmeW.js";import{D as ps}from"./DrawerScreen-B7V2OyqL.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.js";import"./decodeURIComponentSafe-pK1yrQsS.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]="ad584eba-43d7-4fc1-a357-096b9944c7d6",t._sentryDebugIdIdentifier="sentry-dbid-ad584eba-43d7-4fc1-a357-096b9944c7d6")}catch{}})();const hs=()=>{const t=pe(),l=Jt(),B=Ye(),f=w(d=>xe(d)),{useFeatureGate:v}=sn(),{isFeatureEnabled:S}=v(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=v(ne.aiAuditScorePercentage),I=w(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=w(d=>ia(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,q,X=!1)=>{t(Ee({tenantId:q,period:{month:d.month,year:d.year},refreshViewInBackground:X}))},[]),T=o.useCallback(d=>{const q=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,q??null),t(la(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)},[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=te(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(q=>q.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(g,f.tenantId)},[k,g,s.fetchState,f.tenantId,y]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(ra(g))},[g,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(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.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=Fe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Cs=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:v})=>{const S=pe(),r=Be.getSignedInUser(),I=w(e=>xe(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,g=u[l],m=g?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{S(ma(e,n.split(".")[0]))},E=e=>{m!=null&&S(ua({accountId:l,selectedPeriod:k,fileId:e,statementUploadId:m}))},y=()=>{S(Ht({statementUploadChosen:!1}))},d=e=>{S(da({accountId:l,selectedPeriod:k,payload:e}))},q=e=>{S(Zt({accountId:l,selectedPeriod:k,localData:{accountSource:e}}))},X=o.useCallback(()=>{S(Yt({accountId:l}))},[S,l]),M=o.useCallback(()=>{S(Kt({accountId:l}))},[S,l]),O=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return g!=null?h.jsx($t,{children:h.jsx(Qt,{children:h.jsx(Lo,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:g,monthYearPeriod:k,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:v,onEditFileName:P,onDeleteFile:E,onSelectSourceType:q,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:T,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:X})})}):O!=null?h.jsx($t,{children:h.jsx(Qt,{children:h.jsx($o,{excludedAccountReconciliation:O,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:M})})}):null}),$t=Fe.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,Qt=Fe.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
`;function Ss({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 S=w(r=>pa(r,t,v));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Qo,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const fs=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Is,comma:qt,space:Es}},dateFormat:pn}=qo.getLocalizedStrings(),Gt=zo,ks=sa(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:S,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:g}=T;return{expenseAutomationViewSelector:T,bulkUploadSelector:I===!0?T.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:k,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Jo}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:v,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:k,navigate:T,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:E,currentSelectedView:y,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:q}=p.jeSchedules,X=tn(E),M=Ue(X.start),O=Ue(X.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{Q.trackMissingReceiptAttached(E.month,E.year),t(uo(e))},onUploadTransactionReceipt:(e,n,c,i,b,C)=>{t(Ot(e,n,{fetchState:"In-Progress"}));const A=()=>t(Ot(e,n,{fetchState:"Error"}));Yo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,b).then(V=>{V!=null?t(ro(e,V)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(lo(e,n)),u!=null&&t(Ee({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(io(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?Es+Is+i+qt:qt}]}))},onUpdateJESchedulesUIState:e=>{t(co(e))},onUpdateMissingReceiptsUIState:e=>{t(so(e))},onFetchMissingReceiptsList:()=>{O!=null&&M!=null&&t(an({start:M,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(_o(e))},onBulkUploadSuccess:e=>{t(Oo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,b)=>{t(Bo(e,n,c,i,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Do(e))},onSetBulkUploadSortConfig:(e,n)=>{t(zt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(xo())},onSearchTransactionsForManualMatch:(e,n)=>{t(Gt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Gt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Po(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(wo())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(Ro())},onResetBulkUploadSort:()=>{t(zt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(oo())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ge({selectedTab:c,uiState:{searchString:e}})),O!=null&&M!=null&&t(me(c,{start:M,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(ao({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(no(S))},onClose:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0})),T("../")},onBack:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(to(e))},onSaveReconciliationReview:e=>{t(eo(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=te(I.state?.pathnameStackToGoBack,I.pathname);T(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=te(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,C=Je(q.prepaidExpensesAccountList,c.selectedOptions),A=Je(q.fixedAssetsAccountList,i.selectedOptions),V=Je(q.accruedExpensesAccountList,b.selectedOptions),x={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:V.map(D=>D.accountId)};t(Xa({data:x}))},onSaveJeAccountSettingsClick:()=>{t(Wa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:b,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:V,allClassList:x,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,ae={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},oe=C?.selectedOption!=null?V.find(N=>N.qboId===C.selectedOption):void 0,Ve=b?.selectedOption!=null?x.find(N=>N.classId===b.selectedOption):void 0,Oe=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Za({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(xt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onCancelAutoComplete:()=>{t(Re("common"))}},onPostJESchedule(e,n){t(Ka({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ya())},handleJeScheduleClick:(e,n,c)=>{t(Ja({selectedJEScheduleKey:n}));const i=te(I.state?.pathnameStackToGoBack,I.pathname);T(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Na(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ga())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(qa(e))},onUpdateFileAttachment:e=>{t(Qa({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ft(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(La(u.companyId,e,u.tenantId)),Q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,$a().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=te(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,b,C,A,V,x,D,j,ae,oe)=>{t(ja(e,n,c,i,k,b,C,A,V,x,D,j,ae,oe))},onCancelAutoComplete:()=>{t(Re("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(me(e,{start:M,end:O},!1,!1)),t(za(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),O!=null&&M!=null&&(t(Ma(e)),t(me("autoCategorized",{start:M,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n})),O!=null&&M!=null&&t(me(e,{start:M,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ge({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,b,C,A)=>{O!=null&&M!=null&&t(me(e,{start:M,end:O},!0,c,n,i,b,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,b,C,A,V)=>{t(_a(e,n,c,i,V??null,b,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,b)=>{t(Ut({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(Oa(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&t(Fa({transactionId:V,customerUpdates:C})),t(Ba({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:k,updatedCustomer:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(He({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:v,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,b,C,A)=>{const{transactionId:V,transaction:x,lineIds:D}=n;C!=null&&(t(xa({transactionId:V,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Da({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ut({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:x,uncategorizedAccounts:k,updatedVendor:C,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(He({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(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(E,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{Q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Pa(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(wa(e))},updateOperatingExpensesIdsForReview:e=>{t(Ra({operatingExpenseIds:e,selectedPeriod:E}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ms(e.id,e.qboId,l.tenantEmailDomain),c=te(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Aa({sectionId:e,selectedPeriod:E}))},onFetchReimbursementView:(e,n,c)=>{t(we(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(le(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(Zt({accountId:e,selectedPeriod:E,localData:{accountSource:"bank_statement"}})),t(Ht({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(le(E,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Ta({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ya({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Ea(i)),t(ka({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ke("bill"));const n=te(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(xt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Re("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ia({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Yt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Kt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||y!=="reconciliation"||t(le(E,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...v}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,k,T)=>{r.onUploadTransactionReceipt(s,p,u,k,T,S.authParams)}}}(t,l,v)})(Go(No)),ys=ds(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=v=>{const S=pe(),r=function(){const P=pe(),E=w(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=w(P=>Ie(P).reconciliation),s=w(P=>xe(P)),p=o.useCallback((P,E)=>{S(Wt("expense_automation_reconcile",P,E))},[S]),u=o.useCallback((P,E)=>{const y=s?.companyId;y!=null&&(S(Xt(P,y,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",E)),S(en({accountId:E,connectionInProgress:!0})))},[S,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]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);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:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ko(),u=Ho(),{isOpen:k}=Zo(),T=Jt(),g=Ye(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:E}=dn({mobileExploreReferrer:"Transaction categorization"}),y=o.useCallback(()=>{v===!0&&f!==!0&&t?.()},[t,v,f]),{areTenantIdsInSync:d}=cn(),q=(()=>{const a=w(G=>Ie(G)),F=Ye(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:R}=a,Z=Ne($),J=Ne(L.fetchState),H=o.useCallback(G=>{const W=F.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?Q.trackTransactionsReviewPage(R.month,R.year,a.transactionView.totalCountByTab.review,0,G,W??null):Q.trackTransactionsAutoCategorisedPage(R.month,R.year,a.transactionView.totalCountByTab.autoCategorized,0,G,W??null)),$==="missing_receipts"&&Q.trackMissingReceiptsPage(R.month,R.year,G,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&Q.trackMonthCloseScheduleListPage(R.month,R.year,G,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&Q.trackFluxAnalysisPage(R.month,R.year,G,fs(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&Q.trackInsightsEmailPage(R.month,R.year,G,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[R,a]);return o.useEffect(()=>{J===L.fetchState&&$===Z||L.fetchState!=="Completed"||H(!1)},[$,L.fetchState,Z]),H})(),X=Wo(),[M,O]=o.useState(!1),e=w(a=>Pt(a)),n=w(a=>xe(a)),[c,i]=o.useState(!1),[b,C]=o.useState(!1),[A,V]=o.useState([]),[x,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),ae=x?.contentType==="activity"?x.detail.transactionId:void 0,oe=o.useCallback(a=>{a!=null?(s&&p(!1),u(),y(),D({contentType:"activity",detail:{transactionId:a}})):D(F=>F?.contentType==="activity"?null:F)},[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]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),y()),N.current=s},[y,j,s,u]);const Ze=o.useRef(k);o.useEffect(()=>{k===!0&&Ze.current===!1&&(s&&p(!1),j(),v===!0&&f!==!0&&t?.()),Ze.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}=wt(),{tenantEmailDomain:gn}=wt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=Xo(),Me=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:re}=sn(),{configValue:fn}=Sn(es.enableUncategorizedExpenseCategory),ee=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=re(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=re(ne.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:ze}=re(ne.isTransactionActivityEnabled),{isFeatureEnabled:st}=re(ne.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=re(ne.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:En}=re(ne.isProjectsTransactionsEnabled),kn=o.useCallback(a=>{const F=Ke(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,F)},[l]),yn=w(a=>mo(a,"common")),z=w(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:vn}=w(a=>po(a.accountState)),Tn=w(a=>ho(a.classState)),{monthEndCloseChecksView:K,currentSelectedView:U,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:An,currentSelectedViewFetchState:se,jeSchedules:Le,reconciliation:Rn}=z;cs(U==="transaction_categorization");const wn=z.transactionView.saveStatus.fetchState,ct=z.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=w(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=w(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const de=is(wn,()=>{const a=[],F=ut.current,L=dt.current,$=L!=null&&F!=null?L[F]:void 0;if($?.transactionReviewLocalDataById!=null)for(const Z of Object.values($.transactionReviewLocalDataById)){const J=Z?.transactionReviewLocalData?.lineItemById;if(J!=null)for(const H of Object.values(J)){const G=H?.account;G?.accountId!=null&&a.push(G.accountId)}}const R=it.current;for(const Z of R)for(const J of Z.lines??[])"account"in J&&J.account?.accountId!=null&&a.push(J.account.accountId);return a});o.useEffect(()=>{U==="transaction_categorization"&&v!==!0||oe(void 0)},[U,oe,v]);const Pn=z.transactionView.selectedTransactionCategorizationCompletedSubTab,ye=`${je}|${Pn}`,be=o.useRef(null);o.useEffect(()=>{be.current!==null?be.current!==ye&&(be.current=ye,U==="transaction_categorization"&&j()):be.current=ye},[j,U,ye]);const xn=w(a=>ae==null?void 0:go(a.transactionState,ae)),ce=xn?.qboId,mt=w(a=>ce==null?void 0:Co(a,ce));o.useEffect(()=>{ce!=null&&m(So(ce))},[m,ce]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=z.transactionView,Ct=o.useCallback(a=>ls(m,a),[m]),St=o.useMemo(()=>U!=="transaction_categorization"||x==null?null:x.contentType==="activity"?ze===!0?h.jsx(ts,{activityLogView:mt,qboId:ce,onClose:()=>D(null),selectedTransactionId:x.detail.transactionId,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null:x.contentType==="transfer"?h.jsx(ns,{createTransferEntryStatus:pt,transaction:x.detail,transferAccounts:x.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(x.detail.transactionId)):null,[U,x,ze,mt,ce,pt,ht,gt,Ct]),Dn=St!=null,{selectedAccountId:ge}=Rn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=w(a=>fo(a.accountState,a.accountListState,"accountList")),Fn=w(a=>Io(a)),Ce=tt!=null?Eo(tt):U,Bn=w(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:se.fetchState==="Completed"}),Me==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Ue(It.start),fe=Ue(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),On=o.useCallback(()=>{C(!0)},[]),_n=o.useCallback(a=>{V(a),C(!1)},[]),Mn=o.useCallback(()=>{V([])},[]),ve=z.missingReceipts.bulkUpload.phase,Et=z.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&U==="missing_receipts"&&ve==="matching"&&Et!=null&&m(on({cacheOverride:!0}))},[he,U,ve,Et,m]);const kt=Me?.userId,zn=_.month,jn=_.year,yt=n?.tenantId;o.useEffect(()=>{U==="missing_receipts"&&he!==!1&&ve==="idle"&&kt!=null&&yt!=null&&m(ko())},[U,he,ve,kt,yt,zn,jn,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&U!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||se.fetchState!=="Completed"&&se.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,ee)))},[Xe,se,d,ee]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,ee)),m(le(_,ge,!1,!1)))},[_.month,_.year,d,ee]);const bt=o.useCallback((a=!1,F=!1)=>{const L={start:Se,end:fe};switch(U){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,F,void 0,ee)),nt(!1);break;case"flux_analysis":m(we(_,a,F,null));break;case"month_end_insights":if(F===!1){const $=new Date(_.year,_.month,0),R=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(vo(!0,n.companyId,n.tenantId,R)),m(To(n.companyId,n.tenantId))}break;case"je_schedules":m(yo(L,F));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,F));break;default:m(le(_,ge,a,F))}},[U,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,ee]);o.useEffect(()=>{U===Ce&&se.fetchState==="Not-Started"&&d&&bt(!0)},[se,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||An.fetchState==="In-Progress"||se.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(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(Ao({companyId:n.companyId})),T("../"))},[z.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(()=>{U==="reconciliation"&&ge==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(le(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[U,m,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,le,ge,_]);const Ln=Lt();o.useEffect(()=>{const a=(K.monthEndCloseChecks?.monthEndCloseCheckList.find(F=>F.id==="month_end_insights")?.isDisabled??!1)&&!ot;U!=="month_end_insights"||!a&&K.monthEndCloseChecks?.reportEmailSentDate==null||T("../")},[U,K.monthEndCloseChecks]);const $n=r===!0?S:B,Qn=r===!0||v===!0,qn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(Mt())},[ft,Le.accountSettingsView.saveState.fetchState,Mt]);const{transactionId:vt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:F,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const R=pe();let Z,J,H;const G=Lt(),W=a.transactionView;let Tt=()=>{};const{transactions:Hn,selectedTransactionId:ue,selectedTransactionLineId:Te,transactionLocalData:Zn}=W;if(L==="transaction_categorization"){const $e=Zn.find(ie=>ie.transactionId===ue),Y=Hn.find(ie=>ie.id===ue),At=Te!=null?$e?.transactionReviewLocalData?.lineItemById[Te]:void 0,Rt=At?.account;J=At?.class?.classId,Z=["Uncategorized Income","Uncategorized Expense"].includes(Rt?.accountName??"")?void 0:Rt?.accountId;const Xn=us(ue,Y?.typeOfTransaction);Y!=null&&Xn&&(H={id:ue,type:Ke(Y.typeOfTransaction)}),Tt=()=>{if(ue!=null&&Te!=null&&Y!=null){const ie=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(ie!=null&&Y.lines!=null&&Y.lines.length>0){const Ae=ie.lineItemById[Te];let Qe=ie.selectedEntity;if(fa(Y)||(Qe=Ae.selectedEntityLine),Qe!=null){const ea=Qe,ta={transactionId:{id:Y.id,type:Y.type},transaction:Y,lineIds:Y.lines.map(na=>na.id)??[]};R(He({entity:ea,amount:Ae.amount.amount,transactionDetails:ta,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:G,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Wn=w($e=>Pt($e,void 0,Z,J));return{transactionId:H,onSaveVendor:()=>{R(Sa(H,void 0,!1,!0))},onSaveSuccess:Tt,onCancel:()=>{H!=null&&R(ha({transactionId:H})),R(ga()),R(Ca()),F()},vendorViewDetails:Wn}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{O(!1)},currentSelectedView:U,isUncategorizedExpenseCategoryEnabled:ee}),Kn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,F,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?K.fetchState==="Error"?h.jsx(as,{onGoHome:()=>T("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(ps,{isOpen:b,drawerLeftMargin:new os(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(Ss,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:_n,resetCustomerRequest:Mn})})}),vt!=null&&M&&h.jsx(rs,{isOpen:M,transactionId:vt,onSaveVendor:Gn,onSaveSuccess:Nn,onCancel:Jn,vendorViewDetails:Yn}),h.jsx(ks,{...Kn,navigate:T,location:g,themeState:X,categoryOptions:bn,classesForFilters:Tn,accountsForFilters:vn,vendorSearchAutoCompleteData:{autoCompleteText:Bn,entityAutoCompleteView:yn},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:ee,isAccountingClassesEnabled:Fn,isProjectsTransactionsEnabled:En,isCOTEnabled:Ln,currentTenant:n,companyId:n.companyId,signedInUser:Me,isTransactionActivityEnabled:ze,isRightPanelOpen:Dn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Ve:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:On,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:q,setActivityLogTransactionId:oe,closeSidePanel:qn,openTransactionPanel:l,sidePanelIsOpen:Qn,sidePanelIsFullView:r!==!0&&f,panelContent:$n,isAiCfoAccessEnabled:P,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:kn,sidePanelListPercent:r===!0?66:void 0}),de.showPopup&&de.popupType!=null&&h.jsx(ss,{popupType:de.popupType,currencySymbol:de.currencySymbol,onSubmit:de.handleSubmit,onDismiss:de.handleDismiss})]})})),bs=Fe(oa)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function Js(){return h.jsxs(ca,{children:[h.jsx(qe,{path:"*",element:h.jsx(hs,{})}),h.jsx(qe,{path:"/:selectedTab/:selectedPeriod/*",element:h.jsx(ys,{})}),h.jsx(qe,{path:"*",element:h.jsx(aa,{})})]})}export{Js as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-fDjf6Tur.js";import{a as r}from"./sentry-DjzU4p1F.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import c from"./NotFoundScreen-D4Av36kV.js";import{h as u,g as b}from"./core-C8Y7fm3n.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 i}from"./sentry-DjzU4p1F.js";import{u as l,h as m,g as p}from"./core-C8Y7fm3n.js";import{gB as f,Kh as g,Ki as b}from"./zeni-epic-state-DvHgUD1-.js";import{u as _,L as h,z as y}from"./index-C3-objML.js";import"./liveblocks-fDjf6Tur.js";import"./recharts-CgIjuHOA.js";import"./mui-Ky-KJxLh.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="bb38e756-3c8d-4932-8d69-6506b71d54ac",e._sentryDebugIdIdentifier="sentry-dbid-bb38e756-3c8d-4932-8d69-6506b71d54ac")}catch{}})();function R(){const e=l(),n=m(),r=p(),{setLoading:o,clearAllLoading:u}=_(),s=i.useRef(!1);return i.useLayoutEffect(()=>{o(h.CONNECTION_AUTH)},[o]),i.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-fDjf6Tur.js";import{i as S,n as x,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-C8Y7fm3n.js";import{Ka as k,Kb as v,Kc as K,A7 as A,zV as T,Kd as B,Ke as oe,Kf as se,zZ as ie,eX as $,A4 as le,A1 as de}from"./zeni-epic-state-DvHgUD1-.js";import{J as g,o as d,V as re,c as j,h as G,n as ce,p as me,Q as pe,q as H,s as ue,U as he,r as xe,H as ge,m as fe,v as be,B as we,x as Se,j as ye,S as ke,y as ve,A as je,G as $e}from"./index-C3-objML.js";import{n as m}from"./mui-Ky-KJxLh.js";import f from"./NotFoundScreen-D4Av36kV.js";import{a as I}from"./sentry-DjzU4p1F.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="d7ce5708-004b-49b0-8187-1d868e8ebd03",e._sentryDebugIdIdentifier="sentry-dbid-d7ce5708-004b-49b0-8187-1d868e8ebd03")}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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(K({data:l}))}}})(re);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Be=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??ze();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Ae,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const ze=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ne=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(K({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Ke=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(xe);function Te(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Ke,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},He=m(ke)`
|
|
38
|
-
width: ${d.sp4};
|
|
39
|
-
height: ${d.sp4};
|
|
40
|
-
margin-bottom: ${d.sp3};
|
|
41
|
-
margin-top: ${d.sp3};
|
|
42
|
-
margin-left: ${d.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,Me=m.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,Ve=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
|
|
61
|
-
`,Ue=m.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.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=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),r=i.get("token"),M=n.pathname.includes("address"),b=g(),V=ge(),D=fe(),w=be(),U=()=>{V.toggle()},W=E(u=>k(u)),_=E(u=>v(u)),{authParams:q,fetchState:c,billAttachment:J,billFetchState:z,companyName:Q,currencySymbol:X,amount:Z}=W,{tenantId:P,userId:L,sessionId:N}=q,{fetchState:O,internationalBankAccountCreateStatus:R}=_;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&a(le(s,o,r))},[w,c,s,o,r,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(de(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(f,{}):O==="Completed"||R.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&z==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",Q,l??"",_e(n.pathname),X,Z))(u)}),t.jsxs(Me,{windowSize:b,children:[b!=="small"?t.jsx(He,{onClick:U}):null,t.jsx(Ue,{windowSize:b,isAddressPage:M,children:z==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:J,type:"bill"})}),t.jsx(Ve,{windowSize:b,children:e})]})]})}const _e=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return t.jsx($e,{})}function rt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(qe,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{rt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-fDjf6Tur.js";import{a as g}from"./sentry-DjzU4p1F.js";import{u as U,g as _,h as w,s as M,j as l,N as D}from"./core-C8Y7fm3n.js";import{z as r,m as P,D as V,d as A,c as K,e as N,i as J,j as X,g as Q}from"./index-C3-objML.js";import{eQ as R,JX as W,K5 as Y,JY as $,eX as q,fo as B,K1 as G,fM as H,cS as Z,K6 as ee,K7 as te}from"./zeni-epic-state-DvHgUD1-.js";import{n as ne}from"./mui-Ky-KJxLh.js";import{u as ae}from"./useDeviceId-DBHwhChu.js";import{f as se}from"./analyticsHelper-DNuTbD5B.js";import{t as ie}from"./getLocaleForTenant-CYgluMQL.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="a15f6548-fa1c-4a05-9049-da354bbc5079",t._sentryDebugIdIdentifier="sentry-dbid-a15f6548-fa1c-4a05-9049-da354bbc5079")}catch{}})();const T=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Te(){const t=U(),s=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>R(e)),b=l(e=>W(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(Y(n,i,f)))},[n,p,t,i,f,a?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants($(b.tenantsInOrder),a.zeniSessionId),q(a.userId,a.zeniSessionId,o.tenantId),t(B(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(G("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),H().then(()=>{const e=Q();e!=null&&A(e)}),setTimeout(()=>{K.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,a,o,b,v,s.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(J,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(D,{to:e,state:{...s.state,origin:""}})}if(!T(n,p)||f==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(X,{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{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-fDjf6Tur.js";import{a as c}from"./sentry-DjzU4p1F.js";import{u as me,j as n,i as Qe,g as We,h as Je,l as G}from"./core-C8Y7fm3n.js";import{eQ as be,f0 as Ke,f1 as pe,eU as Xe,bn as ea,eP as aa,f2 as ta,f3 as na,f5 as sa,f8 as oa,fh as ia,f9 as g,fb as ra,fc as le,ff as da,fd as la,fe as ca,fg as ua,cI as fa,fj as ma,cN as ba,eT as pa,fo as ha,fp as Sa,fn as ga}from"./zeni-epic-state-DvHgUD1-.js";import{a7 as Ea,a8 as ka,H as Ca,s as ya,z as k,v as Ia,u as Ta,U as r,a9 as wa,T as Aa,aa as _a,k as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ga,ag as Ma,ah as fe,c as M,$ as Ra,q as A,ai as R,aj as Na}from"./index-C3-objML.js";import{D as Ua}from"./mui-Ky-KJxLh.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]="976ba1b1-7b6f-4eb0-a0d0-fdaa99b2261b",f._sentryDebugIdIdentifier="sentry-dbid-976ba1b1-7b6f-4eb0-a0d0-fdaa99b2261b")}catch{}})();const Va=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Qe(),a=We(),C=Ca(),o=Je(),U=Xe(),m=me(),{useFeatureGate:i}=ya(),V=k.getSignedInUser(),P=ea(V),s=n(e=>be(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,j=n(e=>aa(e)),O=j.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[_,L]=c.useState(void 0),F=G("/:tenantEmailDomain/dashboard")!==null,z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,Y),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Z=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=k.getSignedInUser(),v=n(e=>e.tenantState),Ce=n(e=>v.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),q=Aa(),{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=P||!P&&$e,xe=s.company!=null&&ia(s.company),w=ve&&xe,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),Q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:J,isLoading:K,isFetchingMore:X,hasFetchedAll:ee,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&X===!1&&ee===!0)if(s?.companyId!=null&&J!=null){const e=`dashboard_${s.companyId}`;L(J.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,X,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:_},"comments")))},[_,$.fetchState]);const Ue={fetchStatus:Me,count:Ge},ae=t!=null?k.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ve=Fa(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),Pe=F&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!F&&!z?void 0:"disabled",je=c.useMemo(()=>ua(s.userRole),[s.userRole]),Oe=fa(je),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,Y,s),oe=Da(),He=oe&&va(a),ie=ba(Ve?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!k.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[Ye,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,qe=Ba(Ze);return N.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:N.jsx(xa,{signedInUser:V,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ce:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:Pe,isSettings:ue(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Oe,isZeniAccountEnabled:H,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:qe,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:q,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=Q===0&&W>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(M.trackAICFOChatScreenStateChanged("viewed","left_menu",O??null,null),!he)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=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&M.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);fe(e.type)?(O!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{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=>{Se(Ga.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let b=`/${encodeURIComponent(u)}/`;const x=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":fe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:He,aiCfoView:j,isOnDashboard:F,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ya=f=>{const d=me(),t=n(C=>be(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Ke(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Va,{...f,...a})};export{Ya as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-fDjf6Tur.js";import{h as r,n}from"./core-C8Y7fm3n.js";import{N as i}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import"./sentry-DjzU4p1F.js";import"./zeni-epic-state-DvHgUD1-.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="0d8bbeee-ef94-478e-b36a-0f30a9be8cda",e._sentryDebugIdIdentifier="sentry-dbid-0d8bbeee-ef94-478e-b36a-0f30a9be8cda")}catch{}})();const a=n(null,function(e,o){return{onGoBack:()=>{o.navigate(-1)},onGoHome:()=>{o.navigate("/")}}})(i);function _(){const e=r();return t.jsx(a,{navigate:e})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-fDjf6Tur.js";import lt from"./NotFoundScreen-D4Av36kV.js";import{a as k}from"./sentry-DjzU4p1F.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as H}from"./core-C8Y7fm3n.js";import{cq as St,f2 as K,eQ as Y,fg as bt,f9 as b,Qz as O,fc as d,f1 as y,rw as j,wU as It,QA as Ct,f0 as Tt,fj as yt,rB as _t,QB as F,bo as $,gU as x,rF as J,QC as At,cB as Et,cv as Bt}from"./zeni-epic-state-DvHgUD1-.js";import{Y as Nt,z as wt,s as xt,U as Ut,_ as Dt,cD as Rt,q as B,a7 as vt,cE as Gt,a8 as Pt,p as Ft}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="c86ffe42-e791-46c5-8c95-7c5c0ac04a93",t._sentryDebugIdIdentifier="sentry-dbid-c86ffe42-e791-46c5-8c95-7c5c0ac04a93")}catch{}})();const jt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Mt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Y(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:U}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(j("task_manager","dashboard",m))}else U?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(N(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),jt(s,N).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Nt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[N,U]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Y(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Ut.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const X=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const M=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:Q,isLoading:q,fetchMore:L,isFetchingMore:z,hasFetchedAll:W}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{M!=="In-Progress"&&g&&s(j("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=_||v===!0||C!==!0||_||v===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(U(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&q===!1&&w!=null&&Q!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=Q.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||W===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,v,z,C,W,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),M!=="In-Progress"){const A=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s(j("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(Mt,{tenantEmailDomain:n,loggedInUserRoleMap:X,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(H,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(H,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-fDjf6Tur.js";import{a as r}from"./sentry-DjzU4p1F.js";import{u as A,g as j,j as o,N as C}from"./core-C8Y7fm3n.js";import{Kk as K,eQ as P,f8 as x,Kl as z,Km as D,Kn as M,Ko as R,nf as k,Jg as L}from"./zeni-epic-state-DvHgUD1-.js";import{z as h,F as I}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="0b84bf70-f8ca-4a47-8cfe-ce8230c7f4c8",n._sentryDebugIdIdentifier="sentry-dbid-0b84bf70-f8ca-4a47-8cfe-ce8230c7f4c8")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo(()=>K(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=>P(e)),l=o(e=>x(e)),c=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),d=o(M),[v,S]=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&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,c,n]),r.useEffect(()=>{d!=null&&d!==""&&(window.location.href=d)},[d]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??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:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(L(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{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-fDjf6Tur.js";import{h as Y,u as Q,g as Z,i as z,j as d,n as H,o as J,p as I}from"./core-C8Y7fm3n.js";import{eQ as v,rk as R,qU as X,KS as O,qP as T,bs as ee,bn as ae,bT as te,qQ as se,KT as oe,KE as C,dD as re,uR as ne,KU as ce,vc as ie,e$ as le,eZ as de}from"./zeni-epic-state-DvHgUD1-.js";import{z as me,Y as fe,_ as pe,k as ue,s as q,U as M,x as he,c as $,ao as be,q as ge}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import Fe from"./NotFoundScreen-D4Av36kV.js";import{F as Ie}from"./FeaturePreviewScreen-2R9FJdWJ.js";import{a as b}from"./sentry-DjzU4p1F.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{u as Te}from"./useInitialThreadRequest-X7WpfR49.js";import{t as Se}from"./routePaths-B8EWQXPr.js";import{M as ye}from"./MobileAppDrawer-DIls_BW2.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="2b1b85d1-cd19-4982-9b83-90cb47546756",s._sentryDebugIdIdentifier="sentry-dbid-2b1b85d1-cd19-4982-9b83-90cb47546756")}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})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(be);function U(){const s=Y(),e=Q(),a=Z(),{forecastId:o,tenantEmailDomain:r}=z(),[c,p]=b.useState(!1),[m,u]=b.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});b.useEffect(()=>{if(!c&&g)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(F=>F.id===L):P!=null?f.forecasts.findIndex(F=>F.id===P):f.forecasts.length>0?0:-1)(i,o,x?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(e(O(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&g&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,R,T,g]);const A=ue(),N=A?.loggedInUserRole!=null&&ee(A.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:E}=W(M.isReportsCommentingEnabled),G=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[K,V]=b.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:K,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:_,onAskAiCfoClick:B,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>v(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-fDjf6Tur.js";import{KN as te,eQ as J,jH as z,e$ as Y,eZ as ne,Id as q,Kr as oe,tP as Ee,KO as N,tD as ke,tY as Pe,tS as ie,tH as re,tW as Ie,tT as je,KP as le,vD as Te,KQ as Le,fC as ve,KR as K,tM as de,tK as ce,t$ as Fe,c1 as Re}from"./zeni-epic-state-DvHgUD1-.js";import{J as pe,s as X,U as E,z as G,a9 as ue,C as me,ak as ge,al as Ae,A as he,o as A,E as fe,D as Ce,am as Oe,Y as Ve,_ as Ue,x as Ze,c as be,e as $e,q as Be,an as Ke,k as _e}from"./index-C3-objML.js";import{D as ye,n as M,S as Se}from"./mui-Ky-KJxLh.js";import ae from"./NotFoundScreen-D4Av36kV.js";import{a as r}from"./sentry-DjzU4p1F.js";import{u as ee,i as He,j as m,h as ze,g as Ge,n as Me,o as se,p as B}from"./core-C8Y7fm3n.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{M as Qe}from"./MobileAppDrawer-DIls_BW2.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="79cee08c-ff04-4db3-b20e-7e79d3e59f85",a._sentryDebugIdIdentifier="sentry-dbid-79cee08c-ff04-4db3-b20e-7e79d3e59f85")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[P,S]=r.useState(!1),{userId:w}=He(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),I=Y(k,u),L=ne(u),v=q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!I&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?S(!0):C()},$=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:$,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Pe(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[P===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},Ye=M(Se)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,we=M(fe.H6Regular)`
|
|
6
|
-
margin-top: ${A.sp7};
|
|
7
|
-
padding-left: ${A.sp8};
|
|
8
|
-
padding-right: ${A.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: ${A.sp8};
|
|
14
|
-
padding-right: ${A.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${A.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,qe={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[P,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),I=ne(d),L=q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:$,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Ie(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:I,isLoading:Z};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[w.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:[P===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(Se)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=G.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function Q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=Ge(),{areTenantIdsInSync:o}=Ve(),y=G.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),P=!Y(O,h)&&V,S=q(h),w=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[I,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,P))},[b,P,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ze,{analytics:be,onLoad:e=>e.trackPageLoaded($e.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,I===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:I,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Qe,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:P,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(K({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:$})]})}function Sa(){const a=_e();return Re(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(B,{path:"/",element:s.jsx(Q,{})}),s.jsx(B,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx(B,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx(B,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(B,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-fDjf6Tur.js";import E from"./NotFoundScreen-D4Av36kV.js";import{a as r}from"./sentry-DjzU4p1F.js";import{h as _,g as U,j as p,i as v,u as M,N as P,n as z,o as F,p as h}from"./core-C8Y7fm3n.js";import{eQ as B,QD as b,bq as H,bn as N,ho as O,gU as Q}from"./zeni-epic-state-DvHgUD1-.js";import{H as V,z as I,_ as q,cF as $}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{M as J}from"./MobileAppDrawer-DIls_BW2.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="b3f51ee0-bff2-4c8e-b032-3cca5feed4de",e._sentryDebugIdIdentifier="sentry-dbid-b3f51ee0-bff2-4c8e-b032-3cca5feed4de")}catch{}})();const K=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),L=()=>{const e=_(),t=U(),c=V(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=v(),u=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=H(o?.userRole??[]),D=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),x=C||D||k,d=r.useCallback((a,i,T)=>{u(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(F,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-fDjf6Tur.js";import{a as o}from"./sentry-DjzU4p1F.js";import{j as f,h as L,u as N,g as _,n as V}from"./core-C8Y7fm3n.js";import{m as F,J as M,z as R,bb as W,A as U,Y as $,_ as z,x as Q,c as l,e as Y,a7 as J,bc as q}from"./index-C3-objML.js";import{f3 as G,eQ as K,Nf as P,Ng as X,uH as Z,ux as g,f5 as ee,bO as ae,uC as re,Nh as ne}from"./zeni-epic-state-DvHgUD1-.js";import{D as te,e as se,n as oe,S as ie}from"./mui-Ky-KJxLh.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{M as ce}from"./MobileAppDrawer-DIls_BW2.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]="a10c7f3f-650a-4fc1-b82f-3b7e8d3191e5",e._sentryDebugIdIdentifier="sentry-dbid-a10c7f3f-650a-4fc1-b82f-3b7e8d3191e5")}catch{}})();const de={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(c=>G(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.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(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(J(q));function ve({isReferralDrawerOpen:e}){const a=L(),r=N(),n=_(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>K(t)),m=f(t=>P(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=X([m,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&d&&(u(!0),r(g(!0)))},[b,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const B={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(Q,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...B})]})}export{ve as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-fDjf6Tur.js";import x from"./NotFoundScreen-D4Av36kV.js";import{a as p}from"./sentry-DjzU4p1F.js";import{h as D,g as I,u as C,j as c,N as A,n as E,o as k,p as u}from"./core-C8Y7fm3n.js";import{eQ as O,O9 as g,Op as S,DE as T,CN as V,DD as m,Du as U,OG as _}from"./zeni-epic-state-DvHgUD1-.js";import{m as N,z as $,B,a7 as W,bS as z,af as G}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-6mUow2wt.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]="7656b8ea-cf37-42e8-a4b7-27ee648b8ecc",e._sentryDebugIdIdentifier="sentry-dbid-7656b8ea-cf37-42e8-a4b7-27ee648b8ecc")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{G(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(W(z)),Q=()=>{const e=D(),r=I(),a=C(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>O(n)),w=N(),i=c(n=>g(n)),h=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),$.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,q,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(Q,{})}),t.jsx(u,{path:"/new",element:t.jsx(v,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-fDjf6Tur.js";import{a as y}from"./sentry-DjzU4p1F.js";import{h as w,u as A,g as T,i as E,j as b,n as U}from"./core-C8Y7fm3n.js";import{Op as D,O9 as x,Dx as C,DG as _,DE as S,DF as h,Oq as B}from"./zeni-epic-state-DvHgUD1-.js";import{z as O,m as k,B as V,bJ as F,af as j}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.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]="a600c138-a9e6-4ab2-b239-8351dc2c2c8b",e._sentryDebugIdIdentifier="sentry-dbid-a600c138-a9e6-4ab2-b239-8351dc2c2c8b")}catch{}})();function $(e){return B(e)==null}const N=U(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=j(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const R=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=E(),n=O.getSignedInUser(),l=k(),r=b(p=>D(p)),i=b(p=>x(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(C(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(N,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-fDjf6Tur.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-C8Y7fm3n.js";import{eQ as L,fe as I,Kq as Te,jH as J,pZ as W,qO as F,jv as Re,iz as Oe,ub as X,qT as Ae,bs as Fe,Kr as ke,bn as De,vk as je,Ks as Ee,Kt as Pe,u3 as ve,Ku as H,Kv as Le,Kw as Me,Kx as Be,Ky as Ke,Kz as w,KA as k,KB as D,KC as Y,KD as j,KE as E,dD as Ve,v0 as Ue,uQ as q,uR as N,v6 as xe,uV as $,vc as ze,KF as Ge,KG as He,KH as Ye,KI as qe,KJ as Ne,e$ as $e,eZ as Ze}from"./zeni-epic-state-DvHgUD1-.js";import{O as Qe,R as Je,W as We,X as Xe,J as ea,s as ee,U as P,z as ae,Y as aa,k as sa,a as ta,Z as oa,_ as na,x as ra,c as v,e as ia,$ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import ma from"./NotFoundScreen-D4Av36kV.js";import{F as fa}from"./FeaturePreviewScreen-2R9FJdWJ.js";import{a as _}from"./sentry-DjzU4p1F.js";import{u as ua}from"./useInitialThreadRequest-X7WpfR49.js";import{t as Z,a as Q,b as _a}from"./routePaths-B8EWQXPr.js";import{M as ha}from"./MobileAppDrawer-DIls_BW2.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="bcc68d0c-8e5d-45ee-b7b9-805b7d566323",e._sentryDebugIdIdentifier="sentry-dbid-bcc68d0c-8e5d-45ee-b7b9-805b7d566323")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ye()),e(qe()),e(Ne())},ga=we(function(e){const o=ae.getSignedInUser(),m=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:m??""},t=I(e),r=ke(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:v,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:m,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:c}=l;let i=[...f];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)),f.length>0&&e(N(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(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(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(N(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(Ue({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=Ve(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 f=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 Z(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);m(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{m("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(ve()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),m=ea(),u=da(m),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:f}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>L(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),K=d(n=>J(n)),O=d(n=>W(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),A=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(X());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,K,O]);const V=sa(),de=V?.loggedInUserRole!=null&&Fe(V?.loggedInUserRole)!==!0,[pe,me]=_.useState(!1),U=n=>{me(n)},fe=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Qe(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);We({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:v,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:U}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:m,classViewLayout:ce,selectedReportID:R,analytics:v,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:U,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&fe&&!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:f,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=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 xa(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:m}=o(P.isDebitCardFeatureEnabled),u=$e(m,e),a=Ze(e);return u===!0||a===!0?p.jsx(fa,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(ma,{})})]})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-fDjf6Tur.js";import{s as j,z as w,aN as y,x as I,c as p,e as F,cQ as R,U as L}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import l from"./NotFoundScreen-D4Av36kV.js";import{a as u}from"./sentry-DjzU4p1F.js";import{u as P,j as b,h as T,g as U,n as V,o as z,p as d}from"./core-C8Y7fm3n.js";import{eQ as A,Rf as C,NQ as Q,Rg as N,uH as Y,f5 as G,Rh as H,uF as O}from"./zeni-epic-state-DvHgUD1-.js";import{R as x}from"./ReferralListScreen-BA5RvLF7.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.js";import"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import"./MobileAppDrawer-DIls_BW2.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]="199caa9d-8e12-4a2f-8031-49f7d5ebc806",e._sentryDebugIdIdentifier="sentry-dbid-199caa9d-8e12-4a2f-8031-49f7d5ebc806")}catch{}})();const q=V(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(N()),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(O())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(R),B=()=>{const e=P(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>A(o)),c=T(),_=U(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),D=Q(v);u.useEffect(()=>{e(N()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(q,{navigate:c,location:_,currentTenant:r,companyName:S,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(z,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-jRDsqXRC.js","assets/sentry-DjzU4p1F.js","assets/core-C8Y7fm3n.js","assets/zeni-epic-state-DvHgUD1-.js","assets/index-C3-objML.js","assets/mui-Ky-KJxLh.js","assets/analytics-BUNQWYXz.js","assets/utils-Djk4rnCT.js","assets/withTransactionSidePanel-BvWwtSm-.js","assets/useAskAiCfoHostNavButtonProps-DDzinN2F.js","assets/TransactionDetailScreen-gAhskOIn.js","assets/decodeURIComponentSafe-pK1yrQsS.js","assets/routePaths-B8EWQXPr.js","assets/NotFoundScreen-D4Av36kV.js","assets/useInitialThreadRequest-X7WpfR49.js","assets/analyticsHelper-DNuTbD5B.js","assets/CompanyPassportScreen-DkvfpbMw.js","assets/MobileAppDrawer-DIls_BW2.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DN1K5TAQ.js","assets/FeaturePreviewScreen-2R9FJdWJ.js","assets/ReferralListScreen-BA5RvLF7.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-CKtJupU-.js","assets/AddressScreen-V8qhbu9d.js","assets/DomesticWireDetailScreen-CCXVWOri.js","assets/DrawerScreen-B7V2OyqL.js","assets/SetupPagesScreen-DLtasQoq.js","assets/BusinessVerificationPageScreen-DO1Qhw6D.js","assets/BillPayApprovalRoutes-B6jqtEYg.js","assets/ReimbursementApprovalRuleDetailScreen-6mUow2wt.js","assets/getLocaleForTenant-CYgluMQL.js","assets/ReimbursementRoutes-MbRZIHuu.js","assets/ReimbursementApprovalRoutes-BGkN9M7Q.js","assets/TransactionListRoutes-CzgCZLFm.js","assets/ZeniAccountStatementScreen-BbupcIsJ.js","assets/SettingsRoutes-DLxDXOLE.js","assets/accountMappingHelper-B_qiWmeW.js","assets/QBOConnectionScreen-CGgBpuke.js","assets/empty-CTn7RkAu.js","assets/index-DjeTRCsF.js","assets/url-mCw4Y0mb.js","assets/index-BCOcxjVj.js","assets/ReportsRoutes-BBKUYNc0.js","assets/ChargeCardRoutes-BHdVO9a5.js","assets/PeopleRoutes-B7wvEYYp.js","assets/ExpenseAutomationRoutes-cFT1NB2O.js","assets/TreasuryRoutes-BmIGoFg4.js","assets/VendorsRoutes-BjMVmZbA.js","assets/pathToGoBack-9QBEItSt.js","assets/ZeniAccountRoutes-C_Otg4hI.js","assets/AddressRoutes-CPX14XSj.js","assets/PandLWithForecastRoutes-Bkidve9i.js","assets/CustomerOnboardingRoutes-CTpQNO2Q.js","assets/TransactionDetailRoutes-yWhhHCBD.js","assets/EntityDetailRoutes-DfRfi9XQ.js","assets/NotificationRoutes-lCQFJz0z.js","assets/PerformanceRoutes-CjXTt9vm.js","assets/RewardsRoutes-BbXQsLmk.js","assets/TaskRoutes-DQA7zeTW.js","assets/TaskListScreen-G6lL0uD5.js","assets/AiCfoScreen-B2v4oX4h.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as ts,eQ as is,e$ as rs,eZ as os,e_ as ls,fI as cs,eU as ds,cO as pe,cw as ms,ff as us,co as _s,bE as As,bo as ps,fk as Es,v as Is,JY as gs,bs as Ts,JZ as xs,bG as hs,fh as js,bF as Us,bt as Hs,ck as Rs,J_ as bs,J$ as Ds,cL as fs,cN as ys,cM as Cs,cv as vs,cB as Os,nf as Ee,eX as Ie,fS as Ps,fo as ge,fP as Te,fQ as xe,fp as Fs}from"./zeni-epic-state-DvHgUD1-.js";import{j as e}from"./liveblocks-fDjf6Tur.js";import{a as v}from"./sentry-DjzU4p1F.js";import{u as Ls,h as ks,i as Bs,g as Vs,j as G,l as he,N as c,o as Ss,p as t}from"./core-C8Y7fm3n.js";import{m as Ns,u as Zs,z as R,s as Ms,a as ws,T as Gs,U as B,k as $s,L as F,D as je,t as _,P as zs,c as X,l}from"./index-C3-objML.js";import"./mui-Ky-KJxLh.js";import{f as Ue}from"./analyticsHelper-DNuTbD5B.js";import{t as Ys}from"./getLocaleForTenant-CYgluMQL.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.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]="5243499f-b482-47a4-bbae-3c020f83569f",i._sentryDebugIdIdentifier="sentry-dbid-5243499f-b482-47a4-bbae-3c020f83569f")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-jRDsqXRC.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:()=>n(()=>import("./BillPayRoutes-CKtJupU-.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:()=>n(()=>import("./ReimbursementRoutes-MbRZIHuu.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:()=>n(()=>import("./TransactionListRoutes-CzgCZLFm.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-DLxDXOLE.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:()=>n(()=>import("./ReportsRoutes-BBKUYNc0.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BHdVO9a5.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-B7wvEYYp.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-cFT1NB2O.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BmIGoFg4.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-BjMVmZbA.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-C_Otg4hI.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ws=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],K=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},qs=l(()=>n(()=>import("./ReportsRoutes-BBKUYNc0.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Qs=l(()=>n(()=>import("./AddressRoutes-CPX14XSj.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Xs=l(()=>n(()=>import("./PeopleRoutes-B7wvEYYp.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Ks=l(()=>n(()=>import("./PandLWithForecastRoutes-Bkidve9i.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-CTpQNO2Q.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-BjMVmZbA.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-yWhhHCBD.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>n(()=>import("./EntityDetailRoutes-DfRfi9XQ.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),an=l(()=>n(()=>import("./DashboardRoutes-jRDsqXRC.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(()=>n(()=>import("./BillPayRoutes-CKtJupU-.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]))),tn=l(()=>n(()=>import("./SettingsRoutes-DLxDXOLE.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]))),be=l(()=>n(()=>import("./ReimbursementRoutes-MbRZIHuu.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]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-C_Otg4hI.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BmIGoFg4.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-CzgCZLFm.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-BHdVO9a5.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-lCQFJz0z.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),mn=l(()=>n(()=>import("./PerformanceRoutes-CjXTt9vm.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-cFT1NB2O.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-BbXQsLmk.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),An=l(()=>n(()=>import("./TaskRoutes-DQA7zeTW.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-B2v4oX4h.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),f=l(()=>n(()=>import("./NotFoundScreen-D4Av36kV.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),En=l(()=>n(()=>import("./TaskListScreen-G6lL0uD5.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:i}){const U=Ls(),V=ks(),{tenantEmailDomain:o}=Bs(),S=Ns().mode,{setLoading:y,clearAllLoading:O,clearLoading:M}=Zs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),ee=ts(h),$=Vs(),[N,fe]=v.useState(!1),r=G(a=>is(a)),{useFeatureGate:L}=Ms(),q=ws(),se=Gs(),{isFeatureEnabled:ye}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=L(B.isTreasuryEnabled),{isFeatureEnabled:ve}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(B.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),p=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||j==="Completed"?rs(ne,r):void 0,z=p==="Completed"||j==="Completed"?os(r):void 0,Oe=p==="Completed"||j==="Completed"?ls(r):void 0,Pe=ve||ne||!!Oe||!!z||!!u,{isFeatureEnabled:Fe}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:Le}=L(B.isAiCfoFileUploadEnabled),Y=G(a=>cs(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&Ue(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=ds(),A=$s(),ke=r.company==null||A?.loggedInUserRoleMap!=null&&pe(A.loggedInUserRole),Be=ms(A?.loggedInUserRoleMap),te=v.useRef(!0),ie=he("/:tenantEmailDomain/onboarding/*")!==null,Q=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(a=>w.tenantId!=null?us(a,w.tenantId):void 0);v.useEffect(()=>{y(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=_s(Number(H[0])),s=Number(H[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=ps();m.isAfter(Z,"month")===!1?U(Es(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(fe(!0),y(F.TENANT_FETCHING)),te.current?te.current=!1:!Is(ae,w)&&R.isSignedIn()&&(y(F.TENANT_FETCHING),function(a,H,d,s){if(Ie(H?.userId,H?.zeniSessionId,a.tenantId),d(Ps(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Ve))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(y(F.TENANT_FETCHING),function(a,H,d,s,m,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,as=d!=null&&d.externalConnections==null;if(J&&ss){k(ge(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),Ie(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else J&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),J&&as&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(J){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Fs(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,p,r,D,h,y,U))},[D,p]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(M(F.TENANT_FETCHING),R.saveSignedInUserTenants(gs(Y.tenantsBaseInOrder)),h!=null&&Ue(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{p==="In-Progress"&&y(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),M(F.TENANT_FETCHING),M(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[p,j,D,N]);const re=v.useRef(!1);v.useEffect(()=>{!re.current&&p==="Completed"&&N&&(re.current=!0,function(a=Ws,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],Z=Js[m];Z!=null?Z().then(()=>K(()=>d(s+1))).catch(()=>K(()=>d(s+1))):d(s+1)};K(()=>d(0))},H)}())},[p,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ne=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),oe=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,le=Pe&&!C,Me=xs(A?.loggedInUserRoleMap),we=r.externalConnections?.accounting[0]?.isValid,ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,me=de&&hs(A?.loggedInUserRoleMap),ue=ye&&!C,Ge=r.company!=null&&js(r.company),$e=Ce&&Ge===!0&&!C,ze=oe&&Us(A?.loggedInUserRoleMap),Ye=le&&Hs(A?.loggedInUserRoleMap),Je=ue&&Rs(A?.loggedInUserRoleMap),We=bs(A?.loggedInUserRoleMap),qe=Ds(A?.loggedInUserRoleMap),E=fs(A?.loggedInUserRoleMap),I=ys(A?.loggedInUserRoleMap),g=Cs(A?.loggedInUserRoleMap),T=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),_e=oe&&T,Ae=de&&x,Qe=ue&&E,Xe=$e&&I,Ke=le&&g,es=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Be===!0||Me===!0||We===!0||qe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(ce===!0||ee&&!ie)&&we===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||ce!==!1||ie||ee?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Ss,{children:e.jsxs(t,{element:e.jsx(zs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(In,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(an,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(qs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:es||P?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Ks,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ne||Ze?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(ln,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(En,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(An,{})}),e.jsx(t,{path:"address/*",element:ze||me||Je||Ye?e.jsx(Qs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Qe?e.jsx(rn,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:Xe?e.jsx(on,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(mn,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&C===!1?e.jsx(un,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(t,{path:"vendors/*",element:ke?e.jsx(sn,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ae?e.jsx(be,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ae?e.jsx(be,{}):e.jsx(b,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Fe?e.jsx(tn,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:Ke?e.jsx(cn,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:q?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:q?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:q?e.jsx(pn,{isFileUploadEnabled:Le}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):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 In=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:M})=>O===!0&&U?e.jsx(c,{to:"checking"}):M===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?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"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(hn,{tenantEmailDomain:O}):S?e.jsx(xn,{tenantEmailDomain:O}):U?e.jsx(jn,{tenantEmailDomain:O}):V?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(gn,{tenantEmailDomain:O}):e.jsx(f,{}),gn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Tn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),xn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,Nn as default};
|