@zeniai/client-epic-state 5.1.4-beta1ND → 5.1.4-beta3ND
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/lib/esm/index.js +4 -3
- package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +16 -15
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +6 -2
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +13 -11
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +25 -6
- package/lib/index.d.ts +4 -4
- package/lib/index.js +23 -15
- package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +15 -14
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +4 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +8 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +13 -11
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +12 -8
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +27 -7
- package/package.json +1 -1
package/lib/esm/index.js
CHANGED
|
@@ -215,8 +215,9 @@ import { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, } from './
|
|
|
215
215
|
import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetchOnboardingCompletedCompanies, fetchQBOConnectionPool, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, resetNewOnboardedCustomerId, retryBankAccountConnectionForOnboarding, saveOnboardingCustomerCompletedStatus, saveOnboardingCustomerDataInLocalStore, saveOnboardingCustomerNotes, saveOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdates, sendOnboardingCustomerViewInvite, updateCustomerCreationStatus, updateOnboardingCustomerDataInLocalStore, updateOnboardingCustomerListUIState, updateQBOConnectionPoolExternalConnection, updateStatusAfterOnboardingCompleted, } from './view/onboardingView/cockpitView/onboardingCockpitViewReducer';
|
|
216
216
|
import { getNewOnboardingCustomerView, getOnboardingCockpitView, } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
|
|
217
217
|
import { toProductType, toProductTypeStrict, } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
|
|
218
|
-
import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
|
|
219
|
-
import { getOnboardingCustomerView, getProductSettingsString, } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
|
|
218
|
+
import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
|
|
219
|
+
import { getAiAgentsActivationCounts, getAiAgentsActivationPhases, getAiAgentsActivationSubview, getOnboardingCustomerView, getProductSettingsString, } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
|
|
220
|
+
import { ALL_ONBOARDING_STEPS, ALL_ONBOARDING_SUB_STEPS, toOnboardingSubStepType, } from './view/onboardingView/customerView/onboardingCustomerViewState';
|
|
220
221
|
import { fetchOpEx, fetchOpExWithForecast, updateOpExCOABalancesRange, updateOpExDownloadState, updateOpExUIState, } from './view/opEx/opExReducer';
|
|
221
222
|
import { getOperatingExpensesForHighlightedRange, getOperatingExpensesForSelectedRange, getOperatingExpensesReport, getOperatingExpensesReportFetchState, getOperatingExpensesUIState, } from './view/opEx/opExSelector';
|
|
222
223
|
import { clearOpExByVendorSearch, fetchOpExByVendor, fetchOpExByVendorReportForTimeframe, updateOpExByVendorAdditionalBalancesSelection, updateOpExByVendorDownloadState, updateOpExByVendorPageFetchInProgress, updateOpExByVendorPageLimit, updateOpExByVendorSearchString, updateOpExByVendorSort, updateOpExByVendorSortOrSearchInProgress, updateOpExByVendorTimeFrame, updateOpExByVendorUIState, } from './view/opExByVendor/opExByVendorReducer';
|
|
@@ -607,7 +608,7 @@ export { saveTransactionVendor, saveTransactionVendorSuccessOrFailure, updateTra
|
|
|
607
608
|
export { fetchCompanyConfig };
|
|
608
609
|
export { getCompanyConfig };
|
|
609
610
|
export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, };
|
|
610
|
-
export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getOnboardingCustomerView, getProductSettingsString, };
|
|
611
|
+
export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getAiAgentsActivationCounts, getAiAgentsActivationPhases, getAiAgentsActivationSubview, getOnboardingCustomerView, getProductSettingsString, ALL_ONBOARDING_STEPS, ALL_ONBOARDING_SUB_STEPS, toOnboardingSubStepType, };
|
|
611
612
|
export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, getAccountMappingView, initializeAccountMappingView, };
|
|
612
613
|
export { getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
|
|
613
614
|
export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateFiles } from '../../../entity/file/fileReducer';
|
|
4
4
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
5
5
|
import { updateFileName, updateFileNameFailure, updateFileNameSuccess, } from '../fileViewReducer';
|
|
6
|
-
export const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateFileName.match),
|
|
6
|
+
export const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateFileName.match), switchMap((action) => {
|
|
7
7
|
/**
|
|
8
8
|
* tenantId is required for updating onboarding file names.
|
|
9
9
|
*/
|
|
@@ -18,7 +18,7 @@ import { getOnboardingCustomerView } from '../../onboardingCustomerViewSelector'
|
|
|
18
18
|
export const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateOnboardingCustomerView.match), mergeMap((action) => {
|
|
19
19
|
const { companyId, officerType, sendForVerification, reCalculateCurrentStep = false, isBillingAddressUpdate, } = action.payload;
|
|
20
20
|
const { onboardingCustomerViewState } = state$.value;
|
|
21
|
-
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, } = onboardingCustomerViewState;
|
|
21
|
+
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, currentSubStep, } = onboardingCustomerViewState;
|
|
22
22
|
const companyLocalData = companyDetails.localData;
|
|
23
23
|
const primaryContactLocalData = primaryContactDetails.localData;
|
|
24
24
|
let companyOfficerLocalData;
|
|
@@ -52,8 +52,12 @@ export const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => a
|
|
|
52
52
|
Boolean(companyOfficerLocalData.email) === true // Don't save Empty Company Officer details
|
|
53
53
|
? toBusinessVerificationOfficerDataPayload(companyOfficerLocalData, false, companyOfficerAddressToCreate)
|
|
54
54
|
: {};
|
|
55
|
+
// Verification step has two sub-steps that share currentStep but save
|
|
56
|
+
// different payloads — currentSubStep is the source of truth here.
|
|
57
|
+
const isOfficerSave = currentStep === 'verification' &&
|
|
58
|
+
currentSubStep === 'company_officer';
|
|
55
59
|
if (isBillingAddressUpdate === false) {
|
|
56
|
-
if (
|
|
60
|
+
if (isOfficerSave) {
|
|
57
61
|
payload = {
|
|
58
62
|
company: toBusinessVerificationMinimalCompanyDataPayload(companyLocalData),
|
|
59
63
|
company_officer,
|
|
@@ -66,6 +70,11 @@ export const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => a
|
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
}
|
|
73
|
+
const section = isBillingAddressUpdate === true
|
|
74
|
+
? 'setup_billing'
|
|
75
|
+
: isOfficerSave
|
|
76
|
+
? 'company_officer'
|
|
77
|
+
: 'company_details';
|
|
69
78
|
const messageSectionMapper = {
|
|
70
79
|
company_officer: {
|
|
71
80
|
sendForVerification: 'onboarding_customer_identity_verification_submit',
|
|
@@ -75,23 +84,20 @@ export const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => a
|
|
|
75
84
|
sendForVerification: 'onboarding_customer_business_verification_submit',
|
|
76
85
|
save: 'onboarding_customer_business_verification_save',
|
|
77
86
|
},
|
|
78
|
-
|
|
87
|
+
setup_billing: {
|
|
79
88
|
save: 'billing_address_view',
|
|
80
89
|
sendForVerification: 'billing_address_view',
|
|
81
90
|
},
|
|
82
91
|
};
|
|
83
92
|
let messageSection;
|
|
84
93
|
if (isBillingAddressUpdate === true) {
|
|
85
|
-
messageSection = messageSectionMapper[
|
|
94
|
+
messageSection = messageSectionMapper[section].save;
|
|
95
|
+
}
|
|
96
|
+
else if (sendForVerification === true) {
|
|
97
|
+
messageSection = messageSectionMapper[section].sendForVerification;
|
|
86
98
|
}
|
|
87
99
|
else {
|
|
88
|
-
|
|
89
|
-
messageSection =
|
|
90
|
-
messageSectionMapper[currentStep].sendForVerification;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
messageSection = messageSectionMapper[currentStep].save;
|
|
94
|
-
}
|
|
100
|
+
messageSection = messageSectionMapper[section].save;
|
|
95
101
|
}
|
|
96
102
|
return zeniAPI
|
|
97
103
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
@@ -114,18 +120,18 @@ export const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => a
|
|
|
114
120
|
const externalConnections = currentTenant.externalConnections;
|
|
115
121
|
const isQBOConnection = externalConnections?.accounting?.some((connection) => connection.connectionName.match(/quickbooks/i)) ?? false;
|
|
116
122
|
const { allSteps } = getOnboardingCustomerView(state$.value, companyId);
|
|
117
|
-
if (currentStep === '
|
|
123
|
+
if (currentStep === 'setup_billing') {
|
|
118
124
|
if (isQBOConnection === true &&
|
|
119
|
-
allSteps.includes('
|
|
120
|
-
actions.push(updateCurrentStep({ step: '
|
|
125
|
+
allSteps.includes('connect_ledger')) {
|
|
126
|
+
actions.push(updateCurrentStep({ step: 'connect_ledger' }));
|
|
121
127
|
}
|
|
122
128
|
else {
|
|
123
|
-
actions.push(updateCurrentStep({ step: '
|
|
129
|
+
actions.push(updateCurrentStep({ step: 'verification' }));
|
|
124
130
|
}
|
|
125
131
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
// The officer→details transition is now a sub-step change
|
|
133
|
+
// handled by the page (currentSubStep dispatch). No
|
|
134
|
+
// currentStep update needed for that traversal anymore.
|
|
129
135
|
actions.push(updateOnboardingCustomerViewLocalStoreData({
|
|
130
136
|
companyId: response.data.companies[0].company_id,
|
|
131
137
|
currentStep,
|
|
@@ -13,10 +13,10 @@ import { toAddressViewLocalData } from '../../../../addressView/toAddressViewLoc
|
|
|
13
13
|
import { getCompanyView } from '../../../../companyView/selectorHelpers/getCompanyView';
|
|
14
14
|
import { toSetupViewLocalData } from '../../../../spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic';
|
|
15
15
|
import { clearOnboardingCustomerViewDataInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerViewLocalStoreData, } from '../../onboardingCustomerViewReducer';
|
|
16
|
-
import {
|
|
16
|
+
import { onboardingStepsData } from '../../onboardingCustomerViewSelector';
|
|
17
17
|
export const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe(filter(updateOnboardingCustomerViewLocalStoreData.match), mergeMap((action) => {
|
|
18
18
|
const { companyId, currentStep, reCalculateCurrentStep } = action.payload;
|
|
19
|
-
const { companyState, companyViewState,
|
|
19
|
+
const { companyState, companyViewState, userState, userRoleState, onboardingCustomerViewState, subscriptionPaymentAccountState, paymentAccountState, addressState, } = state$.value;
|
|
20
20
|
const { subscriptionPaymentAccountIds } = onboardingCustomerViewState;
|
|
21
21
|
const subscriptionIDs = recordGet(companyViewState.passportView.subscriptionIDsByCompanyID, companyId, undefined);
|
|
22
22
|
const companyView = getCompanyView(state$.value, companyId, subscriptionIDs ?? []);
|
|
@@ -36,7 +36,12 @@ export const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$)
|
|
|
36
36
|
const onboardingCustomerViewLocalData = toOnboardingCustomerViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
|
|
37
37
|
const { companyDetails, officers, primaryContactDetails } = onboardingCustomerViewLocalData;
|
|
38
38
|
let updatedCompanyDetails = companyDetails;
|
|
39
|
-
|
|
39
|
+
// After an officer sub-step save inside the verification step, propagate
|
|
40
|
+
// the latest syncToken into the cached company-details local data so the
|
|
41
|
+
// user's next details-save doesn't 409.
|
|
42
|
+
const isOfficerSave = currentStep === 'verification' &&
|
|
43
|
+
onboardingCustomerViewState.currentSubStep === 'company_officer';
|
|
44
|
+
if (isOfficerSave &&
|
|
40
45
|
onboardingCustomerViewState.companyDetails.localData != null) {
|
|
41
46
|
const { companyInfo } = company;
|
|
42
47
|
const { syncToken } = companyInfo;
|
|
@@ -45,7 +50,7 @@ export const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$)
|
|
|
45
50
|
syncToken,
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
|
-
let updatedCurrentStep = '
|
|
53
|
+
let updatedCurrentStep = 'setup_billing';
|
|
49
54
|
let subscriptionPaymentAccount;
|
|
50
55
|
const { companyOnboardingInfo } = company;
|
|
51
56
|
const accountingConnectionCreationMode = companyOnboardingInfo?.onboardingInfo
|
|
@@ -72,18 +77,14 @@ export const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$)
|
|
|
72
77
|
cardPaymentViewState.cardPaymentsIds.length > 0) &&
|
|
73
78
|
companyView?.company.company.companyOnboardingInfo
|
|
74
79
|
.subscriptionBillingAddressId != null) {
|
|
75
|
-
updatedCurrentStep = '
|
|
80
|
+
updatedCurrentStep = 'connect_ledger';
|
|
81
|
+
// After the ledger is connected we move straight to verification —
|
|
82
|
+
// company_officer / company_details are now sub-steps inside it,
|
|
83
|
+
// so the page handles which sub-step to land on. The optional
|
|
84
|
+
// connect_data_source step is opt-in from the sidebar, not from
|
|
85
|
+
// the recalc.
|
|
76
86
|
if (isValidConnection) {
|
|
77
|
-
updatedCurrentStep = '
|
|
78
|
-
let officerIndex = companyOfficers.length > 0
|
|
79
|
-
? officers.findIndex((officer) => officer?.isSelectedForVerification === true)
|
|
80
|
-
: 0;
|
|
81
|
-
if (officerIndex === -1) {
|
|
82
|
-
officerIndex = 0;
|
|
83
|
-
}
|
|
84
|
-
if (isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, officers[officerIndex], fileState)) {
|
|
85
|
-
updatedCurrentStep = 'company_details';
|
|
86
|
-
}
|
|
87
|
+
updatedCurrentStep = 'verification';
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -10,7 +10,8 @@ export const initialState = {
|
|
|
10
10
|
updateStatus: initialStatus,
|
|
11
11
|
saveStatus: initialStatus,
|
|
12
12
|
dashboardLoadedStatus: initialStatus,
|
|
13
|
-
currentStep: '
|
|
13
|
+
currentStep: 'setup_billing',
|
|
14
|
+
currentSubStep: 'default',
|
|
14
15
|
parsingDocumentFileIds: [],
|
|
15
16
|
companyDetails: {
|
|
16
17
|
autoFilledFields: [],
|
|
@@ -116,6 +117,9 @@ const onboardingCustomerView = createSlice({
|
|
|
116
117
|
updateCurrentStep(draft, action) {
|
|
117
118
|
draft.currentStep = action.payload.step;
|
|
118
119
|
},
|
|
120
|
+
updateCurrentSubStep(draft, action) {
|
|
121
|
+
draft.currentSubStep = action.payload.subStep;
|
|
122
|
+
},
|
|
119
123
|
updateOnboardingCustomerViewAccountDetails: {
|
|
120
124
|
prepare(paymentAccountIds, subscriptionPaymentAccountIds) {
|
|
121
125
|
return { payload: { paymentAccountIds, subscriptionPaymentAccountIds } };
|
|
@@ -762,5 +766,5 @@ const onboardingCustomerView = createSlice({
|
|
|
762
766
|
});
|
|
763
767
|
},
|
|
764
768
|
});
|
|
765
|
-
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamSuccess, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiActivationViewedSuccess, acknowledgeOnboardingAiActivationViewedFailure, fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusSuccess, fetchAiAgentsActivationStatusFailure, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, } = onboardingCustomerView.actions;
|
|
769
|
+
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamSuccess, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiActivationViewedSuccess, acknowledgeOnboardingAiActivationViewedFailure, fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusSuccess, fetchAiAgentsActivationStatusFailure, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, } = onboardingCustomerView.actions;
|
|
766
770
|
export default onboardingCustomerView.reducer;
|
|
@@ -11,7 +11,7 @@ import { getCompanyAndIdentityDetails, } from '../../spendManagement/commonSetup
|
|
|
11
11
|
import { ALL_ONBOARDING_STEPS, ALL_ZENI_USER_ONBOARDING_STEPS, REQUIRED_ONBOARDING_STEPS, ZENI_USER_REQUIRED_ONBOARDING_STEPS, emptyAiAgentsActivationSubview, toOnboardingStepType, } from './onboardingCustomerViewState';
|
|
12
12
|
export function getOnboardingCustomerView(state, companyId) {
|
|
13
13
|
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, countryListState, addressViewState, } = state;
|
|
14
|
-
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, parsingDocumentFileIds, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
14
|
+
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, parsingDocumentFileIds, updateStatus, saveStatus, currentStep, currentSubStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
15
15
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
16
16
|
let subscriptionPaymentAccount;
|
|
17
17
|
let paymentAccount;
|
|
@@ -74,7 +74,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
74
74
|
cardPaymentViewState.cardPaymentsIds.length > 0) &&
|
|
75
75
|
companyView?.company.company.companyOnboardingInfo
|
|
76
76
|
.subscriptionBillingAddressId != null) {
|
|
77
|
-
completedSteps.push('
|
|
77
|
+
completedSteps.push('setup_billing');
|
|
78
78
|
}
|
|
79
79
|
const isPaymentVerified = (paymentAccount?.providerVerificationStatus?.code?.includes('verified') ===
|
|
80
80
|
true &&
|
|
@@ -85,24 +85,25 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
85
85
|
.subscriptionBillingAddressId != null;
|
|
86
86
|
if ((isPaymentVerified || hasSubscriptionBillingAddress) &&
|
|
87
87
|
!(isPaymentVerified && hasSubscriptionBillingAddress)) {
|
|
88
|
-
halfCompletedSteps.push('
|
|
88
|
+
halfCompletedSteps.push('setup_billing');
|
|
89
89
|
}
|
|
90
90
|
const isValidConnection = externalConnections?.accounting[0]?.isValid ?? false;
|
|
91
91
|
if (isValidConnection) {
|
|
92
|
-
completedSteps.push('
|
|
92
|
+
completedSteps.push('connect_ledger');
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
const isCompanyDetailsDone = companyDetails.localData != null &&
|
|
95
95
|
primaryContactDetails.localData != null &&
|
|
96
|
-
isCompanyDetailsCompleted(fileState, companyView, primaryContact)
|
|
97
|
-
completedSteps.push('company_details');
|
|
98
|
-
}
|
|
96
|
+
isCompanyDetailsCompleted(fileState, companyView, primaryContact);
|
|
99
97
|
const officerIndex = companyOfficers.length > 0
|
|
100
98
|
? Object.values(companyOfficerLocalData).findIndex((officer) => officer?.isSelectedForVerification === true)
|
|
101
99
|
: 0;
|
|
102
100
|
const selectedOfficerType = `Officer_${officerIndex < 0 ? 1 : officerIndex + 1}`;
|
|
103
|
-
|
|
104
|
-
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState)
|
|
105
|
-
|
|
101
|
+
const isOfficerDone = companyOfficerLocalData[selectedOfficerType] != null &&
|
|
102
|
+
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState);
|
|
103
|
+
// The verification step (single sidebar step) is only "complete" once both
|
|
104
|
+
// the company-officer and company-details sub-steps are fully filled in.
|
|
105
|
+
if (isCompanyDetailsDone && isOfficerDone) {
|
|
106
|
+
completedSteps.push('verification');
|
|
106
107
|
}
|
|
107
108
|
const { allStepsData, requiredStepsData } = onboardingStepsData(isValidConnection, currentTenant?.productSettings ?? [], accountingConnectionCreationMode);
|
|
108
109
|
const allRequiredStepsCompleted = requiredStepsData.every((step) => {
|
|
@@ -129,6 +130,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
129
130
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
130
131
|
},
|
|
131
132
|
currentStep,
|
|
133
|
+
currentSubStep,
|
|
132
134
|
completedSteps,
|
|
133
135
|
halfCompletedSteps,
|
|
134
136
|
allRequiredStepsCompleted,
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// Onboarding steps are the 4 top-level surfaces. Officer + details verification
|
|
3
|
+
// live as sub-steps under `verification` (state machine in CustomerOnboardingPage).
|
|
4
|
+
// The optional data-source step is its own surface; the legacy connect-data-source
|
|
5
|
+
// sub-step under the old `qbo_connection` no longer exists.
|
|
6
|
+
export const ZENI_USER_REQUIRED_ONBOARDING_STEPS = ['setup_billing'];
|
|
5
7
|
export const CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = [
|
|
6
|
-
'
|
|
8
|
+
'connect_ledger',
|
|
7
9
|
];
|
|
8
10
|
export const REQUIRED_ONBOARDING_STEPS = [
|
|
9
11
|
...ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
10
12
|
...CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
11
13
|
];
|
|
12
14
|
export const ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = [
|
|
13
|
-
'
|
|
14
|
-
'company_details',
|
|
15
|
+
'verification',
|
|
15
16
|
];
|
|
16
17
|
export const ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
17
18
|
...ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
@@ -19,13 +20,31 @@ export const ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
|
19
20
|
];
|
|
20
21
|
export const ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = [
|
|
21
22
|
...CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
23
|
+
'connect_data_source',
|
|
22
24
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
23
25
|
];
|
|
24
26
|
export const ALL_ONBOARDING_STEPS = [
|
|
25
27
|
...REQUIRED_ONBOARDING_STEPS,
|
|
28
|
+
'connect_data_source',
|
|
26
29
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
27
30
|
];
|
|
28
31
|
export const toOnboardingStepType = (v) => stringToUnion(v, ALL_ONBOARDING_STEPS);
|
|
32
|
+
// Per-step sub-state. Lives in Redux so the save epic can tell, for example,
|
|
33
|
+
// an officer-form save from a company-details save while both share
|
|
34
|
+
// currentStep = 'verification'.
|
|
35
|
+
// - 'default' generic landing sub-state.
|
|
36
|
+
// - 'ai-activating' connect_ledger interstitial during AI activation.
|
|
37
|
+
// - 'unlock-stack' verification landing — VerifyUnlockFinancialStackPage.
|
|
38
|
+
// - 'company_officer' verification → officer form.
|
|
39
|
+
// - 'company_details' verification → company details form.
|
|
40
|
+
export const ALL_ONBOARDING_SUB_STEPS = [
|
|
41
|
+
'default',
|
|
42
|
+
'ai-activating',
|
|
43
|
+
'unlock-stack',
|
|
44
|
+
'company_officer',
|
|
45
|
+
'company_details',
|
|
46
|
+
];
|
|
47
|
+
export const toOnboardingSubStepType = (v) => stringToUnion(v, ALL_ONBOARDING_SUB_STEPS);
|
|
29
48
|
export const emptyAiAgentsActivationCounts = {
|
|
30
49
|
customerCount: 0,
|
|
31
50
|
glAccountCount: 0,
|
package/lib/index.d.ts
CHANGED
|
@@ -341,9 +341,9 @@ import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetc
|
|
|
341
341
|
import { NewOnboardingCustomerLocalData, NewOnboardingCustomerView, OnboardingCockpitView, ProductInfo, getNewOnboardingCustomerView, getOnboardingCockpitView } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
|
|
342
342
|
import { OnboardingCustomerListUIState, QBOConnectionPool } from './view/onboardingView/cockpitView/onboardingCockpitViewState';
|
|
343
343
|
import { CustomerCreationStatus, NewOnboardingCustomer, OnboardingCompanyDetails, OnboardingCustomer, OnboardingCustomerCompletedStatus, ProductGroupType, ProductType, toProductType, toProductTypeStrict } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
|
|
344
|
-
import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
|
|
345
|
-
import { OnboardingCustomerView, getOnboardingCustomerView, getProductSettingsString } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
|
|
346
|
-
import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
|
|
344
|
+
import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
|
|
345
|
+
import { OnboardingCustomerView, getAiAgentsActivationCounts, getAiAgentsActivationPhases, getAiAgentsActivationSubview, getOnboardingCustomerView, getProductSettingsString } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
|
|
346
|
+
import { ALL_ONBOARDING_STEPS, ALL_ONBOARDING_SUB_STEPS, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep, OnboardingSubStep, toOnboardingSubStepType } from './view/onboardingView/customerView/onboardingCustomerViewState';
|
|
347
347
|
import { fetchOpEx, fetchOpExWithForecast, updateOpExCOABalancesRange, updateOpExDownloadState, updateOpExUIState } from './view/opEx/opExReducer';
|
|
348
348
|
import { getOperatingExpensesForHighlightedRange, getOperatingExpensesForSelectedRange, getOperatingExpensesReport, getOperatingExpensesReportFetchState, getOperatingExpensesUIState } from './view/opEx/opExSelector';
|
|
349
349
|
import { OpExReport, OpExUIStateSelectorView } from './view/opEx/opExSelectorTypes';
|
|
@@ -866,7 +866,7 @@ export { CountryWithCurrency };
|
|
|
866
866
|
export { fetchCompanyConfig };
|
|
867
867
|
export { getCompanyConfig };
|
|
868
868
|
export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, };
|
|
869
|
-
export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, };
|
|
869
|
+
export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getAiAgentsActivationCounts, getAiAgentsActivationPhases, getAiAgentsActivationSubview, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingSubStep, ALL_ONBOARDING_STEPS, ALL_ONBOARDING_SUB_STEPS, toOnboardingSubStepType, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, };
|
|
870
870
|
export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, AccountMappingLocalData, AccountMappingView, VendorAccountMappingView, getAccountMappingView, initializeAccountMappingView, ExpenseCategory1099Filing, };
|
|
871
871
|
export { MagicLinkView, getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
|
|
872
872
|
export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
|
package/lib/index.js
CHANGED
|
@@ -61,21 +61,21 @@ exports.clearDuplicateReimbursementDetail = exports.fetchDuplicateReimbursement
|
|
|
61
61
|
exports.initializeOnboardingCustomerViewUpdateData = exports.getOnboardingEmailGroup = exports.getNewOnboardingCustomerView = exports.getOnboardingCockpitView = exports.toProductTypeStrict = exports.toProductType = exports.saveOnboardingCustomerCompletedStatus = exports.fetchOnboardingCompletedCompanies = exports.updateQBOConnectionPoolExternalConnection = exports.fetchQBOConnectionPool = exports.fetchCompanyOnboardingView = exports.PAYMENT_BUSINESS_DAYS = exports.holidaysFormatted = exports.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextTransferDate = exports.getNextNthWorkingDay = exports.toFileTypeStrict = exports.ALL_FILE_TYPES = exports.isAllFetchCompleted = exports.isAnyFetchInProgress = exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.reduceFetchStateParallelTimeframes = exports.reduceFetchState = exports.clearAddRemiAutoFields = exports.updateHomeCurrencyConversion = exports.updateReimbursementType = exports.clearTentativeMerchantName = exports.updateTentativeMerchantNames = exports.updateUploadFetchState = exports.updateAddRemiAutoFields = exports.clearEditRemiViewDetail = exports.parseReceiptsToRemi = exports.saveRemiSuccessOrFailure = exports.saveRemiDetail = exports.removeFileFromRemiUpdatesInLocalStore = exports.discardRemiUpdatesInLocalStore = exports.fetchCurrencyConversionValue = exports.saveRemiUpdatesToLocalStore = exports.initializeRemiToLocalStore = exports.fetchRemiAndInitializeLocalStore = exports.fetchRecommendationsAndUpdateMerchantRecommendations = exports.fetchEditRemiDetailPage = exports.getEditRemiDetail = exports.removeDuplicateReimbursementByLineId = void 0;
|
|
62
62
|
exports.getVendorList = exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.getInternationalSubConfigCodeKey = exports.shouldEnableCalendarPickerForLastReportSent = exports.canSendMonthEndEmailReport = exports.checkIfLowBalance = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toSameDayAchDisablementConfig = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.isVerifiedPaymentAccountProviderStatusCode = exports.isVerifiedStatusCode = exports.getActualPaymentDate = exports.showReimbursementPromoPage = exports.showBillPayPromoPage = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getSnackbar = exports.closeSnackbar = exports.openSnackbar = exports.toJournalEntrySortKey = exports.sumJournalEntryAmounts = exports.sortJournalEntryLines = exports.journalEntryTotalsByPostingSide = exports.journalEntryDefaultSortConfig = exports.filterJournalEntryLinesExcludingLinked = exports.JOURNAL_ENTRY_SORT_KEYS = exports.isAccountUncategorized = exports.getChangedLineItemCountFromLocalData = exports.getTransactionListUIStateByCategoryType = exports.getTransactionsListByCategoryType = exports.retryBankAccountConnectionForOnboarding = exports.sendOnboardingCustomerViewInvite = exports.resetNewOnboardedCustomerId = exports.updateOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerNotes = exports.saveOnboardingCustomerViewUpdates = exports.updateStatusAfterOnboardingCompleted = exports.updateCustomerCreationStatus = exports.updateOnboardingCustomerListUIState = exports.saveOnboardingCustomerViewUpdateData = exports.clearOnboardingCustomerViewUpdateData = void 0;
|
|
63
63
|
exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = exports.updateDepositToLocalData = exports.updateTransferToLocalData = exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = exports.getAllDepositAccounts = exports.getDepositAccountDetail = exports.unlinkPaymentAccount = exports.fetchPaymentAccountList = exports.createCheckingAccount = exports.fetchAccountList = exports.fetchZeniAccountList = exports.getZeniAccountList = exports.getZeniAccountsConfigDetail = exports.fetchOwnerList = exports.fetchRecommendationByEntityName = exports.fetchRecommendationByEntityId = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.fetchVendorsFiling1099Download = exports.getVendorFiling1099List = exports.toVendorReportIDType = exports.isVendorsTabVisible = exports.isColumnYTDSpend = exports.updateYTDSelectionUIState = exports.updatePageToken = exports.updateSortUiState = void 0;
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.getCashManagementOverviewBanner = exports.getCashManagementOverview = exports.bufferAmountToRisk = exports.RISK_BUFFER_AMOUNT = exports.getAutoSweepFlow = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = exports.updateAutoSweepSettingsFetchStatus = exports.updateAutoSweepRisk = exports.updateAutoSweepDraft = exports.saveAutoSweepSettings = exports.clearAutoSweepFlow = exports.fetchCashManagementOverviewPage = exports.fetchCashManagementBanner = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = void 0;
|
|
64
|
+
exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.toOnboardingSubStepType = exports.ALL_ONBOARDING_SUB_STEPS = exports.ALL_ONBOARDING_STEPS = exports.getProductSettingsString = exports.getOnboardingCustomerView = exports.getAiAgentsActivationSubview = exports.getAiAgentsActivationPhases = exports.getAiAgentsActivationCounts = exports.aiAgentsActivationPhaseChanged = exports.aiAgentsActivationCountsUpdated = exports.fetchAiAgentsActivationStatus = exports.acknowledgeOnboardingAiFinanceTeam = exports.acknowledgeOnboardingAiActivationViewed = exports.clearKycKybAutofillForOnboarding = exports.applyKybDocumentAutofillForOnboarding = exports.applyKycDocumentAutofillForOnboarding = exports.clearOnboardingCustomerViewDataInLocalStore = exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentSubStep = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerView = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewDashboardLoaded = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = void 0;
|
|
65
|
+
exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.fetchDebitCardSummary = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.attachmentFilePathToAttachment = exports.addDeclinedChargeCardTransactionFromPusher = exports.addChargeCardTransactionFromPusher = exports.updateCreditAccountBalanceFromPusher = exports.updateChargeCardTransactionReceiptFromPusher = exports.updateChargeCardTransactionFromPusher = exports.updateChargeCardTransactionStatusFromPusher = exports.updateChargeCardSpendingFromPusher = exports.updateChargeCardStatusFromPusher = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState = exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.fetchCompanyHealthMetricConfig = exports.getCompanyHealthMetricConfig = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = void 0;
|
|
66
|
+
exports.getLastIssuedChargeCardIds = exports.getLastIssueChargeCardsSourceChatSessionId = exports.getIssueChargeCardsSaveStatus = exports.getIssueChargeCardView = exports.getInFlightIssueChargeCardsCount = exports.getDepositAccountListWithDebitCardIssued = exports.toCreditLimitFrequencyCodeType = exports.getZeniDateFromPeriod = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = exports.getChargeCardCVVActivateView = exports.getChargeCardBulkActionView = exports.getChargeCardRowActionView = exports.getChargeCardRecurringExpensesView = exports.getChargeCardRecurringExpensesByCardIds = exports.getDebitCardSetPinView = exports.getChargeCardTransactionAttachmentView = exports.getDepositAccountLimitFetchStateByDepositAccountId = exports.getChargeCardControlDetailView = exports.getChargeCardDetailView = exports.fetchDepositAccountLimit = exports.fetchChargeCardTransactionStatistics = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.getCreditAccountDetails = exports.PAYMENT_HISTORY_FILTER_CATEGORIES = exports.getPaymentStatusDisplayText = exports.getPaymentHistorySourceAccountName = exports.getChargeCardPaymentHistoryView = exports.getChargeCardPaymentHistoryDownloadReport = exports.updatePaymentHistoryUIState = exports.updatePaymentHistorySearchText = exports.updatePaymentHistoryFilters = exports.updatePaymentHistoryDownloadUIState = exports.fetchChargeCardPaymentHistory = exports.fetchChargeCardPaymentPage = exports.getChargeCardRepaymentDetail = exports.updateChargeCardRepaymentLocalStore = exports.initiateChargeCardRepayment = exports.fetchChargeCardRepaymentDetail = exports.clearChargeCardRepaymentDetail = exports.getMyRequestOnHoldChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = exports.getAllChargeCardsWithUser = exports.fetchCreditAccountRepayment = exports.fetchCreditAccount = exports.fetchChargeCardConfig = void 0;
|
|
67
|
+
exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateDebitCardPinAttempt = exports.startDebitCardSetPinWait = exports.completeDebitCardSetPinWait = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updateChargeCardName = exports.closeChargeCard = exports.unlockChargeCard = exports.lockChargeCard = exports.updatePhysicalChargeCardAttempt = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState = exports.updateChargeCardListSearchText = exports.updateBulkActionCardIds = exports.resetIssueChargeCardForm = exports.updateLastIssuedCardIds = exports.updateChargeCardsLocalStore = exports.updateCustomAddressId = exports.getDebitCardSummary = exports.getDebitCardList = exports.fetchDepositAccountListForCards = exports.fetchIssueCardPage = exports.issueChargeCards = exports.toCardType = exports.toShippingAddressType = exports.toCardAddressType = exports.getDepositAccountLimitForChargeCardByDepositAccountId = exports.expressInterestInChargeCard = exports.acceptChargeCardTerms = exports.enableChargeCardAutoPay = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.applyAiCardCreationFormDraftUpdate = exports.deriveAiCardRowsFromTeams = exports.buildAiCardCreationFormDraftSeed = exports.toIssueChargeCardLocalDataFromDraft = exports.selectIssueChargeCardLocalDataFromDraft = exports.getAiCardCreationFormDraft = exports.updateAiCardCreationFormDraft = exports.seedAiCardCreationFormDraft = exports.clearAiCardCreationFormDraft = void 0;
|
|
68
|
+
exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateExpenseAutomationJESchedulesUIState = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeJeAccountSettingsView = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.clearExpenseAutomationJEScheduleLocalData = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.aggregatedReportView = exports.fetchAggregatedReport = exports.toTimeSeriesDuration = exports.convertToTimeSeriesSelectionRange = exports.TIME_SERIES_DURATIONS = exports.anyCardOnHold = exports.getChargeCardById = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeCardUserOnboardingActivationWait = exports.startCardUserOnboardingActivationWait = exports.fetchChargeCardsRecurringExpenses = exports.updateChargeCardsSpendLimit = exports.closeChargeCards = exports.unlockChargeCards = exports.lockChargeCards = exports.revokeChargeCardsInvite = exports.updateRowActionCardId = exports.revokeCardInvite = exports.resendCardInvite = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.startCVVActivationWait = exports.completeCVVActivationWait = void 0;
|
|
69
|
+
exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.clearSelectedJELinkRowIndex = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = void 0;
|
|
70
|
+
exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = void 0;
|
|
71
|
+
exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = void 0;
|
|
72
|
+
exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = void 0;
|
|
73
|
+
exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = void 0;
|
|
74
|
+
exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = void 0;
|
|
75
|
+
exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = exports.removeCardPolicyTemplate = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers = void 0;
|
|
76
|
+
exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = void 0;
|
|
77
|
+
exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = void 0;
|
|
78
|
+
exports.getCashManagementOverviewBanner = exports.getCashManagementOverview = exports.bufferAmountToRisk = exports.RISK_BUFFER_AMOUNT = exports.getAutoSweepFlow = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = exports.updateAutoSweepSettingsFetchStatus = exports.updateAutoSweepRisk = exports.updateAutoSweepDraft = exports.saveAutoSweepSettings = exports.clearAutoSweepFlow = exports.fetchCashManagementOverviewPage = exports.fetchCashManagementBanner = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = void 0;
|
|
79
79
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
80
80
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
81
81
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -1089,6 +1089,7 @@ Object.defineProperty(exports, "getOnboardingPlaidLinkToken", { enumerable: true
|
|
|
1089
1089
|
Object.defineProperty(exports, "saveOnboardingCompnayOfficerPhoneInLocalStore", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.saveOnboardingCompnayOfficerPhoneInLocalStore; } });
|
|
1090
1090
|
Object.defineProperty(exports, "saveOnboardingCustomerViewDataInLocalStore", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.saveOnboardingCustomerViewDataInLocalStore; } });
|
|
1091
1091
|
Object.defineProperty(exports, "updateCurrentStep", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateCurrentStep; } });
|
|
1092
|
+
Object.defineProperty(exports, "updateCurrentSubStep", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateCurrentSubStep; } });
|
|
1092
1093
|
Object.defineProperty(exports, "updateOnboardingCustomerView", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateOnboardingCustomerView; } });
|
|
1093
1094
|
Object.defineProperty(exports, "updateOnboardingCustomerViewAccountDetails", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateOnboardingCustomerViewAccountDetails; } });
|
|
1094
1095
|
Object.defineProperty(exports, "updateOnboardingCustomerViewCompleteStatus", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateOnboardingCustomerViewCompleteStatus; } });
|
|
@@ -1098,8 +1099,15 @@ Object.defineProperty(exports, "updateOnboardingCustomerViewUIState", { enumerab
|
|
|
1098
1099
|
Object.defineProperty(exports, "updateOnboardingPaymentAccountLoginStatus", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateOnboardingPaymentAccountLoginStatus; } });
|
|
1099
1100
|
Object.defineProperty(exports, "updateOnboardingPaymentAccountStatus", { enumerable: true, get: function () { return onboardingCustomerViewReducer_1.updateOnboardingPaymentAccountStatus; } });
|
|
1100
1101
|
const onboardingCustomerViewSelector_1 = require("./view/onboardingView/customerView/onboardingCustomerViewSelector");
|
|
1102
|
+
Object.defineProperty(exports, "getAiAgentsActivationCounts", { enumerable: true, get: function () { return onboardingCustomerViewSelector_1.getAiAgentsActivationCounts; } });
|
|
1103
|
+
Object.defineProperty(exports, "getAiAgentsActivationPhases", { enumerable: true, get: function () { return onboardingCustomerViewSelector_1.getAiAgentsActivationPhases; } });
|
|
1104
|
+
Object.defineProperty(exports, "getAiAgentsActivationSubview", { enumerable: true, get: function () { return onboardingCustomerViewSelector_1.getAiAgentsActivationSubview; } });
|
|
1101
1105
|
Object.defineProperty(exports, "getOnboardingCustomerView", { enumerable: true, get: function () { return onboardingCustomerViewSelector_1.getOnboardingCustomerView; } });
|
|
1102
1106
|
Object.defineProperty(exports, "getProductSettingsString", { enumerable: true, get: function () { return onboardingCustomerViewSelector_1.getProductSettingsString; } });
|
|
1107
|
+
const onboardingCustomerViewState_1 = require("./view/onboardingView/customerView/onboardingCustomerViewState");
|
|
1108
|
+
Object.defineProperty(exports, "ALL_ONBOARDING_STEPS", { enumerable: true, get: function () { return onboardingCustomerViewState_1.ALL_ONBOARDING_STEPS; } });
|
|
1109
|
+
Object.defineProperty(exports, "ALL_ONBOARDING_SUB_STEPS", { enumerable: true, get: function () { return onboardingCustomerViewState_1.ALL_ONBOARDING_SUB_STEPS; } });
|
|
1110
|
+
Object.defineProperty(exports, "toOnboardingSubStepType", { enumerable: true, get: function () { return onboardingCustomerViewState_1.toOnboardingSubStepType; } });
|
|
1103
1111
|
const opExReducer_1 = require("./view/opEx/opExReducer");
|
|
1104
1112
|
Object.defineProperty(exports, "fetchOpEx", { enumerable: true, get: function () { return opExReducer_1.fetchOpEx; } });
|
|
1105
1113
|
Object.defineProperty(exports, "fetchOpExWithForecast", { enumerable: true, get: function () { return opExReducer_1.fetchOpExWithForecast; } });
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.
|
|
9
|
+
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
/**
|
|
11
11
|
* tenantId is required for updating onboarding file names.
|
|
12
12
|
*/
|
|
@@ -21,7 +21,7 @@ const onboardingCustomerViewSelector_1 = require("../../onboardingCustomerViewSe
|
|
|
21
21
|
const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.updateOnboardingCustomerView.match), (0, operators_1.mergeMap)((action) => {
|
|
22
22
|
const { companyId, officerType, sendForVerification, reCalculateCurrentStep = false, isBillingAddressUpdate, } = action.payload;
|
|
23
23
|
const { onboardingCustomerViewState } = state$.value;
|
|
24
|
-
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, } = onboardingCustomerViewState;
|
|
24
|
+
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, currentSubStep, } = onboardingCustomerViewState;
|
|
25
25
|
const companyLocalData = companyDetails.localData;
|
|
26
26
|
const primaryContactLocalData = primaryContactDetails.localData;
|
|
27
27
|
let companyOfficerLocalData;
|
|
@@ -55,8 +55,12 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
55
55
|
Boolean(companyOfficerLocalData.email) === true // Don't save Empty Company Officer details
|
|
56
56
|
? (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationOfficerDataPayload)(companyOfficerLocalData, false, companyOfficerAddressToCreate)
|
|
57
57
|
: {};
|
|
58
|
+
// Verification step has two sub-steps that share currentStep but save
|
|
59
|
+
// different payloads — currentSubStep is the source of truth here.
|
|
60
|
+
const isOfficerSave = currentStep === 'verification' &&
|
|
61
|
+
currentSubStep === 'company_officer';
|
|
58
62
|
if (isBillingAddressUpdate === false) {
|
|
59
|
-
if (
|
|
63
|
+
if (isOfficerSave) {
|
|
60
64
|
payload = {
|
|
61
65
|
company: toBusinessVerificationMinimalCompanyDataPayload(companyLocalData),
|
|
62
66
|
company_officer,
|
|
@@ -69,6 +73,11 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
69
73
|
};
|
|
70
74
|
}
|
|
71
75
|
}
|
|
76
|
+
const section = isBillingAddressUpdate === true
|
|
77
|
+
? 'setup_billing'
|
|
78
|
+
: isOfficerSave
|
|
79
|
+
? 'company_officer'
|
|
80
|
+
: 'company_details';
|
|
72
81
|
const messageSectionMapper = {
|
|
73
82
|
company_officer: {
|
|
74
83
|
sendForVerification: 'onboarding_customer_identity_verification_submit',
|
|
@@ -78,23 +87,20 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
78
87
|
sendForVerification: 'onboarding_customer_business_verification_submit',
|
|
79
88
|
save: 'onboarding_customer_business_verification_save',
|
|
80
89
|
},
|
|
81
|
-
|
|
90
|
+
setup_billing: {
|
|
82
91
|
save: 'billing_address_view',
|
|
83
92
|
sendForVerification: 'billing_address_view',
|
|
84
93
|
},
|
|
85
94
|
};
|
|
86
95
|
let messageSection;
|
|
87
96
|
if (isBillingAddressUpdate === true) {
|
|
88
|
-
messageSection = messageSectionMapper[
|
|
97
|
+
messageSection = messageSectionMapper[section].save;
|
|
98
|
+
}
|
|
99
|
+
else if (sendForVerification === true) {
|
|
100
|
+
messageSection = messageSectionMapper[section].sendForVerification;
|
|
89
101
|
}
|
|
90
102
|
else {
|
|
91
|
-
|
|
92
|
-
messageSection =
|
|
93
|
-
messageSectionMapper[currentStep].sendForVerification;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
messageSection = messageSectionMapper[currentStep].save;
|
|
97
|
-
}
|
|
103
|
+
messageSection = messageSectionMapper[section].save;
|
|
98
104
|
}
|
|
99
105
|
return zeniAPI
|
|
100
106
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
@@ -117,18 +123,18 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
117
123
|
const externalConnections = currentTenant.externalConnections;
|
|
118
124
|
const isQBOConnection = externalConnections?.accounting?.some((connection) => connection.connectionName.match(/quickbooks/i)) ?? false;
|
|
119
125
|
const { allSteps } = (0, onboardingCustomerViewSelector_1.getOnboardingCustomerView)(state$.value, companyId);
|
|
120
|
-
if (currentStep === '
|
|
126
|
+
if (currentStep === 'setup_billing') {
|
|
121
127
|
if (isQBOConnection === true &&
|
|
122
|
-
allSteps.includes('
|
|
123
|
-
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: '
|
|
128
|
+
allSteps.includes('connect_ledger')) {
|
|
129
|
+
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: 'connect_ledger' }));
|
|
124
130
|
}
|
|
125
131
|
else {
|
|
126
|
-
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: '
|
|
132
|
+
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: 'verification' }));
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
// The officer→details transition is now a sub-step change
|
|
136
|
+
// handled by the page (currentSubStep dispatch). No
|
|
137
|
+
// currentStep update needed for that traversal anymore.
|
|
132
138
|
actions.push((0, onboardingCustomerViewReducer_1.updateOnboardingCustomerViewLocalStoreData)({
|
|
133
139
|
companyId: response.data.companies[0].company_id,
|
|
134
140
|
currentStep,
|
|
@@ -22,7 +22,7 @@ const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewRed
|
|
|
22
22
|
const onboardingCustomerViewSelector_1 = require("../../onboardingCustomerViewSelector");
|
|
23
23
|
const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.updateOnboardingCustomerViewLocalStoreData.match), (0, operators_1.mergeMap)((action) => {
|
|
24
24
|
const { companyId, currentStep, reCalculateCurrentStep } = action.payload;
|
|
25
|
-
const { companyState, companyViewState,
|
|
25
|
+
const { companyState, companyViewState, userState, userRoleState, onboardingCustomerViewState, subscriptionPaymentAccountState, paymentAccountState, addressState, } = state$.value;
|
|
26
26
|
const { subscriptionPaymentAccountIds } = onboardingCustomerViewState;
|
|
27
27
|
const subscriptionIDs = (0, get_1.default)(companyViewState.passportView.subscriptionIDsByCompanyID, companyId, undefined);
|
|
28
28
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, subscriptionIDs ?? []);
|
|
@@ -42,7 +42,12 @@ const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$) => act
|
|
|
42
42
|
const onboardingCustomerViewLocalData = toOnboardingCustomerViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
|
|
43
43
|
const { companyDetails, officers, primaryContactDetails } = onboardingCustomerViewLocalData;
|
|
44
44
|
let updatedCompanyDetails = companyDetails;
|
|
45
|
-
|
|
45
|
+
// After an officer sub-step save inside the verification step, propagate
|
|
46
|
+
// the latest syncToken into the cached company-details local data so the
|
|
47
|
+
// user's next details-save doesn't 409.
|
|
48
|
+
const isOfficerSave = currentStep === 'verification' &&
|
|
49
|
+
onboardingCustomerViewState.currentSubStep === 'company_officer';
|
|
50
|
+
if (isOfficerSave &&
|
|
46
51
|
onboardingCustomerViewState.companyDetails.localData != null) {
|
|
47
52
|
const { companyInfo } = company;
|
|
48
53
|
const { syncToken } = companyInfo;
|
|
@@ -51,7 +56,7 @@ const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$) => act
|
|
|
51
56
|
syncToken,
|
|
52
57
|
};
|
|
53
58
|
}
|
|
54
|
-
let updatedCurrentStep = '
|
|
59
|
+
let updatedCurrentStep = 'setup_billing';
|
|
55
60
|
let subscriptionPaymentAccount;
|
|
56
61
|
const { companyOnboardingInfo } = company;
|
|
57
62
|
const accountingConnectionCreationMode = companyOnboardingInfo?.onboardingInfo
|
|
@@ -78,18 +83,14 @@ const updateOnboardingCustomerViewLocalStoreDataEpic = (actions$, state$) => act
|
|
|
78
83
|
cardPaymentViewState.cardPaymentsIds.length > 0) &&
|
|
79
84
|
companyView?.company.company.companyOnboardingInfo
|
|
80
85
|
.subscriptionBillingAddressId != null) {
|
|
81
|
-
updatedCurrentStep = '
|
|
86
|
+
updatedCurrentStep = 'connect_ledger';
|
|
87
|
+
// After the ledger is connected we move straight to verification —
|
|
88
|
+
// company_officer / company_details are now sub-steps inside it,
|
|
89
|
+
// so the page handles which sub-step to land on. The optional
|
|
90
|
+
// connect_data_source step is opt-in from the sidebar, not from
|
|
91
|
+
// the recalc.
|
|
82
92
|
if (isValidConnection) {
|
|
83
|
-
updatedCurrentStep = '
|
|
84
|
-
let officerIndex = companyOfficers.length > 0
|
|
85
|
-
? officers.findIndex((officer) => officer?.isSelectedForVerification === true)
|
|
86
|
-
: 0;
|
|
87
|
-
if (officerIndex === -1) {
|
|
88
|
-
officerIndex = 0;
|
|
89
|
-
}
|
|
90
|
-
if ((0, onboardingCustomerViewSelector_1.isOfficerDetailsCompleted)(companyOfficers, companyOfficerRoles, officers[officerIndex], fileState)) {
|
|
91
|
-
updatedCurrentStep = 'company_details';
|
|
92
|
-
}
|
|
93
|
+
updatedCurrentStep = 'verification';
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -3,7 +3,7 @@ import { ZeniAPIStatus } from '../../../responsePayload';
|
|
|
3
3
|
import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
|
|
4
4
|
import { CompanyDetailsLocalData, CompanyOfficerLocalData } from '../../spendManagement/commonSetup/setupViewState';
|
|
5
5
|
import { PlaidLinkTokenType } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
6
|
-
import { AiAgentsActivationCounts, AiAgentsActivationPhase, OnboardingCustomerViewState, OnboardingCustomerViewUIState, OnboardingStep } from './onboardingCustomerViewState';
|
|
6
|
+
import { AiAgentsActivationCounts, AiAgentsActivationPhase, OnboardingCustomerViewState, OnboardingCustomerViewUIState, OnboardingStep, OnboardingSubStep } from './onboardingCustomerViewState';
|
|
7
7
|
export declare const initialState: OnboardingCustomerViewState;
|
|
8
8
|
export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, cacheOverride?: any, reCalculateCurrentStep?: any], {
|
|
9
9
|
companyId: string;
|
|
@@ -76,7 +76,9 @@ export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").Act
|
|
|
76
76
|
linkTokenType: PlaidLinkTokenType;
|
|
77
77
|
}, "onboardingCustomerView/getOnboardingPlaidLinkTokenFailure", never, never>, updateCurrentStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
78
78
|
step: OnboardingStep;
|
|
79
|
-
}, "onboardingCustomerView/updateCurrentStep">,
|
|
79
|
+
}, "onboardingCustomerView/updateCurrentStep">, updateCurrentSubStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
80
|
+
subStep: OnboardingSubStep;
|
|
81
|
+
}, "onboardingCustomerView/updateCurrentSubStep">, updateOnboardingCustomerViewAccountDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], subscriptionPaymentAccountIds: string[]], {
|
|
80
82
|
paymentAccountIds: string[];
|
|
81
83
|
subscriptionPaymentAccountIds: string[];
|
|
82
84
|
}, "onboardingCustomerView/updateOnboardingCustomerViewAccountDetails", never, never>, updateOnboardingCustomerViewLocalStoreData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.clearKycKybAutofillForOnboarding = exports.applyKybDocumentAutofillForOnboarding = exports.applyKycDocumentAutofillForOnboarding = exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = void 0;
|
|
4
|
+
exports.verifyOnboardingOfficerOtpSuccess = exports.verifyOnboardingOfficerOtp = exports.resendOnboardingOfficerOtp = exports.sendOnboardingOfficerOtpFailure = exports.sendOnboardingOfficerOtpSuccess = exports.sendOnboardingOfficerOtp = exports.updateOnboardingCustomerViewUIState = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.saveOnboardingCustomerViewDataInLocalStore = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerViewAccountDetails = exports.updateCurrentSubStep = exports.updateCurrentStep = exports.getOnboardingPlaidLinkTokenFailure = exports.getOnboardingPlaidLinkTokenSuccess = exports.getOnboardingPlaidLinkToken = exports.establishOnboardingPlaidConnectionFailure = exports.establishOnboardingPlaidConnectionSuccess = exports.establishOnboardingPlaidConnection = exports.updateOnboardingPaymentAccountLoginStatusFailure = exports.updateOnboardingPaymentAccountLoginStatusSuccess = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingPaymentAccountStatusFailure = exports.updateOnboardingPaymentAccountStatusSuccess = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingCustomerViewFailure = exports.updateOnboardingCustomerViewSuccess = exports.updateOnboardingCustomerView = exports.updateOnboardingCustomerViewDashboardLoadedFailure = exports.updateOnboardingCustomerViewDashboardLoadedSuccess = exports.updateOnboardingCustomerViewDashboardLoaded = exports.aiAgentsActivationPhaseChanged = exports.aiAgentsActivationCountsUpdated = exports.fetchAiAgentsActivationStatusFailure = exports.fetchAiAgentsActivationStatusSuccess = exports.fetchAiAgentsActivationStatus = exports.acknowledgeOnboardingAiActivationViewedFailure = exports.acknowledgeOnboardingAiActivationViewedSuccess = exports.acknowledgeOnboardingAiActivationViewed = exports.acknowledgeOnboardingAiFinanceTeamFailure = exports.acknowledgeOnboardingAiFinanceTeamSuccess = exports.acknowledgeOnboardingAiFinanceTeam = exports.updateOnboardingCustomerViewCompleteStatusFailure = exports.updateOnboardingCustomerViewCompleteStatusSuccess = exports.updateOnboardingCustomerViewCompleteStatus = exports.fetchOnboardingCustomerSetupViewFailure = exports.fetchOnboardingCustomerSetupViewSuccess = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.initialState = void 0;
|
|
5
|
+
exports.clearKycKybAutofillForOnboarding = exports.applyKybDocumentAutofillForOnboarding = exports.applyKycDocumentAutofillForOnboarding = exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.verifyOnboardingOfficerOtpFailure = void 0;
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
8
8
|
const kycKybAutofillActions_1 = require("../../spendManagement/commonSetup/kycKybAutofillActions");
|
|
@@ -15,7 +15,8 @@ exports.initialState = {
|
|
|
15
15
|
updateStatus: initialStatus,
|
|
16
16
|
saveStatus: initialStatus,
|
|
17
17
|
dashboardLoadedStatus: initialStatus,
|
|
18
|
-
currentStep: '
|
|
18
|
+
currentStep: 'setup_billing',
|
|
19
|
+
currentSubStep: 'default',
|
|
19
20
|
parsingDocumentFileIds: [],
|
|
20
21
|
companyDetails: {
|
|
21
22
|
autoFilledFields: [],
|
|
@@ -121,6 +122,9 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
121
122
|
updateCurrentStep(draft, action) {
|
|
122
123
|
draft.currentStep = action.payload.step;
|
|
123
124
|
},
|
|
125
|
+
updateCurrentSubStep(draft, action) {
|
|
126
|
+
draft.currentSubStep = action.payload.subStep;
|
|
127
|
+
},
|
|
124
128
|
updateOnboardingCustomerViewAccountDetails: {
|
|
125
129
|
prepare(paymentAccountIds, subscriptionPaymentAccountIds) {
|
|
126
130
|
return { payload: { paymentAccountIds, subscriptionPaymentAccountIds } };
|
|
@@ -767,5 +771,5 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
767
771
|
});
|
|
768
772
|
},
|
|
769
773
|
});
|
|
770
|
-
_a = onboardingCustomerView.actions, exports.fetchOnboardingCustomerView = _a.fetchOnboardingCustomerView, exports.fetchOnboardingCustomerSetupView = _a.fetchOnboardingCustomerSetupView, exports.fetchOnboardingCustomerSetupViewSuccess = _a.fetchOnboardingCustomerSetupViewSuccess, exports.fetchOnboardingCustomerSetupViewFailure = _a.fetchOnboardingCustomerSetupViewFailure, exports.updateOnboardingCustomerViewCompleteStatus = _a.updateOnboardingCustomerViewCompleteStatus, exports.updateOnboardingCustomerViewCompleteStatusSuccess = _a.updateOnboardingCustomerViewCompleteStatusSuccess, exports.updateOnboardingCustomerViewCompleteStatusFailure = _a.updateOnboardingCustomerViewCompleteStatusFailure, exports.acknowledgeOnboardingAiFinanceTeam = _a.acknowledgeOnboardingAiFinanceTeam, exports.acknowledgeOnboardingAiFinanceTeamSuccess = _a.acknowledgeOnboardingAiFinanceTeamSuccess, exports.acknowledgeOnboardingAiFinanceTeamFailure = _a.acknowledgeOnboardingAiFinanceTeamFailure, exports.acknowledgeOnboardingAiActivationViewed = _a.acknowledgeOnboardingAiActivationViewed, exports.acknowledgeOnboardingAiActivationViewedSuccess = _a.acknowledgeOnboardingAiActivationViewedSuccess, exports.acknowledgeOnboardingAiActivationViewedFailure = _a.acknowledgeOnboardingAiActivationViewedFailure, exports.fetchAiAgentsActivationStatus = _a.fetchAiAgentsActivationStatus, exports.fetchAiAgentsActivationStatusSuccess = _a.fetchAiAgentsActivationStatusSuccess, exports.fetchAiAgentsActivationStatusFailure = _a.fetchAiAgentsActivationStatusFailure, exports.aiAgentsActivationCountsUpdated = _a.aiAgentsActivationCountsUpdated, exports.aiAgentsActivationPhaseChanged = _a.aiAgentsActivationPhaseChanged, exports.updateOnboardingCustomerViewDashboardLoaded = _a.updateOnboardingCustomerViewDashboardLoaded, exports.updateOnboardingCustomerViewDashboardLoadedSuccess = _a.updateOnboardingCustomerViewDashboardLoadedSuccess, exports.updateOnboardingCustomerViewDashboardLoadedFailure = _a.updateOnboardingCustomerViewDashboardLoadedFailure, exports.updateOnboardingCustomerView = _a.updateOnboardingCustomerView, exports.updateOnboardingCustomerViewSuccess = _a.updateOnboardingCustomerViewSuccess, exports.updateOnboardingCustomerViewFailure = _a.updateOnboardingCustomerViewFailure, exports.updateOnboardingPaymentAccountStatus = _a.updateOnboardingPaymentAccountStatus, exports.updateOnboardingPaymentAccountStatusSuccess = _a.updateOnboardingPaymentAccountStatusSuccess, exports.updateOnboardingPaymentAccountStatusFailure = _a.updateOnboardingPaymentAccountStatusFailure, exports.updateOnboardingPaymentAccountLoginStatus = _a.updateOnboardingPaymentAccountLoginStatus, exports.updateOnboardingPaymentAccountLoginStatusSuccess = _a.updateOnboardingPaymentAccountLoginStatusSuccess, exports.updateOnboardingPaymentAccountLoginStatusFailure = _a.updateOnboardingPaymentAccountLoginStatusFailure, exports.establishOnboardingPlaidConnection = _a.establishOnboardingPlaidConnection, exports.establishOnboardingPlaidConnectionSuccess = _a.establishOnboardingPlaidConnectionSuccess, exports.establishOnboardingPlaidConnectionFailure = _a.establishOnboardingPlaidConnectionFailure, exports.getOnboardingPlaidLinkToken = _a.getOnboardingPlaidLinkToken, exports.getOnboardingPlaidLinkTokenSuccess = _a.getOnboardingPlaidLinkTokenSuccess, exports.getOnboardingPlaidLinkTokenFailure = _a.getOnboardingPlaidLinkTokenFailure, exports.updateCurrentStep = _a.updateCurrentStep, exports.updateOnboardingCustomerViewAccountDetails = _a.updateOnboardingCustomerViewAccountDetails, exports.updateOnboardingCustomerViewLocalStoreData = _a.updateOnboardingCustomerViewLocalStoreData, exports.saveOnboardingCustomerViewDataInLocalStore = _a.saveOnboardingCustomerViewDataInLocalStore, exports.saveOnboardingCompnayOfficerPhoneInLocalStore = _a.saveOnboardingCompnayOfficerPhoneInLocalStore, exports.updateOnboardingCustomerViewUIState = _a.updateOnboardingCustomerViewUIState, exports.sendOnboardingOfficerOtp = _a.sendOnboardingOfficerOtp, exports.sendOnboardingOfficerOtpSuccess = _a.sendOnboardingOfficerOtpSuccess, exports.sendOnboardingOfficerOtpFailure = _a.sendOnboardingOfficerOtpFailure, exports.resendOnboardingOfficerOtp = _a.resendOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtp = _a.verifyOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtpSuccess = _a.verifyOnboardingOfficerOtpSuccess, exports.verifyOnboardingOfficerOtpFailure = _a.verifyOnboardingOfficerOtpFailure, exports.clearOnboardingCustomerViewDataInLocalStore = _a.clearOnboardingCustomerViewDataInLocalStore, exports.clearOnboardingCustomerView = _a.clearOnboardingCustomerView, exports.applyKycDocumentAutofillForOnboarding = _a.applyKycDocumentAutofillForOnboarding, exports.applyKybDocumentAutofillForOnboarding = _a.applyKybDocumentAutofillForOnboarding, exports.clearKycKybAutofillForOnboarding = _a.clearKycKybAutofillForOnboarding;
|
|
774
|
+
_a = onboardingCustomerView.actions, exports.fetchOnboardingCustomerView = _a.fetchOnboardingCustomerView, exports.fetchOnboardingCustomerSetupView = _a.fetchOnboardingCustomerSetupView, exports.fetchOnboardingCustomerSetupViewSuccess = _a.fetchOnboardingCustomerSetupViewSuccess, exports.fetchOnboardingCustomerSetupViewFailure = _a.fetchOnboardingCustomerSetupViewFailure, exports.updateOnboardingCustomerViewCompleteStatus = _a.updateOnboardingCustomerViewCompleteStatus, exports.updateOnboardingCustomerViewCompleteStatusSuccess = _a.updateOnboardingCustomerViewCompleteStatusSuccess, exports.updateOnboardingCustomerViewCompleteStatusFailure = _a.updateOnboardingCustomerViewCompleteStatusFailure, exports.acknowledgeOnboardingAiFinanceTeam = _a.acknowledgeOnboardingAiFinanceTeam, exports.acknowledgeOnboardingAiFinanceTeamSuccess = _a.acknowledgeOnboardingAiFinanceTeamSuccess, exports.acknowledgeOnboardingAiFinanceTeamFailure = _a.acknowledgeOnboardingAiFinanceTeamFailure, exports.acknowledgeOnboardingAiActivationViewed = _a.acknowledgeOnboardingAiActivationViewed, exports.acknowledgeOnboardingAiActivationViewedSuccess = _a.acknowledgeOnboardingAiActivationViewedSuccess, exports.acknowledgeOnboardingAiActivationViewedFailure = _a.acknowledgeOnboardingAiActivationViewedFailure, exports.fetchAiAgentsActivationStatus = _a.fetchAiAgentsActivationStatus, exports.fetchAiAgentsActivationStatusSuccess = _a.fetchAiAgentsActivationStatusSuccess, exports.fetchAiAgentsActivationStatusFailure = _a.fetchAiAgentsActivationStatusFailure, exports.aiAgentsActivationCountsUpdated = _a.aiAgentsActivationCountsUpdated, exports.aiAgentsActivationPhaseChanged = _a.aiAgentsActivationPhaseChanged, exports.updateOnboardingCustomerViewDashboardLoaded = _a.updateOnboardingCustomerViewDashboardLoaded, exports.updateOnboardingCustomerViewDashboardLoadedSuccess = _a.updateOnboardingCustomerViewDashboardLoadedSuccess, exports.updateOnboardingCustomerViewDashboardLoadedFailure = _a.updateOnboardingCustomerViewDashboardLoadedFailure, exports.updateOnboardingCustomerView = _a.updateOnboardingCustomerView, exports.updateOnboardingCustomerViewSuccess = _a.updateOnboardingCustomerViewSuccess, exports.updateOnboardingCustomerViewFailure = _a.updateOnboardingCustomerViewFailure, exports.updateOnboardingPaymentAccountStatus = _a.updateOnboardingPaymentAccountStatus, exports.updateOnboardingPaymentAccountStatusSuccess = _a.updateOnboardingPaymentAccountStatusSuccess, exports.updateOnboardingPaymentAccountStatusFailure = _a.updateOnboardingPaymentAccountStatusFailure, exports.updateOnboardingPaymentAccountLoginStatus = _a.updateOnboardingPaymentAccountLoginStatus, exports.updateOnboardingPaymentAccountLoginStatusSuccess = _a.updateOnboardingPaymentAccountLoginStatusSuccess, exports.updateOnboardingPaymentAccountLoginStatusFailure = _a.updateOnboardingPaymentAccountLoginStatusFailure, exports.establishOnboardingPlaidConnection = _a.establishOnboardingPlaidConnection, exports.establishOnboardingPlaidConnectionSuccess = _a.establishOnboardingPlaidConnectionSuccess, exports.establishOnboardingPlaidConnectionFailure = _a.establishOnboardingPlaidConnectionFailure, exports.getOnboardingPlaidLinkToken = _a.getOnboardingPlaidLinkToken, exports.getOnboardingPlaidLinkTokenSuccess = _a.getOnboardingPlaidLinkTokenSuccess, exports.getOnboardingPlaidLinkTokenFailure = _a.getOnboardingPlaidLinkTokenFailure, exports.updateCurrentStep = _a.updateCurrentStep, exports.updateCurrentSubStep = _a.updateCurrentSubStep, exports.updateOnboardingCustomerViewAccountDetails = _a.updateOnboardingCustomerViewAccountDetails, exports.updateOnboardingCustomerViewLocalStoreData = _a.updateOnboardingCustomerViewLocalStoreData, exports.saveOnboardingCustomerViewDataInLocalStore = _a.saveOnboardingCustomerViewDataInLocalStore, exports.saveOnboardingCompnayOfficerPhoneInLocalStore = _a.saveOnboardingCompnayOfficerPhoneInLocalStore, exports.updateOnboardingCustomerViewUIState = _a.updateOnboardingCustomerViewUIState, exports.sendOnboardingOfficerOtp = _a.sendOnboardingOfficerOtp, exports.sendOnboardingOfficerOtpSuccess = _a.sendOnboardingOfficerOtpSuccess, exports.sendOnboardingOfficerOtpFailure = _a.sendOnboardingOfficerOtpFailure, exports.resendOnboardingOfficerOtp = _a.resendOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtp = _a.verifyOnboardingOfficerOtp, exports.verifyOnboardingOfficerOtpSuccess = _a.verifyOnboardingOfficerOtpSuccess, exports.verifyOnboardingOfficerOtpFailure = _a.verifyOnboardingOfficerOtpFailure, exports.clearOnboardingCustomerViewDataInLocalStore = _a.clearOnboardingCustomerViewDataInLocalStore, exports.clearOnboardingCustomerView = _a.clearOnboardingCustomerView, exports.applyKycDocumentAutofillForOnboarding = _a.applyKycDocumentAutofillForOnboarding, exports.applyKybDocumentAutofillForOnboarding = _a.applyKybDocumentAutofillForOnboarding, exports.clearKycKybAutofillForOnboarding = _a.clearKycKybAutofillForOnboarding;
|
|
771
775
|
exports.default = onboardingCustomerView.reducer;
|
|
@@ -15,7 +15,7 @@ import { CompanyView } from '../../companyView/types/companyView';
|
|
|
15
15
|
import { CompanyDetails, CompanyOfficersDetails } from '../../spendManagement/commonSetup/setupViewSelector';
|
|
16
16
|
import { CompanyOfficerLocalData } from '../../spendManagement/commonSetup/setupViewState';
|
|
17
17
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
18
|
-
import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationSubview, OnboardingCustomerViewUIState, OnboardingStep } from './onboardingCustomerViewState';
|
|
18
|
+
import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationSubview, OnboardingCustomerViewUIState, OnboardingStep, OnboardingSubStep } from './onboardingCustomerViewState';
|
|
19
19
|
export interface OnboardingCustomerView {
|
|
20
20
|
allNationalityCountries: Country[];
|
|
21
21
|
allRequiredStepsCompleted: boolean;
|
|
@@ -25,6 +25,7 @@ export interface OnboardingCustomerView {
|
|
|
25
25
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
26
26
|
completedSteps: OnboardingStep[];
|
|
27
27
|
currentStep: OnboardingStep;
|
|
28
|
+
currentSubStep: OnboardingSubStep;
|
|
28
29
|
fetchStatus: FetchStateAndError;
|
|
29
30
|
halfCompletedSteps: OnboardingStep[];
|
|
30
31
|
isInterimEmailSent: boolean;
|
|
@@ -17,7 +17,7 @@ const setupViewSelector_1 = require("../../spendManagement/commonSetup/setupView
|
|
|
17
17
|
const onboardingCustomerViewState_1 = require("./onboardingCustomerViewState");
|
|
18
18
|
function getOnboardingCustomerView(state, companyId) {
|
|
19
19
|
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, countryListState, addressViewState, } = state;
|
|
20
|
-
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, parsingDocumentFileIds, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
20
|
+
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, parsingDocumentFileIds, updateStatus, saveStatus, currentStep, currentSubStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
21
21
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
22
22
|
let subscriptionPaymentAccount;
|
|
23
23
|
let paymentAccount;
|
|
@@ -80,7 +80,7 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
80
80
|
cardPaymentViewState.cardPaymentsIds.length > 0) &&
|
|
81
81
|
companyView?.company.company.companyOnboardingInfo
|
|
82
82
|
.subscriptionBillingAddressId != null) {
|
|
83
|
-
completedSteps.push('
|
|
83
|
+
completedSteps.push('setup_billing');
|
|
84
84
|
}
|
|
85
85
|
const isPaymentVerified = (paymentAccount?.providerVerificationStatus?.code?.includes('verified') ===
|
|
86
86
|
true &&
|
|
@@ -91,24 +91,25 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
91
91
|
.subscriptionBillingAddressId != null;
|
|
92
92
|
if ((isPaymentVerified || hasSubscriptionBillingAddress) &&
|
|
93
93
|
!(isPaymentVerified && hasSubscriptionBillingAddress)) {
|
|
94
|
-
halfCompletedSteps.push('
|
|
94
|
+
halfCompletedSteps.push('setup_billing');
|
|
95
95
|
}
|
|
96
96
|
const isValidConnection = externalConnections?.accounting[0]?.isValid ?? false;
|
|
97
97
|
if (isValidConnection) {
|
|
98
|
-
completedSteps.push('
|
|
98
|
+
completedSteps.push('connect_ledger');
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
const isCompanyDetailsDone = companyDetails.localData != null &&
|
|
101
101
|
primaryContactDetails.localData != null &&
|
|
102
|
-
isCompanyDetailsCompleted(fileState, companyView, primaryContact)
|
|
103
|
-
completedSteps.push('company_details');
|
|
104
|
-
}
|
|
102
|
+
isCompanyDetailsCompleted(fileState, companyView, primaryContact);
|
|
105
103
|
const officerIndex = companyOfficers.length > 0
|
|
106
104
|
? Object.values(companyOfficerLocalData).findIndex((officer) => officer?.isSelectedForVerification === true)
|
|
107
105
|
: 0;
|
|
108
106
|
const selectedOfficerType = `Officer_${officerIndex < 0 ? 1 : officerIndex + 1}`;
|
|
109
|
-
|
|
110
|
-
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState)
|
|
111
|
-
|
|
107
|
+
const isOfficerDone = companyOfficerLocalData[selectedOfficerType] != null &&
|
|
108
|
+
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState);
|
|
109
|
+
// The verification step (single sidebar step) is only "complete" once both
|
|
110
|
+
// the company-officer and company-details sub-steps are fully filled in.
|
|
111
|
+
if (isCompanyDetailsDone && isOfficerDone) {
|
|
112
|
+
completedSteps.push('verification');
|
|
112
113
|
}
|
|
113
114
|
const { allStepsData, requiredStepsData } = (0, exports.onboardingStepsData)(isValidConnection, currentTenant?.productSettings ?? [], accountingConnectionCreationMode);
|
|
114
115
|
const allRequiredStepsCompleted = requiredStepsData.every((step) => {
|
|
@@ -135,6 +136,7 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
135
136
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
136
137
|
},
|
|
137
138
|
currentStep,
|
|
139
|
+
currentSubStep,
|
|
138
140
|
completedSteps,
|
|
139
141
|
halfCompletedSteps,
|
|
140
142
|
allRequiredStepsCompleted,
|
|
@@ -3,15 +3,18 @@ import { Address } from '../../../entity/address/addressState';
|
|
|
3
3
|
import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
|
|
4
4
|
import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData, SetupViewLocalData } from '../../spendManagement/commonSetup/setupViewState';
|
|
5
5
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
6
|
-
export declare const ZENI_USER_REQUIRED_ONBOARDING_STEPS: readonly ["
|
|
7
|
-
export declare const CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO: readonly ["
|
|
8
|
-
export declare const REQUIRED_ONBOARDING_STEPS: readonly ["
|
|
9
|
-
export declare const ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT: readonly ["
|
|
10
|
-
export declare const ALL_ZENI_USER_ONBOARDING_STEPS: readonly ["
|
|
11
|
-
export declare const ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO: readonly ["
|
|
12
|
-
export declare const ALL_ONBOARDING_STEPS: readonly ["
|
|
13
|
-
export declare const toOnboardingStepType: (v: string) => "
|
|
6
|
+
export declare const ZENI_USER_REQUIRED_ONBOARDING_STEPS: readonly ["setup_billing"];
|
|
7
|
+
export declare const CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO: readonly ["connect_ledger"];
|
|
8
|
+
export declare const REQUIRED_ONBOARDING_STEPS: readonly ["setup_billing", "connect_ledger"];
|
|
9
|
+
export declare const ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT: readonly ["verification"];
|
|
10
|
+
export declare const ALL_ZENI_USER_ONBOARDING_STEPS: readonly ["setup_billing", "verification"];
|
|
11
|
+
export declare const ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO: readonly ["connect_ledger", "connect_data_source", "verification"];
|
|
12
|
+
export declare const ALL_ONBOARDING_STEPS: readonly ["setup_billing", "connect_ledger", "connect_data_source", "verification"];
|
|
13
|
+
export declare const toOnboardingStepType: (v: string) => "setup_billing" | "connect_ledger" | "verification" | "connect_data_source";
|
|
14
14
|
export type OnboardingStep = ReturnType<typeof toOnboardingStepType>;
|
|
15
|
+
export declare const ALL_ONBOARDING_SUB_STEPS: readonly ["default", "ai-activating", "unlock-stack", "company_officer", "company_details"];
|
|
16
|
+
export declare const toOnboardingSubStepType: (v: string) => "default" | "company_details" | "company_officer" | "ai-activating" | "unlock-stack";
|
|
17
|
+
export type OnboardingSubStep = ReturnType<typeof toOnboardingSubStepType>;
|
|
15
18
|
/**
|
|
16
19
|
* Onboarding Custiner View Local Data - Intefaces
|
|
17
20
|
*/
|
|
@@ -41,6 +44,7 @@ export interface OnboardingCustomerViewState extends FetchedState {
|
|
|
41
44
|
localData?: CompanyOfficerLocalData;
|
|
42
45
|
}>;
|
|
43
46
|
currentStep: OnboardingStep;
|
|
47
|
+
currentSubStep: OnboardingSubStep;
|
|
44
48
|
dashboardLoadedStatus: FetchStateAndError;
|
|
45
49
|
/**
|
|
46
50
|
* File IDs currently being parsed by the AI autofill epic for onboarding.
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyAiAgentsActivationSubview = exports.emptyAiAgentsActivationCounts = exports.toOnboardingStepType = exports.ALL_ONBOARDING_STEPS = exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = exports.ALL_ZENI_USER_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = exports.REQUIRED_ONBOARDING_STEPS = exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = void 0;
|
|
3
|
+
exports.emptyAiAgentsActivationSubview = exports.emptyAiAgentsActivationCounts = exports.toOnboardingSubStepType = exports.ALL_ONBOARDING_SUB_STEPS = exports.toOnboardingStepType = exports.ALL_ONBOARDING_STEPS = exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = exports.ALL_ZENI_USER_ONBOARDING_STEPS = exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = exports.REQUIRED_ONBOARDING_STEPS = exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// Onboarding steps are the 4 top-level surfaces. Officer + details verification
|
|
6
|
+
// live as sub-steps under `verification` (state machine in CustomerOnboardingPage).
|
|
7
|
+
// The optional data-source step is its own surface; the legacy connect-data-source
|
|
8
|
+
// sub-step under the old `qbo_connection` no longer exists.
|
|
9
|
+
exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = ['setup_billing'];
|
|
8
10
|
exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = [
|
|
9
|
-
'
|
|
11
|
+
'connect_ledger',
|
|
10
12
|
];
|
|
11
13
|
exports.REQUIRED_ONBOARDING_STEPS = [
|
|
12
14
|
...exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
13
15
|
...exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
14
16
|
];
|
|
15
17
|
exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = [
|
|
16
|
-
'
|
|
17
|
-
'company_details',
|
|
18
|
+
'verification',
|
|
18
19
|
];
|
|
19
20
|
exports.ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
20
21
|
...exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
@@ -22,14 +23,33 @@ exports.ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
|
22
23
|
];
|
|
23
24
|
exports.ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = [
|
|
24
25
|
...exports.CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
26
|
+
'connect_data_source',
|
|
25
27
|
...exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
26
28
|
];
|
|
27
29
|
exports.ALL_ONBOARDING_STEPS = [
|
|
28
30
|
...exports.REQUIRED_ONBOARDING_STEPS,
|
|
31
|
+
'connect_data_source',
|
|
29
32
|
...exports.ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
30
33
|
];
|
|
31
34
|
const toOnboardingStepType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ONBOARDING_STEPS);
|
|
32
35
|
exports.toOnboardingStepType = toOnboardingStepType;
|
|
36
|
+
// Per-step sub-state. Lives in Redux so the save epic can tell, for example,
|
|
37
|
+
// an officer-form save from a company-details save while both share
|
|
38
|
+
// currentStep = 'verification'.
|
|
39
|
+
// - 'default' generic landing sub-state.
|
|
40
|
+
// - 'ai-activating' connect_ledger interstitial during AI activation.
|
|
41
|
+
// - 'unlock-stack' verification landing — VerifyUnlockFinancialStackPage.
|
|
42
|
+
// - 'company_officer' verification → officer form.
|
|
43
|
+
// - 'company_details' verification → company details form.
|
|
44
|
+
exports.ALL_ONBOARDING_SUB_STEPS = [
|
|
45
|
+
'default',
|
|
46
|
+
'ai-activating',
|
|
47
|
+
'unlock-stack',
|
|
48
|
+
'company_officer',
|
|
49
|
+
'company_details',
|
|
50
|
+
];
|
|
51
|
+
const toOnboardingSubStepType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ONBOARDING_SUB_STEPS);
|
|
52
|
+
exports.toOnboardingSubStepType = toOnboardingSubStepType;
|
|
33
53
|
exports.emptyAiAgentsActivationCounts = {
|
|
34
54
|
customerCount: 0,
|
|
35
55
|
glAccountCount: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.4-
|
|
3
|
+
"version": "5.1.4-beta3ND",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|