@zeniai/web-app-ui 5.1.75-qa → 5.1.76-next
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-DS2UgHxm.js +1 -0
- package/dist/assets/AddressScreen-D3HAG5Pr.js +9 -0
- package/dist/assets/AiCfoScreen-CTc-VcRc.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-gDdPXgYD.js +1 -0
- package/dist/assets/BillPayRoutes-CAewvRkJ.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-BbDxcN3K.js +9 -0
- package/dist/assets/ChargeCardRoutes-6QU1QBxN.js +71 -0
- package/dist/assets/{CompanyPassportScreen-DetGWMZx.js → CompanyPassportScreen-CC2QSh6z.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CUgHHwsJ.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-kSr2iHC6.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-1feU8VPE.js +23 -0
- package/dist/assets/{DashboardRoutes-eNF287fs.js → DashboardRoutes-NArRDQJ-.js} +4 -4
- package/dist/assets/DefaultTenantHome-BuXiJZb7.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-BnYbmIQy.js +18 -0
- package/dist/assets/DrawerScreen-DGyfdHJW.js +1 -0
- package/dist/assets/EntityDetailRoutes-BkBZEVBw.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BBY95n1E.js +25 -0
- package/dist/assets/FeaturePreviewScreen-DDv7GOn2.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-DhJqrvHU.js +1 -0
- package/dist/assets/MagicLinkRoutes-D7su7riK.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Di_hmBzG.js +12 -0
- package/dist/assets/MobileAppDrawer-Df4Qimmh.js +1 -0
- package/dist/assets/NotFoundScreen-DVKBuN7e.js +1 -0
- package/dist/assets/NotificationRoutes-CiWM75s-.js +1 -0
- package/dist/assets/OAuthConsentScreen-CWFjUYEE.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-BxTz-s5z.js +1 -0
- package/dist/assets/PeopleRoutes-DVOlkZuO.js +22 -0
- package/dist/assets/PerformanceRoutes-BEdQ7JSy.js +1 -0
- package/dist/assets/{Preview-DIWTyMQY.js → Preview-CjoXDjPl.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BaZwNX6H.js → QBOConnectionScreen-CHdv-UVo.js} +1 -1
- package/dist/assets/{ReferralListScreen-DyC1Khln.js → ReferralListScreen-CySa3ted.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-LmykdpDG.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CeUHThGh.js +1 -0
- package/dist/assets/{ReimbursementRoutes-4pQ7nHpz.js → ReimbursementRoutes-BHzQla-l.js} +12 -12
- package/dist/assets/ReportsRoutes-CQmypnoq.js +1 -0
- package/dist/assets/RewardsRoutes-fl2VG6Nw.js +1 -0
- package/dist/assets/ScreenRoutes-DjKy2K-h.js +2 -0
- package/dist/assets/SettingsRoutes-DAHFIT1_.js +57 -0
- package/dist/assets/SetupPagesScreen-DFqkA6OC.js +29 -0
- package/dist/assets/SignInScreen-BPpnP2Dl.js +1 -0
- package/dist/assets/SignOutScreen-DG3qj3-0.js +9 -0
- package/dist/assets/TaskListScreen-DG4Dv6A-.js +9 -0
- package/dist/assets/TaskRoutes-CcM2JaZH.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CiYZElQb.js +1 -0
- package/dist/assets/{TransactionDetailScreen-L3SyvDDw.js → TransactionDetailScreen-C7_imF3Y.js} +2 -2
- package/dist/assets/TransactionListRoutes-n2hWV2dp.js +1 -0
- package/dist/assets/TreasuryRoutes-B-c4f7k7.js +37 -0
- package/dist/assets/{VendorsRoutes-Cv1guWUA.js → VendorsRoutes-BoEmibsm.js} +19 -19
- package/dist/assets/WiseConfirmationScreen-D52utSHx.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DQHAmu9e.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-BrO9jMz2.js +9 -0
- package/dist/assets/{accountMappingHelper-s2xO6MjH.js → accountMappingHelper-BNXnlSEh.js} +1 -1
- package/dist/assets/{analytics-Ba6zmRos.js → analytics-7J1CNh2i.js} +1 -1
- package/dist/assets/{analyticsHelper-F9bkDfUR.js → analyticsHelper-B5epc-PZ.js} +1 -1
- package/dist/assets/{core-D6ttr5iw.js → core-BwBLfZO1.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-D0vQ4d1Q.js → decodeURIComponentSafe-Cau4zUJU.js} +1 -1
- package/dist/assets/dnd-yE3kwzv1.js +6 -0
- package/dist/assets/{empty-B81gHGCB.js → empty-CCgcIyVB.js} +1 -1
- package/dist/assets/empty-Cf0SP1Fa.js +1 -0
- package/dist/assets/{emptyVideoElement-DNxKi3mL.js → emptyVideoElement-BStn4F8t.js} +1 -1
- package/dist/assets/epic-CYiMnVeW.js +2 -0
- package/dist/assets/{getLocaleForTenant-YNgm3b7A.js → getLocaleForTenant-Bn0H95YD.js} +1 -1
- package/dist/assets/{index-DL-oj321.js → index-A51o-oGI.js} +1 -1
- package/dist/assets/{index-CETE-7wR.js → index-BerjEF27.js} +1 -1
- package/dist/assets/{empty-0_eSm854.js → index-CF_NP1ls.js} +1 -1
- package/dist/assets/index-DqVSCvOK.js +1 -0
- package/dist/assets/{index-BUmr5maU.css → index-R6GjjTB3.css} +1 -1
- package/dist/assets/{index-DK3W-xXd.js → index-VDS7QZz-.js} +2 -2
- package/dist/assets/{index-BGtgXdBV.js → index-aRVrbNiC.js} +40263 -45717
- package/dist/assets/{index-DyaqeLYa.js → index-aoY9thIU.js} +1 -1
- package/dist/assets/{index-pFVjg2n3.js → index-t__Gmvon.js} +1 -1
- package/dist/assets/{lexical-T2nlwAPk.js → lexical-CppAuKk8.js} +1 -1
- package/dist/assets/{liveblocks-CS0rfBBF.js → liveblocks-BRoLXdu-.js} +1 -1
- package/dist/assets/{lottie-CZmubsAo.js → lottie-BAjpdqbN.js} +1 -1
- package/dist/assets/{mui-vLo47rlo.js → mui-BBkWv1mU.js} +1 -1
- package/dist/assets/{pathToGoBack-CkJN8BOO.js → pathToGoBack-Bp5PBNhl.js} +1 -1
- package/dist/assets/{pdf-CdoB_huE.js → pdf-BQyDOTnR.js} +3 -3
- package/dist/assets/{pdf-lib-RRzqb1kw.js → pdf-lib-B_thHwDW.js} +1 -1
- package/dist/assets/{plaid-IKw4XOsd.js → plaid-Gte2Ckk-.js} +1 -1
- package/dist/assets/{pusher-Cj6_igRe.js → pusher-DvtgmJur.js} +1 -1
- package/dist/assets/{react-CppN-oCz.js → react-B02axkNd.js} +1 -1
- package/dist/assets/{react-D95yXzXQ.js → react-B7dU6M-a.js} +1 -1
- package/dist/assets/{react-BDJBiih3.js → react-CNo23rWl.js} +1 -1
- package/dist/assets/{react-BbjDrfEs.js → react-CgknZZrM.js} +1 -1
- package/dist/assets/{react-BkKsXl-3.js → react-MOAFD_Zh.js} +1 -1
- package/dist/assets/{react-CCfELnN3.js → react-NEHU30OY.js} +1 -1
- package/dist/assets/{recharts-BDyAk4nR.js → recharts-CiU9jjGx.js} +3 -3
- package/dist/assets/{routePaths-DZDk8gbY.js → routePaths-hmakpH65.js} +1 -1
- package/dist/assets/{sentry-CEfOando.js → sentry-B_UPXuSC.js} +1 -1
- package/dist/assets/{url-BQNo9gT5.js → url-DMkZVN82.js} +1 -1
- package/dist/assets/{url-C9_bAZjF.js → url-DUFXwvN_.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DHhcASUk.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-DO0seTDc.js +1 -0
- package/dist/assets/{useDeviceId-DISstVTH.js → useDeviceId-b4A3GNY_.js} +1 -1
- package/dist/assets/useInitialThreadRequest-D_32gSqj.js +1 -0
- package/dist/assets/{utils-DKj7mVPA.js → utils-ox49Wmvb.js} +2 -2
- package/dist/assets/{withTransactionSidePanel-R0O15XnS.js → withTransactionSidePanel-B6uMMn0i.js} +4 -4
- package/dist/assets/zeni-epic-state-5KAN0o5k.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-C8E4I-UT.js +0 -1
- package/dist/assets/AddressScreen-DV4gK_4i.js +0 -9
- package/dist/assets/AiCfoScreen-CJQFw07R.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-Dz2xD1tC.js +0 -1
- package/dist/assets/BillPayRoutes-Os14xiVD.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-BKvR8fKs.js +0 -9
- package/dist/assets/CardsAiCfoScreen-DTFvzHIL.js +0 -14
- package/dist/assets/ChargeCardRoutes-DDxAQjwA.js +0 -71
- package/dist/assets/ConnectionAuthScreen-BC2sFUmX.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Bq-Ubv4b.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-CXBEVGX4.js +0 -30
- package/dist/assets/DefaultTenantHome-bOMFA9uq.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BMyfqSTi.js +0 -18
- package/dist/assets/DrawerScreen--Suq3tvT.js +0 -1
- package/dist/assets/EntityDetailRoutes-BGhUBNO_.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-ByFBxCiw.js +0 -25
- package/dist/assets/FeaturePreviewScreen-heeivM6W.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-0saA8ZXr.js +0 -1
- package/dist/assets/MagicLinkRoutes-CMAONj1z.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-Dg99P6Pw.js +0 -12
- package/dist/assets/MobileAppDrawer-BI_hKtLW.js +0 -1
- package/dist/assets/NotFoundScreen-DUKrEDOk.js +0 -1
- package/dist/assets/NotificationRoutes-D64xsn7f.js +0 -1
- package/dist/assets/OAuthConsentScreen-Mj5Bje1l.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Dt90QdCw.js +0 -1
- package/dist/assets/PeopleRoutes-2kLgkUle.js +0 -22
- package/dist/assets/PerformanceRoutes-CKlQ6rou.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-Bks_7P4u.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-ClRq5kCS.js +0 -1
- package/dist/assets/ReportsRoutes-BOrBSfD8.js +0 -1
- package/dist/assets/RewardsRoutes-kDqXZQmp.js +0 -1
- package/dist/assets/ScreenRoutes-BddXHfq8.js +0 -2
- package/dist/assets/SettingsRoutes-CN__-GS9.js +0 -57
- package/dist/assets/SetupPagesScreen-Duc28IO6.js +0 -29
- package/dist/assets/SignInScreen-WsALbw6J.js +0 -1
- package/dist/assets/SignOutScreen-DBYHyG26.js +0 -9
- package/dist/assets/TaskListScreen-gPJk_aPE.js +0 -9
- package/dist/assets/TaskRoutes-D7b5hUHG.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DMGvj5pX.js +0 -1
- package/dist/assets/TransactionListRoutes-yd5cXXN9.js +0 -1
- package/dist/assets/TreasuryRoutes-idT6t3yc.js +0 -37
- package/dist/assets/WiseConfirmationScreen-B9z9Ex9l.js +0 -12
- package/dist/assets/ZeniAccountRoutes-Bmxg5Hu_.js +0 -73
- package/dist/assets/ZeniAccountStatementScreen-B1x9Ll2M.js +0 -9
- package/dist/assets/dnd-C751Xq24.js +0 -6
- package/dist/assets/epic-BpVO28im.js +0 -2
- package/dist/assets/index-lXh6fiHl.js +0 -1
- package/dist/assets/index-xNwL9wH4.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-D6zsFuCp.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-re9SKSxV.js +0 -1
- package/dist/assets/useCashManagementBanner-DoVCCRms.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-DxT609il.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-CdPAtb7K.js +0 -1
- package/dist/assets/useInitialThreadRequest-CmTGqSIj.js +0 -1
- package/dist/assets/zeni-epic-state-Cl3jFj7z.js +0 -13
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-CS0rfBBF.js";import{a as d}from"./sentry-CEfOando.js";import{h as z,g as Q,u as O,j as b,s as ce,n as $,i as G,o as W,p as w}from"./core-D6ttr5iw.js";import{bn as Pe,eX as D,gq as De,n0 as le,Og as Me,hG as he,O7 as Ue,qS as Te,ky as fe,mY as _e,hI as Fe,O9 as Oe,O8 as Re,Qy as Be,zj as Ve,EM as ze,Q7 as Le,Qg as Ne,c6 as ne,cL as Qe,cM as $e,M7 as Ge,Qz as He,M8 as Ze,xL as Ke,QA as qe,Hb as Ye,Es as Je,Ej as be,Eg as Xe,xP as Se,Em as ye,Ep as Ce,Ev as te,uc as ae,xO as We,ka as q,kd as Ie,QB as en,le as nn,y2 as tn,M$ as an,N0 as on,k8 as sn,QC as cn,kb as ln,rk as rn,MW as dn,MX as un,ro as pn,hr as gn,Mg as X,hj as re,hg as mn,ho as hn,Mh as fn,x$ as bn,QD as Sn,QE as yn,EJ as Cn,fC as Ee,fE as xe,QF as In,ge as En,Mq as xn,x_ as de,gj as ue,gi as An,xZ as vn,gh as wn,gg as kn,QG as jn,fH as Ae,QH as Pn,QI as Dn,y5 as Mn,xY as pe,QJ as Un,fY as Tn,xV as _n,bZ as Fn,c5 as On,c4 as Rn,b_ as Bn,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as Qn}from"./zeni-epic-state-Cl3jFj7z.js";import{Q as Y,d as F,z as P,af as ve,bS as $n,e as J,g as Gn,bD as Hn,I as H,w as oe,bT as Zn,i as we,bU as Kn,aq as qn,k as ke,bV as Yn,bW as Jn,bX as Xn,Y as Wn,bY as et,s as nt,bZ as tt}from"./index-BGtgXdBV.js";import{n as B}from"./mui-vLo47rlo.js";import{M as R}from"./MobileAppDrawer-BI_hKtLW.js";import{a as Z,g as K,m as at}from"./accountMappingHelper-s2xO6MjH.js";import{t as ot,A as st}from"./AddressScreen-DV4gK_4i.js";import N from"./NotFoundScreen-DUKrEDOk.js";import{g as it}from"./analyticsHelper-F9bkDfUR.js";import{B as ct}from"./BusinessVerificationPageScreen-BKvR8fKs.js";import{C as lt}from"./CompanyPassportScreen-DetGWMZx.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-CdPAtb7K.js";import{q as ge}from"./QBOConnectionScreen-BaZwNX6H.js";import{B as ut}from"./BillPayApprovalRoutes-Dz2xD1tC.js";import{R as pt}from"./ReimbursementApprovalRoutes-Bks_7P4u.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.js";import"./routePaths-DZDk8gbY.js";import"./empty-B81gHGCB.js";import"./pdf-lib-RRzqb1kw.js";import"./index-pFVjg2n3.js";import"./url-BQNo9gT5.js";import"./index-lXh6fiHl.js";import"./decodeURIComponentSafe-D0vQ4d1Q.js";import"./ReimbursementApprovalRuleDetailScreen-ClRq5kCS.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]="ed38793f-dc64-407e-b8e1-4df9f58ccbbb",e._sentryDebugIdIdentifier="sentry-dbid-ed38793f-dc64-407e-b8e1-4df9f58ccbbb")}catch{}})();const gt=B.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
|
-
`,mt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:fe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Te(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizableAccountOverrides:t.capitalizableAccountOverrides,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:t.onSaveCapitalizationAccountThreshold}},function(e,t){const{navigate:s,location:l,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:p,filing1099Section:m}=n,{incomeAccount:y,expenseAccount:g}=a,{billPayAccount:r}=c,{reimbursementsAccount:f}=u,{prepaidExpensesAccount:E,fixedAssetsAccount:k,accruedExpensesAccount:v}=p,{bankAccount:h,expenseCategory1099:I}=m,x=Z(t.accountMappingView.incomeAccountList,y.selectedOption),T=Z(t.accountMappingView.expenseAccountList,g.selectedOption),M=Z(t.accountMappingView.billPayAccountList,r.selectedOption),L=Z(t.accountMappingView.reimbursementsAccountList,f.selectedOption),V=K(t.accountMappingView.prepaidExpensesAccountList,E.selectedOptions),S=K(t.accountMappingView.fixedAssetsAccountList,k.selectedOptions),U=K(t.accountMappingView.accruedExpensesAccountList,v.selectedOptions),C=K(t.accountMappingView.bankAccounts1099FilingAccountList,h.selectedOptions),A=at(t.accountMappingView.expenseAccounts1099FilingAccountList,I),_={selectedIncomeAccountId:x?.accountId,selectedExpenseAccountId:T?.accountId,selectedBillPayAccountId:M?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:V.map(j=>j.accountId),selectedFixedAssetsAccountIds:S.map(j=>j.accountId),selectedAccruedExpensesAccountIds:U.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:C.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:A};e(Re({data:_}))},onBackClick:()=>{ve(l)===!1?(s("../../dashboard"),e(Oe())):e(he())},onSaveClick:()=>{e(Fe()),i&&J.track(Gn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(_e(t.currentTenant.companyId,n))}}})($n),ht=()=>{const e=z(),t=Q(),s=O(),{useFeatureGate:l,useDynamicConfig:i}=Y(),{isFeatureEnabled:n}=l(F.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=l(F.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),p=!u&&c?.capitalization_enabled===!0,m=P.getSignedInUser(),y=Pe(m),g=b(C=>D(C)),{capitalizableAccounts:r,capitalizableAccountOverrides:f,isCapitalizationThresholdSaving:E,currencySymbol:k}=b(C=>{const A=C.tenantState.currentTenantId,_=A!=null?C.tenantState.tenantsById[A]:void 0,j=De(C.companyState,g.companyId);return{capitalizableAccounts:_?.capitalizableAccounts??null,capitalizableAccountOverrides:_?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:C.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),v=d.useCallback((C,A)=>{s(le(g.companyId,C,A))},[s,g.companyId]),h=d.useCallback(C=>{const A={...f??{}},_=Object.entries(C);for(const[se,ie]of _)ie===null?delete A[se]:A[se]=ie;const[j,je]=_[0]??[];j!=null&&s(le(g.companyId,j,je,void 0,Object.keys(A).length>0?A:null))},[s,g.companyId,f]),I=b(C=>Me(C.accountState),ce),x=d.useMemo(()=>{const C={};for(const A of I)A.accountId!=null&&A.accountName!=null&&(C[A.accountId]=A.accountName);return C},[I]),[T,M]=d.useState(!1),[L,V]=d.useState(!1);d.useEffect(()=>{T===!1&&(s(he()),M(!0))},[T]);const S=b(C=>Ue(C)),U=C=>{V(C)};return o.jsxs(gt,{children:[o.jsx(R,{isAppContentDrawerOpen:L,handleDrawerToggle:U}),o.jsx(mt,{currentTenant:g,navigate:e,accountMappingView:S,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:p,capitalizableAccounts:r,accountNamesById:x,capitalizableAccountOverrides:f,currencySymbol:k,isCapitalizationThresholdSaving:E,onSaveCapitalizationAccountThreshold:v,onSaveCapitalizationAccountThresholds:h,location:t,isSettings:ve(t),onClickMenuIcon:()=>U(!0)})]})},ft=B.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
|
-
`,bt=$(function(e,t){const s=D(e),l=Le(e),i=Ne(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ne(s?.userRole??[])||n)&&"readonly",billpayApprovalView:l,remiApproverView:i,analytics:J}},function(e,t){const{navigate:s,currentTenant:l}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Zn),St=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),[i,n]=d.useState(!1),[a,c]=d.useState(!1),[u,p]=d.useState(!1),m=b(I=>D(I)),y=b(I=>I.billPaySetupApproverViewState.fetchState),g=b(I=>I.remiSetupApproverViewState.fetchState),r=b(I=>Be(I)),{isApprovalRulesV3Enabled:f,isLoading:E}=Hn(m?.tenantId),k=m.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const v=H();d.useEffect(()=>{u||y!=="Not-Started"||E||(p(!0),s(Ve(!0,!0,f)))},[u,y,E,f,s]),d.useEffect(()=>{a||g!=="Not-Started"||E||(c(!0),s(ze(!0,!1,!1,f)))},[a,g,E,f,s]);const h=I=>{n(I)};return v?.loggedInUserRoleMap!=null?o.jsxs(ft,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:h}),o.jsx(bt,{navigate:e,location:t,companyId:k,currentTenant:m,roleMap:v.loggedInUserRoleMap,onClickMenuIcon:()=>{h(!0)}})]}):o.jsx(oe,{fetchState:r.fetchState})},yt=B.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=$(function(e,t){const{companyId:s,isZeniAccountEnabled:l,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=D(e);return{bankSetupView:qe(e,s,n,a,l,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:J}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(ae(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(te(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,p)=>{e(Ce(n,a,p,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(ye(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(Se(a,n))},onUpdateAccountClick:(n,a,c,u,p)=>{e(p==="paymentAccount"?be(n,a,c,u):Xe(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(Je(i,a,n,c))},onRemoveConnection:n=>{e(Ye(n))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Kn),It=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),i=H(),{useFeatureGate:n}=Y(),{isFeatureEnabled:a}=n(F.isChargeCardFeatureEnabled),{isFeatureEnabled:c}=n(F.isDebitCardFeatureEnabled),[u,p]=d.useState(!1),[m,y]=d.useState(!1),g=b(M=>D(M)),r=b(M=>M.settingsViewState.bankConnection.fetchState),f=Qe(g,i?.loggedInUserRoleMap),E=$e(g,i?.loggedInUserRoleMap),k=Ge(g,i?.loggedInUserRoleMap),v=He(g,i?.loggedInUserRoleMap),h=we(g,a,c),I=Ze(g,i?.loggedInUserRoleMap)&&h,x=g.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect(()=>{m||r==="Completed"||(y(!0),s(Ke(!1)))},[m,s,r]);const T=M=>{p(M)};return f||k||E||I?o.jsxs(yt,{children:[o.jsx(R,{isAppContentDrawerOpen:u,handleDrawerToggle:T}),o.jsx(Ct,{navigate:e,location:t,companyId:x,currentTenant:g,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:E,isZeniAccountEnabled:k,isChargeCardEnabled:I,isTreasuryEnabled:v,onClickMenuIcon:()=>{T(!0)}})]}):o.jsx(N,{})},Et=B.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,xt=$(function(e,t){const{companyId:s}=t,l=D(e),i=t.roleMap.bill_pay_admin,n=en(e,s),{uiState:a}=n,c=(ne(l?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:ke.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:l.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:J}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(ae("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(te(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(Se("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(Ce(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(ye(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(be(n,a,"billing","billing_setup"))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ie(n))},handleConfirmCardSetupIntent:n=>{e(ln(n))},updateCardPaymentModalState:n=>{e(cn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(sn(n,a,c))},handleFetchPaymentSources:()=>{e(q())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},onBillingAddressSave:n=>{e(tn(n))},onAddressEditHandler:n=>{if(n!=null){const a=ot(n);e(nn({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Yn),At=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),[i,n]=d.useState(!1),[a,c]=d.useState(!1),[u,p]=d.useState(!1),m=b(h=>D(h)),y=b(h=>h.cardPaymentViewState),g=b(h=>h.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),r=qn(y.addCardPaymentSourceStatus.fetchState),f=y.addCardPaymentSourceStatus.fetchState,E=m.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=H();d.useEffect(()=>{E!=null&&s(We(E,!1))},[E,s]),d.useEffect(()=>{a||(c(!0),s(q()))},[a,s]),d.useEffect(()=>{u||(Ie(["card"]),p(!0))},[u]),d.useEffect(()=>{r==="In-Progress"&&f==="Completed"&&s(q())},[r,f]);const v=h=>{n(h)};return k?.loggedInUserRoleMap!=null?o.jsxs(Et,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),o.jsx(xt,{navigate:e,location:t,companyId:E,currentTenant:m,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{v(!0)},googleAPIKey:ke.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},ee="external_integrations",vt=$(function(e){const t=un(e,ee);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:l,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{ge.init("/connection/auth",n),ge.handleClick()},onRefreshClick:()=>{l.integrations.refreshQBO.fetchState!=="In-Progress"&&e(bn())},onSaveChargeBeeCredentials:(c,u)=>{const p=l.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;p!=null&&e(hn(a,p,X("revenue"),fn("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const p=l.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(p!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:p,redirect_uri:m,tenant_id:a}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(mn(a,c,X(u)))},onConnectGmail:()=>{e(re(a,"gmail",window.location.href))},onConnectOutlook:()=>{e(re(a,"outlook",window.location.href))},onSaveConnectorCredentials:c=>{e(gn(a,X("payments"),c))},onNotifyMe:c=>{e(pn(ee,c,i))}}})(Jn),wt=()=>{const e=z(),t=O(),{tenantEmailDomain:s}=G();rt();const[l,i]=d.useState(!1),n=b(h=>h.tenantState.fetchState),a=b(h=>D(h)),c=a.companyId??P.getSignedInUserTenant(s)?.companyId,u=P.getSignedInUser(),p=H(),m=ne(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");d.useEffect(()=>{t(rn(ee))},[t]);const[y,g]=d.useState(!1);d.useEffect(()=>{y||(g(!0),t(q()))},[y,t]);const r=h=>{i(h)},f=b(h=>dn(h,c)),E=b(h=>h.plaidAccountViewState.external_account.plaidConnectionDetails),{plaidAccounts:k,onAddPlaidAccount:v}=dt({companyId:c??a.companyId});return p?.loggedInUserRoleMap!=null?o.jsxs(kt,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:r}),o.jsx(vt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:m,integrationsView:f,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:f.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:f.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:f.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:f.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:f.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(f.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([h,I])=>[h,I?.message])),deleteConnectionState:f.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:f.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:k,onAddPlaidAccount:v,plaidConnectionDetails:E})]}):o.jsx(oe,{fetchState:n})},kt=B.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,jt=B.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
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
|
-
`,Pt=()=>{const e=O(),{tenantEmailDomain:t}=G(),[s,l]=d.useState(!1),i=b(r=>D(r)).companyId??P.getSignedInUserTenant(t)?.companyId,n=P.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=b(r=>Sn(r,n.userId)),c=b(r=>yn(r,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,p=r=>{l(r)},m=d.useCallback(r=>{e(ae("user_reimbursement_account",r))},[]),y=d.useCallback(r=>{e(te(r,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);d.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(Cn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(jt,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:p}),o.jsx(Xn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:y,onClickMenuIcon:()=>{p(!0)}})]})},Dt=B.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,me=({appContent:e})=>{const t=O(),s=z(),l=Q(),[i,n]=d.useState(!1),a=b(S=>D(S)),{tenantEmailDomain:c}=a,u=a.companyId??P.getSignedInUserTenant(c)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:p}=Y(),{isFeatureEnabled:m}=p(F.isDepositAccountsFeatureEnabled),{isFeatureEnabled:y}=p(F.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:r}=p(F.isTreasuryEnabled),f=b(S=>fe(S)),E=Ee(a),k=xe(g,a),v=!k&&f,h=we(a,y,g),{areTenantIdsInSync:I}=Wn();d.useEffect(()=>{I&&t(In(u,v))},[u,t,v,I]);const x=b(S=>En(S,v)),T=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||u==null,M=xn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,V=S=>{n(S)};return o.jsxs(Dt,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:V}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:x,isAccountingClassesEnabled:f,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:h===!1,isTreasuryDisabled:r===!1,isLiteRoleDisabled:M===!1,onClickMenuIcon:()=>{V(!0)},isLoading:T,isBankingOnlyTenant:k,isCardsOnlyTenant:E,onAddressClick:S=>{const U=function(A,_){let j=`/${A}/settings/my_profile`;return j=j.concat(`/new/${_}`),j}(c,S),C=nt(l.state?.pathnameStackToGoBack,l.pathname);s(U,{state:{pathnameStackToGoBack:C}})},onGetOtp:S=>{const U={...x.myProfileLocalData,phone:S};t(de({localData:U})),t(kn(S,"MyProfile"))},onResendOtp:S=>{t(wn(S,"MyProfile"))},onCancelClick:()=>{t(vn())},onSaveClick:()=>{t(ue("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(S,U)=>{t(An(S,U,"MyProfile"))},onVerifyOtpSuccess:S=>{S!=null&&P.saveZeniOtpToken(S),t(ue("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:S=>{t(de({localData:S}))}})]})};function Mt(){const e=O(),t=b(r=>D(r)).companyId,s=b(r=>jn(r)),l=b(r=>Ae(r)),i=P.getSignedInUser(),[n,a]=d.useState(!1),c=d.useCallback(r=>{a(r)},[]),u=d.useCallback(r=>{e(Pn(r))},[]),p=d.useCallback(()=>{i?.userEmail!=null&&e(Dn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=d.useCallback(()=>{e(Mn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const y=d.useCallback(()=>{const r=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,t))},[t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=d.useCallback(()=>{e(Un())},[]);return d.useEffect(()=>{if(l.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,t))}},[s.fetchState,t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled,l.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:u,onCancel:p,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:y,resetUpdateStatus:g})]})}function ga(e){const[t,s]=d.useState(!1),l=b(r=>Ae(r)),i=b(r=>D(r)),n=H(),a=P.getSignedInUser(),c=O(),{useFeatureGate:u}=Y(),{isFeatureEnabled:p}=u(F.isDebitCardFeatureEnabled),m=a?.userEmail==null||l.fetchState!=="Completed"||Tn(l.notificationSettings,a.userEmail,p,i);d.useEffect(()=>{l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&t===!1&&(s(!0),c(_n()))},[l.fetchState,t]);const y=xe(p,i),g=Ee(i);return l.fetchState!=="In-Progress"&&l.fetchState!=="Not-Started"||m!==!0?Fn(i)?o.jsxs(W,{children:[On(n?.loggedInUserRole??[],p,i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"accounting/*",element:o.jsx(ht,{})}),Rn(n?.loggedInUserRole??[],p,i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"approval_rules/*",element:o.jsx(Ut,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Bn(i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"my_bank_connections",element:o.jsx(Pt,{})}),Vn(i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"bank_connections",element:o.jsx(It,{})}),zn(i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"business_verification",element:o.jsx(ct,{productType:y?"zeni_accounts":g?"charge_cards":it(i,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(w,{path:"company_details",element:o.jsx(lt,{})}),Nn(n?.loggedInUserRole??[],i)&&o.jsx(w,{path:"billing",element:o.jsx(At,{})}),Qn(n?.loggedInUserRole??[],p,i)&&o.jsx(w,{path:"integrations",element:o.jsx(wt,{})}),o.jsx(w,{path:"my_profile/new/:addressType",element:o.jsx(me,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(w,{path:"my_profile",element:o.jsx(me,{})}),m&&o.jsx(w,{path:"notifications",element:o.jsx(Mt,{})}),o.jsx(w,{path:"*",element:o.jsx(N,{})})]}):o.jsx(W,{children:o.jsx(w,{path:"*",element:o.jsx(N,{})})}):null}function Ut(e){return o.jsxs(W,{children:[o.jsx(w,{path:"/",element:o.jsx(St,{})}),o.jsx(w,{path:"bills/approval-rules/*",element:o.jsx(ut,{})}),o.jsx(w,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(pt,{}):o.jsx(N,{})}),o.jsx(w,{path:"*",element:o.jsx(N,{})})]})}export{ga as default};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CS0rfBBF.js";import{h as Y,g as ee,u as ne,i as G,j as P,N as B,n as W,t as en}from"./core-D6ttr5iw.js";import{bJ as nn,co as Ce,PX as ye,eX as V,cA as tn,zz as Q,zj as an,Q7 as sn,Qa as on,rD as te,rr as ae,l6 as ie,tK as L,Qc as Ie,gi as $e,gh as Ge,gg as We,Qd as cn,zI as rn,Es as Ae,Ej as ke,Eg as _e,D_ as X,Em as ve,Ep as Ee,Ev as Pe,uc as Te,gx as un,cv as dn,fE as ln,fC as pn,fD as mn,bt as yn,Qe as fn,C_ as le,DC as gn,Qf as bn,bK as Sn,FL as pe,EM as hn,Qg as Cn,Qh as In,FP as An,FT as kn,tD as _n,Kh as vn,Go as he,Ho as me,Qi as En,Qj as Pn,Qk as Tn,Ql as He,Qm as wn,MK as Dn,Pk as Un,MZ as On,Qn as Ke,E2 as Fn,M_ as Vn,E6 as xn,Qo as Oe,GK as qe,le as Bn,ru as Xe,tM as jn,bE as Re,tY as ze,cy as Rn,Qp as Je,fX as zn,G6 as Ln,Ga as Nn,Qq as Mn,Gr as Le,Qr as Zn,Qs as Qn,Qt as $n,Qu as Gn,gq as Wn,AT as Hn,Qv as Kn,AY as qn,AX as Xn}from"./zeni-epic-state-Cl3jFj7z.js";import{I as se,Q as oe,d as q,m as we,aR as J,bD as Ye,z as U,K as ce,e as O,w as De,g as $,bE as Jn,at as re,bF as x,bG as Yn,bH as et,af as Be,bI as nt,s as Ne,au as Me,Z as tt,A as at,bJ as it,bK as st,bL as ot,a8 as ct}from"./index-BGtgXdBV.js";import{a as h}from"./sentry-CEfOando.js";import{n as Fe,D as rt,S as ut}from"./mui-vLo47rlo.js";import{M as fe}from"./MobileAppDrawer-BI_hKtLW.js";import z from"./NotFoundScreen-DUKrEDOk.js";import{a as Ze}from"./analyticsHelper-F9bkDfUR.js";import{d as Qe}from"./routePaths-DZDk8gbY.js";import{B as Ue}from"./BusinessVerificationPageScreen-BKvR8fKs.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]="fbac2331-7bbd-4854-8664-b4bd90a90aa6",e._sentryDebugIdIdentifier="sentry-dbid-fbac2331-7bbd-4854-8664-b4bd90a90aa6")}catch{}})();const dt=Fe.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
|
-
`,lt=W(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=sn(e),s=U.getSignedInUser(),l=c.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=on(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",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i}},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(Q(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,s)=>{e(Te("bill_pay_setup",n,s))},onEstablishConnectionClick:n=>{e(Pe(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Ee(n,s,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(ve(!1,n,"bill_pay","bill_pay_setup",s))},onEstablishConnectionSuccess:()=>{e(Q(a,!0))},onEnableBillPayClick:()=>{e(X(a,"bill_pay"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"bill_pay","bill_pay_setup"):_e("reimbursement_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"bill_pay_setup",n,s))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(rn(a))},onAcceptUpdatedTOSSuccess:()=>{e(Q(a,!0))},onGetOtp:(n,s)=>{e(We(n,"SpendManagementSetup")),s!=null&&e(cn({officerType:s,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,s)=>{e($e(n,s,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,s)=>{n!=null&&s!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Jn),pt=()=>{const e=Y(),o=ee(),t=ne(),{tenantEmailDomain:a}=G(),c=se(),n=nn(c?.loggedInUserRoleMap),s=Ce(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:i}=oe(),{isFeatureEnabled:r}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(q.isBillPayLocalCurrencyFeatureEnabled),g=we(),{configValue:C}=i(J.zeniAccountsConfig),I=ye(C),[k,d]=h.useState(!1),b=h.useRef(!1),[y,_]=h.useState(!1),v=P(T=>T.billPaySetupViewState.fetchState),f=P(T=>V(T)),S=P(T=>T.billPaySetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:D,isLoading:A}=Ye(f?.tenantId),m=f.companyId??U.getSignedInUserTenant(a)?.companyId;if(U.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const E=!!f.companyBillPayInfo?.info?.isBillPayTOSAccepted,j=tn(c?.loggedInUserRoleMap);h.useEffect(()=>{b.current||v!=="Not-Started"||m==null?b.current||v!=="Completed"||m==null||f.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(b.current=!0,t(Q(m,!1,!0))):(b.current=!0,t(Q(m,!0)))},[v,m,t]),h.useEffect(()=>{y||S!=="Not-Started"||A||(_(!0),t(an(!0,!0,D)))},[y,S,A,D,t]);const F=T=>{d(T)};if(E===!1||j&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(B,{to:"../promo"});if(E===!0&&c?.loggedInUserRoleMap!=null){const T=R=>R.trackPageLoaded($.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(ce,{analytics:O,onLoad:R=>T(R)}),u.jsx(fe,{isAppContentDrawerOpen:k,handleDrawerToggle:F}),u.jsx(lt,{navigate:e,location:o,companyId:m,currentTenant:f,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:s,accountsPromoConfig:I,isLocalCurrencyEnabled:p})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}})},Qt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,$t=e=>`/${e}/cards`,Gt=e=>`/${e}/cards/setup`,Wt=e=>`/${e}/cards/onboard`,Ht=(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},Kt=(e,o)=>e.find(t=>t.id===o),qt=(e,o,t)=>!e||!o||t.fetchState==="Completed",mt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Xt=(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,Jt=(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,Yt=(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,ea=(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,na=80,ta=80,aa=e=>e.companyId??U.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),gt=W(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,s=V(e),l=U.getSignedInUser(),i=s.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},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",g=!!s.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:s.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:s,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:i,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:g,businessVerificationStatus:C,isCardPolicyEnabled:I,isUserChargeCardAdmin:k}=o;return{onBusinessVerificationSectionClick:()=>{O.trackCardsVerifyIdentityCompanyDetailsClick(g,p,C?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},...k&&I?{onCardPolicySectionClick:()=>{t("../policy")}}:{},onFetchLinkTokenClick:(d,b)=>{e(Te("charge_card_setup",d,b))},onEstablishConnectionClick:d=>{e(Pe(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,b,y)=>{e(Ee(d,b,"charge_cards","charge_card_setup",y))},onUpdatePaymentAccountLoginStatus:(d,b)=>{e(ve(!1,d,"charge_cards","charge_card_setup",b))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{O.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&s===!0&&i===!1&&r===!1?e(X(a,"charge_cards__debit_cards")):l===!0&&i===!1?e(X(a,"charge_cards")):s===!0&&r===!1&&e(X(a,"debit_cards"))},onUpdateChargeCardClick:(d,b,y)=>{const _=n.allBankAccounts.find(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId),v=n.allBankAccounts.find(f=>f.accountId===d);O.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:_?.accountName??"",newZeniCashAccount:v?.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(y==="paymentAccount"?ke(d,b,"charge_cards","charge_card_setup"):_e("charge_card_setup",d,b))},onUpdatePrimaryFundingAccount:(d,b)=>{const y=n.allFundingAccounts.find(f=>f.id===d),_=n.allFundingAccounts.findIndex(f=>f.id===n.primaryFundingAccount?.id)+1,v=n.allFundingAccounts.findIndex(f=>f.id===d)+1;O.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:y?.label??"",newPaymentAccountBalance:x(y?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:y?.accType==="depositAccount",oldPaymentAccountPosition:_,newPaymentAccountPosition:v,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(Ae(a,"charge_card_setup",d,b))},onEnableChargeCardSuccess:()=>{e(bn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,b)=>{e(Ie({officerType:d,fileIds:b}))},onSendForVerificationClick:d=>{l===!0&&s===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):s===!0&&e(L(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ie({files:d}))},onDeleteFile:d=>{e(ae(d))},onEditFileName:(d,b)=>{e(te(d,b.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(gn(a,d))}}})(Yn),bt=()=>{const e=Y(),o=ee(),t=ne(),{tenantEmailDomain:a}=G(),c=se(),n=P(N=>V(N)),{useDynamicConfig:s,useFeatureGate:l}=oe(),i=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=s(J.zeniAccountsConfig),{configValue:p}=s(J.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:C}=l(q.isDebitCardFeatureEnabled),{isFeatureEnabled:I}=l(q.isChargeCardFeatureEnabled),{isFeatureEnabled:k}=l(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=l(q.isCardPolicyEnabled),b=P(N=>un(N,n.companyId)),y=dn(b.controllers),_=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,v=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,f=ln(C,n),S=yt({isDebitCardFeatureEnabled:C,isBankingOnlyTenant:f}),D=pn(n),A=mn(n),m=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,E=ft({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:I,isBookKeepingTenant:A,isDebitCardProductVisible:S,chargeCardsCreditAccountLimit:m}),j=S&&E===!1,F=S===!1&&E,T=ye(r),R=yn(c?.loggedInUserRoleMap),H=Ce(c?.loggedInUserRoleMap),[ge,be]=h.useState(!1),[M,ue]=h.useState(!1),Z=P(N=>N.chargeCardSetupViewState.fetchState),w=U.getSignedInUserTenant(a)?.companyId??n.companyId,Ve=U.getSignedInUser(),de=N=>{be(N)},xe=P(N=>fn(N,w));if(Ve==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect(()=>{M||Z!=="Not-Started"||w==null?M||Z!=="Completed"||w==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(w,!1,!0)):(ue(!0),t(le(w,!0)))},[M,Z,w,t]);const Se=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,K=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,je=mt(E,S,v,_);return Se||K?Se||K?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{O.trackPageLoaded($.Event.cardsSetupVisited),O.trackCardsCardSetupView(y,je,i==null?"Cards Setup":i.includes("cards/promo")?"Promo":i.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:ge,handleDrawerToggle:de}),u.jsx(gt,{autoPayThreshold:g,navigate:e,location:o,companyId:w,currentTenant:n,isEarlyPayEnabled:k,isChargeCardTOSAccepted:Se,isDebitCardTOSAccepted:K,isUserChargeCardAdmin:R,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:j,isCreditCardOnlyEnabled:F,chargeCardSetUpView:xe,isCreditCardProductVisible:E,isDebitCardFeatureEnabled:S,isChargeCardSetupEnabled:_,isDebitCardSetupEnabled:v,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:y,productInformation:je,onClickMenuIcon:()=>{de(!0)},hasZeniAccountsAdminAccess:H,accountsPromoConfig:T})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(B,{to:"../promo"})},St=Fe.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
|
-
`,ht=W(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=Cn(e),s=In(e,a),l=U.getSignedInUser(),i=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=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",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:s,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:s,mileageUnit:l,mileageCurrencyCode:i,mileageCurrencySymbol:r,denomination:p,denominationSymbol:g,mileageAmountInDenomination:C,description:I}=n;e(kn({mileageDetails:{mileageUnitAmount:{amount:s,currencyCode:i,currencySymbol:r},denomination:p,denominationSymbol:g,mileageAmountInDenomination:C,mileageCurrencyCode:i,mileageCurrencySymbol:r,mileageUnit:l,description:I}}))},onSaveMileageClick:n=>{e(An(a)),O.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,s)=>{e(Te("reimbursement_setup",n,s))},onEstablishConnectionClick:n=>{e(Pe(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Ee(n,s,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(ve(!1,n,"reimbursement","reimbursement_setup",s))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(X(a,"reimbursement"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"reimbursement","reimbursement_setup"):_e("reimbursement_setup",n,s))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"reimbursement_setup",n,s))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(et),Ct=()=>{const e=Y(),o=ee(),t=ne(),{tenantEmailDomain:a}=G(),c=se(),{useDynamicConfig:n}=oe(),s=we(),{configValue:l}=n(J.zeniAccountsConfig),i=ye(l),r=Sn(c?.loggedInUserRoleMap),p=Ce(c?.loggedInUserRoleMap),[g,C]=h.useState(!1),I=h.useRef(!1),[k,d]=h.useState(!1),b=P(m=>m.remiSetupViewState.fetchState),y=P(m=>V(m)),_=P(m=>m.remiSetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:v,isLoading:f}=Ye(y?.tenantId),S=U.getSignedInUserTenant(a)?.companyId??y.companyId,D=U.getSignedInUser(),A=m=>{C(m)};if(D==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect(()=>{I.current||b!=="Not-Started"||S==null?I.current||b!=="Completed"||S==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(I.current=!0,t(pe(S,!1,!0))):(I.current=!0,t(pe(S,!0)))},[b,S,t]),h.useEffect(()=>{k||_!=="Not-Started"||f||(d(!0),t(hn(!0,!1,!1,v)))},[k,_,f,v,t]),y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(B,{to:"../promo"});if(y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=E=>E.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(St,{children:[u.jsx(ce,{analytics:O,onLoad:E=>m(E)}),u.jsx(fe,{isAppContentDrawerOpen:g,handleDrawerToggle:A}),u.jsx(ht,{navigate:e,location:o,companyId:S,currentTenant:y,isUserRemiAdmin:r,onClickMenuIcon:()=>{A(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:i})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})},It=W(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=Dn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Un(e.companyConfigState),p=On(e.userRoleConfigState),g=a==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:i,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:s}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:i=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:g,companyLegalName:C,companyTaxId:I,companyWebsite:k,companyPhone:d,primaryContactEmail:b,primaryContactName:y,primaryContactUserId:_,primaryContactSyncToken:v,syncToken:f,fileIds:S,incDate:D,typeOfIncorporation:A,stateOfIncorporation:m,sourceOfFunds:E,companySubIndustry:j,countriesOfOperations:F,companySourceOfFunds:T,companySourceOfFundsDescription:R,transactionVolume:H,transactionVolumeDescription:ge,purposeOfAccount:be,purposeOfAccountDescription:M,regulatedStatus:ue,regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve}=i,de=g?.selectedOption,xe={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:de==null||de===""?void 0:de,companyLegalName:C,taxIdOrEIN:I,website:k!=""&&k!=null?Rn(k):void 0,phone:d,syncToken:f,fileIds:S,incDate:D!=null?Re(D?.toString()):D,typeOfIncorporation:A?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:E?.selectedOption??"",companySubIndustry:j?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map(K=>K.length===2?K:Me(K))??[],companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:R,transactionVolume:H?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:be?.selectedOption??"",purposeOfAccountDescription:M,regulatedStatus:ue??"",regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve?.selectedOptions??[]},Se={userId:_,firstName:y.firstName,lastName:y.lastName,email:b,syncToken:v};e(ze({companyDetails:xe,primaryContactDetails:Se}))},onCompanyOfficerUpdated:i=>{const r=i.map(p=>{const{officerType:g,userId:C,name:I,email:k,nationalityCountryCode:d,ssn:b,dob:y,phone:_,syncToken:v,selectDocument:f,role:S,ownership:D,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:E,fileIds:j}=p;let F;return f.selectDocumentType==="driverLicense"?F="driving_license":f.selectDocumentType==="passport"?F="passport":f.selectDocumentType==="stateId"?F="id_document":f.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:g,userId:C,firstName:I.firstName,lastName:I.lastName,email:k,ssn:b,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:_,birthday:y!=null?Re(y?.toString()):y,syncToken:v,titleAtCompany:S.selectedOption,ownershipInCompany:D,documentTypeSelectedForVerification:F,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:E,fileIds:j,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(ze({officers:r}))},onSaveDetailsClick:i=>{e(L(t,i,a))},onSendForVerificationClick:i=>{e(L(t,i,a,!0))},onAddressClick:i=>{const r=Qe(l,i),p=Ne(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),C={};g.forEach((I,k)=>{C[k]=I}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(C).length>0?C:void 0}})},onRegisteredAddressClick:i=>{const r=Qe(l,i),p=Ne(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),C=Object.fromEntries(g.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(C).length>0?C:void 0}})},onBackClick:()=>{e(jn({companyId:t})),n("../setup")},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onDeleteFileList:i=>{e(Xe(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onGetOtp:i=>{e(We(i,"SpendManagementSetup"))},onResendOtp:i=>{e(Ge(i,"SpendManagementSetup"))},onVerifyOtp:(i,r)=>{e($e(i,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(i,r)=>{e(Bn({addressType:i,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:i=>{if(t==null)return;const r=Vn(i.documentType);r!=null&&e(xn({target:"setup",companyId:t,officerType:i.officerType,fileId:i.fileId,documentType:r}))},onCompanyDocumentUploadedForAutofill:i=>{t!=null&&e(Fn({target:"setup",companyId:t,fileId:i.fileId,documentType:i.documentType}))}}})(nt),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=Y(),c=ee(),n=ne(),[s]=en(),l=s.get("showStepProgress"),i=s.get("isTransferInitiated"),[r,p]=h.useState(!1),{tenantEmailDomain:g}=G(),C=se(),{useDynamicConfig:I}=oe(),k=we(),{configValue:d}=I(J.zeniAccountsConfig),b=ye(d),y=P(m=>{switch(e){case"zeni_accounts":return m.zeniAccountSetupViewState.fetchState;case"reimbursement":return m.remiSetupViewState.fetchState;case"charge_cards":return m.chargeCardSetupViewState.fetchState;case"zeni_treasury":return m.treasurySetupViewState.fetchState;default:return m.billPaySetupViewState.fetchState}}),_=P(m=>m.companyConfigState.fetchState),v=P(m=>m.userRoleConfigState.fetchState),f=P(m=>V(m)),S=f.companyId??U.getSignedInUserTenant(g)?.companyId;if(h.useEffect(()=>{_==="Not-Started"&&n(_n()),v==="Not-Started"&&n(vn(!0))},[_,v,n]),h.useEffect(()=>{if(!r&&y==="Not-Started"&&S!=null)switch(p(!0),e){case"zeni_accounts":n(me(S,!0));break;case"zeni_treasury":n(he(S,!0));break;case"reimbursement":n(pe(S,!0));break;case"charge_cards":n(le(S,!0));break;default:n(Q(S,!0))}},[r,y,S,n]),U.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let D;switch(e){case"zeni_accounts":D=f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":D=f.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":D=f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":D=f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:D=f.companyBillPayInfo?.info?.isBillPayTOSAccepted}const A=P(m=>{let E;switch(e){case"zeni_accounts":E=wn(m,S);break;case"zeni_treasury":E=He(m,S);break;case"charge_cards":E=Tn(m,S);break;case"reimbursement":E=Pn(m,S);break;default:E=En(m,S)}return E});return D===!1?null:A.fetchState==="Completed"&&D===!0&&C?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:m=>(E=>{switch(e){case"zeni_accounts":return E.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return E.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return E.trackPageLoaded($.Event.billPayBusinessVerification,Be(c)?"Settings":void 0)}})(m)}),u.jsx(It,{businessVerificationDetails:A,navigate:a,location:c,companyId:S,analytics:O,currentTenant:f,productType:e,roleMap:C.loggedInUserRoleMap,isSettings:Be(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:i!=null,onClickMenuIcon:()=>{},maxInsuredAmount:b.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},kt={overlayWidth:new at(100,100,59)},_t=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),s=U.getSignedInUser(),l=n.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=Je(e,a),p=He(e,a),g=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",C=Mn(e),I=C.transactions,k=Ke(e),d=C.accountSummary?.totalBalance?.amount,b=I.length===0||d===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:I,transferDetails:k,isFirstTransfer:b,isDisabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:s,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:i=>{e($n(i))},onBusinessVerificationSectionClick:(i,r)=>{let p="../verification";i&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(he(a,!1,!0))},onFetchLinkTokenClick:(i,r)=>{e(Te("treasury_setup",i,r))},onEstablishConnectionClick:i=>{e(Pe(i,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(i,r,p)=>{e(Ee(i,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(i,r)=>{e(ve(!1,i,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(he(a,!0))},onEnableTreasuryClick:()=>{e(X(a,"zeni_treasury"))},onUpdateTreasuryClick:(i,r,p)=>{e(p==="paymentAccount"?ke(i,r,"zeni_treasury","treasury_setup"):_e("treasury_setup",i,r))},onUpdatePrimaryFundingAccount:(i,r)=>{e(Ae(a,"treasury_setup",i,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(i,r)=>{e(Ie({officerType:i,fileIds:r}))},onSendForVerificationClick:(i,r)=>{if(e(L(a,i,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;s.trackTreasuryPortfolioConfirm(p.riskScore,Ze(p)),e(Le(!1))}r===!0&&e(qe())},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:i=>{const{sourceOfFunds:r}=i;e(Qn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:i=>{s.trackTreasuryAllocationAction("update",Ze(i)),e(Zn(i))},onConfirmFundAllocation:()=>{e(Le(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(Oe())}}})(it),vt=()=>{const e=Y(),o=ee(),t=ne(),a=we(),c=tt(),{tenantEmailDomain:n}=G(),{useDynamicConfig:s}=oe(),l=se(),[i,r]=h.useState(!1),p=Ce(l?.loggedInUserRoleMap),{configValue:g}=s(J.zeniAccountsConfig),C=ye(g),[I,k]=h.useState(!1),[d,b]=h.useState(!1),[y,_]=h.useState(!1),[v,f]=h.useState(!1),[S,D]=h.useState(!1),A=P(w=>w.treasurySetupViewState.fetchState),m=P(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),E=P(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),j=P(w=>w.treasuryDetailState.transactionsState?.fetchState),F=P(w=>V(w)),T=U.getSignedInUserTenant(n)?.companyId??F.companyId,R=P(w=>Je(w,T)),H=R.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,be=U.getSignedInUser(),M=w=>{k(w)};if(be==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect(()=>{d||A!=="Not-Started"||T==null||(b(!0),t(he(T,!0,!1)))},[d,A,T,t]),h.useEffect(()=>{y||m!=="Not-Started"||T==null||(_(!0),t(zn()))},[y,m,T,t]),h.useEffect(()=>{v||E!=="Not-Started"||T==null||(f(!0),t(Ln()))},[v,E,T,t]),h.useEffect(()=>{S||j!=="Not-Started"||T==null||(D(!0),t(Nn(!0)))},[S,j,T,t]);const ue=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,Z=ue==="pending_review"||ue==="verified";return h.useEffect(()=>{i||A!=="Completed"||H||Z||!o.pathname.includes("setup")||r(!0)},[A,H,Z]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(B,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:I,handleDrawerToggle:M}),u.jsx(rt,{onClose:()=>{t(Oe()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:i?0:250,PaperProps:{style:{width:kt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Et,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),e("../setup")}})})}),u.jsx(_t,{navigate:e,location:o,companyId:T,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:C,isAccountsEnabled:ge,isAllocationDone:H,analytics:O,treasurySetupView:R,onClickMenuIcon:()=>{M(!0)},showTreasurySetupOverlay:i,setShowTreasurySetupOverlay:r})]})},Et=Fe(ut)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,Pt=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=Gn(e,a),r=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";return{zeniAccountSetUpView:i,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.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,s)=>{e(Te("account_setup",n,s))},onEstablishConnectionClick:n=>{e(Pe(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Ee(n,s,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(ve(!1,n,"zeni_accounts","account_setup",s))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(X(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"zeni_accounts","account_setup"):_e("account_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"account_setup",n,s))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))}}})(st),Tt=()=>{const e=Y(),o=ee(),t=ne(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=oe(),n=se(),s=Ce(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),i=ye(l),[r,p]=h.useState(!1),[g,C]=h.useState(!1),I=P(_=>_.zeniAccountSetupViewState.fetchState),k=P(_=>V(_)),d=U.getSignedInUserTenant(a)?.companyId??k.companyId,b=U.getSignedInUser(),y=_=>{p(_)};if(b==null)throw Error("Can't access zeni bank account setup page without signing in...");if(h.useEffect(()=>{g||I!=="Not-Started"||d==null?g||I!=="Completed"||d==null||k.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(d,!1,!0)):(C(!0),t(me(d,!0)))},[g,I,d,t]),k.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(B,{to:"../promo"});{const _=v=>v.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:v=>_(v)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:y}),u.jsx(Pt,{navigate:e,location:o,companyId:d,currentTenant:k,isUserZeniAccountsAdmin:s,accountsPromoConfig:i,onClickMenuIcon:()=>{y(!0)}})]})}},wt=Fe.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
|
-
`,Dt=W(function(e,o){const t=V(e),a=U.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Kn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:n,analytics:O}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Xn(a))},onSubmitClick:()=>{e(qn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ie({files:a}))},onDeleteFile:a=>{e(ae(a))},onDeleteFileList:a=>{e(Xe(a))},onEditFileName:(a,c)=>{e(te(a,c.split(".")[0]))}}})(ot),Ut=()=>{const e=Y(),o=ee(),t=ne(),[a,c]=h.useState(!1),[n,s]=h.useState(!1),[l,i]=h.useState(!1),{tenantEmailDomain:r}=G(),p=se(),{useFeatureGate:g}=oe(),{isFeatureEnabled:C}=g(q.isBillPayLocalCurrencyFeatureEnabled),I=P(A=>A.internationalWireVerificationState.verificationFormFetchState.fetchState),k=P(A=>A.billPaySetupViewState.fetchState),d=P(A=>V(A)),b=we(),y=d.companyId??U.getSignedInUserTenant(r)?.companyId,_=P(A=>Wn(A.companyState,d.companyId)),v=_?.company.companyBillPayInfo.internationalWireOnboardingStatus,f=v?.code==="onboarding_status_not_started"?void 0:"readonly";if(h.useEffect(()=>{a||I!=="Not-Started"||y==null||(c(!0),t(Hn(y)))},[a,I,y,t]),h.useEffect(()=>{n||k!=="Not-Started"||y==null||(s(!0),t(Q(y,!0)))},[k,n,y,t]),U.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const S=d.companyBillPayInfo?.info?.isBillPayTOSAccepted,D=A=>{i(A)};return S===!1?u.jsx(B,{to:"../promo"}):S===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(wt,{children:[u.jsx(ce,{analytics:O,onLoad:A=>(m=>m.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(A)}),Be(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:D}):null,u.jsx(Dt,{navigate:e,location:o,companyId:y,analytics:O,currentTenant:d,roleMap:p.loggedInUserRoleMap,isFormReadonly:f,isLocalCurrencyEnabled:C})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:b.colors.grey5}})},Ot=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(he(t,!0,!0));break;default:e(Q(t,!0,!0))}}}}})(ct(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:s,isUserHasOnlyCardAccess:l,productType:i,type:r}=e;switch(i){case"bill_pay":switch(r){case"verification":return o?u.jsx(Ue,{productType:i}):t?u.jsx(B,{to:"../"}):u.jsx(z,{});case"international-wire":return o?u.jsx(Ut,{}):t?u.jsx(B,{to:"../"}):u.jsx(z,{});default:return o?u.jsx(pt,{}):t?u.jsx(B,{to:"../"}):u.jsx(z,{})}case"reimbursement":return r==="verification"?a?u.jsx(Ue,{productType:i}):u.jsx(z,{}):a?u.jsx(Ct,{}):u.jsx(z,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Ue,{productType:"zeni_accounts"}):u.jsx(z,{}):c?u.jsx(Tt,{}):u.jsx(z,{});case"zeni_treasury":return n===!0?u.jsx(vt,{}):u.jsx(z,{});case"charge_cards":return r==="verification"?s?u.jsx(Ue,{productType:"charge_cards"}):l?u.jsx(B,{to:"../"}):u.jsx(z,{}):s?u.jsx(bt,{}):l?u.jsx(B,{to:"../"}):u.jsx(z,{})}}));function oa(e){const{tenantEmailDomain:o}=G(),t=P(c=>V(c)).companyId??U.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,s)=>{s.onEventReceived(c)}};if(U.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ot,{...e,companyId:t,...a})}export{na as A,ta as P,oa as S,Jt as a,ea as b,yt as c,ft as d,mt as e,aa as f,Ht as g,$t as h,Xt as i,Yt as j,ia as k,qt as l,Kt as m,Gt as n,Wt as o,Qt as p,sa as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-CS0rfBBF.js";import{a as u,b as M,q as T}from"./sentry-CEfOando.js";import{u as A,h as z,j as c,g as D,N as j,n as O}from"./core-D6ttr5iw.js";import{u as P,z as s,m as F,e as E,a as _,f as B,g as N,h as V,j as W,U as X,k as v}from"./index-BGtgXdBV.js";import{eX as Y,LW as $,LX as q,fA as J,g1 as H,M0 as G,gp as K,cY as Q,M1 as b,M2 as R,M3 as Z,bY as y}from"./zeni-epic-state-Cl3jFj7z.js";import"./mui-vLo47rlo.js";import{u as ee}from"./useDeviceId-DISstVTH.js";import{f as te}from"./analyticsHelper-F9bkDfUR.js";import{t as ne}from"./getLocaleForTenant-YNgm3b7A.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="2cdcc0c2-1dfe-4bae-aeb0-92187373afa5",t._sentryDebugIdIdentifier="sentry-dbid-2cdcc0c2-1dfe-4bae-aeb0-92187373afa5")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),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:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(R(n,a)))},clearSignInError:()=>{t(b())}}})(X),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>Y(e)),I=c(e=>$(e)),m=D(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),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(q(I.tenantsInOrder),o.zeniSessionId),J(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=W();e!=null&&B(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CS0rfBBF.js";import{a as n}from"./sentry-CEfOando.js";import{u as d,g,h as m,N as p}from"./core-D6ttr5iw.js";import{z as c,w as b,t as y,e as f,g as h}from"./index-BGtgXdBV.js";import{gu as x,gv as I,Mi as w}from"./zeni-epic-state-Cl3jFj7z.js";import{n as v}from"./mui-vLo47rlo.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.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]="af92a4ee-66ec-4613-bb22-abeb71ca68cc",e._sentryDebugIdIdentifier="sentry-dbid-af92a4ee-66ec-4613-bb22-abeb71ca68cc")}catch{}})();function q(){const e=d(),t=g(),a=m(),i=n.useRef(!1),l=c.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),y.reset(),f.trackLogout(h.Event.logoutSuccess),f.resetUserIdentity()}catch(u){console.error("Error during sign out:",u)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(j,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const j=v.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{q as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CS0rfBBF.js";import{a as G}from"./sentry-CEfOando.js";import{h as U,u as z,g as v,j as b,i as _,n as J}from"./core-D6ttr5iw.js";import{z as R,Q as M,d as p,$ as O,K as Q,e as V,g as W,da as Z,s as g,r as q}from"./index-BGtgXdBV.js";import{eX as H,TK as F,J3 as I,TL as x,TG as X,Ir as y,TM as Y,Iz as E,HV as aa,J4 as S,TN as B,fz as ea,IW as ta,I$ as sa,IO as oa,IM as w,J0 as na,IJ as ia,TO as la,TP as ra,TQ as ca,TR as ka,TS as T,ej as ua,TT as da,TU as pa}from"./zeni-epic-state-Cl3jFj7z.js";import{n as Ta}from"./mui-vLo47rlo.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-re9SKSxV.js";import{M as ga}from"./MobileAppDrawer-BI_hKtLW.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.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]="690b8a44-ac3a-443c-a917-651e7f50acd6",e._sentryDebugIdIdentifier="sentry-dbid-690b8a44-ac3a-443c-a917-651e7f50acd6")}catch{}})();const fa=Ta.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ha=J(function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=X(e),i=R.isZeniUser();return{taskListView:n,tagListView:u,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(I(!0,u))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(I(!0,u))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(y({taskDetailLocalData:s}));const k=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{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(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(E(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(E(a,[s]))},handleNewTaskInitialization:a=>{if(e(y({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(Z);function Na(){const e=U(),t=z(),o=v(),c=R.getSignedInUser(),n=b(r=>H(r)),{taskGroupId:u}=_(),{useFeatureGate:i}=M(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,$]=G.useState(!1),h=b(r=>F(r,l)),D=b(r=>r.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:N}=ma({mobileExploreReferrer:"Task Checklist"});if(O({isDataReady:m==="Completed"}),G.useEffect(()=>{t(I(!1,l))},[n?.tenantId,t,l]),G.useEffect(()=>{m==="Completed"&&t(x({taskGroupById:D.taskGroupById}))},[m,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return d.jsxs(d.Fragment,{children:[m==="Completed"?d.jsx(Q,{analytics:V,onLoad:r=>(K=>K.trackPageLoaded(W.Event.taskListPage))(r)}):null,d.jsxs(fa,{children:[d.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{$(r)}}),d.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:u,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:j,onAskAiCfoClick:N})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=ua(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=da(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{Na as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-CS0rfBBF.js";import se from"./NotFoundScreen-DUKrEDOk.js";import{a as c}from"./sentry-CEfOando.js";import{h as M,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-D6ttr5iw.js";import{I6 as Z,I9 as le,I3 as de,eX as H,TG as J,In as K,I0 as pe,IT as ue,IM as ke,TH as Y,TI as V,HY as me,HV as fe,rD as ge,rr as he,l6 as Ie,Ih as Se,TJ as Te,Iy as be,Iv as Ee,Ic as Ge,Is as Ce,Ir as De}from"./zeni-epic-state-Cl3jFj7z.js";import{z as C,d8 as xe,S as ye,Q as je,d as b,r as Q,s as w,K as ve,e as z,g as we,d9 as Re,k as A,at as Fe}from"./index-BGtgXdBV.js";import{n as Be}from"./mui-vLo47rlo.js";import{u as Pe}from"./useInitialThreadRequest-CmTGqSIj.js";import{M as Ue}from"./MobileAppDrawer-BI_hKtLW.js";import Le from"./TaskListScreen-gPJk_aPE.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.js";import"./useAskAiCfoHostNavButtonProps-re9SKSxV.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]="0027a998-eb54-4f6b-9151-f82dd54afc26",e._sentryDebugIdIdentifier="sentry-dbid-0027a998-eb54-4f6b-9151-f82dd54afc26")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))},[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(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=Y(e,t.taskId),d=H(e),l=r.taskGroupId??u,k=l!=null?V(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>V(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(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Q(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(K(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>H(i)),k=Pe(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,W]=c.useState(!1),[F,X]=c.useState(!1),[B,ee]=c.useState(!1),[P,y]=c.useState(!1),T=c.useRef(!1),G=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>J(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(W(!0),t(K(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(X(!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&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);c.useEffect(()=>{if(P)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Q(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,G,l,s,e]);const $=g(i=>Y(i,r)),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=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
|
-
`,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(v,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),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(v,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CS0rfBBF.js";import i from"./NotFoundScreen-DUKrEDOk.js";import{T as r}from"./TransactionDetailScreen-L3SyvDDw.js";import"./sentry-CEfOando.js";import{o as s,p as o}from"./core-D6ttr5iw.js";import"./zeni-epic-state-Cl3jFj7z.js";import"./recharts-BDyAk4nR.js";import"./index-BGtgXdBV.js";import"./mui-vLo47rlo.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.js";import"./useAskAiCfoHostNavButtonProps-re9SKSxV.js";import"./decodeURIComponentSafe-D0vQ4d1Q.js";import"./routePaths-DZDk8gbY.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]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{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 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CS0rfBBF.js";import{h as Q,g as H,u as X,i as U,j as S,N as z,n as Z,o as ve,p as j}from"./core-D6ttr5iw.js";import{eX as K,qS as W,jX as u,RG as ee,K1 as De,bo as le,RH as be,ky as te,NH as ae,RI as ue,RJ as Pe,bE as Y,JZ as ye,RK as Ee,RL as me,RM as je,K0 as Ae,RN as xe,RO as pe,RP as Me,RQ as ge,RR as Le,RS as Ce,RT as fe,Ld as Be}from"./zeni-epic-state-Cl3jFj7z.js";import{a as de,Q as ne,d as q,e as G,cp as ce,s as V,r as oe,Y as Fe,T as Oe}from"./index-BGtgXdBV.js";import"./mui-vLo47rlo.js";import{a as g}from"./sentry-CEfOando.js";import{w as se}from"./withTransactionSidePanel-R0O15XnS.js";import{p as ie,c as re}from"./routePaths-DZDk8gbY.js";import{v as Re}from"./utils-DKj7mVPA.js";import{d as b}from"./decodeURIComponentSafe-D0vQ4d1Q.js";import{Z as Ge}from"./ZeniAccountStatementScreen-B1x9Ll2M.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./useAskAiCfoHostNavButtonProps-re9SKSxV.js";import"./TransactionDetailScreen-L3SyvDDw.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]="ef5ab729-7780-4071-9905-272b12031e96",a._sentryDebugIdIdentifier="sentry-dbid-ef5ab729-7780-4071-9905-272b12031e96")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(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=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(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=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=Q(),t=H(),n=X(),c=t.pathname.split("/").find(r=>ze.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=U(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S(r=>K(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=S(r=>W(r))&&k,{dataAvailable:C,initialTimeframeTick:P}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(P);return{tranListType:o,accountType:ee(h),title:T,subTitle:D,timeframe:y,period:r}},[o,y,h,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(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(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=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}}},Ne=(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},Je=Z(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??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)}`),G.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=V(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=Q(),n=H(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=U(),p=b(l??""),A=b(m??""),k=b(h??""),x=b(I??""),C=S(d=>Pe(d.transactionListState,A,p,k)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=S(d=>K(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=S(d=>W(d))&&r;let i;const R=Ve(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,h,T,D,y,I].filter(d=>d!=null);return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ve=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ke=Z(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??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)}`),G.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=V(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),Qe=se(function({referrerType:a,...e}){const t=Q(),n=H(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=U(),p=b(l??""),A=b(m??""),k=b(h??""),x=b(I??""),C=S(d=>je(d.transactionListState,A,p,k)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=S(d=>K(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),w=S(d=>W(d))&&r;let i;const R=Xe(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ue(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,h,T,D,y,I].filter(d=>d!=null);return R&&L!=null?s.jsx(Ke,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(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),Ze=Z(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??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)}`),G.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=V(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=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Q(),n=H(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=U(),p=b(l??""),A=b(m??""),k=b(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=S(v=>Me(v.transactionListState,A,p)),[P,B]=g.useState(!1),[E,F]=g.useState(void 0),O=S(v=>K(v)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=We(p,A,h,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:h,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(q.isProjectsTransactionsEnabled),d=S(v=>W(v))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!P&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[P,r,c,_]);const ke=[l,m,h,T,D,y].filter(v=>v!=null);return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(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=H().state?.referrer,e=S(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[S(n=>K(n)).tenantId],t=Oe();return s.jsxs(ve,{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(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),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(Qe,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CS0rfBBF.js";import{h as U,g as B,u as P,i as O,j as y,N as L,n as N,o as we,p as k}from"./core-D6ttr5iw.js";import{cp as G,eX as D,Qp as R,Go as ae,fX as q,G6 as ne,Qr as Ie,Gr as ke,Qn as be,Qo as se,QE as je,Ev as Ee,uc as Ae,Qt as ve,GK as De,Qq as re,cT as Z,ys as oe,fC as Fe,fE as Le,RD as Ue,RE as Be,G7 as Pe,RF as Re,G8 as Me,Gh as Ve,bs as Oe,bJ as Ne,cA as Ge,bK as _e,co as $e,fW as ze,bt as Qe,LY as qe,cn as Ze}from"./zeni-epic-state-Cl3jFj7z.js";import{I as _,aq as He,z as E,K as $,e as b,ci as Ke,cj as We,ck as Q,Z as H,m as Je,Y as Xe,$ as Ye,Q as ie,d as A,A as et,w as tt,cl as at,at as K,s as nt,cm as st,r as W,cn as rt,F as X,co as ot,i as it}from"./index-BGtgXdBV.js";import{D as ct,n as M,S as lt}from"./mui-vLo47rlo.js";import ut from"./NotFoundScreen-DUKrEDOk.js";import{S as Y}from"./SetupPagesScreen-Duc28IO6.js";import{a as p}from"./sentry-CEfOando.js";import{u as dt}from"./useAskAiCfoHostNavButtonProps-re9SKSxV.js";import{u as pt}from"./useInitialThreadRequest-CmTGqSIj.js";import{u as mt}from"./useCashManagementBanner-DoVCCRms.js";import{M as ce}from"./MobileAppDrawer-BI_hKtLW.js";import{F as ft}from"./FeaturePreviewScreen-heeivM6W.js";import{a as ee}from"./analyticsHelper-F9bkDfUR.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.js";import"./routePaths-DZDk8gbY.js";import"./BusinessVerificationPageScreen-BKvR8fKs.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]="4ea39abe-4c61-47b3-b906-656f083debcc",t._sentryDebugIdIdentifier="sentry-dbid-4ea39abe-4c61-47b3-b906-656f083debcc")}catch{}})();const yt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{o.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}})(Ke);function gt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),m=_(),s=y(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=He(s),r=G(m?.loggedInUserRoleMap),[l,i]=p.useState(!1),[u,T]=p.useState(!1),[d,c]=p.useState(!1),h=y(I=>D(I)),g=E.getSignedInUserTenant(o)?.companyId??h.companyId,C=E.getSignedInUser(),S=y(I=>R(I,g)),w=y(I=>I.treasurySetupViewState.fetchState),x=y(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=y(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{l||w!=="Not-Started"||g==null||(i(!0),n(ae(g,!0,!1)))},[l,w,g,n]),p.useEffect(()=>{d||F!=="Not-Started"||g==null||(c(!0),n(q()))},[d,F,g,n]),p.useEffect(()=>{u||x!=="Not-Started"||g==null||(T(!0),n(ne()))},[u,x,g,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const v=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!v&&e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{navigate:t,location:a,companyId:g,isEditMode:!0,isLoading:v,isReadOnly:!r,treasurySetupView:S,analytics:b})]})}const ht=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:m}=a,s=o.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:r=>{t(ve(r))},onFetchLinkTokenClick:r=>{t(Ae("treasury_setup",r))},onEstablishConnectionClick:r=>{t(Ee(r,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(We),St=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=O(),o=P(),[m,s]=p.useState(!1),[f,r]=p.useState(!1),[l,i]=p.useState(!1),[u,T]=p.useState(!1),d=y(x=>x.treasurySetupViewState.fetchState),c=y(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=y(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),g=y(x=>D(x)),C=E.getSignedInUserTenant(n)?.companyId??g.companyId,S=y(x=>be(x)),w=y(x=>R(x,C));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||d!=="Not-Started"||C==null||(r(!0),o(ae(C,!0,!1)))},[f,d,C,o]),p.useEffect(()=>{l||c!=="Not-Started"||C==null||(i(!0),o(q()))},[l,c,C,o]),p.useEffect(()=>{u||h!=="Not-Started"||C==null||(T(!0),o(ne()))},[u,h,C,o]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(ht,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{s(!1),o(se())},currentTenant:g,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},xt=M.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
|
-
`,Ct={overlayWidth:new et(100,100,48)},Tt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:r}=a,{tenantEmailDomain:l}=o;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let u="page-not-found";i==="editPortfolio"?u=wt(l):i==="statements"?u=It(l):i==="taxLetter"?u=kt(l):i==="settings"&&(u=bt(l));const T=nt(m.state?.pathnameStackToGoBack,m.pathname);n(u,{state:{pathnameStackToGoBack:T}})},onColumnSortConfigChanged:(i,u)=>{t(Ue({uiState:{sortKey:i,sortOrder:u}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(r?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${l}/checking/cash_management`)}}})(at);function z({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=U(),m=P(),s=H(),f=Je(),r=y(j=>D(j)),{tenantEmailDomain:l}=O(),i=r.companyId??E.getSignedInUserTenant(l)?.companyId,[u,T]=p.useState(!1),d=y(j=>re(j)),c=d.fetchState,h=d.accountSummary?.totalBalance?.amount,g=y(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!r.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=G(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:v}=Xe();p.useEffect(()=>{c==="Not-Started"&&!u&&v&&(T(!0),m(oe(!0)))},[u,m,c,v]),p.useEffect(()=>{d.transactionsFetchState.fetchState==="Completed"&&d.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[d.transactionsFetchState.fetchState,d.transactions.length]);const I=()=>{o("..")},[le,ue]=p.useState(!1),J=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=dt({mobileExploreReferrer:"Treasury"});Ye({isDataReady:c==="Completed"});const me=mt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(A.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(A.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(A.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(A.isCashManagementFeatureEnabled),Se=pt(i,{clearParams:c==="Completed"&&g?.fetchState==="Completed"}),xe=Fe(r),Ce=Le(fe,r);if(xe===!0&&Ce!==!0)return e.jsx(ft,{});if(C){const j=g?.fetchState!=="Completed"||d.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[d.accountSummaryFetchState.fetchState==="Completed"&&g?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx($,{analytics:b,onLoad:()=>{}}):null,e.jsx(ct,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(jt,{onClick:Te=>Te.stopPropagation(),children:[t===!0?e.jsx(St,{isFirstTransfer:d.transactions.length===0||h===0}):null,a===!0?e.jsx(gt,{}):null]})}),e.jsxs(xt,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(Tt,{treasuryDetailsView:d,isAutoTransferRuleEnabled:ye,navigate:o,currentTenant:r,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:J,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):r.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(tt,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,kt=t=>`/${t}/treasury/tax-letter`,bt=t=>`/${t}/treasury/setup`,jt=M(lt)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Et=M.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 At(){const t=U(),a=P(),n=H(),o=B(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Be(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),a(Pe(!1)))},[s,r.fetchState,a]);const l=E.getSignedInUser(),i=y(c=>D(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(Et,{windowSize:n,children:e.jsx(st,{currentTenantCompanyName:T,statementListView:r,isLoading:d,onBackClick:()=>{const c=W(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const vt=M.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 Dt(){const t=U(),a=H(),n=B(),o=P(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Re(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),o(Me(!1)))},[s,r.fetchState,o]);const l=E.getSignedInUser(),i=y(c=>D(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(vt,{windowSize:a,children:e.jsx(rt,{currentTenantCompanyName:T,taxLetterListView:r,isLoading:d,onBackClick:()=>{const c=W(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const Ft=N(function(t,a){const{companyId:n}=a,o=R(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(Ve(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}})(ot),Lt=()=>{const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),[m,s]=p.useState(!1),f=y(S=>D(S)),[r,l]=p.useState(!1),i=y(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);p.useEffect(()=>{r||i?.fetchState!=="Not-Started"||u==null||(l(!0),n(q()))},[i,n]);const u=E.getSignedInUserTenant(o)?.companyId??f.companyId,T=E.getSignedInUser(),d=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{s(S)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),g=G(h?.loggedInUserRoleMap),C=Z(h?.loggedInUserRoleMap);if(d&&g)return e.jsx(L,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!d&&g||C)){if(a.state?.message==="activation"){const S=W(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($,{analytics:b,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:c}),e.jsx(Ft,{analytics:b,navigate:t,companyId:u,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=M.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 sa(){const t=B(),a=y(v=>D(v)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(A.isTreasuryEnabled),m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=Z(s?.loggedInUserRoleMap),r=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!r)&&Ne(s?.loggedInUserRoleMap),i=Ge(s?.loggedInUserRoleMap),u=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!r)&&_e(s?.loggedInUserRoleMap),{isFeatureEnabled:T}=n(A.isDepositAccountsFeatureEnabled),d=T&&!r&&$e(s?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!r&&G(s?.loggedInUserRoleMap),{isFeatureEnabled:g}=n(A.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(A.isDebitCardFeatureEnabled),S=it(a,g,C)&&!r&&Qe(s?.loggedInUserRoleMap),w=qe(s?.loggedInUserRoleMap),x=Ze(s?.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:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Lt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Dt,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(z,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(z,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(z,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ut,{})})]}):m&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{sa as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-CS0rfBBF.js";import{a as d}from"./sentry-CEfOando.js";import{t as u,u as h,j as y,N as b}from"./core-D6ttr5iw.js";import{Mf as I,fA as w,Bi as j}from"./zeni-epic-state-Cl3jFj7z.js";import{z as l,w as x,D as S,G as D}from"./index-BGtgXdBV.js";import{n as p}from"./mui-vLo47rlo.js";import"./recharts-BDyAk4nR.js";import"./analytics-Ba6zmRos.js";import"./plaid-IKw4XOsd.js";import"./dnd-C751Xq24.js";import"./stripe-DMRn4zHo.js";import"./lottie-CZmubsAo.js";import"./lexical-T2nlwAPk.js";import"./pdf-CdoB_huE.js";import"./utils-DKj7mVPA.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]="d5f286e4-6a6a-48e1-8811-f0fbfbc6a874",e._sentryDebugIdIdentifier="sentry-dbid-d5f286e4-6a6a-48e1-8811-f0fbfbc6a874")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=d.useState(!1),a=h(),s=y(m=>I(m)),r=l.getSignedInUser(),f=l.getSignedInUserTenantWithId(i);if(r==null||f==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,f?.tenantId),d.useEffect(()=>{n||(g(!0),a(j(t,c,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.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
|
-
`,_=p(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{W as default};
|