@tap-payments/auth-jsconnect 2.8.57-development → 2.8.59-beta
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/build/@types/app.d.ts +0 -1
- package/build/@types/form.d.ts +0 -1
- package/build/@types/redux.d.ts +0 -1
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +4 -12
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -0
- package/build/constants/app.js +2 -0
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +165 -184
- package/build/features/app/board/boardStore.js +30 -52
- package/build/features/app/brand/brandStore.d.ts +33 -16
- package/build/features/app/brand/brandStore.js +242 -239
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +88 -77
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
- package/build/features/app/connectExpress/connectExpressStore.js +52 -110
- package/build/features/app/entity/entityStore.d.ts +36 -20
- package/build/features/app/entity/entityStore.js +246 -196
- package/build/features/app/individual/individualStore.d.ts +38 -22
- package/build/features/app/individual/individualStore.js +266 -263
- package/build/features/app/password/passwordStore.d.ts +23 -40
- package/build/features/app/password/passwordStore.js +233 -226
- package/build/features/app/tax/taxStore.d.ts +7 -13
- package/build/features/app/tax/taxStore.js +147 -168
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/bank/Bank.d.ts +0 -1
- package/build/features/bank/Bank.js +4 -7
- package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- package/build/features/board/Board.js +4 -8
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
- package/build/features/brand/Brand.d.ts +0 -1
- package/build/features/brand/Brand.js +4 -7
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/Business.js +4 -9
- package/build/features/business/screens/Activities/Activities.js +3 -12
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -10
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +3 -12
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -14
- package/build/features/business/screens/Verify/Verify.js +3 -13
- package/build/features/connect/Connect.js +2 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +8 -11
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +1 -2
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +0 -1
- package/build/features/entity/Entity.js +4 -7
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
- package/build/features/entity/screens/EntityName/EntityName.js +15 -32
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +7 -67
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
- package/build/features/individual/screens/IndividualList/UserList.js +9 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +1 -1
- package/build/features/password/Password.d.ts +0 -1
- package/build/features/password/Password.js +28 -75
- package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Button/FlowsButtons.js +3 -13
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -14
- package/build/features/signIn/SignIn.js +3 -12
- package/build/features/tax/Tax.d.ts +0 -1
- package/build/features/tax/Tax.js +4 -7
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/useVerifyToken.d.ts +2 -5
- package/build/hooks/useVerifyToken.js +5 -10
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +1 -2
- package/build/utils/string.d.ts +2 -5
- package/build/utils/string.js +5 -34
- package/package.json +2 -2
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
- package/build/features/bank/screens/OperatorError/index.js +0 -2
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/board/screens/OperatorError/index.d.ts +0 -3
- package/build/features/board/screens/OperatorError/index.js +0 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
- package/build/features/brand/screens/OperatorError/index.js +0 -2
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/business/screens/OperatorError/index.d.ts +0 -3
- package/build/features/business/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -31
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
- package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
- package/build/features/entity/screens/OperatorError/index.js +0 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -36
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
- package/build/features/individual/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/password/screens/OperatorError/index.d.ts +0 -3
- package/build/features/password/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
- package/build/features/signIn/screens/OperatorError/index.js +0 -2
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
- package/build/features/tax/screens/OperatorError/index.js +0 -2
- package/build/hooks/useFormDirtyCheck.d.ts +0 -10
- package/build/hooks/useFormDirtyCheck.js +0 -66
|
@@ -7,6 +7,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
7
7
|
token: string;
|
|
8
8
|
brandData: any;
|
|
9
9
|
boardId: any;
|
|
10
|
+
currencyData: any;
|
|
10
11
|
isRequireOTP?: undefined;
|
|
11
12
|
} | {
|
|
12
13
|
data: any;
|
|
@@ -16,6 +17,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
16
17
|
leadData?: undefined;
|
|
17
18
|
brandData?: undefined;
|
|
18
19
|
boardId?: undefined;
|
|
20
|
+
currencyData?: undefined;
|
|
19
21
|
}, string, {
|
|
20
22
|
state?: unknown;
|
|
21
23
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -47,6 +49,7 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
47
49
|
};
|
|
48
50
|
brand: any;
|
|
49
51
|
leadData: any;
|
|
52
|
+
currencyData: any;
|
|
50
53
|
}, OTPFormValues, {
|
|
51
54
|
state?: unknown;
|
|
52
55
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -174,6 +177,7 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
|
|
|
174
177
|
export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
175
178
|
data: any;
|
|
176
179
|
formData: ActivitiesFormValues;
|
|
180
|
+
currencyData: any;
|
|
177
181
|
}, AsyncThunkParams<ActivitiesFormValues>, {
|
|
178
182
|
state?: unknown;
|
|
179
183
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -253,6 +257,7 @@ export interface BusinessData {
|
|
|
253
257
|
activitiesData: ActivitiesFormValues & ResponseData;
|
|
254
258
|
customersData: CustomersFormValues & ResponseData;
|
|
255
259
|
flowName: FlowsTypes;
|
|
260
|
+
currency: string;
|
|
256
261
|
}
|
|
257
262
|
export interface BusinessState extends SharedState<BusinessData> {
|
|
258
263
|
customLoading?: boolean;
|
|
@@ -59,14 +59,15 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
|
59
59
|
import API from '../../../api';
|
|
60
60
|
import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
|
|
61
61
|
import { BUSINESS_STEP_NAMES, EXPECTED_SALES_LIST, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
62
|
-
import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue
|
|
62
|
+
import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue } from '../../../utils';
|
|
63
63
|
import { handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
64
|
export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var payload, data, publicKey, countryIso2, boardData, brandData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
|
|
65
|
+
var settings, payload, data, publicKey, countryIso2, boardData, brandData, currencyData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
|
|
66
66
|
var _b, _c;
|
|
67
67
|
return __generator(this, function (_d) {
|
|
68
68
|
switch (_d.label) {
|
|
69
69
|
case 0:
|
|
70
|
+
settings = thunkApi.getState().settings;
|
|
70
71
|
payload = {
|
|
71
72
|
service_name: 'tap_email',
|
|
72
73
|
verify_token: token
|
|
@@ -85,9 +86,9 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
85
86
|
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
86
87
|
if (countryIso2)
|
|
87
88
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
88
|
-
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
89
|
+
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 21];
|
|
89
90
|
boardData = undefined;
|
|
90
|
-
brandData = void 0, isicActivityList = undefined;
|
|
91
|
+
brandData = void 0, currencyData = undefined, isicActivityList = undefined;
|
|
91
92
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
92
93
|
case 2:
|
|
93
94
|
leadData = (_d.sent()).data;
|
|
@@ -100,7 +101,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
100
101
|
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && (isSA(countryIso2) || isOtherThanKWOrSA(countryIso2))) {
|
|
101
102
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
102
103
|
}
|
|
103
|
-
if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3,
|
|
104
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 20];
|
|
104
105
|
_a = leadData || {}, steps = _a.steps, brand = _a.brand, board_id = _a.board_id, business_id = _a.business_id, entity = _a.entity;
|
|
105
106
|
brandID = brand === null || brand === void 0 ? void 0 : brand.id;
|
|
106
107
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
@@ -118,60 +119,64 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
118
119
|
_d.label = 5;
|
|
119
120
|
case 5:
|
|
120
121
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
121
|
-
return [3,
|
|
122
|
+
return [3, 20];
|
|
122
123
|
case 6:
|
|
123
124
|
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 7];
|
|
124
125
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
125
|
-
return [3,
|
|
126
|
+
return [3, 20];
|
|
126
127
|
case 7:
|
|
127
128
|
if (!hasBusinessCustomersCompleted) return [3, 8];
|
|
128
129
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
129
|
-
return [3,
|
|
130
|
+
return [3, 20];
|
|
130
131
|
case 8:
|
|
131
|
-
if (!hasBusinessCRActivitiesCompleted) return [3,
|
|
132
|
-
return [4, API.
|
|
132
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 13];
|
|
133
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
133
134
|
case 9:
|
|
135
|
+
currencyData = _d.sent();
|
|
136
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
137
|
+
case 10:
|
|
134
138
|
list = (_d.sent()).list;
|
|
135
139
|
isicActivityList = list || [];
|
|
136
140
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
137
|
-
case
|
|
141
|
+
case 11:
|
|
138
142
|
_d.sent();
|
|
139
143
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
140
|
-
case
|
|
144
|
+
case 12:
|
|
141
145
|
brandData = _d.sent();
|
|
142
146
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
143
|
-
return [3,
|
|
144
|
-
case 12:
|
|
145
|
-
if (!hasBusinessCRInfoCompleted) return [3, 15];
|
|
146
|
-
return [4, API.dataService.getActivitiesIsIc()];
|
|
147
|
+
return [3, 20];
|
|
147
148
|
case 13:
|
|
149
|
+
if (!hasBusinessCRInfoCompleted) return [3, 16];
|
|
150
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
151
|
+
case 14:
|
|
148
152
|
list = (_d.sent()).list;
|
|
149
153
|
isicActivityList = list || [];
|
|
150
154
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
151
|
-
case
|
|
155
|
+
case 15:
|
|
152
156
|
brandData = _d.sent();
|
|
153
157
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
154
|
-
return [3,
|
|
155
|
-
case
|
|
156
|
-
case 16:
|
|
157
|
-
_d.sent();
|
|
158
|
-
if (!isSA(countryIso2)) return [3, 18];
|
|
159
|
-
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
158
|
+
return [3, 20];
|
|
159
|
+
case 16: return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
160
160
|
case 17:
|
|
161
161
|
_d.sent();
|
|
162
|
-
|
|
162
|
+
if (!isSA(countryIso2)) return [3, 19];
|
|
163
|
+
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
163
164
|
case 18:
|
|
164
|
-
|
|
165
|
+
_d.sent();
|
|
165
166
|
_d.label = 19;
|
|
166
|
-
case 19:
|
|
167
|
+
case 19:
|
|
168
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
169
|
+
_d.label = 20;
|
|
170
|
+
case 20: return [2, {
|
|
167
171
|
data: data,
|
|
168
172
|
isicActivityList: isicActivityList,
|
|
169
173
|
leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
|
|
170
174
|
token: token,
|
|
171
175
|
brandData: brandData === null || brandData === void 0 ? void 0 : brandData.brand,
|
|
172
|
-
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
|
|
176
|
+
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id,
|
|
177
|
+
currencyData: currencyData
|
|
173
178
|
}];
|
|
174
|
-
case
|
|
179
|
+
case 21: return [2, { data: data, isRequireOTP: true, token: token }];
|
|
175
180
|
}
|
|
176
181
|
});
|
|
177
182
|
}); });
|
|
@@ -193,7 +198,7 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
|
|
|
193
198
|
});
|
|
194
199
|
}); });
|
|
195
200
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var _a, business, settings, isNID, responseBody, stepName, payload, data, publicKey, brandData, isicActivityList, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, boardResponse, list, list;
|
|
201
|
+
var _a, business, settings, isNID, responseBody, stepName, payload, data, publicKey, brandData, isicActivityList, currencyData, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, boardResponse, list, list;
|
|
197
202
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
198
203
|
return __generator(this, function (_k) {
|
|
199
204
|
switch (_k.label) {
|
|
@@ -218,7 +223,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
218
223
|
if (publicKey) {
|
|
219
224
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
220
225
|
}
|
|
221
|
-
|
|
226
|
+
currencyData = undefined;
|
|
222
227
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
223
228
|
case 2:
|
|
224
229
|
leadData = (_k.sent()).data;
|
|
@@ -248,11 +253,11 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
248
253
|
case 6:
|
|
249
254
|
if (!isNID) return [3, 7];
|
|
250
255
|
thunkApi.dispatch(handleNextScreenStep());
|
|
251
|
-
return [3,
|
|
256
|
+
return [3, 23];
|
|
252
257
|
case 7:
|
|
253
258
|
if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 8];
|
|
254
259
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
255
|
-
return [3,
|
|
260
|
+
return [3, 23];
|
|
256
261
|
case 8:
|
|
257
262
|
if (!hasBusinessCompleted) return [3, 12];
|
|
258
263
|
if (!board_id) return [3, 11];
|
|
@@ -266,44 +271,47 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
266
271
|
_k.label = 11;
|
|
267
272
|
case 11:
|
|
268
273
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP')); });
|
|
269
|
-
return [3,
|
|
274
|
+
return [3, 23];
|
|
270
275
|
case 12:
|
|
271
276
|
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 13];
|
|
272
277
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP')); });
|
|
273
|
-
return [3,
|
|
278
|
+
return [3, 23];
|
|
274
279
|
case 13:
|
|
275
280
|
if (!hasBusinessCustomersCompleted) return [3, 14];
|
|
276
281
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP')); });
|
|
277
|
-
return [3,
|
|
282
|
+
return [3, 23];
|
|
278
283
|
case 14:
|
|
279
|
-
if (!hasBusinessCRActivitiesCompleted) return [3,
|
|
280
|
-
return [4, API.
|
|
284
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 19];
|
|
285
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
281
286
|
case 15:
|
|
287
|
+
currencyData = _k.sent();
|
|
288
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
289
|
+
case 16:
|
|
282
290
|
list = (_k.sent()).list;
|
|
283
291
|
isicActivityList = list || [];
|
|
284
292
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
285
|
-
case
|
|
293
|
+
case 17:
|
|
286
294
|
_k.sent();
|
|
287
295
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
288
|
-
case
|
|
296
|
+
case 18:
|
|
289
297
|
brandData = _k.sent();
|
|
290
298
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP')); });
|
|
291
|
-
return [3,
|
|
292
|
-
case 18:
|
|
293
|
-
if (!hasBusinessCRInfoCompleted) return [3, 21];
|
|
294
|
-
return [4, API.dataService.getActivitiesIsIc()];
|
|
299
|
+
return [3, 23];
|
|
295
300
|
case 19:
|
|
301
|
+
if (!hasBusinessCRInfoCompleted) return [3, 22];
|
|
302
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
303
|
+
case 20:
|
|
296
304
|
list = (_k.sent()).list;
|
|
297
305
|
isicActivityList = list || [];
|
|
298
306
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
299
|
-
case
|
|
307
|
+
case 21:
|
|
300
308
|
brandData = _k.sent();
|
|
301
309
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP')); });
|
|
302
|
-
return [3,
|
|
303
|
-
case
|
|
310
|
+
return [3, 23];
|
|
311
|
+
case 22:
|
|
304
312
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP')); });
|
|
305
|
-
_k.label =
|
|
306
|
-
case
|
|
313
|
+
_k.label = 23;
|
|
314
|
+
case 23: return [2, { data: data, isicActivityList: isicActivityList, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData, currencyData: currencyData }];
|
|
307
315
|
}
|
|
308
316
|
});
|
|
309
317
|
}); });
|
|
@@ -381,7 +389,7 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
381
389
|
});
|
|
382
390
|
}); });
|
|
383
391
|
export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
384
|
-
var _a, settings, business, identification_id_type, stepName, lead_id, countryIso2,
|
|
392
|
+
var _a, settings, business, identification_id_type, stepName, lead_id, countryIso2, requestBody, data, business_id, entity, screen;
|
|
385
393
|
var _b, _c;
|
|
386
394
|
return __generator(this, function (_d) {
|
|
387
395
|
switch (_d.label) {
|
|
@@ -391,7 +399,6 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
391
399
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
392
400
|
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
393
401
|
countryIso2 = settings.data.businessCountry.iso2;
|
|
394
|
-
dob = dateFormat(new Date(params.dob));
|
|
395
402
|
if (isOtherThanKWOrSA(countryIso2)) {
|
|
396
403
|
identification_id_type = IDENTIFICATION_TYPE.NID;
|
|
397
404
|
}
|
|
@@ -402,7 +409,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
402
409
|
issued_country_code: countryIso2,
|
|
403
410
|
type: identification_id_type
|
|
404
411
|
},
|
|
405
|
-
date_of_birth: dob,
|
|
412
|
+
date_of_birth: params.dob,
|
|
406
413
|
step_name: stepName,
|
|
407
414
|
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
408
415
|
};
|
|
@@ -429,7 +436,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
429
436
|
});
|
|
430
437
|
}); });
|
|
431
438
|
export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
432
|
-
var _a, settings, business, _b, nid, dob, type, stepName, lead_id,
|
|
439
|
+
var _a, settings, business, _b, nid, dob, type, stepName, lead_id, requestBody, data;
|
|
433
440
|
return __generator(this, function (_c) {
|
|
434
441
|
switch (_c.label) {
|
|
435
442
|
case 0:
|
|
@@ -437,7 +444,6 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
437
444
|
_b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
|
|
438
445
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
439
446
|
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
440
|
-
date_of_birth = dateFormat(new Date(dob));
|
|
441
447
|
requestBody = {
|
|
442
448
|
id: lead_id || '',
|
|
443
449
|
identification: {
|
|
@@ -445,7 +451,7 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
445
451
|
issued_country_code: settings.data.businessCountry.iso2,
|
|
446
452
|
type: type
|
|
447
453
|
},
|
|
448
|
-
date_of_birth:
|
|
454
|
+
date_of_birth: dob,
|
|
449
455
|
step_name: stepName,
|
|
450
456
|
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
451
457
|
};
|
|
@@ -489,7 +495,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
489
495
|
case 1:
|
|
490
496
|
data = _c.sent();
|
|
491
497
|
return [2, {
|
|
492
|
-
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals, board_id: data === null || data === void 0 ? void 0 : data.id })
|
|
498
|
+
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals, board_id: data === null || data === void 0 ? void 0 : data.id, board_status: data === null || data === void 0 ? void 0 : data.status })
|
|
493
499
|
}];
|
|
494
500
|
}
|
|
495
501
|
});
|
|
@@ -599,7 +605,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
599
605
|
export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (_a, thunkApi) {
|
|
600
606
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
601
607
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
602
|
-
var _b, settings, business, _c, brand, entity_activities, entity, _d, brandActivities, brandId, data_status, activities, operationStartDate, isActivitiesNonEditable, isOperationStartDateNonEditable, stepName, id, removedActivities, payload, newBrandActivities, newEntityActivities, activityPayload, requestBody, data;
|
|
608
|
+
var _b, settings, business, _c, brand, entity_activities, entity, _d, brandActivities, brandId, data_status, activities, operationStartDate, isActivitiesNonEditable, isOperationStartDateNonEditable, stepName, id, removedActivities, payload, newBrandActivities, newEntityActivities, activityPayload, requestBody, data, currencyData;
|
|
603
609
|
var _e, _f;
|
|
604
610
|
return __generator(this, function (_g) {
|
|
605
611
|
switch (_g.label) {
|
|
@@ -655,10 +661,13 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
655
661
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
656
662
|
case 6:
|
|
657
663
|
_g.sent();
|
|
664
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
665
|
+
case 7:
|
|
666
|
+
currencyData = _g.sent();
|
|
658
667
|
thunkApi.dispatch(updateStepName(stepName));
|
|
659
668
|
thunkApi.dispatch(handleNextScreenStep());
|
|
660
669
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
661
|
-
return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: originalFormData }];
|
|
670
|
+
return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: originalFormData, currencyData: currencyData }];
|
|
662
671
|
}
|
|
663
672
|
});
|
|
664
673
|
});
|
|
@@ -759,12 +768,6 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
|
|
|
759
768
|
return [4, API.leadService.updateLead(payload)];
|
|
760
769
|
case 1:
|
|
761
770
|
data = _g.sent();
|
|
762
|
-
sendCustomEventToGTM({
|
|
763
|
-
event: 'Send Event',
|
|
764
|
-
event_category: 'Account Creation Flow',
|
|
765
|
-
event_action: 'Account Creation Success',
|
|
766
|
-
event_label: settings.data.businessCountry.iso2
|
|
767
|
-
});
|
|
768
771
|
board_id = data === null || data === void 0 ? void 0 : data.board_id;
|
|
769
772
|
if (!board_id) return [3, 4];
|
|
770
773
|
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
@@ -812,6 +815,7 @@ var initialState = {
|
|
|
812
815
|
uploadingArticle: false,
|
|
813
816
|
data: {
|
|
814
817
|
flowName: FlowsTypes.BUSINESS,
|
|
818
|
+
currency: '',
|
|
815
819
|
verify: {
|
|
816
820
|
token: ''
|
|
817
821
|
},
|
|
@@ -875,13 +879,13 @@ export var businessSlice = createSlice({
|
|
|
875
879
|
state.customLoading = true;
|
|
876
880
|
})
|
|
877
881
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
878
|
-
var _a, _b, _c, _d, _e;
|
|
882
|
+
var _a, _b, _c, _d, _e, _f;
|
|
879
883
|
state.error = null;
|
|
880
884
|
state.customLoading = false;
|
|
881
|
-
var
|
|
885
|
+
var _g = action.payload, data = _g.data, boardId = _g.boardId, brandData = _g.brandData, leadData = _g.leadData, token = _g.token, isRequireOTP = _g.isRequireOTP, isicActivityList = _g.isicActivityList, currencyData = _g.currencyData;
|
|
882
886
|
var responseBody = state.data.verify.responseBody;
|
|
883
887
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id }), (brandData && { brand: brandData }));
|
|
884
|
-
var
|
|
888
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
885
889
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
886
890
|
state.data.nidData.nid = identification.id;
|
|
887
891
|
if (date_of_birth)
|
|
@@ -893,13 +897,13 @@ export var businessSlice = createSlice({
|
|
|
893
897
|
state.data.otpData.isNID = false;
|
|
894
898
|
if (isRequireOTP)
|
|
895
899
|
return;
|
|
896
|
-
var
|
|
900
|
+
var _j = state.data.verify.responseBody || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
897
901
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
898
902
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
899
903
|
var issuingDate = ((_a = brandData === null || brandData === void 0 ? void 0 : brandData.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
|
|
900
904
|
if (issuingDate)
|
|
901
905
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
902
|
-
var
|
|
906
|
+
var _k = brandData || {}, terms = _k.terms, activities = _k.activities;
|
|
903
907
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
904
908
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
905
909
|
})) || [];
|
|
@@ -910,9 +914,11 @@ export var businessSlice = createSlice({
|
|
|
910
914
|
state.data.customersData.refundPolicy = element.agree;
|
|
911
915
|
}
|
|
912
916
|
});
|
|
917
|
+
if ((_c = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _c === void 0 ? void 0 : _c.english)
|
|
918
|
+
state.data.currency = currencyData.code.english;
|
|
913
919
|
state.data.activitiesData.activities = selectedActivity;
|
|
914
920
|
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
915
|
-
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((
|
|
921
|
+
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((_f = (_e = (_d = state.data.businessTypeData) === null || _d === void 0 ? void 0 : _d.responseBody) === null || _e === void 0 ? void 0 : _e.licenseList) === null || _f === void 0 ? void 0 : _f.length) && { licenseList: licenseList }));
|
|
916
922
|
})
|
|
917
923
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
918
924
|
state.error = action.error.message;
|
|
@@ -940,27 +946,29 @@ export var businessSlice = createSlice({
|
|
|
940
946
|
state.error = null;
|
|
941
947
|
})
|
|
942
948
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
943
|
-
var _a, _b, _c, _d, _e;
|
|
949
|
+
var _a, _b, _c, _d, _e, _f;
|
|
944
950
|
state.loading = false;
|
|
945
951
|
state.error = null;
|
|
946
|
-
var
|
|
952
|
+
var _g = action.payload, data = _g.data, formData = _g.formData, brand = _g.brand, leadData = _g.leadData, isicActivityList = _g.isicActivityList, currencyData = _g.currencyData;
|
|
947
953
|
state.data.otpData = formData;
|
|
948
954
|
state.data.otpData.responseBody = data;
|
|
955
|
+
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
956
|
+
state.data.currency = currencyData.code.english;
|
|
949
957
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, leadData), state.data.verify.responseBody), (brand && { brand: brand })), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
|
|
950
|
-
var
|
|
958
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
951
959
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
952
960
|
state.data.nidData.nid = identification.id;
|
|
953
961
|
if (date_of_birth)
|
|
954
962
|
state.data.nidData.dob = dateFormat(date_of_birth);
|
|
955
963
|
if (identification === null || identification === void 0 ? void 0 : identification.type)
|
|
956
964
|
state.data.nidData.type = identification.type;
|
|
957
|
-
var
|
|
965
|
+
var _j = leadData || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
958
966
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
959
967
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
960
|
-
var issuingDate = ((
|
|
968
|
+
var issuingDate = ((_b = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _b === void 0 ? void 0 : _b.start_date) || ((_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date);
|
|
961
969
|
if (issuingDate)
|
|
962
970
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
963
|
-
var
|
|
971
|
+
var _k = brand || {}, terms = _k.terms, activities = _k.activities;
|
|
964
972
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
965
973
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
966
974
|
})) || [];
|
|
@@ -973,7 +981,7 @@ export var businessSlice = createSlice({
|
|
|
973
981
|
});
|
|
974
982
|
state.data.activitiesData.activities = selectedActivity;
|
|
975
983
|
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
976
|
-
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((
|
|
984
|
+
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((_f = (_e = (_d = state.data.businessTypeData) === null || _d === void 0 ? void 0 : _d.responseBody) === null || _e === void 0 ? void 0 : _e.licenseList) === null || _f === void 0 ? void 0 : _f.length) && { licenseList: licenseList }));
|
|
977
985
|
})
|
|
978
986
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
979
987
|
state.loading = false;
|
|
@@ -1194,10 +1202,13 @@ export var businessSlice = createSlice({
|
|
|
1194
1202
|
state.error = null;
|
|
1195
1203
|
})
|
|
1196
1204
|
.addCase(updateActivitiesInfo.fulfilled, function (state, action) {
|
|
1205
|
+
var _a;
|
|
1197
1206
|
state.loading = false;
|
|
1198
1207
|
state.error = null;
|
|
1199
|
-
var
|
|
1208
|
+
var _b = action.payload, data = _b.data, formData = _b.formData, currencyData = _b.currencyData;
|
|
1200
1209
|
state.data.activitiesData = formData;
|
|
1210
|
+
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
1211
|
+
state.data.currency = currencyData.code.english;
|
|
1201
1212
|
var terms = (data || {}).terms;
|
|
1202
1213
|
terms === null || terms === void 0 ? void 0 : terms.forEach(function (element) {
|
|
1203
1214
|
if ((element === null || element === void 0 ? void 0 : element.term) === 'general') {
|
|
@@ -278,23 +278,14 @@ export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit")
|
|
|
278
278
|
rejectedMeta?: unknown;
|
|
279
279
|
}>;
|
|
280
280
|
export declare const createAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
281
|
-
accountData: any;
|
|
282
|
-
} | undefined, {
|
|
283
|
-
isRetry: boolean;
|
|
284
|
-
}, {
|
|
285
|
-
state?: unknown;
|
|
286
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
287
|
-
extra?: unknown;
|
|
288
|
-
rejectValue?: unknown;
|
|
289
|
-
serializedErrorType?: unknown;
|
|
290
|
-
pendingMeta?: unknown;
|
|
291
|
-
fulfilledMeta?: unknown;
|
|
292
|
-
rejectedMeta?: unknown;
|
|
293
|
-
}>;
|
|
294
|
-
export declare const retrieveDetailsAfterCreateAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
295
281
|
boardInfo: any;
|
|
296
282
|
boardData: any;
|
|
297
|
-
|
|
283
|
+
account: any;
|
|
284
|
+
} | {
|
|
285
|
+
account: any;
|
|
286
|
+
boardInfo?: undefined;
|
|
287
|
+
boardData?: undefined;
|
|
288
|
+
} | undefined, void, {
|
|
298
289
|
state?: unknown;
|
|
299
290
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
300
291
|
extra?: unknown;
|