@zeniai/web-app-ui 5.1.19-qa → 5.1.20-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-BXMIlSTb.js +1 -0
- package/dist/assets/AddressScreen-CjLQE8F3.js +9 -0
- package/dist/assets/{AiCfoScreen-CuzxWz_S.js → AiCfoScreen-COG2flaI.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-B3t0yngo.js → BillPayApprovalRoutes-cecdJlYU.js} +1 -1
- package/dist/assets/{BillPayRoutes-DpbVMcmn.js → BillPayRoutes-CWmCSCXV.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-JQs-1sFZ.js → BusinessVerificationPageScreen-ow69Wdnb.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-CDHTUBYy.js → ChargeCardRoutes-BQjkBvaR.js} +10 -10
- package/dist/assets/{CompanyPassportScreen-Ch2epTwN.js → CompanyPassportScreen-wGuw6nrC.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DpRUq6ze.js → ConnectionAuthScreen-BRBF64cO.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BzDYbX94.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DcIv-DzY.js → CustomerOnboardingRoutes-DhgfvMTb.js} +4 -4
- package/dist/assets/{DashboardRoutes-DxpU77bI.js → DashboardRoutes-B8YORLtS.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BfT17Gvw.js → DefaultTenantHome-C_SB_0pi.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-avYzSuvB.js → DomesticWireDetailScreen-B0I-XVOq.js} +3 -3
- package/dist/assets/DrawerScreen-C28AzR-_.js +1 -0
- package/dist/assets/EntityDetailRoutes-DpBE8R0L.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-BcHDBHiv.js → ExpenseAutomationRoutes-CjvhJSRR.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BAmTzzrj.js → FeaturePreviewScreen-CNpXIisp.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-B23SvUNt.js → HubSpotOAuthCallbackScreen-CtNFNtZf.js} +1 -1
- package/dist/assets/MagicLinkRoutes-Ctd9-k7o.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BimKVzfO.js +12 -0
- package/dist/assets/{MobileAppDrawer-naJjFnDb.js → MobileAppDrawer-BPTcRRBp.js} +1 -1
- package/dist/assets/NotFoundScreen-B__1dupq.js +1 -0
- package/dist/assets/{NotificationRoutes-Bq8VJmwT.js → NotificationRoutes-B6VxXPmE.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CLwgo45N.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-CDkULALB.js → PandLWithForecastRoutes-BzI7Jnag.js} +1 -1
- package/dist/assets/{PeopleRoutes-KHinGLfv.js → PeopleRoutes-HH2apdxr.js} +1 -1
- package/dist/assets/PerformanceRoutes-81OvqD2T.js +1 -0
- package/dist/assets/{Preview-WyBDjHSN.js → Preview-CVswbusF.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BEBX4IUV.js → QBOConnectionScreen-1sg28M5z.js} +1 -1
- package/dist/assets/ReferralListScreen-CDv4r3zP.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-B0rpTNP9.js → ReimbursementApprovalRoutes-DAnacrd-.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BCvdld9V.js → ReimbursementApprovalRuleDetailScreen-UB01OSuZ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-D1EKDj2K.js → ReimbursementRoutes-BudlAJyL.js} +1 -1
- package/dist/assets/{ReportsRoutes-DlfuOJMm.js → ReportsRoutes-CWs4_ChN.js} +1 -1
- package/dist/assets/RewardsRoutes-BvO8B7Zb.js +1 -0
- package/dist/assets/{ScreenRoutes-CPffc7sR.js → ScreenRoutes-zrmKnyw0.js} +2 -2
- package/dist/assets/{SettingsRoutes-CSNnKonU.js → SettingsRoutes-BfCDh5la.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DhzTJYKJ.js → SetupPagesScreen-CGvclNp8.js} +1 -1
- package/dist/assets/{SignInScreen-CsNpygic.js → SignInScreen-C22I5CRo.js} +1 -1
- package/dist/assets/{SignOutScreen-BIdV_C0Q.js → SignOutScreen-BToYQbTA.js} +1 -1
- package/dist/assets/{TaskListScreen-CbpezfGT.js → TaskListScreen-CPXhJGMg.js} +2 -2
- package/dist/assets/{TaskRoutes-CRmENGlB.js → TaskRoutes-D0U1evnV.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-BCi51su3.js → TransactionDetailRoutes-CTPQlClN.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DzFJFnkS.js → TransactionDetailScreen-BMJ9pcvt.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Di58L4DD.js → TransactionListRoutes-CKZKgDMw.js} +1 -1
- package/dist/assets/TreasuryRoutes-DzeUslRt.js +37 -0
- package/dist/assets/{VendorsRoutes-SLQunhqi.js → VendorsRoutes-LEgPzpGO.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-Cze1njel.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BfEURRIG.js → ZeniAccountRoutes-CzRdD1-H.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-LZ2-VOHt.js +9 -0
- package/dist/assets/{accountMappingHelper-BN803kfl.js → accountMappingHelper-DSYys5zM.js} +1 -1
- package/dist/assets/{analytics-Bt-6aSwp.js → analytics-RHZXXukl.js} +1 -1
- package/dist/assets/{analyticsHelper-yc2vJb1S.js → analyticsHelper-B48RdZxU.js} +1 -1
- package/dist/assets/{core-DA33MFkN.js → core-Cu9_V7DI.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Dp2pNC7r.js → decodeURIComponentSafe-DwKi2VH1.js} +1 -1
- package/dist/assets/{dnd-vhylj_Eh.js → dnd-cSRmPjhK.js} +1 -1
- package/dist/assets/{empty-BkOHZhZ_.js → empty-Dh9k7Mlu.js} +1 -1
- package/dist/assets/{empty-C3vQ9p7W.js → empty-H4DS2HhT.js} +1 -1
- package/dist/assets/{emptyVideoElement-DqXx_3iz.js → emptyVideoElement-C8hpwYyz.js} +1 -1
- package/dist/assets/{epic-DOohCIB-.js → epic-Cf6_0VZK.js} +1 -1
- package/dist/assets/getLocaleForTenant-CQ6kIMFQ.js +1 -0
- package/dist/assets/{index-B0KYqmOA.js → index-BXA-O4AL.js} +1 -1
- package/dist/assets/{index-CAgO0fyi.js → index-BaDODbvC.js} +9900 -9888
- package/dist/assets/{index-BIecxFT-.js → index-C7WXzlOi.js} +1 -1
- package/dist/assets/{index-BDGZBSxD.js → index-C8Sg0_Jq.js} +1 -1
- package/dist/assets/{index-C10P_vbj.js → index-DPX9rfvS.js} +1 -1
- package/dist/assets/{index-Dd3yljav.js → index-DrYfTQW_.js} +1 -1
- package/dist/assets/{index-CLexxx1X.js → index-J0IBMNGj.js} +1 -1
- package/dist/assets/{index-Daus_KEs.js → index-Tpz76u84.js} +2 -2
- package/dist/assets/{lexical-CvOa6Yk0.js → lexical-B-UHoQhE.js} +1 -1
- package/dist/assets/{liveblocks-DENVUg9q.js → liveblocks-1RWQirWE.js} +1 -1
- package/dist/assets/{lottie-BT3ic1mv.js → lottie-qz5T1VFo.js} +1 -1
- package/dist/assets/{mui-D6faDY4H.js → mui-D8xl37lU.js} +1 -1
- package/dist/assets/{pathToGoBack-Dpj_uhjQ.js → pathToGoBack-CS9uZra5.js} +1 -1
- package/dist/assets/{pdf-DcKpVBQA.js → pdf-Dny5wh2o.js} +4 -4
- package/dist/assets/{pdf-lib-BChZu1hi.js → pdf-lib-CxZmdrsT.js} +1 -1
- package/dist/assets/{plaid-WpCusSjr.js → plaid-CM1lGBpq.js} +1 -1
- package/dist/assets/{pusher-BxdG568H.js → pusher-BYJa2T8d.js} +1 -1
- package/dist/assets/{react-BIK8RdLM.js → react-B9GoOkzp.js} +1 -1
- package/dist/assets/{react-CP7WlKlB.js → react-BbJn2EQe.js} +1 -1
- package/dist/assets/{react-cBSmH1hl.js → react-CErU_1yP.js} +1 -1
- package/dist/assets/{react-GQ6ntsPB.js → react-CITkb_ne.js} +1 -1
- package/dist/assets/{react-CvIqlY8S.js → react-H_61_T3L.js} +1 -1
- package/dist/assets/{react-BHVVGiJF.js → react-dY49GOzE.js} +1 -1
- package/dist/assets/{recharts-Cqn7-bzR.js → recharts-DFGRflCT.js} +1 -1
- package/dist/assets/{routePaths-li_k_voj.js → routePaths-fc5DDlJm.js} +1 -1
- package/dist/assets/{sentry-BAjw0qw4.js → sentry-LUgCZnRx.js} +1 -1
- package/dist/assets/{url-C_Ezxzjh.js → url-BkSN4Ht6.js} +1 -1
- package/dist/assets/{url-Ckuey0dJ.js → url-N3s043Uw.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-xRdY9uIS.js → useAiCfoDashboardSuggestedQuestionsChips-BjonjuyY.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BoysBhZD.js +1 -0
- package/dist/assets/{useDeviceId-BDljgxSq.js → useDeviceId-Cuegkfr2.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CUw4ci1w.js → useInitialThreadRequest-BggytmMN.js} +1 -1
- package/dist/assets/{utils-sY58mrq9.js → utils-C0WjER8w.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bv5QqHdk.js → withTransactionSidePanel-Cts5wE1j.js} +2 -2
- package/dist/assets/{zeni-epic-state-PjsyjhMR.js → zeni-epic-state-C-Iw-Pw8.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-BGLDekgt.js +0 -1
- package/dist/assets/AddressScreen-DqPYWg9M.js +0 -9
- package/dist/assets/CustomerOnboardingAuthScreen-Cx-dvQml.js +0 -1
- package/dist/assets/DrawerScreen-B8TxbRqf.js +0 -1
- package/dist/assets/EntityDetailRoutes-FF-eobJW.js +0 -1
- package/dist/assets/MagicLinkRoutes-CbGsnLVK.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-B4sMirTJ.js +0 -12
- package/dist/assets/NotFoundScreen-YtiZH5DD.js +0 -1
- package/dist/assets/OAuthConsentScreen-D_hYt32m.js +0 -1
- package/dist/assets/PerformanceRoutes-CqpQ2aAq.js +0 -1
- package/dist/assets/ReferralListScreen-DJHO4P5A.js +0 -5
- package/dist/assets/RewardsRoutes-D9uUstPx.js +0 -1
- package/dist/assets/TreasuryRoutes-9Ch4Tf-E.js +0 -37
- package/dist/assets/WiseConfirmationScreen-BfumPBOp.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BjghPGLW.js +0 -9
- package/dist/assets/getLocaleForTenant-ChawDfM5.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Dtxt7fE2.js +0 -1
package/dist/assets/{CustomerOnboardingRoutes-DcIv-DzY.js → CustomerOnboardingRoutes-DhgfvMTb.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-1RWQirWE.js";import{t as Ke,A as Ce}from"./AddressScreen-CjLQE8F3.js";import $e from"./NotFoundScreen-B__1dupq.js";import{a as g}from"./sentry-LUgCZnRx.js";import{h as oe,g as se,u as ie,i as re,j as A,N as E,n as ce,l as ze,o as Me,p as z}from"./core-Cu9_V7DI.js";import{n as de,k as le,z as B,v as ue,h as qe,T as _,m as V,r as J,c as N,B as ve,e as Y,ap as Qe,J as Ze,aq as Ie,i as te,ar as He,as as ke,o as Je,at as We,au as Ee,av as Ye}from"./index-BaDODbvC.js";import{bn as Xe,eP as ee,fg as et,e_ as pe,eY as me,bt as tt,mU as at,fc as nt,bO as ot,ji as ae,jl as we,JU as st,bT as it,c2 as ge,su as fe,sf as rt,Ko as X,sv as _e,HM as ct,km as Ue,Kp as Ve,Kq as dt,Kr as lt,Ks as ut,jg as pt,jj as mt,sh as Be,st as gt,bE as Te,cv as ft,sH as xe,qo as ht,qc as yt,ke as St,fE as bt,fD as Ct,fC as It,Kt as kt,s9 as Et,sI as Tt,sL as xt,sO as Ot,sU as Pt,cT as Dt}from"./zeni-epic-state-C-Iw-Pw8.js";import{n as he}from"./mui-D8xl37lU.js";import{g as At,h as Ft,q as ne}from"./QBOConnectionScreen-1sg28M5z.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./empty-H4DS2HhT.js";import"./pdf-lib-CxZmdrsT.js";import"./index-DPX9rfvS.js";import"./url-N3s043Uw.js";import"./index-DrYfTQW_.js";import"./decodeURIComponentSafe-DwKi2VH1.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="77f90106-4f4a-4880-893c-2a7d7eeeaaf8",t._sentryDebugIdIdentifier="sentry-dbid-77f90106-4f4a-4880-893c-2a7d7eeeaaf8")}catch{}})();const jt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Qe),vt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,S]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),f=Xe(i),{useFeatureGate:m}=ue(),k=qe(),{isFeatureEnabled:T}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),K=C||U&&f,c=A(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,O=A(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const v=pe(F,c),P=me(c),D=[],Q=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,$=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),w=b?.resources?.find(l=>l.resource==="/bills")==null&&!M,q=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&D.push("top_expenses"),$===!1&&D.push("task_card"),w===!1&&D.push("bill_pay_card","bill_pay_promo_card"),q===!1&&D.push("reimbursement_card","reimbursement_promo_card"),I===!1&&D.push("zeni_accounts_promo_card"),h===!1&&D.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||v||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,D)))},[d,O,v,P,i,c.tenantId,s]),g.useEffect(()=>{(v||P)&&setTimeout(()=>{S(!0)},5e3)},[v,P]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(v)return a.jsx(E,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(E,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(J,{analytics:N,onLoad:l=>(Z=>Z.trackPageLoaded(Y.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:K,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(ve,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=he.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
5
|
-
`,Pe=
|
|
5
|
+
`,Pe=he.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
align-items: center;
|
|
@@ -16,8 +16,8 @@ import{j as a}from"./liveblocks-DENVUg9q.js";import{t as Ke,A as Ce}from"./Addre
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
${t=>t.windowSize!=="small"?"overflow: auto;":""}
|
|
19
|
-
`,De=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),S=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:S??""},n=ee(t),i=
|
|
19
|
+
`,De=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),S=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:S??""},n=ee(t),i=fe(t,s),f=Ve(t),m=ge(d?.userRole??[])&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",k=dt(t.userRoleConfigState);return{onboardingCustomerView:i,analytics:N,isRefreshingViewInBackground:!1,isDisabled:m,companyTitles:k.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:We.fileMicroServiceBaseUrl,authParams:e},signedInUser:B.getSignedInUser(),currentTenant:d,isAdmin:u,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:f,isCardPaymentPopupOpen:!1,stripeKey:te.stripeKey}},function(t,o){const{companyId:s,currentTenant:u,themeState:d,navigate:r,location:p}=o,{tenantEmailDomain:S}=u;return{onFetchLinkTokenClick:(e,n)=>{t(Pt(e,n))},onEstablishConnectionClick:(e,n)=>{t(Ot(e,n))},onUpdatePaymentAccountStatus:(e,n,i)=>{t(xt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(Tt(!1,e,n))},onEstablishConnectionSuccess:()=>{t(Et(s,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),ne.handleClick()},updateQBOPopupState:e=>{t(X({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(i=>{const{officerType:f,userId:m,name:k,email:T,ssn:x,nationalityCountryCode:I,dob:h,phone:U,syncToken:C,selectDocument:F,role:K,ownership:c,isSelectedForVerification:L,userVerificationStatus:j,fileIds:R,isPhoneVerified:O}=i;let b;return F.selectDocumentType==="driverLicense"?b="driving_license":F.selectDocumentType==="passport"?b="passport":F.selectDocumentType==="stateId"?b="id_document":F.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:f,userId:m,firstName:k.firstName,lastName:k.lastName,email:T,ssn:x,nationalityCountryCode:I?.selectedOption!=null?Ee(I.selectedOption):void 0,phone:U,birthday:h!=null?Te(h?.toString()):h,syncToken:C,titleAtCompany:K.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:b,isSelectedForVerification:L,userVerificationStatus:j,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(xe({officers:n}))},onGetOtp:(e,n)=>{t(It(e,"CustomerOnboarding")),n!=null&&t(kt({officerType:n,phone:e}))},onResendOtp:e=>{t(Ct(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(bt(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(St({files:e}))},onDeleteFile:e=>{t(yt(e))},onEditFileName:(e,n)=>{t(ht(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:i,companyIndustryType:f,companyLegalName:m,companyTaxId:k,companyWebsite:T,companyPhone:x,primaryContactEmail:I,primaryContactName:h,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:K,typeOfIncorporation:c,stateOfIncorporation:L,incDate:j,companySourceOfFunds:R,companySourceOfFundsDescription:O,companySubIndustry:b,countriesOfOperations:G,purposeOfAccount:v,purposeOfAccountDescription:P,regulatedStatus:D,regulatedStatusDescription:Q,transactionVolume:$,transactionVolumeDescription:M,usNexus:w,usNexusTypes:q}=e,l={companyId:s,companyDescription:n,companyIndustry:i.selectedOption,companyIndustryType:f?.selectedOption??"",companyLegalName:m,taxIdOrEIN:k,website:T!=""&&T!=null?ft(T):void 0,phone:x,syncToken:F,fileIds:K,incDate:j!=null?Te(j?.toString()):j,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:R?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:b?.selectedOption??"",countriesOfOperations:G?.selectedOptions.map(H=>H.length===2?H:Ee(H))??[],purposeOfAccount:v?.selectedOption??"",purposeOfAccountDescription:P,regulatedStatus:D??"",regulatedStatusDescription:Q,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:M,usNexus:w,usNexusTypes:q?.selectedOptions??[]},Z={userId:U,firstName:h.firstName,lastName:h.lastName,email:I,syncToken:C};t(xe({companyDetails:l,primaryContactDetails:Z}))},onAddressClick:(e,n)=>{const i=Ae(S,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onRegisteredAddressClick:(e,n)=>{const i=Ae(S,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onUpdateCustomerView:(e,n,i)=>{t(gt(s,!1,n,i,e))},onAddressEditHandler:e=>{if(e!=null){const n=Ke(e);t(Ue({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);t(Be(s,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(_e({step:e}))},onZeniLogoClick:()=>{d.toggle()},handleLogOutClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleCreateCardSetupIntent:e=>{t(we(e))},handleConfirmCardSetupIntent:e=>{t(mt(e))},updateCardPaymentModalState:e=>{t(X({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,i)=>{t(pt(e,n,i))},handleFetchPaymentSources:()=>{t(ae())},resetCardPaymentViewState:()=>{t(ut())},handleResetCardPaymentErrorStatuses:()=>{t(lt())},redirectToProductSuitePage:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r(`/${S}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})}}})(He),W=({taxCFOCustomer:t=!1,isOnAddressPage:o=!1,appContent:s})=>{const u=oe(),d=se(),r=ie(),p=Ze(),S=de(),[e,n]=g.useState(!1),[i,f]=g.useState(!1),[m,k]=g.useState(!1),{tenantEmailDomain:T}=re(),x=le(),{useFeatureGate:I}=ue(),{isFeatureEnabled:h}=I(_.isDebitCardFeatureEnabled),U=ze("/:tenantEmailDomain/onboarding")!==null&&d.search?.includes("code"),C=A(y=>y.onboardingCustomerViewState.fetchState),F=A(y=>y.onboardingCustomerViewState.currentStep),K=A(y=>y.onboardingCustomerViewState.uiState),c=A(y=>ee(y)),L=A(y=>y.userRoleConfigState.fetchState),j=A(y=>y.cardPaymentViewState),R=Ie(j.addCardPaymentSourceStatus.fetchState),O=j.addCardPaymentSourceStatus.fetchState,{code:b,realmId:G,state:v}=At(d.search),P=c.externalConnections?.accounting[0],D=P?.connectionType,Q=P?.connectionName,$=P?.connectionId??"",M=B.getSignedInUser()?.userId??"";g.useEffect(()=>{i||(f(!0),r(ae()))},[i,r]),g.useEffect(()=>{m||(we(["card"]),k(!0))},[m]),g.useEffect(()=>{R==="In-Progress"&&O==="Completed"&&r(ae())},[R,O]),g.useEffect(()=>{Ft(b,G,v,$,M)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(st(c.tenantId,{connection_type:D??"accounting",connection_name:Q??"quickbooks_online",authorization_code:b,realm_id:G,connection_id:$,user_id:M},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(G,$),u(d.pathname))},[b,G,v,d.pathname,C]),g.useEffect(()=>{ne.isInitiated===!1&&C==="Completed"&&ne.init("/onboarding/auth",c.tenantEmailDomain)},[C]);const w=c.companyId??B.getSignedInUserTenant(T)?.companyId,q=ge(c?.userRole??[]),l=A(y=>fe(y,w));g.useEffect(()=>{e||C!=="Not-Started"||w==null||(n(!0),r(rt(w,!0,!U)))},[e,C,w]),g.useEffect(()=>{c.externalConnections?.saveConnectionState!=="Completed"&&c.externalConnections?.saveConnectionState!=="Error"||!K.isQBOPopupOpen||F!=="qbo_connection"||r(X({isQBOPopupOpen:!1}))},[c.externalConnections?.saveConnectionState]),g.useEffect(()=>{C==="Completed"&&U&&(r(_e({step:"qbo_connection"})),r(X({isQBOPopupOpen:!0})))},[U,C]),g.useEffect(()=>{L==="Not-Started"&&r(ct(!0))},[L,r]);const Z=Ie(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&Z==null&&r(Ue({addressType:"company_registered_address",addressToCreate:l.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[l.companyDetailsLocalData?.addressStatus?.addressToCreate,l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const H=l.isInterimEmailSent;if(B.getSignedInUser()==null)throw Error("Can't access onboarding flow without signing in...");const Le=pe(h,c),Re=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,Se=y=>y.trackPageLoaded(Y.Event.onboardingPage),be=c.productSettings.isOtherProductsEnabled,Ge=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!be)return Ge?a.jsx(E,{to:"../../treasury"}):Le?a.jsx(E,{to:"../../checking"}):Re?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"});const y=l.updateStatus.fetchState==="In-Progress";if(be&&!y)return t?a.jsxs(Oe,{children:[a.jsx(J,{analytics:N,onLoad:Ne=>Se(Ne)}),a.jsx(De,{navigate:u,location:d,companyId:w,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:S,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]}):a.jsx(E,{to:"../../onboarding/thankyou"})}else if(ye===!1&&x?.loggedInUserRoleMap!=null)return H===!0?a.jsx(E,{to:"../../onboarding/thankyou"}):a.jsxs(Oe,{children:[a.jsx(J,{analytics:N,onLoad:y=>Se(y)}),a.jsx(De,{navigate:u,location:d,companyId:w,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:S,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]});return null};function Ae(t,o,s){let u=`/${t}/onboarding/address`;return u=s!=null?u.concat(`/edit/${o}/${encodeURIComponent(s)}`):u.concat(`/new/${o}`),u}const Fe=he.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100vh;
|
|
22
22
|
background-color: ${t=>t.theme.colors.grey4};
|
|
23
|
-
`,je=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=
|
|
23
|
+
`,je=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=fe(t,s),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,o){const{currentTenant:s,themeState:u,navigate:d,location:r}=o,{tenantEmailDomain:p}=s;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const S=V(r.state?.pathnameStackToGoBack,r.pathname);d("/signout",{replace:!0,state:{pathnameStackToGoBack:S,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleUpdatePaymentAddressDetailClick:()=>{const S=V(r.state?.pathnameStackToGoBack,r.pathname);d(`/${p}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:S,message:"UpdatePaymentAddressDetail"}})}}})(Ye),wt=()=>{const t=oe(),o=ie(),s=se(),u=de(),{useFeatureGate:d}=ue(),{isFeatureEnabled:r}=d(_.isDebitCardFeatureEnabled),{tenantEmailDomain:p}=re(),S=le(),[e,n]=g.useState(!1);g.useEffect(()=>{e===!1&&s.state?.message==="OnboardingThankyou"&&n(!0)},[s.state]);const i=A(h=>ee(h)),f=i.productSettings.isOtherProductsEnabled;g.useEffect(()=>{o(Be(m,!1,!f))},[]);const m=i.companyId??B.getSignedInUserTenant(p)?.companyId;if(S.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const k=pe(r,i),T=me(i),x=A(h=>h.onboardingCustomerViewState.updateStatus.fetchState),I=i.company?.companyOnboardingInfo.isOnboardingCompleted;return I!==!0||f?x==="Completed"&&I===!0&&f&&S?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(J,{analytics:N,onLoad:h=>{h.trackPageLoaded(Y.Event.onboardingLandingPage,"Onboarding",Dt(i.productSettings))}}),a.jsx(je,{navigate:t,showUpdatePaymentDetailButton:f,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):x==="Completed"&&I===!1&&S?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(J,{analytics:N,onLoad:h=>{h.trackPageLoaded(Y.Event.onboardingInterimPage)}}),a.jsx(je,{navigate:t,showUpdatePaymentDetailButton:f,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(ve,{fetchState:x}):k?a.jsx(E,{to:"../../checking"}):T?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"})};function oa(){return a.jsxs(Me,{children:[a.jsx(z,{path:"/",element:a.jsx(W,{})}),a.jsx(z,{path:"/billing/edit",element:a.jsx(W,{taxCFOCustomer:!0})}),a.jsx(z,{path:"/thankyou",element:a.jsx(wt,{})}),a.jsx(z,{path:"/activation",element:a.jsx(vt,{})}),a.jsx(z,{path:"/address/edit/:addressType/:addressId",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(z,{path:"/address/new/:addressType",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(z,{path:"*",element:a.jsx($e,{})})]})}export{oa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-DENVUg9q.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-DA33MFkN.js";import{eP as U,KJ as Xe,bE as sa,bq as xe,LW as In,i6 as Tn,LX as Nt,LY as xn,i9 as bt,LZ as Qe,L_ as Dn,ie as wn,L$ as $t,M0 as Fn,ij as Ct,M1 as He,M2 as On,cl as St,M3 as Pn,M4 as Mn,L1 as Rn,jc as Bn,M5 as jn,bn as Ge,M6 as ra,Kx as ce,bc as ia,jq as ca,n2 as la,j9 as da,Kz as le,Ky as ee,eO as ua,eU as Ln,fq as kt,M7 as Un,M8 as Gn,M9 as ma,Ma as Re,um as Ye,un as Ve,uK as De,uE as de,ur as Ne,Mb as Yn,Mc as Vn,Md as Nn,Me as pa,Mf as Be,Mg as $n,dE as Je,qY as ha,Mh as zn,Mi as Kn,Mj as qn,Mk as yt,JW as At,jG as we,uS as vt,r4 as Zn,Ml as Qn,uo as zt,q$ as Ie,qX as fa,Mm as ge,Mn as Hn,Mo as Et,JV as It,sY as ga,Mp as Wn,Mq as Xn,Mr as Jn,Ms as Tt,t9 as eo,Mt as to,uq as Kt,sX as ba,Mu as be,Mv as ao,bt as Ca,uW as ka,Mw as no,Mx as oo,My as so,Mz as xt,uR as ro,MA as io,up as qt,uV as _a,MB as Ce,MC as co,MD as lo,ME as Sa,jv as ya,m$ as Aa,jA as va,mZ as Ea,mY as Ia,mX as Ta,sk as uo,fg as mo,cN as po,cO as ho,mU as fo,fc as go,n9 as bo,D_ as Zt,MF as Co,MG as ko,MH as _o,MI as So,b5 as et,f4 as yo,gR as Ao,fG as vo,n3 as Eo,j2 as Io,n0 as To,m_ as xo,e_ as Do,eY as wo}from"./zeni-epic-state-PjsyjhMR.js";import{z as j,a2 as ae,n as D,c as x,D as q,aU as Fo,_ as $e,Z as ze,aV as xa,e as N,aW as Oo,k as _e,aX as Da,v as Se,I as R,h as Po,aY as Mo,aZ as Ro,W as wa,j as Fa,a as Oa,Y as Bo,a_ as jo,T as Lo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Uo,b2 as Go,aq as Yo,p as Vo,X as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-CAgO0fyi.js";import{n as Dt}from"./mui-D6faDY4H.js";import{a as b}from"./sentry-BAjw0qw4.js";import{w as ja}from"./withTransactionSidePanel-Bv5QqHdk.js";import{c as La,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-li_k_voj.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-Dtxt7fE2.js";import Ue from"./NotFoundScreen-YtiZH5DD.js";import{u as Ft}from"./useInitialThreadRequest-CUw4ci1w.js";import{t as Ua}from"./analyticsHelper-yc2vJb1S.js";import{C as Zo}from"./CompanyPassportScreen-Ch2epTwN.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-xRdY9uIS.js";import{F as Ho}from"./FeaturePreviewScreen-BAmTzzrj.js";import{R as Wo}from"./ReferralListScreen-DJHO4P5A.js";import"./recharts-Cqn7-bzR.js";import"./analytics-Bt-6aSwp.js";import"./plaid-WpCusSjr.js";import"./dnd-vhylj_Eh.js";import"./stripe-DMRn4zHo.js";import"./lottie-BT3ic1mv.js";import"./lexical-CvOa6Yk0.js";import"./pdf-DcKpVBQA.js";import"./utils-sY58mrq9.js";import"./TransactionDetailScreen-DzFJFnkS.js";import"./decodeURIComponentSafe-Dp2pNC7r.js";import"./MobileAppDrawer-naJjFnDb.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]="ef03e5ba-0de2-4a7e-9c8f-069b8f49dfbc",e._sentryDebugIdIdentifier="sentry-dbid-ef03e5ba-0de2-4a7e-9c8f-069b8f49dfbc")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>U(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),L=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=La({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:L,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>U(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=La({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>U(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.div`
|
|
1
|
+
import{j as d}from"./liveblocks-1RWQirWE.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-Cu9_V7DI.js";import{eP as U,KJ as Xe,bE as sa,bq as xe,LW as In,i6 as Tn,LX as Nt,LY as xn,i9 as bt,LZ as Qe,L_ as Dn,ie as wn,L$ as $t,M0 as Fn,ij as Ct,M1 as He,M2 as On,cl as St,M3 as Pn,M4 as Mn,L1 as Rn,jc as Bn,M5 as jn,bn as Ge,M6 as ra,Kx as ce,bc as ia,jq as ca,n2 as la,j9 as da,Kz as le,Ky as ee,eO as ua,eU as Ln,fq as kt,M7 as Un,M8 as Gn,M9 as ma,Ma as Re,um as Ye,un as Ve,uK as De,uE as de,ur as Ne,Mb as Yn,Mc as Vn,Md as Nn,Me as pa,Mf as Be,Mg as $n,dE as Je,qY as ha,Mh as zn,Mi as Kn,Mj as qn,Mk as yt,JW as At,jG as we,uS as vt,r4 as Zn,Ml as Qn,uo as zt,q$ as Ie,qX as fa,Mm as ge,Mn as Hn,Mo as Et,JV as It,sY as ga,Mp as Wn,Mq as Xn,Mr as Jn,Ms as Tt,t9 as eo,Mt as to,uq as Kt,sX as ba,Mu as be,Mv as ao,bt as Ca,uW as ka,Mw as no,Mx as oo,My as so,Mz as xt,uR as ro,MA as io,up as qt,uV as _a,MB as Ce,MC as co,MD as lo,ME as Sa,jv as ya,m$ as Aa,jA as va,mZ as Ea,mY as Ia,mX as Ta,sk as uo,fg as mo,cN as po,cO as ho,mU as fo,fc as go,n9 as bo,D_ as Zt,MF as Co,MG as ko,MH as _o,MI as So,b5 as et,f4 as yo,gR as Ao,fG as vo,n3 as Eo,j2 as Io,n0 as To,m_ as xo,e_ as Do,eY as wo}from"./zeni-epic-state-C-Iw-Pw8.js";import{z as j,a2 as ae,m as D,c as x,D as q,aU as Fo,_ as $e,r as ze,aV as xa,e as N,aW as Oo,k as _e,aX as Da,v as Se,T as R,h as Po,aY as Mo,aZ as Ro,O as wa,J as Fa,a as Oa,Y as Bo,a_ as jo,H as Lo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Uo,b2 as Go,aq as Yo,p as Vo,X as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-BaDODbvC.js";import{n as Dt}from"./mui-D8xl37lU.js";import{a as b}from"./sentry-LUgCZnRx.js";import{w as ja}from"./withTransactionSidePanel-Cts5wE1j.js";import{c as La,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-fc5DDlJm.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import Ue from"./NotFoundScreen-B__1dupq.js";import{u as Ft}from"./useInitialThreadRequest-BggytmMN.js";import{t as Ua}from"./analyticsHelper-B48RdZxU.js";import{C as Zo}from"./CompanyPassportScreen-wGuw6nrC.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-BjonjuyY.js";import{F as Ho}from"./FeaturePreviewScreen-CNpXIisp.js";import{R as Wo}from"./ReferralListScreen-CDv4r3zP.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./TransactionDetailScreen-BMJ9pcvt.js";import"./decodeURIComponentSafe-DwKi2VH1.js";import"./MobileAppDrawer-BPTcRRBp.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]="706766a4-5d1e-48d1-bcc3-7ac1ae9b45ab",e._sentryDebugIdIdentifier="sentry-dbid-706766a4-5d1e-48d1-bcc3-7ac1ae9b45ab")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>U(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),L=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=La({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:L,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>U(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=La({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>U(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-1RWQirWE.js";import{a as u}from"./sentry-LUgCZnRx.js";import{u as y,j as b,n as w,g as A,N}from"./core-Cu9_V7DI.js";import{Jo as U,eP as _,fo as k,Jp as L,mW as R,Jq as z}from"./zeni-epic-state-C-Iw-Pw8.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import{t as P}from"./getLocaleForTenant-CQ6kIMFQ.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.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]="41e106af-3673-4a62-ade2-778b7b9350fc",t._sentryDebugIdIdentifier="sentry-dbid-41e106af-3673-4a62-ade2-778b7b9350fc")}catch{}})();const q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(q,{})}const J=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],Q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of J)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-avYzSuvB.js → DomesticWireDetailScreen-B0I-XVOq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-1RWQirWE.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-Cu9_V7DI.js";import{Nq as k,Nx as q,fE as W,fD as J,fC as K,iD as M,Ky as Y,qf as L,eP as D,MY as V,iB as T,Nr as v,NA as F,iz as G,iW as N}from"./zeni-epic-state-C-Iw-Pw8.js";import{bu as Q,J as j,v as R,z as U,h as z,p as b,T as S,B as O,bv as X,o as Z,bw as ee,m as te}from"./index-BaDODbvC.js";import{n as H}from"./mui-D8xl37lU.js";import"./sentry-LUgCZnRx.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]="ea400c9a-1725-4e34-a152-040658974aff",e._sentryDebugIdIdentifier="sentry-dbid-ea400c9a-1725-4e34-a152-040658974aff")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(K(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(Q);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-DENVUg9q.js";import{h as w,g as C,j as h,n as A,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
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=V(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(
|
|
9
|
+
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(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(N(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=b(a.state?.pathnameStackToGoBack),i=s.poppedPathname??P();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(F({data:i}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=b(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??P(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(X);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=j(),{vendorId:s,billId:i}=B(),d=e??s,{useFeatureGate:r}=R(),c=U.getSignedInUser(),p=h(u=>D(u)),g=z(),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(_,{vendorId:d,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:p,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return E(e,"ach",t,n)}function Se(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
10
|
display: flex;
|
|
11
11
|
height: 100vh;
|
|
12
12
|
width: 100%;
|
|
@@ -15,4 +15,4 @@ import{j as l}from"./liveblocks-DENVUg9q.js";import{h as w,g as C,j as h,n as A,
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
17
|
box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ie=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(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:i}=t,{tenantEmailDomain:d}=i;return{onFetchBankName:r=>{e(
|
|
18
|
+
`,ie=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(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:i}=t,{tenantEmailDomain:d}=i;return{onFetchBankName:r=>{e(N(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:c}=r;e(F({data:c}))},onCancel:()=>{(()=>{const r=b(o.state?.pathnameStackToGoBack),c=r.poppedPathname??$();a(c,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(d,r,n),p=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:p}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=b(t.location.state?.pathnameStackToGoBack),c=r.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=j(),{vendorId:s,billId:i}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:c}=R(),p=z(),g=h(u=>D(u)),x=b(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.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(O,{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:d,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,_ as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-1RWQirWE.js";import{J as f,x as l,h as c}from"./index-BaDODbvC.js";import{D as p}from"./mui-D8xl37lU.js";import"./sentry-LUgCZnRx.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]="6914df4e-18ee-4d16-860e-ba01e5fdbcff",e._sentryDebugIdIdentifier="sentry-dbid-6914df4e-18ee-4d16-860e-ba01e5fdbcff")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{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{h as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-1RWQirWE.js";import{a as d}from"./sentry-LUgCZnRx.js";import{h as A,u as B,g as F,i as L,j as l,N as q,n as K,o as N,p as _}from"./core-Cu9_V7DI.js";import{LF as z,eP as O,L2 as R,kG as H,HE as k,LK as M,Kx as W,jG as Y,HF as S,L7 as $,L8 as V,Kz as J,Ky as Q}from"./zeni-epic-state-C-Iw-Pw8.js";import{aR as U,c as X,p as Z,m as tt}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import{d as b}from"./decodeURIComponentSafe-DwKi2VH1.js";import{w as et}from"./withTransactionSidePanel-Cts5wE1j.js";import{f as at,c as nt}from"./routePaths-fc5DDlJm.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import"./TransactionDetailScreen-BMJ9pcvt.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]="7d2107b6-c0a9-464f-b4eb-e851d019af2a",a._sentryDebugIdIdentifier="sentry-dbid-7d2107b6-c0a9-464f-b4eb-e851d019af2a")}catch{}})();const ot=K(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:Y(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(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),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??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=L(),r=b(x??""),p=b(j??""),f=rt(r,p),w=[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")),G=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(H(i)))},[m,f,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,v=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),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BcHDBHiv.js → ExpenseAutomationRoutes-CjvhJSRR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-1RWQirWE.js";import Rn from"./NotFoundScreen-B__1dupq.js";import{a,b as wt}from"./sentry-LUgCZnRx.js";import{n as Fe,S as Dn}from"./mui-D8xl37lU.js";import{u as de,h as Pt,g as Ge,j as F,n as Un,i as rt,o as Fn,p as ze}from"./core-Cu9_V7DI.js";import{eP as Re,Q7 as Bn,n4 as ke,fj as _n,qS as Vn,nm as xt,nH as Rt,Q8 as Dt,nR as Mn,Q9 as Ut,nf as jn,qo as On,f3 as fe,Qa as De,sR as Ft,C2 as Bt,Qb as _t,Qc as zn,pY as qe,LG as dt,LI as Ln,jJ as Qn,LJ as $n,jQ as Gn,cV as qn,tW as Je,ns as Vt,nW as Ue,Qd as Jn,Kz as ut,Ky as we,Qe as mt,k5 as Yn,Qf as Kn,Qg as Nn,Qh as Hn,Qi as Wn,nz as Zn,nk as ue,nZ as Pe,Qj as Xn,Qk as ea,Ql as ta,o4 as na,jU as aa,jL as oa,Qm as sa,jT as ht,LQ as ca,Qn as ia,Qo as la,pU as ra,pw as da,nX as le,pv as Le,Qp as ua,Qq as ma,Qr as ha,lo as pa,bq as ga,lj as pt,l5 as Ca,Qs as Sa,gT as gt,fU as Ia,lg as fa,vP as ka,Qt as Ea,ov as va,oq as ya,ou as ba,of as Aa,Qu as Ta,f6 as Mt,nK as wa,nv as Pa,fk as Ct,n$ as xa,Qv as Ra,nY as jt,Qw as Da,Qx as Ua,Qy as Fa,Qz as Ba,QA as St,q4 as _a,pm as Va,Kx as Ma,jS as ja,QB as Oa,GA as za,jR as La,jG as Qa,f5 as $a,oW as Ot,pe as Ga,nV as It,n_ as qa,bE as Ja,ld as Ya,la as Ka,QC as Na,oe as ft,pc as kt,pa as Ha,o$ as Wa,oG as Za,pd as Xa,QD as eo,QE as to,oK as no,QF as ao,oA as oo,oJ as so,oH as co,ph as io}from"./zeni-epic-state-C-Iw-Pw8.js";import{v as zt,T as re,c as z,m as H,X as Lt,_ as Qt,cE as lo,z as Be,cF as ro,at as xe,cG as uo,aT as Et,B as $t,cH as mo,aq as Qe,D as ho,cI as po,a2 as go,cJ as Co,O as So,cK as Io,cL as fo,n as ko,k as Eo,aN as vo,b7 as yo,x as bo,cM as Ao}from"./index-BaDODbvC.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{c as vt,C as To}from"./TransactionDetailScreen-BMJ9pcvt.js";import{w as wo}from"./withTransactionSidePanel-Cts5wE1j.js";import{h as Po,v as xo}from"./routePaths-fc5DDlJm.js";import{g as $e}from"./accountMappingHelper-DSYys5zM.js";import{D as Ro}from"./DrawerScreen-C28AzR-_.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./decodeURIComponentSafe-DwKi2VH1.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="69221236-0892-4410-a51e-8c7f3d18dad6",t._sentryDebugIdIdentifier="sentry-dbid-69221236-0892-4410-a51e-8c7f3d18dad6")}catch{}})();const Do=()=>{const t=de(),i=Pt(),A=Ge(),f=F(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=F(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Uo,{children:C.jsx(lo,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:_,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Uo=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-1RWQirWE.js";import{a as r}from"./sentry-LUgCZnRx.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import c from"./NotFoundScreen-B__1dupq.js";import{h as u,g as b}from"./core-Cu9_V7DI.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 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-LUgCZnRx.js";import{u as l,h as f,g as m}from"./core-Cu9_V7DI.js";import{gA as p,JM as g,JN as _}from"./zeni-epic-state-C-Iw-Pw8.js";import{u as b,L as h,z as y}from"./index-BaDODbvC.js";import"./liveblocks-1RWQirWE.js";import"./recharts-DFGRflCT.js";import"./mui-D8xl37lU.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.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]="c3143327-0e0d-4fc6-83b3-9f591aea766a",e._sentryDebugIdIdentifier="sentry-dbid-c3143327-0e0d-4fc6-83b3-9f591aea766a")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-1RWQirWE.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-Cu9_V7DI.js";import{JF as k,JG as v,JH as T,zF as z,zr as J,JI as B,JJ as oe,JK as se,zv as ie,eW as $,zC as le,zz as re}from"./zeni-epic-state-C-Iw-Pw8.js";import{J as g,o as r,W as de,c as j,i as G,Z as ce,p as me,V as pe,m as M,v as ue,T as he,Q as xe,n as ge,h as fe,q as be,B as we,r as Se,R as ye,S as ke,s as ve,x as je,U as $e}from"./index-BaDODbvC.js";import{n as m}from"./mui-D8xl37lU.js";import f from"./NotFoundScreen-B__1dupq.js";import{a as I}from"./sentry-LUgCZnRx.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.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]="4ffa3b9f-95e7-42cd-9f7b-0de4802b3745",e._sentryDebugIdIdentifier="sentry-dbid-4ffa3b9f-95e7-42cd-9f7b-0de4802b3745")}catch{}})();const Ie=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(J(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(z(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const ze=m.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,Be=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(ze,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(J(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=x(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Je(){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(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Me=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,Ve=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
|
+
`,We=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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,He=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,Ke=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),V=n.pathname.includes("address"),b=g(),W=ge(),D=fe(),w=be(),H=()=>{W.toggle()},K=E(u=>k(u)),U=E(u=>v(u)),{authParams:_,fetchState:c,billAttachment:Q,billFetchState:A,companyName:R,currencySymbol:Z,amount:q}=K,{tenantId:P,userId:L,sessionId:N}=_,{fetchState:O,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(f,{}):O==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),Z,q))(u)}),t.jsxs(Ve,{windowSize:b,children:[b!=="small"?t.jsx(Me,{onClick:H}):null,t.jsx(He,{windowSize:b,isAddressPage:V,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ke,{file:Q,type:"bill"})}),t.jsx(We,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(_e,{})}),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(Je,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-1RWQirWE.js";import{a as g}from"./sentry-LUgCZnRx.js";import{u as U,g as w,h as _,s as J,j as l,N as T}from"./core-Cu9_V7DI.js";import{z as r,h as P,D as A,d as M,c as V,e as N,j as R,R as W,g as q}from"./index-BaDODbvC.js";import{eP as B,Jq as $,JA as G,Jr as H,eW as K,fn as Q,Jw as X,fL as Y,cT as Z,JB as ee,JC as te}from"./zeni-epic-state-C-Iw-Pw8.js";import{n as ne}from"./mui-D8xl37lU.js";import{u as se}from"./useDeviceId-Cuegkfr2.js";import{f as ae}from"./analyticsHelper-B48RdZxU.js";import{t as ie}from"./getLocaleForTenant-CQ6kIMFQ.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="229ebe31-a40e-404b-9b19-3c3f17e71ab0",t._sentryDebugIdIdentifier="sentry-dbid-229ebe31-a40e-404b-9b19-3c3f17e71ab0")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=w(),m=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),b=l(e=>$(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=q();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.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(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
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{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as U}from"./liveblocks-1RWQirWE.js";import{a as c}from"./sentry-LUgCZnRx.js";import{u as pe,j as s,i as Je,g as We,h as Ke,l as M}from"./core-Cu9_V7DI.js";import{eP as he,e$ as Qe,f0 as Se,eT as Xe,bn as ea,eO as aa,f1 as ta,f2 as na,f4 as sa,f7 as oa,fg as ia,f8 as g,fa as ra,fb as ue,fe as da,fc as la,fd as ca,ff as ua,cJ as fa,fi as ma,cO as ba,bt as pa,eS as ha,fn as Sa,fo as ga,fm as Ea}from"./zeni-epic-state-C-Iw-Pw8.js";import{a7 as ka,a8 as Ca,n as ya,v as Ia,z as k,q as Ta,u as wa,T as r,a9 as Aa,aa as _a,k as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Pa,ag as Ma,ah as be,c as R,$ as Ra,m as A,ai as N,aj as Na}from"./index-BaDODbvC.js";import{D as Ua}from"./mui-D8xl37lU.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]="28ab1040-b6b5-4b58-9a68-69d5bfff5b05",f._sentryDebugIdIdentifier="sentry-dbid-28ab1040-b6b5-4b58-9a68-69d5bfff5b05")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Je(),a=We(),C=ya(),o=Ke(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),O=k.getSignedInUser(),_=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,x=s(e=>aa(e)),j=x.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,H),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabledV2),W=J||q&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Pe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),K=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,J,q,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(xe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,H,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,qe=Ba(Ze);return U.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ga,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:qe,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=K===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Na(e.type);be(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Ee(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:x,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ha=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Ha as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-1RWQirWE.js";import{h as r,n}from"./core-Cu9_V7DI.js";import{F as i}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import"./sentry-LUgCZnRx.js";import"./zeni-epic-state-C-Iw-Pw8.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="5c5889c8-57e3-45ae-9448-30e7686263ec",o._sentryDebugIdIdentifier="sentry-dbid-5c5889c8-57e3-45ae-9448-30e7686263ec")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-1RWQirWE.js";import lt from"./NotFoundScreen-B__1dupq.js";import{a as k}from"./sentry-LUgCZnRx.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-Cu9_V7DI.js";import{cr as St,f1 as K,eP as X,ff as bt,f8 as b,Q2 as O,fb as d,f0 as y,ra as M,wq as It,Q3 as Ct,e$ as Tt,fi as yt,rf as _t,Q4 as $,bq as F,gT as x,rj as J,Q5 as Et,cC as At,cw as Nt}from"./zeni-epic-state-C-Iw-Pw8.js";import{X as Bt,z as wt,v as xt,T as Rt,_ as vt,cB as Dt,m as N,a7 as Pt,cC as Ut,a8 as Gt,p as $t}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.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]="c38c2f4a-60fe-4c49-8b34-62c963ec1aff",t._sentryDebugIdIdentifier="sentry-dbid-c38c2f4a-60fe-4c49-8b34-62c963ec1aff")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=X(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:B,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ut)),Qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,R]=k.useState(!1),a=S(e=>K(e)),o=S(e=>X(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),Q=S(e=>b(e).currentTab),v=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),D=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Dt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:C,isFetchingMore:P,fetchMore:ot}=ct(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(Q!==i&&i!=null&&s(O(i)),i==null){const e=`../${Q}`,p=N(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(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=_||P===!0||C!==!0||_||P===!0||C!==!0;k.useEffect(()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,D]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&q===!1&&w!=null&&V!=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),E=p.map(f=>f.id),it=p.map(f=>{const G=V.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,P,W,C,z,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];v==="all"?E.push("read","unread"):v!=="mentions"&&E.push(v),s(M("task_manager",T,E,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(H,{path:"/:selectedTab",element:A.jsx(Qt,{})}),A.jsx(H,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-1RWQirWE.js";import{a as r}from"./sentry-LUgCZnRx.js";import{u as P,g as A,j as o,N as j}from"./core-Cu9_V7DI.js";import{JP as C,eP as J,f7 as R,JQ as x,JR as z,JS as D,JT as L,mW as M,IL as N}from"./zeni-epic-state-C-Iw-Pw8.js";import{z as h,N as I}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.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]="cd83cd86-1de4-4f11-9d23-a47f8df2bd2e",n._sentryDebugIdIdentifier="sentry-dbid-cd83cd86-1de4-4f11-9d23-a47f8df2bd2e")}catch{}})();function ee(){const n=P(),s=A(),{params:t,error:i}=r.useMemo(()=>C(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=>J(e)),d=o(e=>R(e)),l=o(e=>e.tenantState.fetchState),y=o(x),S=o(z),c=o(D),[v,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[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&&(l!=="Not-Started"&&l!=="Error"||(g.current=!0,n(M(a.userId,a.zeniSessionId??void 0))))},[f,a,l,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&d.some(T=>T.tenantId===e)?e:d.length===1?d[0].tenantId:null},[p?.tenantId,d]),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:l!=="Completed",tenants:d,selectedTenantId:u,onSelectTenant:b,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|