@zeniai/web-app-ui 5.1.48-dev → 5.1.50-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-BO0Y1XuG.js +1 -0
- package/dist/assets/{AddressScreen-BdkkfpOD.js → AddressScreen-cCnouRSn.js} +2 -2
- package/dist/assets/{AiCfoScreen-CJ2jNf-v.js → AiCfoScreen-DuDTdplv.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-C9K9cwdL.js → BillPayApprovalRoutes-B_ArN4m-.js} +1 -1
- package/dist/assets/{BillPayRoutes-DI9tqZg4.js → BillPayRoutes-CeSWBsHw.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BvxrLE03.js → BusinessVerificationPageScreen-B8bnbJvI.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-7dPiCcoy.js → CardsAiCfoScreen-BFi-6bPY.js} +1 -1
- package/dist/assets/ChargeCardRoutes-3ZPc6bsC.js +71 -0
- package/dist/assets/CompanyPassportScreen--e7woif_.js +1 -0
- package/dist/assets/ConnectionAuthScreen-DYP_9VcK.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-vzmXnBfR.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BgHk9KVG.js → CustomerOnboardingRoutes-DY7mGrS8.js} +4 -4
- package/dist/assets/{DashboardRoutes-BRz85PCY.js → DashboardRoutes-CWWt-YY9.js} +3 -3
- package/dist/assets/{DefaultTenantHome-BcFCHmoG.js → DefaultTenantHome-Bi_Nepv1.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BtjmG_jm.js +18 -0
- package/dist/assets/DrawerScreen-Bhvl5Bpw.js +1 -0
- package/dist/assets/EntityDetailRoutes-DWUflhpV.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-C-CBTBm8.js → ExpenseAutomationRoutes-5xMDqEkK.js} +3 -3
- package/dist/assets/{FeaturePreviewScreen-CeZNu_Vi.js → FeaturePreviewScreen-Cs1JStpc.js} +1 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-C2hS7TqE.js +1 -0
- package/dist/assets/{MagicLinkRoutes-7XFxi-_N.js → MagicLinkRoutes-DIheMWou.js} +5 -5
- package/dist/assets/MagicLinkSignInScreen-BhydWF2v.js +12 -0
- package/dist/assets/{MobileAppDrawer-D6Fu3M_x.js → MobileAppDrawer-bZsvcUIO.js} +1 -1
- package/dist/assets/NotFoundScreen-DkPaaWNr.js +1 -0
- package/dist/assets/{NotificationRoutes-DN56rmti.js → NotificationRoutes-Debt_KCq.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BYk52B4_.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DvAao1a8.js +1 -0
- package/dist/assets/{PeopleRoutes-CVdNkMW2.js → PeopleRoutes-jjBWyySA.js} +9 -9
- package/dist/assets/PerformanceRoutes-K4zUr9LW.js +1 -0
- package/dist/assets/{Preview-BohCuc6u.js → Preview-CKm-UT5u.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CL_uJ9x0.js → QBOConnectionScreen-Bq-1t6Xi.js} +1 -1
- package/dist/assets/ReferralListScreen-_mz3EFDf.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-DrGF2MTj.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DGivgXWQ.js → ReimbursementApprovalRuleDetailScreen-BWFBxfUH.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CqFV9Upl.js → ReimbursementRoutes-DY21Vmvy.js} +5 -5
- package/dist/assets/{ReportsRoutes-iiURxm9r.js → ReportsRoutes-WmSJGW8t.js} +1 -1
- package/dist/assets/RewardsRoutes-BZ9NRCXj.js +1 -0
- package/dist/assets/{ScreenRoutes-BVYp-4m8.js → ScreenRoutes-Cf5Tsx0Z.js} +2 -2
- package/dist/assets/{SettingsRoutes-DOfAWDHL.js → SettingsRoutes-C9qtCzkG.js} +8 -8
- package/dist/assets/{SetupPagesScreen-Djxd17id.js → SetupPagesScreen-B_L42KP-.js} +5 -5
- package/dist/assets/SignInScreen-ChB2BnS8.js +1 -0
- package/dist/assets/SignOutScreen-BwwfTIGJ.js +9 -0
- package/dist/assets/{TaskListScreen-Dreq2LHj.js → TaskListScreen-DP-G56Cv.js} +2 -2
- package/dist/assets/TaskRoutes-B1qP8Ev_.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-Bs9ghT0l.js → TransactionDetailRoutes-q6akxnYr.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-s_jEo2WG.js → TransactionDetailScreen-BDokO385.js} +2 -2
- package/dist/assets/{TransactionListRoutes-BgdTO4HR.js → TransactionListRoutes-4uU8xSo5.js} +1 -1
- package/dist/assets/{TreasuryRoutes-8u7u_9F8.js → TreasuryRoutes-Cwxw4OCX.js} +5 -5
- package/dist/assets/{VendorsRoutes-CYZmnwrv.js → VendorsRoutes-CYXZWLCR.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-DFk6ctUo.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DO2fE8r2.js → ZeniAccountRoutes-Dkb3Uwio.js} +13 -13
- package/dist/assets/ZeniAccountStatementScreen-Cp587aU0.js +9 -0
- package/dist/assets/{accountMappingHelper-DwVJRdRo.js → accountMappingHelper-D75TOEDA.js} +1 -1
- package/dist/assets/{analytics-BUvTITrb.js → analytics-CkXhIYGA.js} +1 -1
- package/dist/assets/{analyticsHelper-DaDCazpC.js → analyticsHelper-DcxhhZJu.js} +1 -1
- package/dist/assets/{core-wjM80qIn.js → core-B5TeChD4.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-4aj60Fs2.js → decodeURIComponentSafe-DXB7OyA3.js} +1 -1
- package/dist/assets/{dnd-BK3JI-SF.js → dnd-CWnSyq9-.js} +1 -1
- package/dist/assets/{empty-CUF5cU17.js → empty-D1f-cCDu.js} +1 -1
- package/dist/assets/{empty-D8a3KaBg.js → empty-r-IKwqcp.js} +1 -1
- package/dist/assets/{emptyVideoElement-DDXARDvi.js → emptyVideoElement-B8V1wuPO.js} +1 -1
- package/dist/assets/epic-DuAKKq3W.js +2 -0
- package/dist/assets/{getLocaleForTenant-yX1iEbj2.js → getLocaleForTenant-Bixn6PX7.js} +1 -1
- package/dist/assets/{index-BVZpKi1S.js → index-B0QsCXA7.js} +2 -2
- package/dist/assets/{index-Det3Ki3b.js → index-B2U2XMzI.js} +13002 -12858
- package/dist/assets/{index-DApnMePi.js → index-BfRRBBMI.js} +1 -1
- package/dist/assets/{index-D3VvkPFN.js → index-CGTF1rlJ.js} +1 -1
- package/dist/assets/{index-CWHzFtd9.js → index-C_NwT3-k.js} +1 -1
- package/dist/assets/{index-D8Ajpofo.js → index-DDl-KBgR.js} +1 -1
- package/dist/assets/{index-DuIPJrPJ.js → index-Kq1a616O.js} +1 -1
- package/dist/assets/{index-DypTJFR1.js → index-R3BgB7Uo.js} +1 -1
- package/dist/assets/{lexical-DcicQSkI.js → lexical-D7c0ykAW.js} +1 -1
- package/dist/assets/{liveblocks-GsPfxkQ7.js → liveblocks-C-n95g0A.js} +1 -1
- package/dist/assets/{lottie-C5rIATv6.js → lottie-zNHYqEBz.js} +1 -1
- package/dist/assets/{mui-BSDa87ap.js → mui-Da8iY16Z.js} +1 -1
- package/dist/assets/{pathToGoBack-CAzQiLsh.js → pathToGoBack-nrN7wX5B.js} +1 -1
- package/dist/assets/{pdf-BLNuomMl.js → pdf-BM7gJkYi.js} +4 -4
- package/dist/assets/{pdf-lib-BR9HrRu8.js → pdf-lib-BVCnHm-C.js} +1 -1
- package/dist/assets/{plaid-50YvjniW.js → plaid-kqYG7b9d.js} +1 -1
- package/dist/assets/{pusher-DyWQA0RT.js → pusher-CLZoiBO8.js} +1 -1
- package/dist/assets/{react-BKGEXYtN.js → react-B40ow9gH.js} +1 -1
- package/dist/assets/{react-CrU6fZvx.js → react-BggCpRGR.js} +1 -1
- package/dist/assets/{react-Dj2j64JD.js → react-C-sHFsWu.js} +1 -1
- package/dist/assets/{react-uWUXgbgu.js → react-C3y2xvic.js} +1 -1
- package/dist/assets/{react-Ci53z-6c.js → react-CbGrXN5I.js} +1 -1
- package/dist/assets/{react-DmfWUkEA.js → react-zGBF6iFI.js} +1 -1
- package/dist/assets/{recharts-D4VpFd5q.js → recharts--v-RQjOV.js} +1 -1
- package/dist/assets/{routePaths-CbGdb8gZ.js → routePaths-BhCcxP1S.js} +1 -1
- package/dist/assets/{sentry-B2TzMFx9.js → sentry-lku8kjDH.js} +1 -1
- package/dist/assets/{url-CcjxrMLZ.js → url-ByXYagPi.js} +1 -1
- package/dist/assets/{url-D1xNpCnF.js → url-CRmtHtjd.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D8RjKLM8.js → useAiCfoDashboardSuggestedQuestionsChips-B4QfsEVQ.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Bt3rxiW7.js +1 -0
- package/dist/assets/useCashManagementBanner-BdFPdsZy.js +1 -0
- package/dist/assets/{useDeviceId-t80vtq4B.js → useDeviceId-bV7jqaoy.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D9NRPlO5.js → useInitialThreadRequest-j8y2-Pa3.js} +1 -1
- package/dist/assets/{utils-BwzhiOdE.js → utils-Dw1Jg_v9.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-D8vEjelm.js → withTransactionSidePanel-BZm11u-w.js} +4 -4
- package/dist/assets/{zeni-epic-state-DrcliB1J.js → zeni-epic-state-BzDw8pi_.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-Cfx49so1.js +0 -1
- package/dist/assets/ChargeCardRoutes-BIha80p-.js +0 -71
- package/dist/assets/CompanyPassportScreen-CuQ-1lmT.js +0 -1
- package/dist/assets/ConnectionAuthScreen-CZ8o3YZi.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BnNax-8a.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BgEqXJEl.js +0 -18
- package/dist/assets/DrawerScreen-_1RQlY4y.js +0 -1
- package/dist/assets/EntityDetailRoutes-C7uFwXUz.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-C0pKe0vy.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CGIo0N71.js +0 -12
- package/dist/assets/NotFoundScreen-_JeeXwwE.js +0 -1
- package/dist/assets/OAuthConsentScreen-DCckgFNN.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DQXcPbfr.js +0 -1
- package/dist/assets/PerformanceRoutes-BFxcHJn-.js +0 -1
- package/dist/assets/ReferralListScreen-Cb-o7kTE.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-BV3UuxT_.js +0 -1
- package/dist/assets/RewardsRoutes-6b8h1meH.js +0 -1
- package/dist/assets/SignInScreen-D7gytnqh.js +0 -1
- package/dist/assets/SignOutScreen-C-j9YPM-.js +0 -9
- package/dist/assets/TaskRoutes-Dy3OoIyM.js +0 -9
- package/dist/assets/WiseConfirmationScreen-BiPmlGq6.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Cb_rEVWr.js +0 -9
- package/dist/assets/epic-sEosDzE-.js +0 -2
- package/dist/assets/useAskAiCfoHostNavButtonProps-BXGcqvyl.js +0 -1
- package/dist/assets/useCashManagementBanner-CdVrtcFk.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-C-n95g0A.js";import{a as p}from"./sentry-lku8kjDH.js";import{h as V,g as Q,u as D,j as h,s as se,n as $,i as G,o as W,p as E}from"./core-B5TeChD4.js";import{bn as Ee,eW as T,go as Ae,mW as ve,Q1 as we,hA as ue,ND as ke,qN as Pe,ks as pe,mS as je,hC as Te,NF as Me,NE as De,Q2 as Ue,z3 as _e,Eo as Re,PC as Fe,PL as Be,c7 as ee,cM as ze,cN as Ve,LL as Le,Q3 as Oe,LM as Ne,xw as Qe,Q4 as $e,GP as Ge,E4 as Ke,DX as ge,DU as He,xA as me,D_ as he,E1 as fe,E7 as ne,t_ as te,xz as Ze,k4 as X,k7 as be,Q5 as qe,l8 as Je,xP as We,My as Xe,Mz as Ye,k2 as en,Q6 as nn,k5 as tn,rf as an,Q7 as on,Q8 as sn,rj as cn,hl as ln,LU as J,he as rn,hh as dn,LV as un,xM as pn,Q9 as gn,Qa as mn,El as hn,fc as Se,fe as ye,Qb as fn,gc as bn,M2 as Sn,xL as ie,gh as ce,gg as yn,xK as Cn,gf as In,ge as xn,Qc as En,fh as Ce,Qd as An,Qe as vn,xS as wn,xJ as le,Qf as kn,fy as Pn,xG as jn,b_ as Tn,c6 as Mn,c5 as Dn,b$ as Un,c3 as _n,c2 as Rn,c1 as Fn,c4 as Bn,c0 as zn}from"./zeni-epic-state-BzDw8pi_.js";import{N as ae,f as R,z as w,af as Ie,bO as Vn,c as q,g as Ln,bz as On,j as K,B as oe,bP as Nn,bQ as Qn,aq as $n,i as xe,bR as Gn,bS as Kn,bT as Hn,a9 as Zn,Y as qn,bU as Jn,r as Wn,bV as Xn}from"./index-B2U2XMzI.js";import{n as F}from"./mui-Da8iY16Z.js";import{M as U}from"./MobileAppDrawer-bZsvcUIO.js";import{a as H,g as Z,m as Yn}from"./accountMappingHelper-D75TOEDA.js";import{t as et,A as nt}from"./AddressScreen-cCnouRSn.js";import N from"./NotFoundScreen-DkPaaWNr.js";import{g as tt}from"./analyticsHelper-DcxhhZJu.js";import{B as at}from"./BusinessVerificationPageScreen-B8bnbJvI.js";import{C as ot}from"./CompanyPassportScreen--e7woif_.js";import{q as re}from"./QBOConnectionScreen-Bq-1t6Xi.js";import{B as st}from"./BillPayApprovalRoutes-B_ArN4m-.js";import{R as it}from"./ReimbursementApprovalRoutes-DrGF2MTj.js";import"./recharts--v-RQjOV.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.js";import"./routePaths-BhCcxP1S.js";import"./empty-D1f-cCDu.js";import"./pdf-lib-BVCnHm-C.js";import"./index-CGTF1rlJ.js";import"./url-ByXYagPi.js";import"./index-R3BgB7Uo.js";import"./decodeURIComponentSafe-DXB7OyA3.js";import"./ReimbursementApprovalRuleDetailScreen-BWFBxfUH.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]="5628731f-9d39-485b-854d-05700858d146",e._sentryDebugIdIdentifier="sentry-dbid-5628731f-9d39-485b-854d-05700858d146")}catch{}})();const ct=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,lt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:pe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Pe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizationThreshold:t.capitalizationThreshold,capitalizationThresholdMaxCeiling:t.capitalizationThresholdMaxCeiling,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationThresholds:t.onSaveCapitalizationThresholds}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:C}=u,{prepaidExpensesAccount:I,fixedAssetsAccount:k,accruedExpensesAccount:A}=d,{bankAccount:S,expenseCategory1099:x}=m,v=
|
|
9
|
+
`,lt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:pe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Pe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizationThreshold:t.capitalizationThreshold,capitalizationThresholdMaxCeiling:t.capitalizationThresholdMaxCeiling,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationThresholds:t.onSaveCapitalizationThresholds}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:C}=u,{prepaidExpensesAccount:I,fixedAssetsAccount:k,accruedExpensesAccount:A}=d,{bankAccount:S,expenseCategory1099:x}=m,v=H(t.accountMappingView.incomeAccountList,f.selectedOption),B=H(t.accountMappingView.expenseAccountList,g.selectedOption),L=H(t.accountMappingView.billPayAccountList,l.selectedOption),O=H(t.accountMappingView.reimbursementsAccountList,C.selectedOption),z=Z(t.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),b=Z(t.accountMappingView.fixedAssetsAccountList,k.selectedOptions),M=Z(t.accountMappingView.accruedExpensesAccountList,A.selectedOptions),y=Z(t.accountMappingView.bankAccounts1099FilingAccountList,S.selectedOptions),P=Yn(t.accountMappingView.expenseAccounts1099FilingAccountList,x),_={selectedIncomeAccountId:v?.accountId,selectedExpenseAccountId:B?.accountId,selectedBillPayAccountId:L?.accountId,selectedReimbursementsAccountId:O?.accountId,selectedPrepaidExpensesAccountIds:z.map(j=>j.accountId),selectedFixedAssetsAccountIds:b.map(j=>j.accountId),selectedAccruedExpensesAccountIds:M.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:y.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:P};e(De({data:_}))},onBackClick:()=>{Ie(r)===!1?(s("../../dashboard"),e(Me())):e(ue())},onSaveClick:()=>{e(Te()),i&&q.track(Ln.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(je(t.currentTenant.companyId,n))}}})(Vn),rt=()=>{const e=V(),t=Q(),s=D(),{useFeatureGate:r,useDynamicConfig:i}=ae(),{isFeatureEnabled:n}=r(R.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=r(R.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),d=!u&&c?.capitalization_enabled===!0,m=w.getSignedInUser(),f=Ee(m),g=h(y=>T(y)),{capitalizableAccounts:l,capitalizationThreshold:C,capitalizationThresholdMaxCeiling:I,isCapitalizationThresholdSaving:k,currencySymbol:A}=h(y=>{const P=y.tenantState.currentTenantId,_=P!=null?y.tenantState.tenantsById[P]:void 0,j=Ae(y.companyState,g.companyId);return{capitalizableAccounts:_?.capitalizableAccounts??null,capitalizationThreshold:_?.capitalizationThreshold??null,capitalizationThresholdMaxCeiling:_?.capitalizationThresholdMaxCeiling??null,isCapitalizationThresholdSaving:y.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}},se),S=p.useCallback((y,P)=>{s(ve(g.companyId,y,P))},[s,g.companyId]),x=h(y=>we(y.accountState),se),v=p.useMemo(()=>{const y={};for(const P of x)P.accountId!=null&&P.accountName!=null&&(y[P.accountId]=P.accountName);return y},[x]),[B,L]=p.useState(!1),[O,z]=p.useState(!1);p.useEffect(()=>{B===!1&&(s(ue()),L(!0))},[B]);const b=h(y=>ke(y)),M=y=>{z(y)};return o.jsxs(ct,{children:[o.jsx(U,{isAppContentDrawerOpen:O,handleDrawerToggle:M}),o.jsx(lt,{currentTenant:g,navigate:e,accountMappingView:b,isFiling1099FeatureEnabled:n&&f,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:d,capitalizableAccounts:l,accountNamesById:v,capitalizationThreshold:C,capitalizationThresholdMaxCeiling:I,currencySymbol:A,isCapitalizationThresholdSaving:k,onSaveCapitalizationThresholds:S,location:t,isSettings:Ie(t),onClickMenuIcon:()=>M(!0)})]})},dt=F.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,ut=$(function(e,t){const s=T(e),r=
|
|
17
|
+
`,ut=$(function(e,t){const s=T(e),r=Fe(e),i=Be(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ee(s?.userRole??[])||n)&&"readonly",billpayApprovalView:r,remiApproverView:i,analytics:q}},function(e,t){const{navigate:s,currentTenant:r}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Nn),pt=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(x=>T(x)),f=h(x=>x.billPaySetupApproverViewState.fetchState),g=h(x=>x.remiSetupApproverViewState.fetchState),l=h(x=>Ue(x)),{isApprovalRulesV3Enabled:C,isLoading:I}=On(m?.tenantId),k=m.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const A=K();p.useEffect(()=>{u||f!=="Not-Started"||I||(d(!0),s(_e(!0,!0,C)))},[u,f,I,C,s]),p.useEffect(()=>{a||g!=="Not-Started"||I||(c(!0),s(Re(!0,!1,!1,C)))},[a,g,I,C,s]);const S=x=>{n(x)};return A?.loggedInUserRoleMap!=null?o.jsxs(dt,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),o.jsx(ut,{navigate:e,location:t,companyId:k,currentTenant:m,roleMap:A.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)}})]}):o.jsx(oe,{fetchState:l.fetchState})},gt=F.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,mt=$(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=T(e);return{bankSetupView:$e(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(fe(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(he(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(me(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?ge(n,a,c,u):
|
|
25
|
+
`,mt=$(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=T(e);return{bankSetupView:$e(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(fe(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(he(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(me(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?ge(n,a,c,u):He(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(Ke(i,a,n,c))},onRemoveConnection:n=>{e(Ge(n))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Qn),ht=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),i=K(),[n,a]=p.useState(!1),[c,u]=p.useState(!1),d=h(S=>T(S)),m=h(S=>S.settingsViewState.bankConnection.fetchState),f=ze(d,i?.loggedInUserRoleMap),g=Ve(d,i?.loggedInUserRoleMap),l=Le(d,i?.loggedInUserRoleMap),C=Oe(d,i?.loggedInUserRoleMap),I=Ne(d,i?.loggedInUserRoleMap),k=d.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{c||m==="Completed"||(u(!0),s(Qe(!1)))},[c,s,m]);const A=S=>{a(S)};return f||l||g||I?o.jsxs(gt,{children:[o.jsx(U,{isAppContentDrawerOpen:n,handleDrawerToggle:A}),o.jsx(mt,{navigate:e,location:t,companyId:k,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:I,isTreasuryEnabled:C,onClickMenuIcon:()=>{A(!0)}})]}):o.jsx(N,{})},ft=F.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -30,7 +30,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,bt=$(function(e,t){const{companyId:s}=t,r=T(e),i=t.roleMap.bill_pay_admin,n=qe(e,s),{uiState:a}=n,c=(ee(r?.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:xe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(me("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(fe(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(he(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(ge(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(be(n))},handleConfirmCardSetupIntent:n=>{e(tn(n))},updateCardPaymentModalState:n=>{e(nn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(en(n,a,c))},handleFetchPaymentSources:()=>{e(
|
|
33
|
+
`,bt=$(function(e,t){const{companyId:s}=t,r=T(e),i=t.roleMap.bill_pay_admin,n=qe(e,s),{uiState:a}=n,c=(ee(r?.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:xe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(me("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(fe(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(he(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(ge(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(be(n))},handleConfirmCardSetupIntent:n=>{e(tn(n))},updateCardPaymentModalState:n=>{e(nn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(en(n,a,c))},handleFetchPaymentSources:()=>{e(X())},resetCardPaymentViewState:()=>{e(Ye())},handleResetCardPaymentErrorStatuses:()=>{e(Xe())},onBillingAddressSave:n=>{e(We(n))},onAddressEditHandler:n=>{if(n!=null){const a=et(n);e(Je({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Gn),St=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(S=>T(S)),f=h(S=>S.cardPaymentViewState),g=h(S=>S.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=$n(f.addCardPaymentSourceStatus.fetchState),C=f.addCardPaymentSourceStatus.fetchState,I=m.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=K();p.useEffect(()=>{I!=null&&s(Ze(I,!1))},[I,s]),p.useEffect(()=>{a||(c(!0),s(X()))},[a,s]),p.useEffect(()=>{u||(be(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&C==="Completed"&&s(X())},[l,C]);const A=S=>{n(S)};return k?.loggedInUserRoleMap!=null?o.jsxs(ft,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:A}),o.jsx(bt,{navigate:e,location:t,companyId:I,currentTenant:m,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{A(!0)},googleAPIKey:xe.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},Y="external_integrations",yt=$(function(e){const t=sn(e,Y);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:r,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{r.integrations.refreshQBO.fetchState!=="In-Progress"&&e(pn())},onSaveChargeBeeCredentials:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;d!=null&&e(dn(a,d,J("revenue"),un("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(d!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:d,redirect_uri:m,tenant_id:a}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(rn(a,c,J(u)))},onSaveConnectorCredentials:c=>{e(ln(a,J("payments"),c))},onNotifyMe:c=>{e(cn(Y,c,i))}}})(Kn),Ct=()=>{const e=V(),t=D(),{tenantEmailDomain:s}=G(),[r,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),a=h(l=>T(l)),c=a.companyId??w.getSignedInUserTenant(s)?.companyId,u=w.getSignedInUser(),d=K(),m=ee(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(an(Y))},[t]);const f=l=>{i(l)},g=h(l=>on(l,c));return d?.loggedInUserRoleMap!=null?o.jsxs(It,{children:[o.jsx(U,{isAppContentDrawerOpen:r,handleDrawerToggle:f}),o.jsx(yt,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([l,C])=>[l,C?.message])),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},It=F.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
height: 100%;
|
|
36
36
|
width: 100%;
|
|
@@ -38,7 +38,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
align-items: center;
|
|
40
40
|
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,xt=
|
|
41
|
+
`,xt=F.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
height: 100%;
|
|
44
44
|
width: 100%;
|
|
@@ -46,7 +46,7 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,Et=()=>{const e=
|
|
49
|
+
`,Et=()=>{const e=D(),{tenantEmailDomain:t}=G(),[s,r]=p.useState(!1),i=h(l=>T(l)).companyId??w.getSignedInUserTenant(t)?.companyId,n=w.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=h(l=>gn(l,n.userId)),c=h(l=>mn(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,d=l=>{r(l)},m=p.useCallback(l=>{e(te("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ne(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(hn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(xt,{children:[o.jsx(U,{isAppContentDrawerOpen:s,handleDrawerToggle:d}),o.jsx(Hn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},At=F.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
height: 100%;
|
|
52
52
|
width: 100%;
|
|
@@ -54,4 +54,4 @@ import{j as o}from"./liveblocks-GsPfxkQ7.js";import{a as p}from"./sentry-B2TzMFx
|
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
align-items: center;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,de=({appContent:e})=>{const t=
|
|
57
|
+
`,de=({appContent:e})=>{const t=D(),s=V(),r=Q(),[i,n]=p.useState(!1),a=h(b=>T(b)),{tenantEmailDomain:c}=a,u=a.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ae(),{isFeatureEnabled:m}=d(R.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(R.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(R.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(R.isTreasuryEnabled),C=h(b=>pe(b)),I=Se(a),k=ye(g,a),A=!k&&C,S=Zn(a,f,g),{areTenantIdsInSync:x}=qn();p.useEffect(()=>{x&&t(fn(u,A))},[u,t,A,x]);const v=h(b=>bn(b,A)),B=v.fetchState==="Not-Started"||v.fetchState==="In-Progress"||u==null,L=Sn(a),O=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,z=b=>{n(b)};return o.jsxs(At,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:z}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(Jn,{myProfileView:v,isAccountingClassesEnabled:C,isReimbursementDisabled:O===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:S===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:L===!1,onClickMenuIcon:()=>{z(!0)},isLoading:B,isBankingOnlyTenant:k,isCardsOnlyTenant:I,onAddressClick:b=>{const M=function(P,_){let j=`/${P}/settings/my_profile`;return j=j.concat(`/new/${_}`),j}(c,b),y=Wn(r.state?.pathnameStackToGoBack,r.pathname);s(M,{state:{pathnameStackToGoBack:y}})},onGetOtp:b=>{const M={...v.myProfileLocalData,phone:b};t(ie({localData:M})),t(xn(b,"MyProfile"))},onResendOtp:b=>{t(In(b,"MyProfile"))},onCancelClick:()=>{t(Cn())},onSaveClick:()=>{t(ce("MyProfile",v.myProfileLocalData.phone,v.myProfileLocalData.otpChallenge,v.myProfileLocalData.dateOfBirth,v.addressData?.addressToCreate))},onVerifyOtp:(b,M)=>{t(yn(b,M,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&w.saveZeniOtpToken(b),t(ce("MyProfile",v.myProfileLocalData.phone,v.myProfileLocalData.otpChallenge,v.myProfileLocalData.dateOfBirth,v.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{t(ie({localData:b}))}})]})};function vt(){const e=D(),t=h(l=>T(l)).companyId,s=h(l=>En(l)),r=h(l=>Ce(l)),i=w.getSignedInUser(),[n,a]=p.useState(!1),c=p.useCallback(l=>{a(l)},[]),u=p.useCallback(l=>{e(An(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(vn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(wn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))},[t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=p.useCallback(()=>{e(kn())},[]);return p.useEffect(()=>{if(r.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))}},[s.fetchState,t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled,r.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(U,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(Xn,{notificationSettingsView:s,onFormDataChange:u,onCancel:d,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:g})]})}function ia(e){const[t,s]=p.useState(!1),r=h(l=>Ce(l)),i=h(l=>T(l)),n=K(),a=w.getSignedInUser(),c=D(),{useFeatureGate:u}=ae(),{isFeatureEnabled:d}=u(R.isDebitCardFeatureEnabled),m=a?.userEmail==null||r.fetchState!=="Completed"||Pn(r.notificationSettings,a.userEmail,d,i);p.useEffect(()=>{r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&t===!1&&(s(!0),c(jn()))},[r.fetchState,t]);const f=ye(d,i),g=Se(i);return r.fetchState!=="In-Progress"&&r.fetchState!=="Not-Started"||m!==!0?Tn(i)?o.jsxs(W,{children:[Mn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"accounting/*",element:o.jsx(rt,{})}),Dn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"approval_rules/*",element:o.jsx(wt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Un(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"my_bank_connections",element:o.jsx(Et,{})}),_n(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"bank_connections",element:o.jsx(ht,{})}),Rn(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"business_verification",element:o.jsx(at,{productType:f?"zeni_accounts":g?"charge_cards":tt(i,n?.loggedInUserRoleMap)})}),Fn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"company_details",element:o.jsx(ot,{})}),Bn(n?.loggedInUserRole??[],i)&&o.jsx(E,{path:"billing",element:o.jsx(St,{})}),zn(n?.loggedInUserRole??[],d,i)&&o.jsx(E,{path:"integrations",element:o.jsx(Ct,{})}),o.jsx(E,{path:"my_profile/new/:addressType",element:o.jsx(de,{appContent:o.jsx(nt,{isSubPage:!1})})}),o.jsx(E,{path:"my_profile",element:o.jsx(de,{})}),m&&o.jsx(E,{path:"notifications",element:o.jsx(vt,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]}):o.jsx(W,{children:o.jsx(E,{path:"*",element:o.jsx(N,{})})}):null}function wt(e){return o.jsxs(W,{children:[o.jsx(E,{path:"/",element:o.jsx(pt,{})}),o.jsx(E,{path:"bills/approval-rules/*",element:o.jsx(st,{})}),o.jsx(E,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(it,{}):o.jsx(N,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]})}export{ia as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-C-n95g0A.js";import{h as Q,g as Y,u as ee,i as G,j as _,N as j,n as H,t as Ye}from"./core-B5TeChD4.js";import{bJ as en,cp as Ie,Pq as ye,eW as V,cB as nn,zk as $,z3 as tn,PC as an,PF as sn,ry as ne,rm as te,l0 as ae,tw as L,PH as Ae,gg as $e,gf as We,ge as Ge,PI as on,zt as cn,E4 as ke,DX as Pe,DU as _e,DL as J,D_ as ve,E1 as Ee,E7 as we,t_ as Te,gv as rn,cw as un,fe as dn,fc as ln,fd as pn,bs as mn,PJ as yn,CL as le,Dn as fn,PK as gn,bK as Sn,Fn as pe,Eo as bn,PL as hn,PM as Cn,Fr as In,Fv as An,tp as kn,JV as Pn,G0 as Ce,H0 as me,PN as _n,PO as vn,PP as En,PQ as He,PR as wn,Mm as Tn,OP as Dn,Mx as Un,PS as Ke,PT as Ve,Gm as qe,l8 as On,rp as Je,ty as Fn,bE as je,tK as Re,cz as Vn,PU as Xe,fx as xn,FK as Bn,FO as jn,PV as Rn,G3 as Ne,PW as Nn,PX as zn,PY as Ln,PZ as Mn,go as Zn,AE as $n,P_ as Wn,AJ as Gn,AI as Hn}from"./zeni-epic-state-BzDw8pi_.js";import{j as ie,N as se,f as de,m as De,aN as X,bz as Qe,z as D,w as oe,c as U,B as Ue,g as W,bA as Kn,at as ce,bB as x,bC as qn,bD as Jn,af as Be,bE as Xn,r as ze,au as Le,K as Qn,y as Yn,bF as et,bG as nt,bH as tt,a7 as at}from"./index-B2U2XMzI.js";import{a as C}from"./sentry-lku8kjDH.js";import{n as xe,D as it,S as st}from"./mui-Da8iY16Z.js";import{M as fe}from"./MobileAppDrawer-bZsvcUIO.js";import z from"./NotFoundScreen-DkPaaWNr.js";import{a as Me}from"./analyticsHelper-DcxhhZJu.js";import{d as Ze}from"./routePaths-BhCcxP1S.js";import{B as Fe}from"./BusinessVerificationPageScreen-B8bnbJvI.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]="5f4aa02a-190c-4a01-8d42-225bbd4e4e6a",e._sentryDebugIdIdentifier="sentry-dbid-5f4aa02a-190c-4a01-8d42-225bbd4e4e6a")}catch{}})();const ot=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-GsPfxkQ7.js";import{h as X,g as Y,u as ee,i as G
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ct=H(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=an(e),i=D.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=sn(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",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e($(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e($(a,!0))},onEnableBillPayClick:()=>{e(J(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"bill_pay","bill_pay_setup"):_e("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(cn(a))},onAcceptUpdatedTOSSuccess:()=>{e($(a,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(on({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),rt=()=>{const e=X(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=en(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=se(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),f=De(),{configValue:A}=s(Q.zeniAccountsConfig),d=ye(A),[y,b]=C.useState(!1),P=C.useRef(!1),[g,S]=C.useState(!1),w=_(E=>E.billPaySetupViewState.fetchState),I=_(E=>V(E)),h=_(E=>E.billPaySetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:T,isLoading:k}=Xe(I?.tenantId),m=I.companyId??D.getSignedInUserTenant(a)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const v=!!I.companyBillPayInfo?.info?.isBillPayTOSAccepted,R=nn(c?.loggedInUserRoleMap);C.useEffect(()=>{P.current||w!=="Not-Started"||m==null?P.current||w!=="Completed"||m==null||I.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(P.current=!0,t($(m,!1,!0))):(P.current=!0,t($(m,!0)))},[w,m,t]),C.useEffect(()=>{g||h!=="Not-Started"||k||(S(!0),t(tn(!0,!0,T)))},[g,h,k,T,t]);const F=E=>{b(E)};if(v===!1||R&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(v===!0&&c?.loggedInUserRoleMap!=null){const E=N=>N.trackPageLoaded(W.Event.billPaySetup);return u.jsxs(ot,{children:[u.jsx(oe,{analytics:U,onLoad:N=>E(N)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:F}),u.jsx(ct,{navigate:e,location:o,companyId:m,currentTenant:I,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})},zt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,Lt=e=>`/${e}/cards`,Mt=e=>`/${e}/cards/setup`,Zt=e=>`/${e}/cards/onboard`,$t=(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},Wt=(e,o)=>e.find(t=>t.id===o),Gt=(e,o,t)=>!e||!o||t.fetchState==="Completed",ut=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Ht=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:B(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:B(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:B(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Kt=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:B(a.limit.amount),creditAccountAvailableAmount:B(a.available.amount),creditAccountSpentAmount:B(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:B(c.remainingAmountDue.amount)}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>B(n.accountBalance.available.amount)),debitCardsSpend:B(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Jt=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:B(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:B(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,Qt=80,Xt=80,Yt=e=>e.companyId??D.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,dt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,lt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),ea=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,na=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),pt=H(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=V(e),l=D.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:f,businessVerificationStatus:A}=o;return{onBusinessVerificationSectionClick:()=>{U.trackCardsVerifyIdentityCompanyDetailsClick(f,p,A?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onCardPolicySectionClick:()=>{t("../policy")},onFetchLinkTokenClick:(d,y)=>{e(Te("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(we(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,b)=>{e(Ee(d,y,"charge_cards","charge_card_setup",b))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(ve(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{U.trackCardsEnableCardsClick(f,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(J(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(J(a,"charge_cards")):i===!0&&r===!1&&e(J(a,"debit_cards"))},onUpdateChargeCardClick:(d,y,b)=>{const P=n.allBankAccounts.find(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(S=>S.accountId===d);U.trackCardsZeniCashAccountChangeClick(f,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(b==="paymentAccount"?Pe(d,y,"charge_cards","charge_card_setup"):_e("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const b=n.allFundingAccounts.find(S=>S.id===d),P=n.allFundingAccounts.findIndex(S=>S.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(S=>S.id===d)+1;U.trackCardsPaymentAccountChangeClick(f,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:B(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:b?.label??"",newPaymentAccountBalance:B(b?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:b?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(gn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ae({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(L(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(fn(a,d))}}})(qn),mt=()=>{const e=X(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=_(M=>V(M)),{useDynamicConfig:i,useFeatureGate:l}=se(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(Q.zeniAccountsConfig),{configValue:p}=i(Q.zeniCardsConfig),f=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:A}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=l(de.isEarlyPayFeatureEnabled),b=_(M=>rn(M,n.companyId)),P=un(b.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,S=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,w=dn(A,n),I=dt({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:w}),h=ln(n),T=pn(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,m=lt({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:d,isBookKeepingTenant:T,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:k}),v=I&&m===!1,R=I===!1&&m,F=ye(r),E=mn(c?.loggedInUserRoleMap),N=Ie(c?.loggedInUserRoleMap),[K,ge]=C.useState(!1),[q,re]=C.useState(!1),Z=_(M=>M.chargeCardSetupViewState.fetchState),x=D.getSignedInUserTenant(a)?.companyId??n.companyId,O=D.getSignedInUser(),Oe=M=>{ge(M)},Se=_(M=>yn(M,x));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||Z!=="Not-Started"||x==null?q||Z!=="Completed"||x==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(x,!1,!0)):(re(!0),t(le(x,!0)))},[q,Z,x,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=ut(m,I,S,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:()=>{U.trackPageLoaded(W.Event.cardsSetupVisited),U.trackCardsCardSetupView(P,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:K,handleDrawerToggle:Oe}),u.jsx(pt,{autoPayThreshold:f,navigate:e,location:o,companyId:x,currentTenant:n,isEarlyPayEnabled:y,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:E,isDebitCardOnlyEnabled:v,isCreditCardOnlyEnabled:R,chargeCardSetUpView:Se,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:I,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:P,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:N,accountsPromoConfig:F})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},yt=Be.div`
|
|
9
|
+
`,ct=H(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=an(e),i=D.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=sn(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",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e($(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e($(a,!0))},onEnableBillPayClick:()=>{e(J(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"bill_pay","bill_pay_setup"):_e("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(cn(a))},onAcceptUpdatedTOSSuccess:()=>{e($(a,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(on({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),rt=()=>{const e=Q(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=en(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=se(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),f=De(),{configValue:A}=s(X.zeniAccountsConfig),d=ye(A),[y,b]=C.useState(!1),P=C.useRef(!1),[g,S]=C.useState(!1),w=_(E=>E.billPaySetupViewState.fetchState),I=_(E=>V(E)),h=_(E=>E.billPaySetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:T,isLoading:k}=Qe(I?.tenantId),m=I.companyId??D.getSignedInUserTenant(a)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const v=!!I.companyBillPayInfo?.info?.isBillPayTOSAccepted,R=nn(c?.loggedInUserRoleMap);C.useEffect(()=>{P.current||w!=="Not-Started"||m==null?P.current||w!=="Completed"||m==null||I.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(P.current=!0,t($(m,!1,!0))):(P.current=!0,t($(m,!0)))},[w,m,t]),C.useEffect(()=>{g||h!=="Not-Started"||k||(S(!0),t(tn(!0,!0,T)))},[g,h,k,T,t]);const F=E=>{b(E)};if(v===!1||R&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(v===!0&&c?.loggedInUserRoleMap!=null){const E=N=>N.trackPageLoaded(W.Event.billPaySetup);return u.jsxs(ot,{children:[u.jsx(oe,{analytics:U,onLoad:N=>E(N)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:F}),u.jsx(ct,{navigate:e,location:o,companyId:m,currentTenant:I,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})},zt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,Lt=e=>`/${e}/cards`,Mt=e=>`/${e}/cards/setup`,Zt=e=>`/${e}/cards/onboard`,$t=(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},Wt=(e,o)=>e.find(t=>t.id===o),Gt=(e,o,t)=>!e||!o||t.fetchState==="Completed",ut=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Ht=(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,Kt=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:x(a.limit.amount),creditAccountAvailableAmount:x(a.available.amount),creditAccountSpentAmount:x(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:x(c.remainingAmountDue.amount)}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>x(n.accountBalance.available.amount)),debitCardsSpend:x(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Jt=(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,Xt=80,Qt=80,Yt=e=>e.companyId??D.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,dt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,lt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),ea=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,na=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),pt=H(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=V(e),l=D.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:f,businessVerificationStatus:A}=o;return{onBusinessVerificationSectionClick:()=>{U.trackCardsVerifyIdentityCompanyDetailsClick(f,p,A?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onCardPolicySectionClick:()=>{t("../policy")},onFetchLinkTokenClick:(d,y)=>{e(Te("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(we(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,b)=>{e(Ee(d,y,"charge_cards","charge_card_setup",b))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(ve(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{U.trackCardsEnableCardsClick(f,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(J(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(J(a,"charge_cards")):i===!0&&r===!1&&e(J(a,"debit_cards"))},onUpdateChargeCardClick:(d,y,b)=>{const P=n.allBankAccounts.find(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(S=>S.accountId===d);U.trackCardsZeniCashAccountChangeClick(f,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(S=>S.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(b==="paymentAccount"?Pe(d,y,"charge_cards","charge_card_setup"):_e("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const b=n.allFundingAccounts.find(S=>S.id===d),P=n.allFundingAccounts.findIndex(S=>S.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(S=>S.id===d)+1;U.trackCardsPaymentAccountChangeClick(f,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:b?.label??"",newPaymentAccountBalance:x(b?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:b?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(gn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ae({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(L(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(fn(a,d))}}})(qn),mt=()=>{const e=Q(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),n=_(M=>V(M)),{useDynamicConfig:i,useFeatureGate:l}=se(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(X.zeniAccountsConfig),{configValue:p}=i(X.zeniCardsConfig),f=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:A}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=l(de.isEarlyPayFeatureEnabled),b=_(M=>rn(M,n.companyId)),P=un(b.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,S=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,w=dn(A,n),I=dt({isDebitCardFeatureEnabled:A,isBankingOnlyTenant:w}),h=ln(n),T=pn(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,m=lt({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:d,isBookKeepingTenant:T,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:k}),v=I&&m===!1,R=I===!1&&m,F=ye(r),E=mn(c?.loggedInUserRoleMap),N=Ie(c?.loggedInUserRoleMap),[K,ge]=C.useState(!1),[q,re]=C.useState(!1),Z=_(M=>M.chargeCardSetupViewState.fetchState),B=D.getSignedInUserTenant(a)?.companyId??n.companyId,O=D.getSignedInUser(),Oe=M=>{ge(M)},Se=_(M=>yn(M,B));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||Z!=="Not-Started"||B==null?q||Z!=="Completed"||B==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(B,!1,!0)):(re(!0),t(le(B,!0)))},[q,Z,B,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=ut(m,I,S,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:()=>{U.trackPageLoaded(W.Event.cardsSetupVisited),U.trackCardsCardSetupView(P,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:K,handleDrawerToggle:Oe}),u.jsx(pt,{autoPayThreshold:f,navigate:e,location:o,companyId:B,currentTenant:n,isEarlyPayEnabled:y,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:E,isDebitCardOnlyEnabled:v,isCreditCardOnlyEnabled:R,chargeCardSetUpView:Se,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:I,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:P,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:N,accountsPromoConfig:F})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},yt=xe.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-GsPfxkQ7.js";import{h as X,g as Y,u as ee,i as G
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,ft=H(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=hn(e),i=Cn(e,a),l=D.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,description:d}=n;e(An({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(In(a)),U.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(J(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"reimbursement","reimbursement_setup"):_e("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Jn),gt=()=>{const e=X(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),{useDynamicConfig:n}=se(),i=De(),{configValue:l}=n(Q.zeniAccountsConfig),s=ye(l),r=Sn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[f,A]=C.useState(!1),d=C.useRef(!1),[y,b]=C.useState(!1),P=_(m=>m.remiSetupViewState.fetchState),g=_(m=>V(m)),S=_(m=>m.remiSetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:w,isLoading:I}=Xe(g?.tenantId),h=D.getSignedInUserTenant(a)?.companyId??g.companyId,T=D.getSignedInUser(),k=m=>{A(m)};if(T==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||P!=="Not-Started"||h==null?d.current||P!=="Completed"||h==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(h,!1,!0))):(d.current=!0,t(pe(h,!0)))},[P,h,t]),C.useEffect(()=>{y||S!=="Not-Started"||I||(b(!0),t(bn(!0,!1,!1,w)))},[y,S,I,w,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=v=>v.trackPageLoaded(W.Event.reimbursementSetup);return u.jsxs(yt,{children:[u.jsx(oe,{analytics:U,onLoad:v=>m(v)}),u.jsx(fe,{isAppContentDrawerOpen:f,handleDrawerToggle:k}),u.jsx(ft,{navigate:e,location:o,companyId:h,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{k(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},St=H(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Tn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),f=a==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:f}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:f,companyLegalName:A,companyTaxId:d,companyWebsite:y,companyPhone:b,primaryContactEmail:P,primaryContactName:g,primaryContactUserId:S,primaryContactSyncToken:w,syncToken:I,fileIds:h,incDate:T,typeOfIncorporation:k,stateOfIncorporation:m,sourceOfFunds:v,companySubIndustry:R,countriesOfOperations:F,companySourceOfFunds:E,companySourceOfFundsDescription:N,transactionVolume:K,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:Z,regulatedStatusDescription:x,usNexus:O,usNexusTypes:Oe}=s,Se=f?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:A,taxIdOrEIN:d,website:y!=""&&y!=null?Vn(y):void 0,phone:b,syncToken:I,fileIds:h,incDate:T!=null?je(T?.toString()):T,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:v?.selectedOption??"",companySubIndustry:R?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:E?.selectedOption??"",companySourceOfFundsDescription:N,transactionVolume:K?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Z??"",regulatedStatusDescription:x,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:S,firstName:g.firstName,lastName:g.lastName,email:P,syncToken:w};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:f,userId:A,name:d,email:y,nationalityCountryCode:b,ssn:P,dob:g,phone:S,syncToken:w,selectDocument:I,role:h,ownership:T,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:v,fileIds:R}=p;let F;return I.selectDocumentType==="driverLicense"?F="driving_license":I.selectDocumentType==="passport"?F="passport":I.selectDocumentType==="stateId"?F="id_document":I.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:f,userId:A,firstName:d.firstName,lastName:d.lastName,email:y,ssn:P,nationalityCountryCode:b?.selectedOption!=null?Le(b.selectedOption):void 0,phone:S,birthday:g!=null?je(g?.toString()):g,syncToken:w,titleAtCompany:h.selectedOption,ownershipInCompany:T,documentTypeSelectedForVerification:F,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:v,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:s=>{e(L(t,s,a))},onSendForVerificationClick:s=>{e(L(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),f=new URLSearchParams(i.search),A={};f.forEach((d,y)=>{A[y]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),f=new URLSearchParams(i.search),A=Object.fromEntries(f.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onBackClick:()=>{e(Fn({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ne(s,r.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(On({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Ve())}}})(Qn),bt=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=X(),c=Y(),n=ee(),[i]=Ye(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:f}=G(),A=ie(),{useDynamicConfig:d}=se(),y=De(),{configValue:b}=d(Q.zeniAccountsConfig),P=ye(b),g=_(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}}),S=_(m=>m.companyConfigState.fetchState),w=_(m=>m.userRoleConfigState.fetchState),I=_(m=>V(m)),h=I.companyId??D.getSignedInUserTenant(f)?.companyId;if(C.useEffect(()=>{S==="Not-Started"&&n(kn()),w==="Not-Started"&&n(Pn(!0))},[S,w,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&h!=null)switch(p(!0),e){case"zeni_accounts":n(me(h,!0));break;case"zeni_treasury":n(Ce(h,!0));break;case"reimbursement":n(pe(h,!0));break;case"charge_cards":n(le(h,!0));break;default:n($(h,!0))}},[r,g,h,n]),D.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let T;switch(e){case"zeni_accounts":T=I.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":T=I.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":T=I.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||I.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":T=I.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:T=I.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=_(m=>{let v;switch(e){case"zeni_accounts":v=wn(m,h);break;case"zeni_treasury":v=He(m,h);break;case"charge_cards":v=En(m,h);break;case"reimbursement":v=vn(m,h);break;default:v=_n(m,h)}return v});return T===!1?null:k.fetchState==="Completed"&&T===!0&&A?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:m=>(v=>{switch(e){case"zeni_accounts":return v.trackPageLoaded(W.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return v.trackPageLoaded(W.Event.reimbursementBusinessVerification);default:return v.trackPageLoaded(W.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(m)}),u.jsx(St,{businessVerificationDetails:k,navigate:a,location:c,companyId:h,analytics:U,currentTenant:I,productType:e,roleMap:A.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:P.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},ht={overlayWidth:new Yn(100,100,59)},Ct=H(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),i=D.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Qe(e,a),p=He(e,a),f=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",A=Rn(e),d=A.transactions,y=Ke(e),b=A.accountSummary?.totalBalance?.amount,P=d.length===0||b===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:y,isFirstTransfer:P,isDisabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Ln(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(Te("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(we(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(Ee(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(ve(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(J(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?Pe(s,r,"zeni_treasury","treasury_setup"):_e("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(L(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Ne(!1))}r===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,r)=>{e(ne(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(zn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(Nn(s))},onConfirmFundAllocation:()=>{e(Ne(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Ve())}}})(et),It=()=>{const e=X(),o=Y(),t=ee(),a=De(),c=Xn(),{tenantEmailDomain:n}=G(),{useDynamicConfig:i}=se(),l=ie(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:f}=i(Q.zeniAccountsConfig),A=ye(f),[d,y]=C.useState(!1),[b,P]=C.useState(!1),[g,S]=C.useState(!1),[w,I]=C.useState(!1),[h,T]=C.useState(!1),k=_(O=>O.treasurySetupViewState.fetchState),m=_(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),v=_(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),R=_(O=>O.treasuryDetailState.transactionsState?.fetchState),F=_(O=>V(O)),E=D.getSignedInUserTenant(n)?.companyId??F.companyId,N=_(O=>Qe(O,E)),K=N.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=D.getSignedInUser(),re=O=>{y(O)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{b||k!=="Not-Started"||E==null||(P(!0),t(Ce(E,!0,!1)))},[b,k,E,t]),C.useEffect(()=>{g||m!=="Not-Started"||E==null||(S(!0),t(Bn()))},[g,m,E,t]),C.useEffect(()=>{w||v!=="Not-Started"||E==null||(I(!0),t(xn()))},[w,v,E,t]),C.useEffect(()=>{h||R!=="Not-Started"||E==null||(T(!0),t(jn(!0)))},[h,R,E,t]);const Z=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,x=Z==="pending_review"||Z==="verified";return C.useEffect(()=>{s||k!=="Completed"||K||x||!o.pathname.includes("setup")||r(!0)},[k,K,x]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(it,{onClose:()=>{t(Ve()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(At,{onClick:O=>O.stopPropagation(),children:u.jsx(bt,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Ve()),e("../setup")}})})}),u.jsx(Ct,{navigate:e,location:o,companyId:E,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:A,isAccountsEnabled:ge,isAllocationDone:K,analytics:U,treasurySetupView:N,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},At=Be(st)`
|
|
17
|
+
`,ft=H(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=hn(e),i=Cn(e,a),l=D.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",f=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,description:d}=n;e(An({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:f,mileageAmountInDenomination:A,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(In(a)),U.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(J(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"reimbursement","reimbursement_setup"):_e("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Jn),gt=()=>{const e=Q(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),c=ie(),{useDynamicConfig:n}=se(),i=De(),{configValue:l}=n(X.zeniAccountsConfig),s=ye(l),r=Sn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[f,A]=C.useState(!1),d=C.useRef(!1),[y,b]=C.useState(!1),P=_(m=>m.remiSetupViewState.fetchState),g=_(m=>V(m)),S=_(m=>m.remiSetupApproverViewState.fetchState),{isApprovalRulesV3Enabled:w,isLoading:I}=Qe(g?.tenantId),h=D.getSignedInUserTenant(a)?.companyId??g.companyId,T=D.getSignedInUser(),k=m=>{A(m)};if(T==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||P!=="Not-Started"||h==null?d.current||P!=="Completed"||h==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(h,!1,!0))):(d.current=!0,t(pe(h,!0)))},[P,h,t]),C.useEffect(()=>{y||S!=="Not-Started"||I||(b(!0),t(bn(!0,!1,!1,w)))},[y,S,I,w,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=v=>v.trackPageLoaded(W.Event.reimbursementSetup);return u.jsxs(yt,{children:[u.jsx(oe,{analytics:U,onLoad:v=>m(v)}),u.jsx(fe,{isAppContentDrawerOpen:f,handleDrawerToggle:k}),u.jsx(ft,{navigate:e,location:o,companyId:h,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{k(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},St=H(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Tn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),f=a==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:f}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:f,companyLegalName:A,companyTaxId:d,companyWebsite:y,companyPhone:b,primaryContactEmail:P,primaryContactName:g,primaryContactUserId:S,primaryContactSyncToken:w,syncToken:I,fileIds:h,incDate:T,typeOfIncorporation:k,stateOfIncorporation:m,sourceOfFunds:v,companySubIndustry:R,countriesOfOperations:F,companySourceOfFunds:E,companySourceOfFundsDescription:N,transactionVolume:K,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:Z,regulatedStatusDescription:B,usNexus:O,usNexusTypes:Oe}=s,Se=f?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:A,taxIdOrEIN:d,website:y!=""&&y!=null?Vn(y):void 0,phone:b,syncToken:I,fileIds:h,incDate:T!=null?je(T?.toString()):T,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:v?.selectedOption??"",companySubIndustry:R?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:E?.selectedOption??"",companySourceOfFundsDescription:N,transactionVolume:K?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Z??"",regulatedStatusDescription:B,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:S,firstName:g.firstName,lastName:g.lastName,email:P,syncToken:w};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:f,userId:A,name:d,email:y,nationalityCountryCode:b,ssn:P,dob:g,phone:S,syncToken:w,selectDocument:I,role:h,ownership:T,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:v,fileIds:R}=p;let F;return I.selectDocumentType==="driverLicense"?F="driving_license":I.selectDocumentType==="passport"?F="passport":I.selectDocumentType==="stateId"?F="id_document":I.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:f,userId:A,firstName:d.firstName,lastName:d.lastName,email:y,ssn:P,nationalityCountryCode:b?.selectedOption!=null?Le(b.selectedOption):void 0,phone:S,birthday:g!=null?je(g?.toString()):g,syncToken:w,titleAtCompany:h.selectedOption,ownershipInCompany:T,documentTypeSelectedForVerification:F,isSelectedForVerification:k,userVerificationStatus:m,treasuryUserVerificationStatus:v,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:s=>{e(L(t,s,a))},onSendForVerificationClick:s=>{e(L(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),f=new URLSearchParams(i.search),A={};f.forEach((d,y)=>{A[y]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),f=new URLSearchParams(i.search),A=Object.fromEntries(f.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(A).length>0?A:void 0}})},onBackClick:()=>{e(Fn({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ne(s,r.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(On({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Ve())}}})(Xn),bt=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=Q(),c=Y(),n=ee(),[i]=Ye(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:f}=G(),A=ie(),{useDynamicConfig:d}=se(),y=De(),{configValue:b}=d(X.zeniAccountsConfig),P=ye(b),g=_(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}}),S=_(m=>m.companyConfigState.fetchState),w=_(m=>m.userRoleConfigState.fetchState),I=_(m=>V(m)),h=I.companyId??D.getSignedInUserTenant(f)?.companyId;if(C.useEffect(()=>{S==="Not-Started"&&n(kn()),w==="Not-Started"&&n(Pn(!0))},[S,w,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&h!=null)switch(p(!0),e){case"zeni_accounts":n(me(h,!0));break;case"zeni_treasury":n(Ce(h,!0));break;case"reimbursement":n(pe(h,!0));break;case"charge_cards":n(le(h,!0));break;default:n($(h,!0))}},[r,g,h,n]),D.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let T;switch(e){case"zeni_accounts":T=I.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":T=I.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":T=I.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||I.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":T=I.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:T=I.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=_(m=>{let v;switch(e){case"zeni_accounts":v=wn(m,h);break;case"zeni_treasury":v=He(m,h);break;case"charge_cards":v=En(m,h);break;case"reimbursement":v=vn(m,h);break;default:v=_n(m,h)}return v});return T===!1?null:k.fetchState==="Completed"&&T===!0&&A?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:m=>(v=>{switch(e){case"zeni_accounts":return v.trackPageLoaded(W.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return v.trackPageLoaded(W.Event.reimbursementBusinessVerification);default:return v.trackPageLoaded(W.Event.billPayBusinessVerification,Be(c)?"Settings":void 0)}})(m)}),u.jsx(St,{businessVerificationDetails:k,navigate:a,location:c,companyId:h,analytics:U,currentTenant:I,productType:e,roleMap:A.loggedInUserRoleMap,isSettings:Be(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:P.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},ht={overlayWidth:new Yn(100,100,59)},Ct=H(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),i=D.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Xe(e,a),p=He(e,a),f=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",A=Rn(e),d=A.transactions,y=Ke(e),b=A.accountSummary?.totalBalance?.amount,P=d.length===0||b===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:y,isFirstTransfer:P,isDisabled:f,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Ln(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(Te("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(we(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(Ee(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(ve(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(J(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?Pe(s,r,"zeni_treasury","treasury_setup"):_e("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(L(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Ne(!1))}r===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,r)=>{e(ne(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(zn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(Nn(s))},onConfirmFundAllocation:()=>{e(Ne(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Ve())}}})(et),It=()=>{const e=Q(),o=Y(),t=ee(),a=De(),c=Qn(),{tenantEmailDomain:n}=G(),{useDynamicConfig:i}=se(),l=ie(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:f}=i(X.zeniAccountsConfig),A=ye(f),[d,y]=C.useState(!1),[b,P]=C.useState(!1),[g,S]=C.useState(!1),[w,I]=C.useState(!1),[h,T]=C.useState(!1),k=_(O=>O.treasurySetupViewState.fetchState),m=_(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),v=_(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),R=_(O=>O.treasuryDetailState.transactionsState?.fetchState),F=_(O=>V(O)),E=D.getSignedInUserTenant(n)?.companyId??F.companyId,N=_(O=>Xe(O,E)),K=N.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=D.getSignedInUser(),re=O=>{y(O)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{b||k!=="Not-Started"||E==null||(P(!0),t(Ce(E,!0,!1)))},[b,k,E,t]),C.useEffect(()=>{g||m!=="Not-Started"||E==null||(S(!0),t(xn()))},[g,m,E,t]),C.useEffect(()=>{w||v!=="Not-Started"||E==null||(I(!0),t(Bn()))},[w,v,E,t]),C.useEffect(()=>{h||R!=="Not-Started"||E==null||(T(!0),t(jn(!0)))},[h,R,E,t]);const Z=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Z==="pending_review"||Z==="verified";return C.useEffect(()=>{s||k!=="Completed"||K||B||!o.pathname.includes("setup")||r(!0)},[k,K,B]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(it,{onClose:()=>{t(Ve()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(At,{onClick:O=>O.stopPropagation(),children:u.jsx(bt,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Ve()),e("../setup")}})})}),u.jsx(Ct,{navigate:e,location:o,companyId:E,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:A,isAccountsEnabled:ge,isAllocationDone:K,analytics:U,treasurySetupView:N,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},At=xe(st)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
`,kt=H(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Mn(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Te("account_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(J(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"zeni_accounts","account_setup"):_e("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}})(nt),Pt=()=>{const e=
|
|
21
|
+
`,kt=H(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Mn(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:U,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Te("account_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(ve(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(J(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Pe(n,i,"zeni_accounts","account_setup"):_e("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}})(nt),Pt=()=>{const e=Q(),o=Y(),t=ee(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=se(),n=ie(),i=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(X.zeniAccountsConfig),s=ye(l),[r,p]=C.useState(!1),[f,A]=C.useState(!1),d=_(S=>S.zeniAccountSetupViewState.fetchState),y=_(S=>V(S)),b=D.getSignedInUserTenant(a)?.companyId??y.companyId,P=D.getSignedInUser(),g=S=>{p(S)};if(P==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{f||d!=="Not-Started"||b==null?f||d!=="Completed"||b==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(b,!1,!0)):(A(!0),t(me(b,!0)))},[f,d,b,t]),y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const S=w=>w.trackPageLoaded(W.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(oe,{analytics:U,onLoad:w=>S(w)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(kt,{navigate:e,location:o,companyId:b,currentTenant:y,isUserZeniAccountsAdmin:i,accountsPromoConfig:s,onClickMenuIcon:()=>{g(!0)}})]})}},_t=xe.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-GsPfxkQ7.js";import{h as X,g as Y,u as ee,i as G
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,vt=H(function(e,o){const t=V(e),a=D.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Wn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:n,analytics:U}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Hn(a))},onSubmitClick:()=>{e(Gn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ae({files:a}))},onDeleteFile:a=>{e(te(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ne(a,c.split(".")[0]))}}})(tt),Et=()=>{const e=
|
|
29
|
+
`,vt=H(function(e,o){const t=V(e),a=D.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Wn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${ce.fileMicroServiceBaseUrl}`,authParams:n,analytics:U}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Hn(a))},onSubmitClick:()=>{e(Gn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ae({files:a}))},onDeleteFile:a=>{e(te(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ne(a,c.split(".")[0]))}}})(tt),Et=()=>{const e=Q(),o=Y(),t=ee(),[a,c]=C.useState(!1),[n,i]=C.useState(!1),[l,s]=C.useState(!1),{tenantEmailDomain:r}=G(),p=ie(),{useFeatureGate:f}=se(),{isFeatureEnabled:A}=f(de.isBillPayLocalCurrencyFeatureEnabled),d=_(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),y=_(k=>k.billPaySetupViewState.fetchState),b=_(k=>V(k)),P=De(),g=b.companyId??D.getSignedInUserTenant(r)?.companyId,S=_(k=>Zn(k.companyState,b.companyId)),w=S?.company.companyBillPayInfo.internationalWireOnboardingStatus,I=w?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t($n(g)))},[a,d,g,t]),C.useEffect(()=>{n||y!=="Not-Started"||g==null||(i(!0),t($(g,!0)))},[y,n,g,t]),D.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const h=b.companyBillPayInfo?.info?.isBillPayTOSAccepted,T=k=>{s(k)};return h===!1?u.jsx(j,{to:"../promo"}):h===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(_t,{children:[u.jsx(oe,{analytics:U,onLoad:k=>(m=>m.trackPageLoaded(W.Event.billPayBusinessVerification,void 0))(k)}),Be(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:T}):null,u.jsx(vt,{navigate:e,location:o,companyId:g,analytics:U,currentTenant:b,roleMap:p.loggedInUserRoleMap,isFormReadonly:I,isLocalCurrencyEnabled:A})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}})},wt=H(function(){return{}},function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e($(t,!0,!0))}}}}})(at(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:r}=e;switch(s){case"bill_pay":switch(r){case"verification":return o?u.jsx(Fe,{productType:s}):t?u.jsx(j,{to:"../"}):u.jsx(z,{});case"international-wire":return o?u.jsx(Et,{}):t?u.jsx(j,{to:"../"}):u.jsx(z,{});default:return o?u.jsx(rt,{}):t?u.jsx(j,{to:"../"}):u.jsx(z,{})}case"reimbursement":return r==="verification"?a?u.jsx(Fe,{productType:s}):u.jsx(z,{}):a?u.jsx(gt,{}):u.jsx(z,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Fe,{productType:"zeni_accounts"}):u.jsx(z,{}):c?u.jsx(Pt,{}):u.jsx(z,{});case"zeni_treasury":return n===!0?u.jsx(It,{}):u.jsx(z,{});case"charge_cards":return r==="verification"?i?u.jsx(Fe,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(z,{}):i?u.jsx(mt,{}):l?u.jsx(j,{to:"../"}):u.jsx(z,{})}}));function ta(e){const{tenantEmailDomain:o}=G(),t=_(c=>V(c)).companyId??D.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,i)=>{i.onEventReceived(c)}};if(D.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(wt,{...e,companyId:t,...a})}export{Xt as A,Qt as P,ta as S,Kt as a,Jt as b,dt as c,lt as d,ut as e,Yt as f,$t as g,Lt as h,Ht as i,qt as j,ea as k,Gt as l,Wt as m,Mt as n,Zt as o,zt as p,na as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-C-n95g0A.js";import{a as u,b as D,q as T}from"./sentry-lku8kjDH.js";import{u as A,h as z,j as d,g as M,N as O,n as j}from"./core-B5TeChD4.js";import{u as F,z as s,m as P,c as w,D as _,e as B,g as N,s as W,h as V,W as Y,i as v}from"./index-B2U2XMzI.js";import{eW as $,Ly as q,Lz as G,fa as H,fD as J,LE as K,gn as Q,cY as R,LF as b,LG as X,LH as Z,bY as y}from"./zeni-epic-state-BzDw8pi_.js";import"./mui-Da8iY16Z.js";import{u as ee}from"./useDeviceId-bV7jqaoy.js";import{f as te}from"./analyticsHelper-DcxhhZJu.js";import{t as ne}from"./getLocaleForTenant-Bixn6PX7.js";import"./recharts--v-RQjOV.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.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]="3599a22c-9f76-41e9-9fa7-741b639acc16",t._sentryDebugIdIdentifier="sentry-dbid-3599a22c-9f76-41e9-9fa7-741b639acc16")}catch{}})();const ie=j(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{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(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(Y),ae=D.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),c=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:C,accountUnlockTime:h}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),k=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>$(e)),I=d(e=>q(e)),m=M(),E=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[L.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),Q().then(()=>{const e=V();e!=null&&B(e)}),setTimeout(()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,k,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&h!=null?f.jsx(W,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-C-n95g0A.js";import{a as n}from"./sentry-lku8kjDH.js";import{u,g,h as m,N as p}from"./core-B5TeChD4.js";import{z as c,B as y,t as h,c as d,g as b}from"./index-B2U2XMzI.js";import{gs as x,gt as I,LW as w}from"./zeni-epic-state-BzDw8pi_.js";import{n as j}from"./mui-Da8iY16Z.js";import"./recharts--v-RQjOV.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.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]="06380a20-5037-4396-9df3-8cdaa6963c5c",e._sentryDebugIdIdentifier="sentry-dbid-06380a20-5037-4396-9df3-8cdaa6963c5c")}catch{}})();function $(){const e=u(),t=g(),i=m(),a=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),h.reset(),d.trackLogout(b.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`;export{$ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as d}from"./liveblocks-C-n95g0A.js";import{a as G}from"./sentry-lku8kjDH.js";import{h as _,u as v,g as K,j as b,i as z,n as q}from"./core-B5TeChD4.js";import{z as F,N as W,f as p,_ as H,w as M,c as O,g as V,d8 as Z,r as f,p as Q}from"./index-B2U2XMzI.js";import{eW as J,Th as R,IH as C,Ti as x,Td as X,I3 as y,Tj as Y,Ib as E,Hx as aa,II as S,Tk as B,f9 as ea,Iy as ta,ID as sa,Iq as oa,Io as w,IE as na,Il as ia,Tl as la,Tm as ra,Tn as ca,To as ka,Tp as T,ei as ua,Tq as da,Tr as pa}from"./zeni-epic-state-BzDw8pi_.js";import{n as Ta}from"./mui-Da8iY16Z.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-Bt3rxiW7.js";import{M as fa}from"./MobileAppDrawer-bZsvcUIO.js";import"./recharts--v-RQjOV.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.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]="deefffa7-1e27-42c9-a5b9-c57682ac04f7",e._sentryDebugIdIdentifier="sentry-dbid-deefffa7-1e27-42c9-a5b9-c57682ac04f7")}catch{}})();const ga=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as u}from"./liveblocks-GsPfxkQ7.js";import{a as G}from"./sentry-B2TzMFx
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ha=
|
|
9
|
+
`,ha=q(function(e,t){const o=R(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=F.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=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(C(!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=I(i,t.localData.defaultTaskGroupId),s=f(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(C(!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=I(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:g,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=I(i,t.localData.defaultTaskGroupId),k=f(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 $a(){const e=_(),t=v(),o=K(),c=F.getSignedInUser(),n=b(r=>J(r)),{taskGroupId:u}=z(),{useFeatureGate:i}=W(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:g}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,j]=G.useState(!1),h=b(r=>R(r,l)),D=b(r=>r.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:N,onAskAiCfoClick:$}=ma({mobileExploreReferrer:"Task Checklist"});if(H({isDataReady:m==="Completed"}),G.useEffect(()=>{t(C(!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(M,{analytics:O,onLoad:r=>(U=>U.trackPageLoaded(V.Event.taskListPage))(r)}):null,d.jsxs(ga,{children:[d.jsx(fa,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{j(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:g,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:N,onAskAiCfoClick:$})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,I=(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{$a as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-C-n95g0A.js";import se from"./NotFoundScreen-DkPaaWNr.js";import{a as l}from"./sentry-lku8kjDH.js";import{h as q,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as le,p as f}from"./core-B5TeChD4.js";import{HK as Z,HN as ce,HH as de,eW as M,Td as K,H$ as Q,HE as pe,Iv as ue,Io as ke,Te as W,Tf as N,HA as me,Hx as fe,ry as ge,rm as he,l0 as Se,HV as Ie,Tg as Te,Ia as be,I7 as Ee,HQ as Ce,I4 as Ge,I3 as De}from"./zeni-epic-state-BzDw8pi_.js";import{z as G,d6 as xe,H as ye,N as je,f as b,p as X,r as v,w as we,c as V,g as ve,d7 as Re,i as z,at as Fe}from"./index-B2U2XMzI.js";import{n as Be}from"./mui-Da8iY16Z.js";import{u as Pe}from"./useInitialThreadRequest-j8y2-Pa3.js";import{M as Ue}from"./MobileAppDrawer-bZsvcUIO.js";import Le from"./TaskListScreen-DP-G56Cv.js";import"./recharts--v-RQjOV.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.js";import"./useAskAiCfoHostNavButtonProps-Bt3rxiW7.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]="2928b593-7d67-4b47-a841-f56e56a1ffe9",e._sentryDebugIdIdentifier="sentry-dbid-2928b593-7d67-4b47-a841-f56e56a1ffe9")}catch{}})();function He(){const e=q(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),c=l.useCallback(()=>{t(Z())},[t]),k=l.useCallback((o,h,S)=>{t(ce({name:o,content:h,cannedResponseId:S}))},[t]),a=l.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:c,onSave:k})}let A,_=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=M(e),c=r.taskGroupId??u,k=c!=null?N(e.taskGroupState,c):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=K(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${z.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,_=Object.values(I)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${z.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(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:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!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 w(){const e=q(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=g(i=>M(i)),k=Pe(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,I]=l.useState(!1),[p,Y]=l.useState(!1),[F,J]=l.useState(!1),[B,ee]=l.useState(!1),[P,y]=l.useState(!1),T=l.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>K(i)),L=g(i=>i.taskGroupViewState.fetchState);l.useEffect(()=>{p||(Y(!0),t(Q(!1,r)))},[p,t]),l.useEffect(()=>{F||U.fetchState==="Completed"||(J(!0),t(pe()))},[F,t,U.fetchState]),l.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=l.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);l.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,c,s,e]);const H=g(i=>W(i,r)),j=H.fetchState,$=G.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&H.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(we,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:V,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=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(le,{children:[n.jsx(f,{path:"/new",element:n.jsx(w,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(w,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx(He,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(w,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
package/dist/assets/{TransactionDetailRoutes-Bs9ghT0l.js → TransactionDetailRoutes-q6akxnYr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-C-n95g0A.js";import i from"./NotFoundScreen-DkPaaWNr.js";import{T as r}from"./TransactionDetailScreen-BDokO385.js";import"./sentry-lku8kjDH.js";import{o as a,p as o}from"./core-B5TeChD4.js";import"./zeni-epic-state-BzDw8pi_.js";import"./recharts--v-RQjOV.js";import"./index-B2U2XMzI.js";import"./mui-Da8iY16Z.js";import"./analytics-CkXhIYGA.js";import"./plaid-kqYG7b9d.js";import"./dnd-CWnSyq9-.js";import"./stripe-DMRn4zHo.js";import"./lottie-zNHYqEBz.js";import"./lexical-D7c0ykAW.js";import"./pdf-BM7gJkYi.js";import"./utils-Dw1Jg_v9.js";import"./useAskAiCfoHostNavButtonProps-Bt3rxiW7.js";import"./decodeURIComponentSafe-DXB7OyA3.js";import"./routePaths-BhCcxP1S.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]="56b6774e-1a6b-43e6-92ce-ea2969956395",e._sentryDebugIdIdentifier="sentry-dbid-56b6774e-1a6b-43e6-92ce-ea2969956395")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|