@zeniai/client-epic-state 5.0.84-beta0ND → 5.0.84-beta24RJ
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -1
- package/lib/entity/company/companyPayload.d.ts +0 -2
- package/lib/entity/company/companyPayload.js +0 -2
- package/lib/entity/company/companyStateTypes.d.ts +0 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +0 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.js +0 -4
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +0 -19
- package/lib/entity/tenant/tenantReducer.d.ts +28 -49
- package/lib/entity/tenant/tenantReducer.js +5 -111
- package/lib/entity/tenant/tenantState.d.ts +0 -21
- package/lib/epic.d.ts +1 -6
- package/lib/epic.js +1 -7
- package/lib/esm/commonStateTypes/animations.js +0 -1
- package/lib/esm/entity/company/companyPayload.js +0 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +7 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +0 -3
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/tenant/tenantReducer.js +3 -108
- package/lib/esm/epic.js +1 -7
- package/lib/esm/index.js +6 -9
- package/lib/esm/view/companyView/companyViewReducer.js +1 -45
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +50 -168
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +0 -14
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +0 -13
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +52 -71
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +0 -2
- package/lib/index.d.ts +8 -12
- package/lib/index.js +21 -36
- package/lib/view/companyView/companyViewReducer.d.ts +1 -11
- package/lib/view/companyView/companyViewReducer.js +3 -47
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +0 -3
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +4 -41
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +51 -170
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -7
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +1 -21
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +0 -37
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +1 -14
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +2 -24
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +53 -72
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +0 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +0 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -12
- package/package.json +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +0 -21
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -54
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -50
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +0 -25
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +0 -79
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -45
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -40
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -49
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -58
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -12
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -205
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -28
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +0 -9
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +0 -29
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +0 -10
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +0 -83
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +0 -7
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -49
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +0 -9
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -44
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +0 -8
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -53
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +0 -8
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -62
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +0 -27
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -15
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +0 -24
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -213
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +0 -125
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -32
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.verifyOnboardingOfficerOtpFailure = exports.verifyOnboardingOfficerOtpSuccess = exports.verifyOnboardingOfficerOtp = exports.resendOnboardingOfficerOtp = exports.sendOnboardingOfficerOtpFailure = exports.sendOnboardingOfficerOtpSuccess = exports.sendOnboardingOfficerOtp = exports.updateOnboardingCustomerViewUIState = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.saveOnboardingCustomerViewDataInLocalStore = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerViewAccountDetails = 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.
|
|
5
|
-
exports.clearKycKybAutofillForOnboarding = exports.applyKybDocumentAutofillForOnboarding = exports.applyKycDocumentAutofillForOnboarding = void 0;
|
|
4
|
+
exports.clearOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.verifyOnboardingOfficerOtpFailure = exports.verifyOnboardingOfficerOtpSuccess = exports.verifyOnboardingOfficerOtp = exports.resendOnboardingOfficerOtp = exports.sendOnboardingOfficerOtpFailure = exports.sendOnboardingOfficerOtpSuccess = exports.sendOnboardingOfficerOtp = exports.updateOnboardingCustomerViewUIState = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.saveOnboardingCustomerViewDataInLocalStore = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerViewAccountDetails = 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.updateOnboardingCustomerViewCompleteStatusFailure = exports.updateOnboardingCustomerViewCompleteStatusSuccess = exports.updateOnboardingCustomerViewCompleteStatus = exports.fetchOnboardingCustomerSetupViewFailure = exports.fetchOnboardingCustomerSetupViewSuccess = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.initialState = void 0;
|
|
6
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
6
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
8
|
-
const onboardingCustomerViewState_1 = require("./onboardingCustomerViewState");
|
|
9
7
|
const initialStatus = {
|
|
10
8
|
fetchState: 'Not-Started',
|
|
11
9
|
error: undefined,
|
|
@@ -16,29 +14,60 @@ exports.initialState = {
|
|
|
16
14
|
dashboardLoadedStatus: initialStatus,
|
|
17
15
|
currentStep: 'link_payment_account',
|
|
18
16
|
companyDetails: {
|
|
19
|
-
autoFilledFields: [],
|
|
20
17
|
localData: undefined,
|
|
21
18
|
},
|
|
22
|
-
companyOfficerUpdateStatus:
|
|
23
|
-
|
|
24
|
-
autoFilledFields: [],
|
|
19
|
+
companyOfficerUpdateStatus: {
|
|
20
|
+
Officer_1: {
|
|
25
21
|
localData: undefined,
|
|
26
22
|
sendOtpStatus: initialStatus,
|
|
27
23
|
otpverificationStatus: initialStatus,
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
},
|
|
25
|
+
Officer_2: {
|
|
26
|
+
localData: undefined,
|
|
27
|
+
sendOtpStatus: initialStatus,
|
|
28
|
+
otpverificationStatus: initialStatus,
|
|
29
|
+
},
|
|
30
|
+
Officer_3: {
|
|
31
|
+
localData: undefined,
|
|
32
|
+
sendOtpStatus: initialStatus,
|
|
33
|
+
otpverificationStatus: initialStatus,
|
|
34
|
+
},
|
|
35
|
+
Officer_4: {
|
|
36
|
+
localData: undefined,
|
|
37
|
+
sendOtpStatus: initialStatus,
|
|
38
|
+
otpverificationStatus: initialStatus,
|
|
39
|
+
},
|
|
40
|
+
Officer_5: {
|
|
41
|
+
localData: undefined,
|
|
42
|
+
sendOtpStatus: initialStatus,
|
|
43
|
+
otpverificationStatus: initialStatus,
|
|
44
|
+
},
|
|
45
|
+
Officer_6: {
|
|
46
|
+
localData: undefined,
|
|
47
|
+
sendOtpStatus: initialStatus,
|
|
48
|
+
otpverificationStatus: initialStatus,
|
|
49
|
+
},
|
|
50
|
+
Officer_7: {
|
|
51
|
+
localData: undefined,
|
|
52
|
+
sendOtpStatus: initialStatus,
|
|
53
|
+
otpverificationStatus: initialStatus,
|
|
54
|
+
},
|
|
55
|
+
Officer_8: {
|
|
56
|
+
localData: undefined,
|
|
57
|
+
sendOtpStatus: initialStatus,
|
|
58
|
+
otpverificationStatus: initialStatus,
|
|
59
|
+
},
|
|
60
|
+
Officer_9: {
|
|
61
|
+
localData: undefined,
|
|
62
|
+
sendOtpStatus: initialStatus,
|
|
63
|
+
otpverificationStatus: initialStatus,
|
|
64
|
+
},
|
|
65
|
+
Officer_10: {
|
|
66
|
+
localData: undefined,
|
|
67
|
+
sendOtpStatus: initialStatus,
|
|
68
|
+
otpverificationStatus: initialStatus,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
42
71
|
primaryContactDetails: {},
|
|
43
72
|
paymentAccountDetails: {
|
|
44
73
|
fetchStatus: initialStatus,
|
|
@@ -66,7 +95,6 @@ exports.initialState = {
|
|
|
66
95
|
},
|
|
67
96
|
fetchState: 'Not-Started',
|
|
68
97
|
error: undefined,
|
|
69
|
-
aiAgentsActivation: { ...onboardingCustomerViewState_1.emptyAiAgentsActivationSubview },
|
|
70
98
|
uiState: {
|
|
71
99
|
isQBOPopupOpen: false,
|
|
72
100
|
isCardPaymentPopupOpen: false,
|
|
@@ -156,111 +184,6 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
156
184
|
};
|
|
157
185
|
},
|
|
158
186
|
},
|
|
159
|
-
acknowledgeOnboardingAiFinanceTeam: {
|
|
160
|
-
reducer(draft) {
|
|
161
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
162
|
-
fetchState: 'In-Progress',
|
|
163
|
-
error: undefined,
|
|
164
|
-
};
|
|
165
|
-
},
|
|
166
|
-
prepare(companyId) {
|
|
167
|
-
return {
|
|
168
|
-
payload: { companyId },
|
|
169
|
-
};
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
acknowledgeOnboardingAiFinanceTeamSuccess(draft) {
|
|
173
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
174
|
-
fetchState: 'Completed',
|
|
175
|
-
error: undefined,
|
|
176
|
-
};
|
|
177
|
-
},
|
|
178
|
-
acknowledgeOnboardingAiFinanceTeamFailure: {
|
|
179
|
-
reducer(draft, action) {
|
|
180
|
-
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
181
|
-
fetchState: 'Error',
|
|
182
|
-
error: action.payload,
|
|
183
|
-
};
|
|
184
|
-
},
|
|
185
|
-
prepare(error) {
|
|
186
|
-
return {
|
|
187
|
-
payload: error,
|
|
188
|
-
};
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
fetchAiAgentsActivationStatus(draft) {
|
|
192
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
193
|
-
fetchState: 'In-Progress',
|
|
194
|
-
error: undefined,
|
|
195
|
-
};
|
|
196
|
-
},
|
|
197
|
-
fetchAiAgentsActivationStatusSuccess: {
|
|
198
|
-
reducer(draft, action) {
|
|
199
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
200
|
-
fetchState: 'Completed',
|
|
201
|
-
error: undefined,
|
|
202
|
-
};
|
|
203
|
-
draft.aiAgentsActivation.ledgerPhases = action.payload.ledgerPhases;
|
|
204
|
-
draft.aiAgentsActivation.backgroundPhases =
|
|
205
|
-
action.payload.backgroundPhases;
|
|
206
|
-
draft.aiAgentsActivation.counts = action.payload.counts;
|
|
207
|
-
},
|
|
208
|
-
prepare(payload) {
|
|
209
|
-
return { payload };
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
fetchAiAgentsActivationStatusFailure: {
|
|
213
|
-
reducer(draft, action) {
|
|
214
|
-
draft.aiAgentsActivation.fetchStatus = {
|
|
215
|
-
fetchState: 'Error',
|
|
216
|
-
error: action.payload,
|
|
217
|
-
};
|
|
218
|
-
},
|
|
219
|
-
prepare(error) {
|
|
220
|
-
return { payload: error };
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
aiAgentsActivationCountsUpdated: {
|
|
224
|
-
reducer(draft, action) {
|
|
225
|
-
draft.aiAgentsActivation.counts = {
|
|
226
|
-
...draft.aiAgentsActivation.counts,
|
|
227
|
-
...action.payload,
|
|
228
|
-
};
|
|
229
|
-
},
|
|
230
|
-
prepare(payload) {
|
|
231
|
-
return { payload };
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
aiAgentsActivationPhaseChanged: {
|
|
235
|
-
reducer(draft, action) {
|
|
236
|
-
const target = action.payload.section === 'ledger'
|
|
237
|
-
? draft.aiAgentsActivation.ledgerPhases
|
|
238
|
-
: draft.aiAgentsActivation.backgroundPhases;
|
|
239
|
-
const index = target.findIndex((phase) => phase.key === action.payload.key);
|
|
240
|
-
if (index === -1) {
|
|
241
|
-
target.push(action.payload);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
target[index] = { ...target[index], ...action.payload };
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
prepare(payload) {
|
|
248
|
-
return { payload };
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
aiAgentsActivationSectionReady: {
|
|
252
|
-
reducer(draft, action) {
|
|
253
|
-
const target = action.payload.section === 'ledger'
|
|
254
|
-
? draft.aiAgentsActivation.ledgerPhases
|
|
255
|
-
: draft.aiAgentsActivation.backgroundPhases;
|
|
256
|
-
target.forEach((phase) => {
|
|
257
|
-
phase.status = 'ready';
|
|
258
|
-
});
|
|
259
|
-
},
|
|
260
|
-
prepare(payload) {
|
|
261
|
-
return { payload };
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
187
|
updateOnboardingCustomerViewDashboardLoaded: {
|
|
265
188
|
reducer(draft) {
|
|
266
189
|
draft.dashboardLoadedStatus = {
|
|
@@ -673,49 +596,7 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
673
596
|
clearOnboardingCustomerView(draft) {
|
|
674
597
|
Object.assign(draft, exports.initialState);
|
|
675
598
|
},
|
|
676
|
-
/** Merge AI-parsed officer fields into the officer's onboarding localData. */
|
|
677
|
-
applyKycDocumentAutofillForOnboarding: {
|
|
678
|
-
reducer(draft, action) {
|
|
679
|
-
const { officerType, values, autoFilledFieldNames } = action.payload;
|
|
680
|
-
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
681
|
-
slot.localData = Object.assign({}, slot.localData, values);
|
|
682
|
-
slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
|
|
683
|
-
},
|
|
684
|
-
prepare(payload) {
|
|
685
|
-
return { payload };
|
|
686
|
-
},
|
|
687
|
-
},
|
|
688
|
-
/** Merge AI-parsed company fields into companyDetails onboarding localData. */
|
|
689
|
-
applyKybDocumentAutofillForOnboarding: {
|
|
690
|
-
reducer(draft, action) {
|
|
691
|
-
const { values, autoFilledFieldNames } = action.payload;
|
|
692
|
-
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
693
|
-
const prev = draft.companyDetails.autoFilledFields ?? [];
|
|
694
|
-
draft.companyDetails.autoFilledFields = Array.from(new Set([...prev, ...autoFilledFieldNames]));
|
|
695
|
-
},
|
|
696
|
-
prepare(payload) {
|
|
697
|
-
return { payload };
|
|
698
|
-
},
|
|
699
|
-
},
|
|
700
|
-
/** Wipe AI-autofill badges during onboarding. */
|
|
701
|
-
clearKycKybAutofillForOnboarding: {
|
|
702
|
-
reducer(draft, action) {
|
|
703
|
-
const { officerType } = action.payload;
|
|
704
|
-
if (officerType != null) {
|
|
705
|
-
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
706
|
-
}
|
|
707
|
-
else {
|
|
708
|
-
draft.companyDetails.autoFilledFields = [];
|
|
709
|
-
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
710
|
-
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
prepare(payload = {}) {
|
|
715
|
-
return { payload };
|
|
716
|
-
},
|
|
717
|
-
},
|
|
718
599
|
},
|
|
719
600
|
});
|
|
720
|
-
_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.
|
|
601
|
+
_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.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;
|
|
721
602
|
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 {
|
|
18
|
+
import { OnboardingCustomerViewUIState, OnboardingStep } from './onboardingCustomerViewState';
|
|
19
19
|
export interface OnboardingCustomerView {
|
|
20
20
|
allNationalityCountries: Country[];
|
|
21
21
|
allRequiredStepsCompleted: boolean;
|
|
@@ -55,9 +55,3 @@ export declare const onboardingStepsData: (isValidConnection: boolean, productSe
|
|
|
55
55
|
};
|
|
56
56
|
export declare function isCompanyDetailsSavePending(fileState: FileState, company?: CompanyView, primaryContact?: User, companyDetailsLocalData?: CompanyDetails): boolean;
|
|
57
57
|
export declare const getProductSettingsString: (productSettings: TenantProductSettings | undefined) => string;
|
|
58
|
-
export declare const getAiAgentsActivationSubview: (state: RootState) => AiAgentsActivationSubview;
|
|
59
|
-
export declare const getAiAgentsActivationLedgerPhases: (state: RootState) => AiAgentsActivationPhase[];
|
|
60
|
-
export declare const getAiAgentsActivationBackgroundPhases: (state: RootState) => AiAgentsActivationPhase[];
|
|
61
|
-
export declare const getAiAgentsActivationCounts: (state: RootState) => AiAgentsActivationCounts;
|
|
62
|
-
export declare const getAiAgentsActivationLedgerRowStatuses: (state: RootState) => ReadonlyArray<"idle" | "starting" | "building">;
|
|
63
|
-
export declare const getAiAgentsActivationBackgroundRowStatuses: (state: RootState) => ReadonlyArray<"idle" | "starting" | "building">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getProductSettingsString = exports.onboardingStepsData = void 0;
|
|
4
4
|
exports.getOnboardingCustomerView = getOnboardingCustomerView;
|
|
5
5
|
exports.isOfficerDetailsCompleted = isOfficerDetailsCompleted;
|
|
6
6
|
exports.isCompanyDetailsSavePending = isCompanyDetailsSavePending;
|
|
@@ -331,23 +331,3 @@ const getProductSettingsString = (productSettings) => {
|
|
|
331
331
|
.join(',');
|
|
332
332
|
};
|
|
333
333
|
exports.getProductSettingsString = getProductSettingsString;
|
|
334
|
-
const fromActivationView = (state) => state.onboardingCustomerViewState.aiAgentsActivation;
|
|
335
|
-
const getAiAgentsActivationSubview = (state) => fromActivationView(state);
|
|
336
|
-
exports.getAiAgentsActivationSubview = getAiAgentsActivationSubview;
|
|
337
|
-
const getAiAgentsActivationLedgerPhases = (state) => fromActivationView(state).ledgerPhases;
|
|
338
|
-
exports.getAiAgentsActivationLedgerPhases = getAiAgentsActivationLedgerPhases;
|
|
339
|
-
const getAiAgentsActivationBackgroundPhases = (state) => fromActivationView(state).backgroundPhases;
|
|
340
|
-
exports.getAiAgentsActivationBackgroundPhases = getAiAgentsActivationBackgroundPhases;
|
|
341
|
-
const getAiAgentsActivationCounts = (state) => fromActivationView(state).counts;
|
|
342
|
-
exports.getAiAgentsActivationCounts = getAiAgentsActivationCounts;
|
|
343
|
-
const SECTION_ROW_STATUS_FALLBACK = 'idle';
|
|
344
|
-
const phaseStatusToRowStatus = (status) => {
|
|
345
|
-
if (status === 'ready') {
|
|
346
|
-
return 'building';
|
|
347
|
-
}
|
|
348
|
-
return status;
|
|
349
|
-
};
|
|
350
|
-
const getAiAgentsActivationLedgerRowStatuses = (state) => fromActivationView(state).ledgerPhases.map((phase) => phaseStatusToRowStatus(phase.status ?? SECTION_ROW_STATUS_FALLBACK));
|
|
351
|
-
exports.getAiAgentsActivationLedgerRowStatuses = getAiAgentsActivationLedgerRowStatuses;
|
|
352
|
-
const getAiAgentsActivationBackgroundRowStatuses = (state) => fromActivationView(state).backgroundPhases.map((phase) => phaseStatusToRowStatus(phase.status ?? SECTION_ROW_STATUS_FALLBACK));
|
|
353
|
-
exports.getAiAgentsActivationBackgroundRowStatuses = getAiAgentsActivationBackgroundRowStatuses;
|
|
@@ -21,21 +21,10 @@ export interface OnboardingCustomerViewUIState {
|
|
|
21
21
|
isQBOPopupOpen: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface OnboardingCustomerViewState extends FetchedState {
|
|
24
|
-
aiAgentsActivation: AiAgentsActivationSubview;
|
|
25
24
|
companyDetails: {
|
|
26
|
-
/**
|
|
27
|
-
* Field names from {@link CompanyDetailsLocalData} populated by AI autofill
|
|
28
|
-
* from an uploaded KYB document during onboarding. Drives the ✦ sparkle.
|
|
29
|
-
*/
|
|
30
|
-
autoFilledFields: string[];
|
|
31
25
|
localData?: CompanyDetailsLocalData;
|
|
32
26
|
};
|
|
33
27
|
companyOfficerUpdateStatus: Record<CompanyOfficerType, {
|
|
34
|
-
/**
|
|
35
|
-
* Field names from {@link CompanyOfficerLocalData} populated by AI autofill
|
|
36
|
-
* from an uploaded KYC identity document during onboarding.
|
|
37
|
-
*/
|
|
38
|
-
autoFilledFields: string[];
|
|
39
28
|
otpverificationStatus: FetchStateAndError;
|
|
40
29
|
sendOtpStatus: FetchStateAndError;
|
|
41
30
|
localData?: CompanyOfficerLocalData;
|
|
@@ -55,31 +44,5 @@ export interface OnboardingCustomerViewState extends FetchedState {
|
|
|
55
44
|
subscriptionPaymentAccountIds: ID[];
|
|
56
45
|
uiState: OnboardingCustomerViewUIState;
|
|
57
46
|
updateStatus: FetchStateAndError;
|
|
58
|
-
aiFinanceTeamAcknowledgementStatus?: FetchStateAndError;
|
|
59
47
|
subscriptionBillingAddress?: Address;
|
|
60
48
|
}
|
|
61
|
-
export type AiAgentsActivationPhaseStatus = 'idle' | 'starting' | 'building' | 'ready';
|
|
62
|
-
export type AiAgentsActivationSection = 'ledger' | 'background';
|
|
63
|
-
export interface AiAgentsActivationPhase {
|
|
64
|
-
key: string;
|
|
65
|
-
section: AiAgentsActivationSection;
|
|
66
|
-
status: AiAgentsActivationPhaseStatus;
|
|
67
|
-
completedAt?: string;
|
|
68
|
-
startedAt?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface AiAgentsActivationCounts {
|
|
71
|
-
customerCount: number;
|
|
72
|
-
glAccountCount: number;
|
|
73
|
-
targetTransactionCount: number;
|
|
74
|
-
transactionCount: number;
|
|
75
|
-
vendorCount: number;
|
|
76
|
-
asOf?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface AiAgentsActivationSubview {
|
|
79
|
-
backgroundPhases: AiAgentsActivationPhase[];
|
|
80
|
-
counts: AiAgentsActivationCounts;
|
|
81
|
-
fetchStatus: FetchStateAndError;
|
|
82
|
-
ledgerPhases: AiAgentsActivationPhase[];
|
|
83
|
-
}
|
|
84
|
-
export declare const emptyAiAgentsActivationCounts: AiAgentsActivationCounts;
|
|
85
|
-
export declare const emptyAiAgentsActivationSubview: AiAgentsActivationSubview;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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
5
|
exports.ZENI_USER_REQUIRED_ONBOARDING_STEPS = [
|
|
6
6
|
'link_payment_account',
|
|
@@ -30,16 +30,3 @@ exports.ALL_ONBOARDING_STEPS = [
|
|
|
30
30
|
];
|
|
31
31
|
const toOnboardingStepType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ONBOARDING_STEPS);
|
|
32
32
|
exports.toOnboardingStepType = toOnboardingStepType;
|
|
33
|
-
exports.emptyAiAgentsActivationCounts = {
|
|
34
|
-
customerCount: 0,
|
|
35
|
-
glAccountCount: 0,
|
|
36
|
-
targetTransactionCount: 0,
|
|
37
|
-
transactionCount: 0,
|
|
38
|
-
vendorCount: 0,
|
|
39
|
-
};
|
|
40
|
-
exports.emptyAiAgentsActivationSubview = {
|
|
41
|
-
backgroundPhases: [],
|
|
42
|
-
counts: exports.emptyAiAgentsActivationCounts,
|
|
43
|
-
fetchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
44
|
-
ledgerPhases: [],
|
|
45
|
-
};
|
|
@@ -2,7 +2,7 @@ import { ID } from '../../../commonStateTypes/common';
|
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
3
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
4
4
|
import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
|
|
5
|
-
import { CompanyDetailsLocalData,
|
|
5
|
+
import { CompanyDetailsLocalData, SetupViewLocalData, SetupViewState } from './setupViewState';
|
|
6
6
|
export declare const initialState: SetupViewState;
|
|
7
7
|
export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards"], {
|
|
8
8
|
companyId: string;
|
|
@@ -29,28 +29,6 @@ export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPr
|
|
|
29
29
|
}, "setupView/sendOtpSuccess">, sendOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "setupView/sendOtpFailure">, verifyOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/verifyOtp">, verifyOtpSuccessSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/verifyOtpSuccess">, verifyOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "setupView/verifyOtpFailure">, saveIndustryAndIncDateInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
30
30
|
incDate: ZeniDate;
|
|
31
31
|
industry: string;
|
|
32
|
-
}, "setupView/saveIndustryAndIncDateInLocalStore">, clearSetupViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupViewDataInLocalStore">, clearSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupView"
|
|
33
|
-
autoFilledFieldNames: string[];
|
|
34
|
-
companyId: ID;
|
|
35
|
-
officerType: CompanyOfficerType;
|
|
36
|
-
values: Partial<CompanyOfficerLocalData>;
|
|
37
|
-
}], {
|
|
38
|
-
autoFilledFieldNames: string[];
|
|
39
|
-
companyId: ID;
|
|
40
|
-
officerType: CompanyOfficerType;
|
|
41
|
-
values: Partial<CompanyOfficerLocalData>;
|
|
42
|
-
}, "setupView/applyKycDocumentAutofillForSetup", never, never>, applyKybDocumentAutofillForSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
43
|
-
autoFilledFieldNames: string[];
|
|
44
|
-
companyId: ID;
|
|
45
|
-
values: Partial<CompanyDetailsLocalData>;
|
|
46
|
-
}], {
|
|
47
|
-
autoFilledFieldNames: string[];
|
|
48
|
-
companyId: ID;
|
|
49
|
-
values: Partial<CompanyDetailsLocalData>;
|
|
50
|
-
}, "setupView/applyKybDocumentAutofillForSetup", never, never>, clearKycKybAutofillForSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
|
|
51
|
-
officerType?: CompanyOfficerType;
|
|
52
|
-
} | undefined], {
|
|
53
|
-
officerType?: CompanyOfficerType;
|
|
54
|
-
}, "setupView/clearKycKybAutofillForSetup", never, never>;
|
|
32
|
+
}, "setupView/saveIndustryAndIncDateInLocalStore">, clearSetupViewDataInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupViewDataInLocalStore">, clearSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/clearSetupView">;
|
|
55
33
|
declare const _default: import("redux").Reducer<SetupViewState>;
|
|
56
34
|
export default _default;
|
|
@@ -1,32 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.clearSetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const initialFetchStatus = {
|
|
7
7
|
fetchState: 'Not-Started',
|
|
8
8
|
error: undefined,
|
|
9
9
|
};
|
|
10
|
-
const emptyOfficerSlot = {
|
|
11
|
-
autoFilledFields: [],
|
|
12
|
-
localData: undefined,
|
|
13
|
-
sendOtpStatus: initialFetchStatus,
|
|
14
|
-
otpverificationStatus: initialFetchStatus,
|
|
15
|
-
};
|
|
16
10
|
exports.initialState = {
|
|
17
11
|
updateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
18
|
-
companyDetails: {
|
|
12
|
+
companyDetails: {},
|
|
19
13
|
companyOfficerUpdateStatus: {
|
|
20
|
-
Officer_1: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
Officer_1: {
|
|
15
|
+
localData: undefined,
|
|
16
|
+
sendOtpStatus: initialFetchStatus,
|
|
17
|
+
otpverificationStatus: initialFetchStatus,
|
|
18
|
+
},
|
|
19
|
+
Officer_2: {
|
|
20
|
+
localData: undefined,
|
|
21
|
+
sendOtpStatus: initialFetchStatus,
|
|
22
|
+
otpverificationStatus: initialFetchStatus,
|
|
23
|
+
},
|
|
24
|
+
Officer_3: {
|
|
25
|
+
localData: undefined,
|
|
26
|
+
sendOtpStatus: initialFetchStatus,
|
|
27
|
+
otpverificationStatus: initialFetchStatus,
|
|
28
|
+
},
|
|
29
|
+
Officer_4: {
|
|
30
|
+
localData: undefined,
|
|
31
|
+
sendOtpStatus: initialFetchStatus,
|
|
32
|
+
otpverificationStatus: initialFetchStatus,
|
|
33
|
+
},
|
|
34
|
+
Officer_5: {
|
|
35
|
+
localData: undefined,
|
|
36
|
+
sendOtpStatus: initialFetchStatus,
|
|
37
|
+
otpverificationStatus: initialFetchStatus,
|
|
38
|
+
},
|
|
39
|
+
Officer_6: {
|
|
40
|
+
localData: undefined,
|
|
41
|
+
sendOtpStatus: initialFetchStatus,
|
|
42
|
+
otpverificationStatus: initialFetchStatus,
|
|
43
|
+
},
|
|
44
|
+
Officer_7: {
|
|
45
|
+
localData: undefined,
|
|
46
|
+
sendOtpStatus: initialFetchStatus,
|
|
47
|
+
otpverificationStatus: initialFetchStatus,
|
|
48
|
+
},
|
|
49
|
+
Officer_8: {
|
|
50
|
+
localData: undefined,
|
|
51
|
+
sendOtpStatus: initialFetchStatus,
|
|
52
|
+
otpverificationStatus: initialFetchStatus,
|
|
53
|
+
},
|
|
54
|
+
Officer_9: {
|
|
55
|
+
localData: undefined,
|
|
56
|
+
sendOtpStatus: initialFetchStatus,
|
|
57
|
+
otpverificationStatus: initialFetchStatus,
|
|
58
|
+
},
|
|
59
|
+
Officer_10: {
|
|
60
|
+
localData: undefined,
|
|
61
|
+
sendOtpStatus: initialFetchStatus,
|
|
62
|
+
otpverificationStatus: initialFetchStatus,
|
|
63
|
+
},
|
|
30
64
|
},
|
|
31
65
|
primaryContactDetails: {},
|
|
32
66
|
};
|
|
@@ -267,60 +301,7 @@ const setupView = (0, toolkit_1.createSlice)({
|
|
|
267
301
|
clearSetupView(draft) {
|
|
268
302
|
Object.assign(draft, exports.initialState);
|
|
269
303
|
},
|
|
270
|
-
/**
|
|
271
|
-
* Merge AI-parsed officer fields into the selected officer's localData and
|
|
272
|
-
* track which field names were autofilled so the form can show the ✦ badge.
|
|
273
|
-
*/
|
|
274
|
-
applyKycDocumentAutofillForSetup: {
|
|
275
|
-
reducer(draft, action) {
|
|
276
|
-
const { officerType, values, autoFilledFieldNames } = action.payload;
|
|
277
|
-
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
278
|
-
slot.localData = Object.assign({}, slot.localData, values);
|
|
279
|
-
slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
|
|
280
|
-
},
|
|
281
|
-
prepare(payload) {
|
|
282
|
-
return { payload };
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
/**
|
|
286
|
-
* Merge AI-parsed company fields into companyDetails.localData and track
|
|
287
|
-
* which field names were autofilled.
|
|
288
|
-
*/
|
|
289
|
-
applyKybDocumentAutofillForSetup: {
|
|
290
|
-
reducer(draft, action) {
|
|
291
|
-
const { values, autoFilledFieldNames } = action.payload;
|
|
292
|
-
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
293
|
-
draft.companyDetails.autoFilledFields = Array.from(new Set([
|
|
294
|
-
...draft.companyDetails.autoFilledFields,
|
|
295
|
-
...autoFilledFieldNames,
|
|
296
|
-
]));
|
|
297
|
-
},
|
|
298
|
-
prepare(payload) {
|
|
299
|
-
return { payload };
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
/**
|
|
303
|
-
* Wipe AI-autofill badges. If `officerType` is provided, clears only that
|
|
304
|
-
* officer; otherwise clears company details too.
|
|
305
|
-
*/
|
|
306
|
-
clearKycKybAutofillForSetup: {
|
|
307
|
-
reducer(draft, action) {
|
|
308
|
-
const { officerType } = action.payload;
|
|
309
|
-
if (officerType != null) {
|
|
310
|
-
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
draft.companyDetails.autoFilledFields = [];
|
|
314
|
-
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
315
|
-
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
prepare(payload = {}) {
|
|
320
|
-
return { payload };
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
304
|
},
|
|
324
305
|
});
|
|
325
|
-
_a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView
|
|
306
|
+
_a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView;
|
|
326
307
|
exports.default = setupView.reducer;
|
|
@@ -54,8 +54,6 @@ export interface FundingAccount {
|
|
|
54
54
|
}
|
|
55
55
|
export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
|
|
56
56
|
additionalFiles: File[];
|
|
57
|
-
/** Field names in this officer's localData populated by AI doc autofill. */
|
|
58
|
-
autoFilledFields: string[];
|
|
59
57
|
deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
60
58
|
otpverificationStatus: FetchStateAndError;
|
|
61
59
|
sendOtpStatus: FetchStateAndError;
|
|
@@ -64,8 +62,6 @@ export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
|
|
|
64
62
|
addressStatus?: NewAddressData;
|
|
65
63
|
}
|
|
66
64
|
export interface CompanyDetails {
|
|
67
|
-
/** Field names in companyDetails localData populated by AI doc autofill. */
|
|
68
|
-
autoFilledFields: string[];
|
|
69
65
|
companyFiles: File[];
|
|
70
66
|
companyId: ID;
|
|
71
67
|
deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
@@ -124,7 +124,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
124
124
|
const companyAddress = addressViewState.newAddressState?.company_address;
|
|
125
125
|
const registeredCompanyAddress = addressViewState.newAddressState?.company_registered_address;
|
|
126
126
|
companyDetailsLocalData = {
|
|
127
|
-
autoFilledFields: companyDetails.autoFilledFields,
|
|
128
127
|
companyId,
|
|
129
128
|
companyDescription,
|
|
130
129
|
companyLegalName,
|
|
@@ -197,7 +196,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
197
196
|
const companyOfficerAddress = addressViewState.newAddressState?.[addressType];
|
|
198
197
|
companyOfficerLocalData[officerType] = {
|
|
199
198
|
...companyOfficer.localData,
|
|
200
|
-
autoFilledFields: companyOfficer.autoFilledFields,
|
|
201
199
|
userFiles: (0, fileSelector_1.getFilesByFileIds)(fileState, fileIds),
|
|
202
200
|
additionalFiles: (0, fileSelector_1.getFilesByFileIds)(fileState, additionalSubmittedDocumentsForVerificationFileIds),
|
|
203
201
|
deleteFileStatusById,
|