@zeniai/web-app-ui 5.1.65-prod → 5.1.66-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DEXYkqV1.js +1 -0
- package/dist/assets/{AddressScreen-DBh2kopg.js → AddressScreen-D8kv1hF_.js} +2 -2
- package/dist/assets/AiCfoScreen-BrNLceCE.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CvKgF8Ok.js +1 -0
- package/dist/assets/BillPayRoutes-DYswIHAT.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-YVk91Fzz.js +9 -0
- package/dist/assets/CardsAiCfoScreen-BO5V838O.js +14 -0
- package/dist/assets/ChargeCardRoutes-BZOF502-.js +71 -0
- package/dist/assets/CompanyPassportScreen-CPKfXmmb.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Cv-HiaYb.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DdX8BaLn.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CKdlHWlk.js +30 -0
- package/dist/assets/{DashboardRoutes-CvxLfoR-.js → DashboardRoutes-CopaUmWi.js} +4 -4
- package/dist/assets/DefaultTenantHome-eT4t7R06.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Cbmuyang.js +18 -0
- package/dist/assets/DrawerScreen-CCxq1yzF.js +1 -0
- package/dist/assets/EntityDetailRoutes-DK7l7FnA.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C3RWrFV-.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BuXd4W0P.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-D1enkInm.js +1 -0
- package/dist/assets/MagicLinkRoutes-BSRFSffK.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BSh1nXKM.js +12 -0
- package/dist/assets/{MobileAppDrawer-qPZdyrO4.js → MobileAppDrawer-BIP1MEKX.js} +1 -1
- package/dist/assets/NotFoundScreen-DY1Wwus4.js +1 -0
- package/dist/assets/NotificationRoutes-6rN7RQjW.js +1 -0
- package/dist/assets/OAuthConsentScreen-BqL6PD1E.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-AcF3aqCk.js +1 -0
- package/dist/assets/PeopleRoutes-DPUTbQp_.js +22 -0
- package/dist/assets/PerformanceRoutes-Cn4Ovnir.js +1 -0
- package/dist/assets/{Preview-Dk_ia_hl.js → Preview-DDPGc7EO.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DMhJk96k.js → QBOConnectionScreen-BEQPddK1.js} +1 -1
- package/dist/assets/ReferralListScreen-CQycV-0F.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-Ch3sYOOh.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BJZRYRum.js +1 -0
- package/dist/assets/ReimbursementRoutes-CgQPRNMh.js +68 -0
- package/dist/assets/ReportsRoutes-CQztdl9E.js +1 -0
- package/dist/assets/RewardsRoutes-B0jOOo8W.js +1 -0
- package/dist/assets/ScreenRoutes-D7kpFxVk.js +2 -0
- package/dist/assets/SettingsRoutes-CdvEgvyN.js +57 -0
- package/dist/assets/SetupPagesScreen-Dh6d6vu-.js +29 -0
- package/dist/assets/SignInScreen-FuVo71JP.js +1 -0
- package/dist/assets/SignOutScreen-DJh4f2Aj.js +9 -0
- package/dist/assets/TaskListScreen-CnT3FhwB.js +9 -0
- package/dist/assets/TaskRoutes-BlDolQ3c.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C2XNyTUH.js +1 -0
- package/dist/assets/TransactionDetailScreen-Ch_kEoMB.js +5 -0
- package/dist/assets/TransactionListRoutes-CAZZrQj-.js +1 -0
- package/dist/assets/TreasuryRoutes-BQCtQUx_.js +37 -0
- package/dist/assets/{VendorsRoutes-Hio5Sfl7.js → VendorsRoutes-BGB3F2EZ.js} +27 -27
- package/dist/assets/WiseConfirmationScreen-BSryCvdh.js +12 -0
- package/dist/assets/ZeniAccountRoutes-D-szpn5h.js +73 -0
- package/dist/assets/ZeniAccountStatementScreen-BORtLhU4.js +9 -0
- package/dist/assets/{accountMappingHelper-BJc8FF-F.js → accountMappingHelper-SrHoNEDL.js} +1 -1
- package/dist/assets/{analytics-7_b07CgE.js → analytics-CkLW7NeW.js} +1 -1
- package/dist/assets/{analyticsHelper-DGI02sYS.js → analyticsHelper-BsiU5y2K.js} +1 -1
- package/dist/assets/{core-C1GB7aB-.js → core-Crl6eqZl.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-okum9C8e.js → decodeURIComponentSafe-DwYiSzjo.js} +1 -1
- package/dist/assets/dnd-tE28jHT7.js +6 -0
- package/dist/assets/{empty-DcVAbZV4.js → empty-BpRPQOis.js} +1 -1
- package/dist/assets/{index-D934ejNp.js → empty-C7ggsb2s.js} +1 -1
- package/dist/assets/{emptyVideoElement-2r8hCQGV.js → emptyVideoElement-BvjVfzOS.js} +1 -1
- package/dist/assets/epic-Qgvh4PH7.js +2 -0
- package/dist/assets/getLocaleForTenant-DiFaMSxg.js +1 -0
- package/dist/assets/{index-CJkoGhEu.js → index-B5it1rE5.js} +1 -1
- package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
- package/dist/assets/index-BdlPaglK.js +1 -0
- package/dist/assets/{index-DwUJQ44f.js → index-Bs_5Wou0.js} +2 -2
- package/dist/assets/{index-D4_FYu1h.js → index-CJknvk0s.js} +33673 -28214
- package/dist/assets/index-CZNTdKXM.js +1 -0
- package/dist/assets/{index-DgOeAv6K.js → index-Cg0vsa8G.js} +1 -1
- package/dist/assets/{index-Cgq5e8kx.js → index-D5ItYKRr.js} +1 -1
- package/dist/assets/{index-DcSDyNQG.js → index-Dvok4kj_.js} +1 -1
- package/dist/assets/{lexical-Dcuk4Yua.js → lexical-Bm_vZOjC.js} +1 -1
- package/dist/assets/{liveblocks-Dx9GJaKJ.js → liveblocks-B5ZW-VBI.js} +1 -1
- package/dist/assets/{lottie-MYbVFail.js → lottie-hSeCd_VX.js} +1 -1
- package/dist/assets/{mui-S6TXegyD.js → mui-U77PQnc2.js} +1 -1
- package/dist/assets/{pathToGoBack-CYxRwoYN.js → pathToGoBack-BWWNiH76.js} +1 -1
- package/dist/assets/{pdf-BijcgxIK.js → pdf-DDcPh2pm.js} +4 -4
- package/dist/assets/{pdf-lib-DXIgr0ip.js → pdf-lib-ImawEH2S.js} +1 -1
- package/dist/assets/{plaid-nqaFvQD8.js → plaid-TCRHScH1.js} +1 -1
- package/dist/assets/{pusher-Dwxn49q9.js → pusher-CimMrDFu.js} +1 -1
- package/dist/assets/{react-0X27mp_1.js → react-BUcjX1FU.js} +1 -1
- package/dist/assets/{react-BKDInzaa.js → react-BghKQeK_.js} +1 -1
- package/dist/assets/{react-ClmE3BGe.js → react-DdRuig8o.js} +1 -1
- package/dist/assets/{react-CtohstEB.js → react-DyFf3w8Z.js} +1 -1
- package/dist/assets/{react-BmdAxlR-.js → react-DzBjlQkv.js} +1 -1
- package/dist/assets/{react-BK9aeab9.js → react-z5kfbX38.js} +1 -1
- package/dist/assets/{recharts-DgDFrpbv.js → recharts-e5u-LCPv.js} +3 -3
- package/dist/assets/{routePaths-dZ-9-pnI.js → routePaths-jWP9zfXs.js} +1 -1
- package/dist/assets/{sentry-i8uQ0afM.js → sentry-BxWyF9h9.js} +1 -1
- package/dist/assets/{url-B7pK2_FE.js → url-DTS3WRFG.js} +1 -1
- package/dist/assets/{url-DUqjNyjV.js → url-jBDeguac.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CgykUI65.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-BAtYgUWq.js +1 -0
- package/dist/assets/useCashManagementBanner-CRbG3Xtj.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-Dq1SGHUY.js +1 -0
- package/dist/assets/{useDeviceId-AH1KsB1z.js → useDeviceId-BZa5m-bZ.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-CiGW-Jar.js +1 -0
- package/dist/assets/useInitialThreadRequest-DZr1J4rc.js +1 -0
- package/dist/assets/{utils-BGTnhJzp.js → utils-BjvWDnmB.js} +2 -2
- package/dist/assets/withTransactionSidePanel-DKnep6Xn.js +21 -0
- package/dist/assets/zeni-epic-state-DTyrT1Ga.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-CaAZUR1d.js +0 -1
- package/dist/assets/AiCfoScreen-0P2uyYnp.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-Bf6ESEC4.js +0 -1
- package/dist/assets/BillPayRoutes-JaK42ohp.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-yN_GrrFh.js +0 -9
- package/dist/assets/ChargeCardRoutes-DIGTV0Mu.js +0 -71
- package/dist/assets/CompanyPassportScreen-ioZCXwD_.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BjfktFq2.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Dzpz1U1f.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-Br-Z1BtF.js +0 -23
- package/dist/assets/DefaultTenantHome-GIFjQHwa.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DM1m923S.js +0 -18
- package/dist/assets/DrawerScreen-Bw0Jl3tu.js +0 -1
- package/dist/assets/EntityDetailRoutes-DpkUcZ1b.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-D1H-vOTZ.js +0 -25
- package/dist/assets/FeaturePreviewScreen-RdL9x4ht.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-ChOR5mQ9.js +0 -1
- package/dist/assets/MagicLinkRoutes-B0Bm7tIZ.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BSGPgcvY.js +0 -12
- package/dist/assets/NotFoundScreen-CLwfUXdC.js +0 -1
- package/dist/assets/NotificationRoutes-CsG2sL7b.js +0 -1
- package/dist/assets/OAuthConsentScreen-y-MvR-GE.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DhJIPrDf.js +0 -1
- package/dist/assets/PeopleRoutes-Bj5rMpkn.js +0 -22
- package/dist/assets/PerformanceRoutes-Dh41RQnX.js +0 -1
- package/dist/assets/ReferralListScreen-BTezTn63.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DMZ_8HxF.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-D4-WsBma.js +0 -1
- package/dist/assets/ReimbursementRoutes-CEmvBqU2.js +0 -68
- package/dist/assets/ReportsRoutes-DHk4zguu.js +0 -1
- package/dist/assets/RewardsRoutes-a_wmpytf.js +0 -1
- package/dist/assets/ScreenRoutes-DRJIZt7d.js +0 -2
- package/dist/assets/SettingsRoutes-C70whJIl.js +0 -57
- package/dist/assets/SetupPagesScreen-BN4AuJYP.js +0 -29
- package/dist/assets/SignInScreen-l-2YMbZy.js +0 -1
- package/dist/assets/SignOutScreen-Yt1oM0Fq.js +0 -9
- package/dist/assets/TaskListScreen-DHIOYmiB.js +0 -9
- package/dist/assets/TaskRoutes-PlhqIOO4.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Da9AxMSb.js +0 -1
- package/dist/assets/TransactionDetailScreen-DT8xA3x1.js +0 -5
- package/dist/assets/TransactionListRoutes-BukrAqP2.js +0 -1
- package/dist/assets/TreasuryRoutes-CoolddxK.js +0 -37
- package/dist/assets/WiseConfirmationScreen-CvwI66d8.js +0 -12
- package/dist/assets/ZeniAccountRoutes-Bdh4wUlu.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-C1LlIbPZ.js +0 -9
- package/dist/assets/dnd-BKLSY4Qp.js +0 -6
- package/dist/assets/empty-BAGbIBoq.js +0 -1
- package/dist/assets/epic-BFBt-3XZ.js +0 -2
- package/dist/assets/getLocaleForTenant-COPdXUFc.js +0 -1
- package/dist/assets/index-DFPmY4t1.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-zin4AQfk.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Zz8eSFW2.js +0 -1
- package/dist/assets/useInitialThreadRequest-BKY0Q6gT.js +0 -1
- package/dist/assets/withTransactionSidePanel-yGfWimRu.js +0 -21
- package/dist/assets/zeni-epic-state-BJXbyZuT.js +0 -13
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Dx9GJaKJ.js";import{h as Y,g as Q,u as X,i as G,j as E,N as R,n as W,s as Qe}from"./core-C1GB7aB-.js";import{bF as Xe,ck as Ie,NR as ye,eR as V,cw as en,yu as Z,yj as nn,O1 as tn,O4 as an,qL as ee,qz as ne,kg as te,sK as z,O6 as Ae,fG as $e,fF as Ge,fE as We,O7 as sn,yD as on,Cu as ke,Cl as _e,Ci as ve,C9 as K,Co as Pe,Cr as Ee,Cx as we,tc as Te,fV as cn,cr as rn,f0 as un,e_ as dn,e$ as ln,bt as pn,O8 as mn,Bb as le,BP as yn,O9 as fn,bG as gn,DK as pe,CO as Sn,Oa as bn,Ob as hn,DO as Cn,DS as In,sD as An,Ii as kn,En as Ce,Fo as me,Oc as _n,Od as vn,Oe as Pn,Of as He,Og as En,KM as wn,Ne as Tn,KY as Dn,Oh as qe,Oi as Be,EJ as Ke,ko as On,qC as Je,sM as Un,bE as je,sY as Re,cu as Fn,Oj as Ye,fj as Bn,E5 as Vn,E9 as xn,Ok as jn,Eq as Ne,Ol as Rn,Om as Nn,On as zn,Oo as Ln,fO as Mn,zO as Zn,Op as $n,zT as Gn,zS as Wn}from"./zeni-epic-state-BJXbyZuT.js";import{k as ae,a as ie,G as de,m as De,aN as J,z as w,v as se,d as T,B as Oe,f as $,bz as Hn,at as oe,bA as x,bB as qn,bC as Kn,af as xe,bD as Jn,q as ze,au as Le,J as Yn,y as Qn,bE as Xn,bF as et,bG as nt,a7 as tt}from"./index-D4_FYu1h.js";import{a as C}from"./sentry-i8uQ0afM.js";import{n as Ve,D as at,S as it}from"./mui-S6TXegyD.js";import{M as fe}from"./MobileAppDrawer-qPZdyrO4.js";import N from"./NotFoundScreen-CLwfUXdC.js";import{a as Me}from"./analyticsHelper-DGI02sYS.js";import{d as Ze}from"./routePaths-dZ-9-pnI.js";import{B as Fe}from"./BusinessVerificationPageScreen-yN_GrrFh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ffd631f8-b11d-4243-9a60-cbf73d2e5800",e._sentryDebugIdIdentifier="sentry-dbid-ffd631f8-b11d-4243-9a60-cbf73d2e5800")}catch{}})();const st=Ve.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
|
-
`,ot=W(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=tn(e),i=w.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=an(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(a))},onAcceptUpdatedTOSSuccess:()=>{e(Z(a,!0))},onGetOtp:(n,i)=>{e(We(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(z(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Hn),ct=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=Xe(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=ie(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),y=De(),{configValue:I}=s(J.zeniAccountsConfig),d=ye(I),[m,S]=C.useState(!1),v=C.useRef(!1),[g,f]=C.useState(!1),P=E(F=>F.billPaySetupViewState.fetchState),A=E(F=>V(F)),_=E(F=>F.billPaySetupApproverViewState.fetchState),b=A.companyId??w.getSignedInUserTenant(a)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const k=!!A.companyBillPayInfo?.info?.isBillPayTOSAccepted,h=en(c?.loggedInUserRoleMap);C.useEffect(()=>{v.current||P!=="Not-Started"||b==null?v.current||P!=="Completed"||b==null||A.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(v.current=!0,t(Z(b,!1,!0))):(v.current=!0,t(Z(b,!0)))},[P,b,t]),C.useEffect(()=>{g||_!=="Not-Started"||(f(!0),t(nn(!0)))},[g,_,t]);const D=F=>{S(F)};if(k===!1||h&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(R,{to:"../promo"});if(k===!0&&c?.loggedInUserRoleMap!=null){const F=O=>O.trackPageLoaded($.Event.billPaySetup);return u.jsxs(st,{children:[u.jsx(se,{analytics:T,onLoad:O=>F(O)}),u.jsx(fe,{isAppContentDrawerOpen:m,handleDrawerToggle:D}),u.jsx(ot,{navigate:e,location:o,companyId:b,currentTenant:A,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{D(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Nt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,zt=e=>`/${e}/cards`,Lt=e=>`/${e}/cards/setup`,Mt=e=>`/${e}/cards/onboard`,Zt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},$t=(e,o)=>e.find(t=>t.id===o),Gt=(e,o,t)=>!e||!o||t.fetchState==="Completed",rt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Wt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Ht=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:x(a.limit.amount),creditAccountAvailableAmount:x(a.available.amount),creditAccountSpentAmount:x(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:x(c.remainingAmountDue.amount)}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>x(n.accountBalance.available.amount)),debitCardsSpend:x(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Kt=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:x(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,Jt=80,Yt=80,Qt=e=>e.companyId??w.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,ut=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,dt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),Xt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,ea=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),lt=W(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=V(e),l=w.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:y,businessVerificationStatus:I}=o;return{onBusinessVerificationSectionClick:()=>{T.trackCardsVerifyIdentityCompanyDetailsClick(y,p,I?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onFetchLinkTokenClick:(d,m)=>{e(Te("charge_card_setup",d,m))},onEstablishConnectionClick:d=>{e(we(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,m,S)=>{e(Ee(d,m,"charge_cards","charge_card_setup",S))},onUpdatePaymentAccountLoginStatus:(d,m)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",m))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{T.trackCardsEnableCardsClick(y,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(K(a,"charge_cards")):i===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,m,S)=>{const v=n.allBankAccounts.find(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(f=>f.accountId===d);T.trackCardsZeniCashAccountChangeClick(y,p,{oldZeniCashAccount:v?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(S==="paymentAccount"?_e(d,m,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,m))},onUpdatePrimaryFundingAccount:(d,m)=>{const S=n.allFundingAccounts.find(f=>f.id===d),v=n.allFundingAccounts.findIndex(f=>f.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(f=>f.id===d)+1;T.trackCardsPaymentAccountChangeClick(y,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:S?.label??"",newPaymentAccountBalance:x(S?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:S?.accType==="depositAccount",oldPaymentAccountPosition:v,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,m))},onEnableChargeCardSuccess:()=>{e(fn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,m)=>{e(Ae({officerType:d,fileIds:m}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(z(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(z(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(z(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(te({files:d}))},onDeleteFile:d=>{e(ne(d))},onEditFileName:(d,m)=>{e(ee(d,m.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(yn(a,d))}}})(qn),pt=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=E(L=>V(L)),{useDynamicConfig:i,useFeatureGate:l}=ie(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(J.zeniAccountsConfig),{configValue:p}=i(J.zeniCardsConfig),y=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:I}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=l(de.isEarlyPayFeatureEnabled),S=E(L=>cn(L,n.companyId)),v=rn(S.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,P=un(I,n),A=ut({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:P}),_=dn(n),b=ln(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=dt({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:d,isBookKeepingTenant:b,isDebitCardProductVisible:A,chargeCardsCreditAccountLimit:k}),D=A&&h===!1,F=A===!1&&h,O=ye(r),B=pn(c?.loggedInUserRoleMap),ce=Ie(c?.loggedInUserRoleMap),[H,ge]=C.useState(!1),[q,re]=C.useState(!1),M=E(L=>L.chargeCardSetupViewState.fetchState),j=w.getSignedInUserTenant(a)?.companyId??n.companyId,U=w.getSignedInUser(),Ue=L=>{ge(L)},Se=E(L=>mn(L,j));if(U==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||M!=="Not-Started"||j==null?q||M!=="Completed"||j==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(j,!1,!0)):(re(!0),t(le(j,!0)))},[q,M,j,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=rt(h,A,f,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:()=>{T.trackPageLoaded($.Event.cardsSetupVisited),T.trackCardsCardSetupView(v,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:H,handleDrawerToggle:Ue}),u.jsx(lt,{autoPayThreshold:y,navigate:e,location:o,companyId:j,currentTenant:n,isEarlyPayEnabled:m,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:B,isDebitCardOnlyEnabled:D,isCreditCardOnlyEnabled:F,chargeCardSetUpView:Se,isCreditCardProductVisible:h,isDebitCardFeatureEnabled:A,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:f,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:v,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:ce,accountsPromoConfig:O})]}):u.jsx(Oe,{fetchState:"Not-Started"}):u.jsx(R,{to:"../promo"})},mt=Ve.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,yt=W(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=bn(e),i=hn(e,a),l=w.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,description:d}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(Cn(a)),T.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),ft=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),{useDynamicConfig:n}=ie(),i=De(),{configValue:l}=n(J.zeniAccountsConfig),s=ye(l),r=gn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[y,I]=C.useState(!1),d=C.useRef(!1),[m,S]=C.useState(!1),v=E(b=>b.remiSetupViewState.fetchState),g=E(b=>V(b)),f=E(b=>b.remiSetupApproverViewState.fetchState),P=w.getSignedInUserTenant(a)?.companyId??g.companyId,A=w.getSignedInUser(),_=b=>{I(b)};if(A==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||v!=="Not-Started"||P==null?d.current||v!=="Completed"||P==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(P,!1,!0))):(d.current=!0,t(pe(P,!0)))},[v,P,t]),C.useEffect(()=>{m||f!=="Not-Started"||(S(!0),t(Sn(!0)))},[m,f,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(R,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const b=k=>k.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(mt,{children:[u.jsx(se,{analytics:T,onLoad:k=>b(k)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:_}),u.jsx(yt,{navigate:e,location:o,companyId:P,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{_(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},gt=W(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=w.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=wn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Tn(e.companyConfigState),p=Dn(e.userRoleConfigState),y=a==="zeni_treasury"?qe(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:y}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:y,companyLegalName:I,companyTaxId:d,companyWebsite:m,companyPhone:S,primaryContactEmail:v,primaryContactName:g,primaryContactUserId:f,primaryContactSyncToken:P,syncToken:A,fileIds:_,incDate:b,typeOfIncorporation:k,stateOfIncorporation:h,sourceOfFunds:D,companySubIndustry:F,countriesOfOperations:O,companySourceOfFunds:B,companySourceOfFundsDescription:ce,transactionVolume:H,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:M,regulatedStatusDescription:j,usNexus:U,usNexusTypes:Ue}=s,Se=y?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:I,taxIdOrEIN:d,website:m!=""&&m!=null?Fn(m):void 0,phone:S,syncToken:A,fileIds:_,incDate:b!=null?je(b?.toString()):b,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",sourceOfFunds:D?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:O?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:B?.selectedOption??"",companySourceOfFundsDescription:ce,transactionVolume:H?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:M??"",regulatedStatusDescription:j,usNexus:U,usNexusTypes:Ue?.selectedOptions??[]},he={userId:f,firstName:g.firstName,lastName:g.lastName,email:v,syncToken:P};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:y,userId:I,name:d,email:m,nationalityCountryCode:S,ssn:v,dob:g,phone:f,syncToken:P,selectDocument:A,role:_,ownership:b,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:F}=p;let O;return A.selectDocumentType==="driverLicense"?O="driving_license":A.selectDocumentType==="passport"?O="passport":A.selectDocumentType==="stateId"?O="id_document":A.selectDocumentType==="ssnCard"&&(O="social_security_card"),{officerType:y,userId:I,firstName:d.firstName,lastName:d.lastName,email:m,ssn:v,nationalityCountryCode:S?.selectedOption!=null?Le(S.selectedOption):void 0,phone:f,birthday:g!=null?je(g?.toString()):g,syncToken:P,titleAtCompany:_.selectedOption,ownershipInCompany:b,documentTypeSelectedForVerification:O,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:s=>{e(z(t,s,a))},onSendForVerificationClick:s=>{e(z(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I={};y.forEach((d,m)=>{I[m]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I=Object.fromEntries(y.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onBackClick:()=>{e(Un({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onGetOtp:s=>{e(We(s,"SpendManagementSetup"))},onResendOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(On({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(Ke())},onOverlayClose:()=>{e(Be())}}})(Jn),St=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=Y(),c=Q(),n=X(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:y}=G(),I=ae(),{useDynamicConfig:d}=ie(),m=De(),{configValue:S}=d(J.zeniAccountsConfig),v=ye(S),g=E(h=>{switch(e){case"zeni_accounts":return h.zeniAccountSetupViewState.fetchState;case"reimbursement":return h.remiSetupViewState.fetchState;case"charge_cards":return h.chargeCardSetupViewState.fetchState;case"zeni_treasury":return h.treasurySetupViewState.fetchState;default:return h.billPaySetupViewState.fetchState}}),f=E(h=>h.companyConfigState.fetchState),P=E(h=>h.userRoleConfigState.fetchState),A=E(h=>V(h)),_=A.companyId??w.getSignedInUserTenant(y)?.companyId;if(C.useEffect(()=>{f==="Not-Started"&&n(An()),P==="Not-Started"&&n(kn(!0))},[f,P,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&_!=null)switch(p(!0),e){case"zeni_accounts":n(me(_,!0));break;case"zeni_treasury":n(Ce(_,!0));break;case"reimbursement":n(pe(_,!0));break;case"charge_cards":n(le(_,!0));break;default:n(Z(_,!0))}},[r,g,_,n]),w.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let b;switch(e){case"zeni_accounts":b=A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":b=A.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":b=A.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||A.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":b=A.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:b=A.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=E(h=>{let D;switch(e){case"zeni_accounts":D=En(h,_);break;case"zeni_treasury":D=He(h,_);break;case"charge_cards":D=Pn(h,_);break;case"reimbursement":D=vn(h,_);break;default:D=_n(h,_)}return D});return b===!1?null:k.fetchState==="Completed"&&b===!0&&I?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:h=>(D=>{switch(e){case"zeni_accounts":return D.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return D.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return D.trackPageLoaded($.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(h)}),u.jsx(gt,{businessVerificationDetails:k,navigate:a,location:c,companyId:_,analytics:T,currentTenant:A,productType:e,roleMap:I.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:v.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})},bt={overlayWidth:new Qn(100,100,59)},ht=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),i=w.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Ye(e,a),p=He(e,a),y=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",I=jn(e),d=I.transactions,m=qe(e),S=I.accountSummary?.totalBalance?.amount,v=d.length===0||S===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:m,isFirstTransfer:v,isDisabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(zn(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(Te("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(we(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(Ee(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(Pe(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?_e(s,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(z(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Ne(!1))}r===!0&&e(Ke())},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(Nn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(Rn(s))},onConfirmFundAllocation:()=>{e(Ne(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Be())}}})(Xn),Ct=()=>{const e=Y(),o=Q(),t=X(),a=De(),c=Yn(),{tenantEmailDomain:n}=G(),{useDynamicConfig:i}=ie(),l=ae(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:y}=i(J.zeniAccountsConfig),I=ye(y),[d,m]=C.useState(!1),[S,v]=C.useState(!1),[g,f]=C.useState(!1),[P,A]=C.useState(!1),[_,b]=C.useState(!1),k=E(U=>U.treasurySetupViewState.fetchState),h=E(U=>U.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),D=E(U=>U.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=E(U=>U.treasuryDetailState.transactionsState?.fetchState),O=E(U=>V(U)),B=w.getSignedInUserTenant(n)?.companyId??O.companyId,ce=E(U=>Ye(U,B)),H=ce.isAtomicAccountExists,ge=!!O.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=w.getSignedInUser(),re=U=>{m(U)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{S||k!=="Not-Started"||B==null||(v(!0),t(Ce(B,!0,!1)))},[S,k,B,t]),C.useEffect(()=>{g||h!=="Not-Started"||B==null||(f(!0),t(Bn()))},[g,h,B,t]),C.useEffect(()=>{P||D!=="Not-Started"||B==null||(A(!0),t(Vn()))},[P,D,B,t]),C.useEffect(()=>{_||F!=="Not-Started"||B==null||(b(!0),t(xn(!0)))},[_,F,B,t]);const M=O.companyTreasuryInfo?.info?.businessVerificationStatus?.code,j=M==="pending_review"||M==="verified";return C.useEffect(()=>{s||k!=="Completed"||H||j||!o.pathname.includes("setup")||r(!0)},[k,H,j]),O.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(R,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(at,{onClose:()=>{t(Be()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:bt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(It,{onClick:U=>U.stopPropagation(),children:u.jsx(St,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Be()),e("../setup")}})})}),u.jsx(ht,{navigate:e,location:o,companyId:B,currentTenant:O,isUserZeniAccountsAdmin:p,accountsPromoConfig:I,isAccountsEnabled:ge,isAllocationDone:H,analytics:T,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},It=Ve(it)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,At=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=w.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Ln(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Te("account_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"zeni_accounts","account_setup"):ve("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))}}})(et),kt=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=ie(),n=ae(),i=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),s=ye(l),[r,p]=C.useState(!1),[y,I]=C.useState(!1),d=E(f=>f.zeniAccountSetupViewState.fetchState),m=E(f=>V(f)),S=w.getSignedInUserTenant(a)?.companyId??m.companyId,v=w.getSignedInUser(),g=f=>{p(f)};if(v==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{y||d!=="Not-Started"||S==null?y||d!=="Completed"||S==null||m.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(S,!1,!0)):(I(!0),t(me(S,!0)))},[y,d,S,t]),m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(R,{to:"../promo"});{const f=P=>P.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:P=>f(P)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(At,{navigate:e,location:o,companyId:S,currentTenant:m,isUserZeniAccountsAdmin:i,accountsPromoConfig:s,onClickMenuIcon:()=>{g(!0)}})]})}},_t=Ve.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,vt=W(function(e,o){const t=V(e),a=w.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:$n(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:T}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Wn(a))},onSubmitClick:()=>{e(Gn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(te({files:a}))},onDeleteFile:a=>{e(ne(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ee(a,c.split(".")[0]))}}})(nt),Pt=()=>{const e=Y(),o=Q(),t=X(),[a,c]=C.useState(!1),[n,i]=C.useState(!1),[l,s]=C.useState(!1),{tenantEmailDomain:r}=G(),p=ae(),{useFeatureGate:y}=ie(),{isFeatureEnabled:I}=y(de.isBillPayLocalCurrencyFeatureEnabled),d=E(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),m=E(k=>k.billPaySetupViewState.fetchState),S=E(k=>V(k)),v=De(),g=S.companyId??w.getSignedInUserTenant(r)?.companyId,f=E(k=>Mn(k.companyState,S.companyId)),P=f?.company.companyBillPayInfo.internationalWireOnboardingStatus,A=P?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Zn(g)))},[a,d,g,t]),C.useEffect(()=>{n||m!=="Not-Started"||g==null||(i(!0),t(Z(g,!0)))},[m,n,g,t]),w.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const _=S.companyBillPayInfo?.info?.isBillPayTOSAccepted,b=k=>{s(k)};return _===!1?u.jsx(R,{to:"../promo"}):_===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(_t,{children:[u.jsx(se,{analytics:T,onLoad:k=>(h=>h.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(k)}),xe(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:b}):null,u.jsx(vt,{navigate:e,location:o,companyId:g,analytics:T,currentTenant:S,roleMap:p.loggedInUserRoleMap,isFormReadonly:A,isLocalCurrencyEnabled:I})]}):u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:v.colors.grey5}})},Et=W(function(){return{}},function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Z(t,!0,!0))}}}}})(tt(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:r}=e;switch(s){case"bill_pay":switch(r){case"verification":return o?u.jsx(Fe,{productType:s}):t?u.jsx(R,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(Pt,{}):t?u.jsx(R,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(ct,{}):t?u.jsx(R,{to:"../"}):u.jsx(N,{})}case"reimbursement":return r==="verification"?a?u.jsx(Fe,{productType:s}):u.jsx(N,{}):a?u.jsx(ft,{}):u.jsx(N,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Fe,{productType:"zeni_accounts"}):u.jsx(N,{}):c?u.jsx(kt,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(Ct,{}):u.jsx(N,{});case"charge_cards":return r==="verification"?i?u.jsx(Fe,{productType:"charge_cards"}):l?u.jsx(R,{to:"../"}):u.jsx(N,{}):i?u.jsx(pt,{}):l?u.jsx(R,{to:"../"}):u.jsx(N,{})}}));function na(e){const{tenantEmailDomain:o}=G(),t=E(c=>V(c)).companyId??w.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,i)=>{i.onEventReceived(c)}};if(w.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Et,{...e,companyId:t,...a})}export{Jt as A,Yt as P,na as S,Ht as a,Kt as b,ut as c,dt as d,rt as e,Qt as f,Zt as g,zt as h,Wt as i,qt as j,Xt as k,Gt as l,$t as m,Lt as n,Mt as o,Nt as p,ea as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-Dx9GJaKJ.js";import{a as u,b as T,q as A}from"./sentry-i8uQ0afM.js";import{u as D,h as z,j as l,g as M,N as O,n as j}from"./core-C1GB7aB-.js";import{u as P,z as s,m as F,d as E,D as K,e as N,f as _,R as B,g as J,x as R,h as v}from"./index-D4_FYu1h.js";import{eR as V,JY as Y,JZ as $,eY as q,fp as W,K2 as H,fN as Z,cS as G,K3 as b,K4 as Q,K5 as X,bT as y}from"./zeni-epic-state-BJXbyZuT.js";import"./mui-S6TXegyD.js";import{u as ee}from"./useDeviceId-AH1KsB1z.js";import{f as te}from"./analyticsHelper-DGI02sYS.js";import{t as ne}from"./getLocaleForTenant-COPdXUFc.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.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]="eebba266-1498-4a21-aa83-c63a2e24eef4",t._sentryDebugIdIdentifier="sentry-dbid-eebba266-1498-4a21-aa83-c63a2e24eef4")}catch{}})();const ae=j(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{A({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const c=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:i,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(Q(n,i)))},clearSignInError:()=>{t(b())}}})(R),ie=T.memo(ae);function ve({setTenantEmailDomain:t}){const a=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const i=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:x,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>V(e)),I=l(e=>Y(e)),m=M(),w=F().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants($(I.tenantsInOrder),o.zeniSessionId),q(o.userId,o.zeniSessionId,r.tenantId),a(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(H("Completed")),K.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Z().then(()=>{const e=J();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",G(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ie,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),x===!0&&k!=null?f.jsx(B,{onClose:()=>a(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Dx9GJaKJ.js";import{a}from"./sentry-i8uQ0afM.js";import{u,g as m,h as p,N as g}from"./core-C1GB7aB-.js";import{z as d,B as b,t as y,d as f,f as h}from"./index-D4_FYu1h.js";import{fS as x,fT as I,Kk as j}from"./zeni-epic-state-BJXbyZuT.js";import{n as w}from"./mui-S6TXegyD.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.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]="34705871-a2bd-4cee-9254-bbd7be911f41",e._sentryDebugIdIdentifier="sentry-dbid-34705871-a2bd-4cee-9254-bbd7be911f41")}catch{}})();function $(){const e=u(),t=m(),i=p(),n=a.useRef(!1),l=d.isSignedIn(),r=t.state?.message==="logout",o=r||l;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),j(),y.reset(),f.trackLogout(h.Event.logoutSuccess),f.resetUserIdentity()}catch(c){console.error("Error during sign out:",c)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(k,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const k=w.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{$ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Dx9GJaKJ.js";import{a as D}from"./sentry-i8uQ0afM.js";import{h as U,u as z,g as K,j as b,i as _,n as V}from"./core-C1GB7aB-.js";import{z as L,a as W,G as p,W as q,v as H,d as M,f as O,cT as Z,q as g,p as J}from"./index-D4_FYu1h.js";import{eR as Q,Rn as F,H3 as y,Ro as x,Rj as X,Gr as E,Rp as Y,Gz as S,FV as aa,H4 as I,Rq as R,gV as ea,GW as ta,G$ as sa,GO as oa,GM as B,H0 as na,GJ as ia,Rr as la,Rs as ra,Rt as ka,Ru as ca,Rv as m,ed as da,Rw as ua,Rx as pa}from"./zeni-epic-state-BJXbyZuT.js";import{n as ma}from"./mui-S6TXegyD.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{M as ga}from"./MobileAppDrawer-qPZdyrO4.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.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]="60fdf591-49d1-425d-9d26-8c0ed5e84669",e._sentryDebugIdIdentifier="sentry-dbid-60fdf591-49d1-425d-9d26-8c0ed5e84669")}catch{}})();const fa=ma.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Ga=V(function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:k}=t,n=k!=null&&k!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(k))})).filter(l=>l.tasks.length>0)}:o,d=X(e),i=L.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:k,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=k,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=w(i,a),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c}})},onReloadTasks:()=>{e(y(!0,d))},onTabChange:a=>{e(ca(a))},onParentTaskClick:a=>{const s=w(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(B(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(R({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(y(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=J(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(B(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ha(l,a);e(E({taskDetailLocalData:s}));const c=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(c,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(I({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(R({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(I({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(S(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(S(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(Z);function va(){const e=U(),t=z(),o=K(),k=L.getSignedInUser(),n=b(r=>Q(r)),{taskGroupId:d}=_(),{useFeatureGate:i}=W(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:c}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,$]=D.useState(!1),G=b(r=>F(r,l)),h=b(r=>r.taskGroupState),T=G.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:v}=Ta({mobileExploreReferrer:"Task Checklist"});if(q({isDataReady:T==="Completed"}),D.useEffect(()=>{t(y(!1,l))},[n?.tenantId,t,l]),D.useEffect(()=>{T==="Completed"&&t(x({taskGroupById:h.taskGroupById}))},[T,h.taskGroupById]),k==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[T==="Completed"?u.jsx(H,{analytics:M,onLoad:r=>(N=>N.trackPageLoaded(O.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{$(r)}}),u.jsx(Ga,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:h,localData:G.localData,uiState:G.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:c,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:j,onAskAiCfoClick:v})]})]})}const w=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ha=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{va as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Dx9GJaKJ.js";import se from"./NotFoundScreen-CLwfUXdC.js";import{a as c}from"./sentry-i8uQ0afM.js";import{h as M,u as Z,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-C1GB7aB-.js";import{G6 as O,G9 as le,G3 as de,eR as Q,Rj as Y,Gn as H,G0 as pe,GT as ue,GM as ke,Rk as W,Rl as z,FY as me,FV as fe,qL as ge,qz as he,kg as Se,Gh as Ge,Rm as Ie,Gy as Te,Gv as be,Gc as Ee,Gs as Ce,Gr as De}from"./zeni-epic-state-BJXbyZuT.js";import{z as C,cR as Re,Q as xe,a as ye,G as T,p as X,q as v,v as je,d as N,f as ve,cS as we,h as V,at as Fe}from"./index-D4_FYu1h.js";import{n as Be}from"./mui-S6TXegyD.js";import{u as Pe}from"./useInitialThreadRequest-BKY0Q6gT.js";import{M as Ue}from"./MobileAppDrawer-qPZdyrO4.js";import Le from"./TaskListScreen-DHIOYmiB.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.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]="4c94278d-93af-482a-901f-630d72655430",e._sentryDebugIdIdentifier="sentry-dbid-4c94278d-93af-482a-901f-630d72655430")}catch{}})();function $e(){const e=M(),t=Z(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Re,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=Q(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=Y(e),{tenantEmailDomain:D}=d,b=r.recurringSourceTaskId,R=b!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(b)}`:void 0;var G;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((G=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=G,_=Object.values(G)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:R,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>z(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ie({taskId:s}))},onDeleteTaskClick:()=>{e(Ge(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function j(){const e=M(),t=Z(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>Q(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:b}=a(T.isTaskGroupAssigneesEnabled),[R,G]=c.useState(!1),[p,J]=c.useState(!1),[F,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),I=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>Y(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(H(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(K(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(I.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(I.current){if(E==="Error")return x(!1),void(I.current=!1);if(E==="Completed"){x(!1),I.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else I.current=!0},[P,E,l,s,e]);const $=g(i=>W(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:N,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:R,handleDrawerToggle:i=>{G(i)}}),n.jsx(qe,{analytics:N,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:b})]})]})}const ze=Be.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,w=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(j,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Dx9GJaKJ.js";import i from"./NotFoundScreen-CLwfUXdC.js";import{T as r}from"./TransactionDetailScreen-DT8xA3x1.js";import"./sentry-i8uQ0afM.js";import{o as a,p as o}from"./core-C1GB7aB-.js";import"./zeni-epic-state-BJXbyZuT.js";import"./recharts-DgDFrpbv.js";import"./index-D4_FYu1h.js";import"./mui-S6TXegyD.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import"./decodeURIComponentSafe-okum9C8e.js";import"./routePaths-dZ-9-pnI.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]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as w}from"./liveblocks-Dx9GJaKJ.js";import{a as r}from"./sentry-i8uQ0afM.js";import{u as N,k as Je,j as h,t as Qe,g as he,h as ge,i as Se,N as Xe,n as Ke}from"./core-C1GB7aB-.js";import{mU as me,eR as J,fO as Ze,m5 as ea,m3 as aa,bn as ta,cO as ye,bs as Te,qj as G,La as $,Mb as be,Mc as ae,LA as Ee,jT as Ie,Md as ve,LF as te,LG as ne,kI as Ce,Ia as oe,L4 as M,jN as De,jL as ke,jX as na,mH as oa,Me as sa,Mf as ia,up as Y,jS as Ae,Hv as xe,cT as ra,cU as ca,Mg as la,L3 as da,Mh as ua,ul as ma,Mi as pa,Mj as fa,Mk as ha,Ml as ga,Mm as Sa,jW as ya,Mn as Ta,Mo as ba,L5 as Ea,Mp as Ia,Mq as va,Mr as Ca,Hp as Da,Hf as ka,HE as Aa,jY as xa,Ib as pe,mM as wa}from"./zeni-epic-state-BJXbyZuT.js";import{a as H,G as F,z as we,aN as Fe,m as Fa,J as Ua,aO as Pa,y as _a,p as Z,k as La,aP as Va,q as ee,W as Ba,aQ as Oa,d as Ue,aR as Ra,at as za,a2 as K}from"./index-D4_FYu1h.js";import{n as Ma,S as Na,D as ja}from"./mui-S6TXegyD.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{d as Pe}from"./decodeURIComponentSafe-okum9C8e.js";import{h as _e,c as Le,g as $a,e as Ha}from"./routePaths-dZ-9-pnI.js";import{t as qa}from"./utils-BGTnhJzp.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="7bf0667f-48d4-4da0-b2b2-6afe156ba5f0",a._sentryDebugIdIdentifier="sentry-dbid-7bf0667f-48d4-4da0-b2b2-6afe156ba5f0")}catch{}})();function Wa(a=!0){const e=N(),s=Je(),{useFeatureGate:t}=H(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ya(a,e){const s=function(){const l=N(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=H(),{configValue:U,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&U?.capitalization_enabled===!0,D=h(v=>J(v)),I=D.companyId,A=h(v=>Ze(v.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:P,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(v=>{const S=v.tenantState.currentTenantId,c=S!=null?v.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Qe),j=r.useCallback(v=>{if(!u||b==null||k!=null&&k>0)return;const S=b.accounts??[],c=new Set(v);let V=!1,C=!1;for(const x of S)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),O=r.useCallback(v=>{E!=null&&(l(ea(I,v,P,E)),f(!1),p(null))},[l,I,E,P]),L=r.useCallback(()=>{E!=null&&(l(aa(I,E)),f(!1),p(null))},[l,I,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:j,handleSubmit:O,handleDismiss:L}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ft(a,e){const s=N(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=h(y=>J(y)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ye(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,U=se(),T=r.useMemo(()=>({id:a,type:G(e)}),[a,e]),u=h(y=>$(y,T)),D=u?.transactionDetailUpdateStatus?.fetchState,I=u?.transactionDetailLocalData?.lineItemById,A=h(y=>{const W=$(y,T)?.transactionDetailLocalData.vendorUpdates?.id;return W==null?"Not-Started":y.transactionVendorViewState.editVendorStateById[W]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(y=>{if(b!=null)return be(y.customerIncomeState,y.vendorExpenseState,y.trendState,b,"month")}),P=h(y=>ae(y)),_=h(y=>{if(b!=null)return Ee(y.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,j=h(y=>Ie(y.accountState,y.accountListState,"accountList")),[O,L]=r.useState(!1),[v,S]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{L(!1),S(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{L(!1),S(!1)},[]),[x,R]=r.useState(!1),q=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(ve({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(O?v||k==null||(S(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:q??k}))):(s(te()),s(ne()),L(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,O,v,k,q]),r.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?R(!0):R(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(M("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:I,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:P,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:j,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:R}}const Ja={overlayWidth:new _a(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Ua(),l=N(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(ja,{anchor:"right",open:a,PaperProps:{style:{width:Ja.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Xa,{onClick:p=>p.stopPropagation(),children:w.jsx(Pa,{...E})})})},Xa=Ma(Na)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function Ka(a,e){a(oa({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:G(e.transactionType),sourceTransactionType:G(e.sourceTransactionType)}))}function Za({currentTransactionId:a,enabled:e=!0,buildPath:s,beforeNavigate:t,navigate:n,navigateState:o}){const i=h(m=>m.createTransferEntryState.lastTransferEntryReplacement),l=r.useRef(null);r.useEffect(()=>{if(!e||i==null||a==null||l.current===i)return;const{previousTransactionId:m,newTransactionId:f}=i;a.id===m.id&&a.type===m.type&&(l.current=i,t?.(),n(s(f),{replace:!0,state:o}))},[e,i,a,s,t,n,o])}const et=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=he(),n=ge(),o=N(),i=se(),{transactionTypeEncoded:l,transactionId:m}=Se(),f=e??m,E=s??Pe(l??"");let p;_e(f,E)&&(p={id:f,type:G(E)});const g=p!=null?h(T=>$(T,p)):void 0,U=()=>{const T=Z(t.state?.pathnameStackToGoBack),u=T.poppedPathname??((D=2)=>{let I="../";for(let A=0;A<D;A++)I=`${I}../`;return I})(1);n(u,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:p,onSaveVendor:()=>{o(Ae(p,void 0))},onSaveSuccess:()=>{if(g!=null&&g?.transaction&&g?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&g?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=g?.transactionDetailLocalData.vendorUpdates,u={id:g?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:g?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:g?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:g?.transaction?.id,type:g?.transaction?.type},transaction:g?.transaction,lineIds:g?.transaction?.lines?.map(I=>I.id)??[]};o(Y({entity:u,amount:g?.transaction?.amount.amount,transactionDetails:D,flowType:"detail",isFetchCOT:i}))}U()},onCancel:()=>{p!=null&&o(sa({transactionId:p})),o(ke()),o(ia()),a(!0),U()}}},at=Ke(function(a,e){const s=$(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=we.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=la(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,m=da(a,"common"),f=J(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${K}/transaction_attachment`,transactionAttachmentsEndpointToFetch:f.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${K}/transaction_attachments_accounting_provider`:`${K}/transaction_attachments`,attachmentUploadEndpoint:`${za.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ue,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:m},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(M("common")),e.onBackClick!=null)return void e.onBackClick();const t=Z(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Be(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(wa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(te()),a(ne());const n=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Le(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(pe(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(oe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(pe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?Ae(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):xa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(M("common"))},onUploadAttachmentAttachment:t=>{a(Aa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ka(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(Da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(Ca(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,m)=>{a(va(t,n,o,i,l,m))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(Ia({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=Z(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=qa(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${$a(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Ha(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(xe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(Ea({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(M("common"))},onCancelAutoComplete:()=>{a(M("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(Y({entity:t,amount:n,transactionDetails:o,flowType:"detail",isFetchCOT:s}))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ba(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(Ta(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(ya({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(Y({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s})),a(De({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const m=e.transaction,f=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(m.type??"")}/${m.id}/vendor/create`,{state:{pathnameStackToGoBack:f}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(Sa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(Y({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s}))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ga({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ha(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(fa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(pa({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(ma(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(ua(t,n,o))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?t=>Ka(a,t):void 0}})(Ra);function ht(){const a=ge(),e=N(),s=he(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=La(),i=h(d=>J(d)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),m=i.userRole!=null&&ye(i.userRole),f=i.userRole!=null&&Te(i.userRole),{isFeatureEnabled:E}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:p}=t(F.isExpenseAutomationEnabled),{configValue:g}=n(Fe.enableUncategorizedExpenseCategory),U=g?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:u,transactionId:D}=Se(),[I,A]=r.useState(!1),b=Pe(u??""),k=_e(D,b),P=h(d=>d.transactionVendorViewState),_=se(),{isFeatureEnabled:B}=t(F.isTransactionCommentingEnabled),{isFeatureEnabled:j}=t(F.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:O}=t(F.isProjectsTransactionsEnabled),L=o?.currentTenant?.companyId,v=o?.currentTenant?.companyName,S=r.useMemo(()=>{if(k)return{id:D,type:G(b)}},[k,D,b]),c=S!=null?h(d=>$(d,S)):void 0,V=c?.transactionDetailLocalData.vendorUpdates?.id!=null?P.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ve(c?.transaction):void 0,x=h(d=>C!=null?be(d.customerIncomeState,d.vendorExpenseState,d.trendState,C,"month"):void 0),R=h(d=>ae(d)),q=h(d=>C!=null?Ee(d.trendWithTransactionsState,C,"TransactionDetail"):void 0),y=i.company?.companyInfo.firstMonthOfFY??1,W=h(d=>Ie(d.accountState,d.accountListState,"accountList")),[Oe,ie]=r.useState(!1),[Re,re]=r.useState(!1),[ze,ce]=r.useState(!1),Me=r.useCallback(d=>Le(d,T??"")+s.search,[T,s.search]),Ne=r.useCallback(()=>{ce(!1)},[]);Za({currentTransactionId:S,enabled:T!=null&&T!=="",buildPath:Me,beforeNavigate:Ne,navigate:a,navigateState:s.state});const le=()=>{ie(!1),re(!1)},de=Va();Wa();const Q=r.useRef(c?.transaction);Q.current=c?.transaction;const je=c?.transactionDetailUpdateStatus?.fetchState,z=Ya(je,()=>{const d=[];if(Q.current!=null)for(const X of Q.current.lines??[])"account"in X&&X.account?.accountId!=null&&d.push(X.account.accountId);return d});r.useEffect(()=>{S!=null&&c!=null&&c.fetchState==="Not-Started"&&(e(xe(S,!1)),le())},[e,S,c?.fetchState]),r.useEffect(()=>{if(S!=null&&c?.fetchState==="Error"){const d=ee(s.state?.pathnameStackToGoBack,s.pathname);a("page-not-found",{replace:!0,state:de?{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:d,message:"pageNotFound",origin:"transaction_detail"}})}},[S,c?.fetchState,a,s.state,s.pathname,de]),r.useEffect(()=>{ze||c==null||c.transaction==null||(e(ve({id:c.transaction.id,type:c.transaction.type})),ce(!0)),C==null&&c?.fetchState==="Completed"&&fe(c?.transaction),C!=null&&(!l||m&&f===!1)&&(Oe?Re||x==null||(re(!0),e(oe(C,"TransactionDetail",{timeframe:"month",timePeriod:q?.selectedPeriod?.timePeriod??x}))):(e(te()),e(ne()),fe(c?.transaction),ie(!0),e(Ce(C))))},[c?.fetchState,c?.transaction,x,l]),r.useEffect(()=>{R.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[R.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{e(M("common"))},[]);const Ge=[u,D].filter(d=>d!=null),{transactionId:ue,onSaveVendor:$e,onSaveSuccess:He,onCancel:qe}=et({closeDrawerHandler:d=>{A(!1),a(d?"../":"../..")}}),{isAiCfoAccessEnabled:We,onAskAiCfoClick:Ye}=Ga({mobileExploreReferrer:"Transaction Details"});return Ba({isDataReady:c?.fetchState==="Completed"}),k?w.jsxs(w.Fragment,{children:[ue!=null&&I&&w.jsx(Qa,{isOpen:I,transactionId:ue,onSaveVendor:$e,onSaveSuccess:He,onCancel:qe}),w.jsx(at,{hideDeleteAttachment:!0,firstMonthOfFY:y,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:S,entity:C,isCOTEnabled:_,defaultTrendTransactionTimePeriod:x,resetTrendIsFetchedStates:le,transaction:c?.transaction,uncategorizedAccounts:W,vendorSaveStatus:V,isVendorBulkUpdateOnTransactionEnabled:E,isCreateTransferEntryFromExpenseEnabled:j,isExpenseAutomationEnabled:p,isUncategorizedExpenseCategoryEnabled:U,isAiCfoAccessEnabled:We,onAskAiCfoClick:Ye,isTransactionCommentingEnabled:B,isProjectsTransactionsEnabled:O,companyId:L,companyName:v}),z.showPopup&&z.popupType!=null&&w.jsx(Oa,{popupType:z.popupType,currencySymbol:z.currencySymbol,onSubmit:z.handleSubmit,onDismiss:z.handleDismiss})]}):w.jsx(Xe,{to:Be(Ge.length)})}const Be=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},fe=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=tt(a),t=nt(a);Ue.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},tt=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},nt=a=>ra(a)===!0?a.customer?.name??"":ca(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Qa as C,ht as T,Wa as a,Ya as b,et as c,at as d,Za as e,se as f,Ka as g,ft as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Dx9GJaKJ.js";import{h as K,g as U,u as Z,i as Q,j as h,N as G,n as W,o as Ye,p as j}from"./core-C1GB7aB-.js";import{eR as H,p_ as X,j5 as u,Py as ee,I1 as De,bo as le,Pz as be,jI as te,LC as ae,PA as ue,PB as ve,bE as P,HZ as ye,PC as Ee,PD as me,PE as je,I0 as Ae,PF as xe,PG as pe,PH as Me,PI as ge,PJ as Le,PK as Ce,PL as fe,Je as Be}from"./zeni-epic-state-BJXbyZuT.js";import{D as de,a as ne,G as q,d as w,ce,q as J,p as oe,U as Fe,_ as Oe}from"./index-D4_FYu1h.js";import"./mui-S6TXegyD.js";import{a as g}from"./sentry-i8uQ0afM.js";import{w as se}from"./withTransactionSidePanel-yGfWimRu.js";import{p as ie,c as re}from"./routePaths-dZ-9-pnI.js";import{u as ze}from"./utils-BGTnhJzp.js";import{d as b}from"./decodeURIComponentSafe-okum9C8e.js";import{Z as we}from"./ZeniAccountStatementScreen-C1LlIbPZ.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import"./TransactionDetailScreen-DT8xA3x1.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="bab61522-d5ce-4ced-bb69-5983c1ca4e7b",a._sentryDebugIdIdentifier="sentry-dbid-bab61522-d5ce-4ced-bb69-5983c1ca4e7b")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>ze(a),_e=W(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),m=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:N(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Q(),m=de.getLocalizedStrings(),{accountType:I,title:T,subTitle:D}=Re(o),y="month",S=h(r=>H(r)),p=S.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:v}=$e(o,p,S.bookCloseDate),[B,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(v);return{tranListType:o,accountType:ee(I),title:T,subTitle:D,timeframe:y,period:r}},[o,y,I,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=N(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(_e,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:S.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),Re=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ne=W(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Q(),p=b(l??""),A=b(m??""),k=b(I??""),x=b(S??""),C=h(d=>ve(d.transactionListState,A,p,k)),[v,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>H(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),_=h(d=>X(d))&&r;let i;const z=Je(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},R=Ue(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:R}}g.useEffect(()=>{v||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),He=W(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Q(),p=b(l??""),A=b(m??""),k=b(I??""),x=b(S??""),C=h(d=>je(d.transactionListState,A,p,k)),[v,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>H(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),_=h(d=>X(d))&&r;let i;const z=Ze(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},R=Qe(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:R}}g.useEffect(()=>{v||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(He,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Ie($.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),We=W(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:I,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:S}=Q(),p=b(l??""),A=b(m??""),k=b(y??""),x=!(S!=null&&S==="exclude_subaccounts"),C=h(Y=>Me(Y.transactionListState,A,p)),[v,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(Y=>H(Y)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const _=Xe(p,A,I,T,D,k);if(_){const Y={startDate:P(T,"YYYY-MM-DD"),endDate:P(D,"YYYY-MM-DD")},Pe=et(C?.dateRange,Y);r={accountId:A,accountType:ee(p),title:k,timeframe:I,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(q.isProjectsTransactionsEnabled),d=h(Y=>X(Y))&&$,{areTenantIdsInSync:R}=Fe();g.useEffect(()=>{!v&&r!=null&&R&&(B(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,R]);const ke=[l,m,I,T,D,y].filter(Y=>Y!=null);return _&&i!=null?s.jsx(We,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>F(Y),...e}):s.jsx(G,{to:Se(ke.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=U().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>H(n)).tenantId],t=Oe();return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Dx9GJaKJ.js";import{h as B,g as L,u as P,i as M,j as f,N as U,n as V,o as we,p as k}from"./core-C1GB7aB-.js";import{cl as N,eR as D,Oj as O,En as ae,fj as H,E5 as ne,Ol as Te,Eq as Ie,Oh as Ce,Oi as se,OB as ke,Cx as je,tc as be,On as Ee,EJ as Ae,Ok as re,cN as W,xs as oe,e_ as ve,f0 as De,Pv as Fe,Pw as Ue,E6 as Be,Px as Le,E7 as Pe,Eg as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as _e,fi as ze,bt as Ge,J_ as $e,cj as qe}from"./zeni-epic-state-BJXbyZuT.js";import{k as _,aq as He,z as E,v as z,d as j,c7 as We,c8 as Je,c9 as q,J,m as Ze,U as Ke,W as Qe,a as ie,G as v,y as Xe,B as Ye,ca as et,at as Z,q as tt,cb as at,p as K,cc as nt,j as X,cd as st,a9 as rt}from"./index-D4_FYu1h.js";import{D as ot,n as R,S as it}from"./mui-S6TXegyD.js";import ct from"./NotFoundScreen-CLwfUXdC.js";import{S as Y}from"./SetupPagesScreen-BN4AuJYP.js";import{a as d}from"./sentry-i8uQ0afM.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{u as ut}from"./useInitialThreadRequest-BKY0Q6gT.js";import{M as ce}from"./MobileAppDrawer-qPZdyrO4.js";import{F as dt}from"./FeaturePreviewScreen-RdL9x4ht.js";import{a as ee}from"./analyticsHelper-DGI02sYS.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./routePaths-dZ-9-pnI.js";import"./BusinessVerificationPageScreen-yN_GrrFh.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]="7f1c5de3-cbf7-4a17-bb55-26c523c0a87f",t._sentryDebugIdIdentifier="sentry-dbid-7f1c5de3-cbf7-4a17-bb55-26c523c0a87f")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(We);function mt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=M(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=E.getSignedInUserTenant(o)?.companyId??h.companyId,w=E.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=M(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=E.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(H()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,ht={overlayWidth:new Xe(100,100,48)},St=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:O(t,o),downloadEndPoint:`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=wt(s):l==="taxLetter"?i=Tt(s):l==="settings"&&(i=It(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=B(),p=P(),r=J(),m=Ze(),s=f(b=>D(b)),{tenantEmailDomain:l}=M(),i=s.companyId??E.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),w=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=W(S?.loggedInUserRoleMap),{areTenantIdsInSync:A}=Ke();d.useEffect(()=>{c==="Not-Started"&&!g&&A&&(I(!0),p(oe(!0)))},[g,p,c,A]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Qe({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(w){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,wt=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=R(it)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,kt=R.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function jt(){const t=B(),a=P(),n=J(),o=L(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=K(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=R.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function Et(){const t=B(),a=J(),n=L(),o=P(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=K(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const At=V(function(t,a){const{companyId:n}=a,o=O(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=M(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=E.getSignedInUserTenant(o)?.companyId??m.companyId,I=E.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=N(h?.loggedInUserRoleMap),w=W(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||w)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(At,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function ea(){const t=L(),a=f(A=>D(A)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=W(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,w)&&!s&&Ge(r?.loggedInUserRoleMap),T=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-Dx9GJaKJ.js";import{a as f}from"./sentry-i8uQ0afM.js";import{s as u,u as h,j as b,N as y}from"./core-C1GB7aB-.js";import{Kh as I,eY as w,Ad as j}from"./zeni-epic-state-BJXbyZuT.js";import{z as l,B as x,A as S,T as D}from"./index-D4_FYu1h.js";import{n as c}from"./mui-S6TXegyD.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.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]="cdf68bbd-dbca-49f5-ac0e-d61e29e3fa92",e._sentryDebugIdIdentifier="sentry-dbid-cdf68bbd-dbca-49f5-ac0e-d61e29e3fa92")}catch{}})();const Y=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,T=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{Y as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Dx9GJaKJ.js";import{h as ne,g as W,u as M,i as Y,j as w,n as q,N as X,o as Ve,p as k}from"./core-C1GB7aB-.js";import{eR as U,Pb as Ce,Pc as $e,ck as ee,cl as Ne,fi as Ze,xq as ke,BD as He,xk as Tn,Pd as Fn,Pe as Bn,xn as On,xu as fe,xh as Ln,xe as Rn,NY as le,Pf as Un,F3 as _n,L3 as zn,F5 as Mn,kp as Fe,Pg as Vn,qL as Ge,qz as We,kg as Ye,kj as Be,L4 as Oe,L5 as $n,Ph as Nn,ki as Zn,kF as Hn,k7 as Gn,iG as Wn,iF as Yn,Pi as qn,Pj as ye,EM as Jn,Pk as Kn,Pl as Qn,NR as we,Pm as Le,Pn as Xn,Fg as ea,OB as na,Cx as qe,tc as Je,Po as aa,Fd as ta,Pp as Ke,cL as Ae,Fk as Qe,fj as oa,e_ as Xe,f0 as De,Fi as sa,Cr as ra,Fa as ia,Pq as en,Pr as nn,EO as an,EY as Re,Ps as ca,Oo as la,Fl as da,bs as ua,bF as pa,cw as ma,bG as ha,bt as ga,J_ as fa}from"./zeni-epic-state-BJXbyZuT.js";import{k as ae,a as N,z as S,G as O,m as _,B as de,bY as ya,a2 as Ie,J as V,y as J,p as tn,aq as xa,af as Ue,d as L,bZ as Ca,at as Se,b_ as ka,v as ue,b$ as wa,f as be,aN as G,c0 as Aa,U as Da,W as on,ac as Ia,c1 as _e,c2 as Sa,q as ce,c3 as ba,c4 as Pa,c5 as va,a9 as Ea,o as ja}from"./index-D4_FYu1h.js";import{n as z,D as K,S as Q}from"./mui-S6TXegyD.js";import ie from"./NotFoundScreen-CLwfUXdC.js";import{S as ze}from"./SetupPagesScreen-BN4AuJYP.js";import{F as sn}from"./FeaturePreviewScreen-RdL9x4ht.js";import{a as d}from"./sentry-i8uQ0afM.js";import{M as pe}from"./MobileAppDrawer-qPZdyrO4.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-DM1m923S.js";import{A as Oa}from"./AddressScreen-DBh2kopg.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{Z as La}from"./ZeniAccountStatementScreen-C1LlIbPZ.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./analyticsHelper-DGI02sYS.js";import"./routePaths-dZ-9-pnI.js";import"./BusinessVerificationPageScreen-yN_GrrFh.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]="4521b472-a6ed-4a97-9b09-a53080ce50d0",e._sentryDebugIdIdentifier="sentry-dbid-4521b472-a6ed-4a97-9b09-a53080ce50d0")}catch{}})();const Ra=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Ua=q(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(ke(t))},onCreateRule:()=>{e(Rn())},onUpdateRule:t=>{e(fe(t))},onDeleteClick:t=>{e(Ln(t))},onPauseClick:t=>{e(fe(t,!0,!1))},onResumeClick:t=>{e(fe(t,!1,!0))},onActivityClick:(t,r)=>{e(On(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(Fn())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function Me({isEditDrawerOpen:e}){const a=ne(),s=W(),o=M(),t=ae(),{ruleId:r,tenantEmailDomain:u}=Y(),{useFeatureGate:l}=N(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=w(y=>U(y)),m=w(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=w(y=>$e(y)),g=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ne(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(O.isTreasuryEnabled),f=c?.company!=null&&Ze(c.company),I=D&&f,F=S.getSignedInUser(),R=c.tenantId,j={userId:F?.userId??"",sessionId:F?.zeniSessionId??"",tenantId:R??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(ke(!0)))},[x,C,g,o]);const P=y=>{h(y)},T=_(),E=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Ra,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:v,handleDrawerToggle:P,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:E})]})}const _a={overlayWidth:new J(100,100,58)},za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:_a.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ma,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},Ma=z(Q)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Va={overlayWidth:new J(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=M(),o=_(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Na,{onClick:r=>r.stopPropagation(),children:n.jsx(Oa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Na=z(Q)`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
`,Za={overlayWidth:new J(100,100,58)},Ha=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Za.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Fa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=z(Q)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,Wa=z.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,Ya=q(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Hn(o))},initializeVendorAddress:()=>{e(Zn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Oe("common"))},onCancelAutoComplete:()=>{e(Oe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=Y(),h=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>U(y)),c=w(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,g]=d.useState(!1),[A,D]=d.useState(!1),[f,I]=d.useState(!1),F=tn(t.state?.pathnameStackToGoBack),{poppedPathname:R}=F,j=R?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const P=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{P==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&E()},[P,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},E=()=>{g(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(za,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:b}):null,A===!0?n.jsx(Ha,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:A}):null,f===!0?n.jsx($a,{closeDrawerHandler:E,isDrawerOpen:f}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(Ya,{navigate:o,location:t,companyId:C,accountId:v,analytics:L,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const qa={overlayWidth:new J(100,100,58)},Ja=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=_(),u=V(),l=w(i=>$e(i)),p=w(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{t(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:qa.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Ka,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})},Ka=z(Q)`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`,Qa={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=V(),t=M(),r=w(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=w(i=>qn(i)),x={analytics:L,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(Kn(i))},updateFilesEntity:i=>{t(Ye({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(Jn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:Qa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Xa,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})]})},Xa=z(Q)`
|
|
34
|
-
display: flex;
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
`,et={overlayWidth:new J(100,100,58)},nt=q(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=w(f=>Qn(f)),u=w(f=>U(f)),l=_(),p=V(),h=M(),{accountId:x}=Y(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=N(),{configValue:g}=b(G.zeniAccountsConfig),A=we(g),D=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:f=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:f=>f.stopPropagation(),children:n.jsx(nt,{analytics:L,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:f=>{h(Xn(f))},onAnotherTransferClick:()=>{C(!1),h(Le())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=z(Q)`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
`,tt=z.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ot=q(function(e,a){return{zeniAccountListView:Ke(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(Je("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=M(),r=V(),{tenantEmailDomain:u}=Y(),{useDynamicConfig:l,useFeatureGate:p}=N(),h=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:c}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),g=w(B=>U(B)),A=g.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),f=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(g.tenantId),[I,F]=d.useState(!1),[R,j]=d.useState(!1),[v,P]=d.useState(!1),[T,E]=d.useState(!1),y=w(B=>Ke(B)),$=y.fetchState,te=w(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Z=ae(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=ee(Z?.loggedInUserRoleMap),fn=Ae(Z?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Pe=S.getSignedInUser(),xn={userId:Pe?.userId??"",sessionId:Pe?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Da();d.useEffect(()=>{!I&&ve&&(F(!0),t(Qe(!1)))},[I,t,$,ve]),d.useEffect(()=>{!R&&oe==="Not-Started"&&A&&(j(!0),t(ke(!0)))},[R,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{E(a!=null&&a===!0)},[a]);const Ee=()=>{P(!1),o("..")},[kn,wn]=d.useState(!1),je=B=>{wn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=g.company!=null&&Ze(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),ge=w(B=>B.treasurySetupViewState.treasuryFundsDetails),Pn=ge.fundsDetails,vn=Ia(Pn);d.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[ge.fetchStatus,t]);const En=Xe(g),jn=De(c,g);return En===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:L,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Ee,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:L,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&gn?n.jsx(X,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(X,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=z.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
width: 100%;
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center;
|
|
55
|
-
min-height: 100vh;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,it=q(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(h=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Re(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Re(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=Y(),{useDynamicConfig:h}=N(),{useFeatureGate:x}=N(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(O.isCheckingCommentingEnabled),m=w(H=>U(H)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),g=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[F,R]=d.useState(!1),[j,v]=d.useState(!1),[P,T]=d.useState(!1),[E,y]=d.useState(!1),$=w(H=>nn(H,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{F||(r(an(p??"",!1)),R(!0))},[F,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const Z=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[E===!0&&$.accountDetail!=null?n.jsx(Ja,{authParams:f,downloadAccountDetailEndPoint:I,closeDrawerHandler:Z,isAccountInfoDrawerOpen:E,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:Z,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:I}):null,P===!0?n.jsx(cn,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:P}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=q(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(va),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=Y(),{useDynamicConfig:o}=N(),t=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=w(f=>U(f)),{configValue:x}=o(G.zeniAccountsConfig),i=we(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{u(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=ee(g?.loggedInUserRoleMap),D=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(X,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const f=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Pa,{showConfetti:l}),n.jsx(ue,{analytics:L,onLoad:f=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:L,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function zt(){const e=W(),a=w(E=>U(E)),s=_(),{useFeatureGate:o,useDynamicConfig:t}=N(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),c=Xe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),g=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ha(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(O.isDepositAccountsFeatureEnabled),f=D&&!C,{configValue:I}=t(G.expressPayConfig),F=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:R}=o(O.isAutoTransferRuleEnabled),j=Ea(a,x,i)&&!C&&ga(r?.loggedInUserRoleMap),v=fa(r?.loggedInUserRoleMap),P=f&&ee(r?.loggedInUserRoleMap),T=P||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),R?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ie,{})}),F&&u?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(k,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(k,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(re,{})}),n.jsx(k,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"statements",element:n.jsx(La,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]})}export{zt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Dx9GJaKJ.js";import{a as u}from"./sentry-i8uQ0afM.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-C1GB7aB-.js";import{Je as s,Jd as j,Pt as v,eR as C,Pu as T}from"./zeni-epic-state-BJXbyZuT.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,p as U}from"./index-D4_FYu1h.js";import{n as _}from"./mui-S6TXegyD.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]="e3546914-86f2-41cf-8d96-6700845e19fa",e._sentryDebugIdIdentifier="sentry-dbid-e3546914-86f2-41cf-8d96-6700845e19fa")}catch{}})();const J=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function q(){const e=x(),n=B(),d=z(),l=P();let{accountId:a}=$(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,h]=u.useState(!1),y=D();u.useEffect(()=>{m||(h(!0),n(j(a??"",!1)))},[m,n]);const o=p(t=>v(t,a??"")),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),c=p(t=>C(t)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(J,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:f})})}export{q as Z};
|