@tap-payments/auth-jsconnect 2.0.54 → 2.0.55
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 +38 -0
- package/build/@types/app.js +5 -0
- package/build/@types/form.d.ts +2 -1
- package/build/api/entity.d.ts +1 -0
- package/build/api/entity.js +8 -1
- package/build/api/index.d.ts +6 -1
- package/build/api/index.js +3 -1
- package/build/api/init.d.ts +16 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +4 -1
- package/build/app/settings.d.ts +4 -8
- package/build/app/settings.js +28 -19
- package/build/assets/locales/ar.json +5 -1
- package/build/assets/locales/en.json +5 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +23 -20
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/DatePicker/DatePicker.d.ts +2 -1
- package/build/components/DatePicker/DatePicker.js +9 -8
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/SimpleList/SimpleList.d.ts +3 -1
- package/build/components/SimpleList/SimpleList.js +19 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +5 -1
- package/build/constants/app.d.ts +11 -0
- package/build/constants/app.js +33 -32
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/features/app/bank/bankStore.d.ts +3 -0
- package/build/features/app/bank/bankStore.js +33 -4
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +45 -24
- package/build/features/app/business/businessStore.d.ts +8 -0
- package/build/features/app/business/businessStore.js +166 -157
- package/build/features/app/connect/connectStore.js +2 -2
- package/build/features/app/connectExpress/connectExpressStore.js +4 -4
- package/build/features/app/entity/entityStore.d.ts +3 -0
- package/build/features/app/entity/entityStore.js +32 -3
- package/build/features/app/individual/individualStore.d.ts +5 -0
- package/build/features/app/individual/individualStore.js +76 -41
- package/build/features/app/tax/taxStore.d.ts +3 -0
- package/build/features/app/tax/taxStore.js +33 -4
- package/build/features/bank/Bank.js +3 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +9 -5
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.js +3 -4
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -5
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +1 -1
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +16 -10
- package/build/features/brand/screens/Verify/Verify.js +7 -20
- package/build/features/business/Business.js +3 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +8 -8
- package/build/features/business/screens/Activities/ActivitiesList.js +6 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +32 -8
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -6
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +4 -16
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +4 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +8 -8
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +1 -1
- package/build/features/connect/Connect.js +3 -4
- package/build/features/connect/screens/Individual/Email.js +10 -18
- package/build/features/connect/screens/Individual/MobileNumber.js +10 -6
- package/build/features/connect/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +3 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +1 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -2
- package/build/features/connectExpress/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +1 -1
- package/build/features/entity/Entity.js +3 -4
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +8 -8
- package/build/features/entity/screens/EntityCapital/ActivityList.js +6 -4
- package/build/features/entity/screens/EntityName/EntityName.js +11 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -8
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/individual/Individual.js +3 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -6
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +17 -9
- package/build/features/individual/screens/Verify/Verify.js +1 -5
- package/build/features/password/Password.js +3 -4
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Button/FlowsButtons.js +6 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/tax/Tax.js +3 -4
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/useAppConfig.js +5 -2
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +5 -0
- package/package.json +1 -1
|
@@ -59,8 +59,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
59
59
|
var _a;
|
|
60
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { BusinessType, DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
63
|
-
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
62
|
+
import { BusinessType, DocumentPurpose, FlowsTypes, LicenseType } from '../../../@types';
|
|
63
|
+
import { handleNextScreenStep, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
64
|
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
65
65
|
import moment from 'moment';
|
|
66
66
|
import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep } from '../../../utils';
|
|
@@ -209,6 +209,21 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
}); });
|
|
212
|
+
export var retrieveBoardStatus = createAsyncThunk('entity/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
213
|
+
var entity, board_id, data;
|
|
214
|
+
return __generator(this, function (_a) {
|
|
215
|
+
switch (_a.label) {
|
|
216
|
+
case 0:
|
|
217
|
+
entity = thunkApi.getState().entity;
|
|
218
|
+
board_id = (entity.data.verify.responseBody || {}).board_id;
|
|
219
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
220
|
+
case 1:
|
|
221
|
+
data = _a.sent();
|
|
222
|
+
thunkApi.dispatch(handlePrevScreenStep());
|
|
223
|
+
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}); });
|
|
212
227
|
export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
213
228
|
var data;
|
|
214
229
|
var _a, _b;
|
|
@@ -247,7 +262,7 @@ export var updateEntityName = createAsyncThunk('entityUpdateEntityName', functio
|
|
|
247
262
|
isEntityTypeVerified = hasVerifiedValue(data_verification, 'type');
|
|
248
263
|
isLicenseNonEditable = isLicenseNumberNonEditable && isLicenseTypeNonEditable && isIssuingDateNonEditable && isExpiryDateNonEditable && isUnifiedNumberNonEditable;
|
|
249
264
|
payload = __assign(__assign(__assign(__assign({ id: id, AOA_file_id: isAOAFileNonEditable ? undefined : params.articleId }, (!isLicenseNonEditable && {
|
|
250
|
-
license: __assign({ number: isLicenseNumberNonEditable || !params.licenseNumber ? undefined : params.licenseNumber, type: isLicenseTypeNonEditable ? undefined : isFL ?
|
|
265
|
+
license: __assign({ number: isLicenseNumberNonEditable || !params.licenseNumber ? undefined : params.licenseNumber, type: isLicenseTypeNonEditable ? undefined : isFL ? LicenseType.FL : LicenseType.CR, issuing_date: isIssuingDateNonEditable ? undefined : issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString(), expiry_date: isExpiryDateNonEditable ? undefined : expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() }, (!(isUnifiedNumberNonEditable || !params.unifiedNumber) && {
|
|
251
266
|
additional_info: {
|
|
252
267
|
unified_number: params.unifiedNumber
|
|
253
268
|
}
|
|
@@ -625,6 +640,20 @@ export var entitySlice = createSlice({
|
|
|
625
640
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
626
641
|
state.error = action.error.message;
|
|
627
642
|
state.loading = false;
|
|
643
|
+
})
|
|
644
|
+
.addCase(retrieveBoardStatus.pending, function (state) {
|
|
645
|
+
state.error = null;
|
|
646
|
+
state.loading = true;
|
|
647
|
+
})
|
|
648
|
+
.addCase(retrieveBoardStatus.fulfilled, function (state, action) {
|
|
649
|
+
state.error = null;
|
|
650
|
+
state.loading = false;
|
|
651
|
+
var flows = action.payload.flows;
|
|
652
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
653
|
+
})
|
|
654
|
+
.addCase(retrieveBoardStatus.rejected, function (state, action) {
|
|
655
|
+
state.error = action.error.message;
|
|
656
|
+
state.loading = false;
|
|
628
657
|
})
|
|
629
658
|
.addCase(updateBoardSuccess.fulfilled, function (state, action) {
|
|
630
659
|
var _a;
|
|
@@ -21,6 +21,7 @@ export declare const verifyToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
21
21
|
countryCode: any;
|
|
22
22
|
notification: any;
|
|
23
23
|
business: any;
|
|
24
|
+
flows: any;
|
|
24
25
|
};
|
|
25
26
|
token: string;
|
|
26
27
|
}, VerifyLeadTokenProps, {}>;
|
|
@@ -60,6 +61,9 @@ export declare const retrieveDataList: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
60
61
|
monthlyIncome: any;
|
|
61
62
|
occupation: any;
|
|
62
63
|
}, string, {}>;
|
|
64
|
+
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
65
|
+
flows: any;
|
|
66
|
+
}, void, {}>;
|
|
63
67
|
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
64
68
|
data: any;
|
|
65
69
|
}, string, {}>;
|
|
@@ -78,6 +82,7 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
78
82
|
countryCode: any;
|
|
79
83
|
notification: any;
|
|
80
84
|
business: any;
|
|
85
|
+
flows: any;
|
|
81
86
|
};
|
|
82
87
|
formData: {
|
|
83
88
|
otp: string;
|
|
@@ -69,13 +69,13 @@ var _a;
|
|
|
69
69
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
70
|
import API from '../../../api';
|
|
71
71
|
import { FlowsTypes, IndividualGender, IndividualType, DocumentPurpose } from '../../../@types';
|
|
72
|
-
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
72
|
+
import { handleNextScreenStep, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
73
73
|
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES } from '../../../constants';
|
|
74
74
|
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose } from '../../../utils';
|
|
75
75
|
export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
|
|
76
76
|
var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
|
|
77
77
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
-
var payload, settings, data, boardData, individualData, countryCode, boardInfoData, countries, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry;
|
|
78
|
+
var payload, settings, data, boardData, individualData, countryCode, boardInfoData, boardInfoStatus, countries, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry;
|
|
79
79
|
var _c, _d, _e, _f, _g, _h, _j;
|
|
80
80
|
return __generator(this, function (_k) {
|
|
81
81
|
switch (_k.label) {
|
|
@@ -88,7 +88,7 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
88
88
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
89
89
|
case 1:
|
|
90
90
|
data = (_k.sent()).data;
|
|
91
|
-
|
|
91
|
+
boardInfoStatus = undefined;
|
|
92
92
|
countries = settings.data.countries;
|
|
93
93
|
if (((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
94
94
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
@@ -100,9 +100,9 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
100
100
|
}
|
|
101
101
|
if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 2];
|
|
102
102
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
103
|
-
return [3,
|
|
103
|
+
return [3, 16];
|
|
104
104
|
case 2:
|
|
105
|
-
if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
105
|
+
if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 15];
|
|
106
106
|
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
107
107
|
board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
|
|
108
108
|
if (!(board_id && board_info_id)) return [3, 5];
|
|
@@ -129,32 +129,34 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
129
129
|
if (countryCode)
|
|
130
130
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
131
131
|
}
|
|
132
|
-
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3,
|
|
132
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
|
|
133
133
|
if (!((_e = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _e === void 0 ? void 0 : _e.id)) return [3, 9];
|
|
134
134
|
return [4, thunkApi.dispatch(getIndividualList((_f = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _f === void 0 ? void 0 : _f.id))];
|
|
135
135
|
case 8:
|
|
136
136
|
_k.sent();
|
|
137
137
|
_k.label = 9;
|
|
138
|
-
case 9:
|
|
139
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
140
|
-
return [3, 13];
|
|
138
|
+
case 9: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
141
139
|
case 10:
|
|
140
|
+
boardInfoStatus = _k.sent();
|
|
141
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
142
|
+
return [3, 14];
|
|
143
|
+
case 11:
|
|
142
144
|
birthCountry = ((_g = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _g === void 0 ? void 0 : _g.country) || countryCode;
|
|
143
|
-
if (!birthCountry) return [3,
|
|
145
|
+
if (!birthCountry) return [3, 13];
|
|
144
146
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
145
|
-
case 11:
|
|
146
|
-
_k.sent();
|
|
147
|
-
_k.label = 12;
|
|
148
147
|
case 12:
|
|
149
|
-
|
|
148
|
+
_k.sent();
|
|
150
149
|
_k.label = 13;
|
|
151
|
-
case 13:
|
|
152
|
-
|
|
150
|
+
case 13:
|
|
151
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
152
|
+
_k.label = 14;
|
|
153
|
+
case 14: return [3, 16];
|
|
154
|
+
case 15:
|
|
153
155
|
if (isUpdatePhoneInfo) {
|
|
154
156
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
|
|
155
157
|
}
|
|
156
|
-
_k.label =
|
|
157
|
-
case
|
|
158
|
+
_k.label = 16;
|
|
159
|
+
case 16: return [2, {
|
|
158
160
|
data: data,
|
|
159
161
|
boardResponse: {
|
|
160
162
|
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
@@ -168,7 +170,8 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
168
170
|
countries: countries,
|
|
169
171
|
countryCode: countryCode,
|
|
170
172
|
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
171
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business
|
|
173
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
174
|
+
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
172
175
|
},
|
|
173
176
|
token: token
|
|
174
177
|
}];
|
|
@@ -386,6 +389,21 @@ export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', fun
|
|
|
386
389
|
}
|
|
387
390
|
});
|
|
388
391
|
}); });
|
|
392
|
+
export var retrieveBoardStatus = createAsyncThunk('individual/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
393
|
+
var individual, board_id, data;
|
|
394
|
+
return __generator(this, function (_a) {
|
|
395
|
+
switch (_a.label) {
|
|
396
|
+
case 0:
|
|
397
|
+
individual = thunkApi.getState().individual;
|
|
398
|
+
board_id = (individual.data.verify.responseBody || {}).board_id;
|
|
399
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
400
|
+
case 1:
|
|
401
|
+
data = _a.sent();
|
|
402
|
+
thunkApi.dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
403
|
+
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}); });
|
|
389
407
|
export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
390
408
|
var _a, user, data;
|
|
391
409
|
var _b, _c;
|
|
@@ -401,7 +419,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetai
|
|
|
401
419
|
});
|
|
402
420
|
}); });
|
|
403
421
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
404
|
-
var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, countryCode, notification, _c, id, type, data_3, birthCountry;
|
|
422
|
+
var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, boardInfoStatus, countryCode, notification, _c, id, type, data_3, birthCountry;
|
|
405
423
|
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
406
424
|
return __generator(this, function (_p) {
|
|
407
425
|
switch (_p.label) {
|
|
@@ -420,7 +438,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
420
438
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
421
439
|
case 1:
|
|
422
440
|
data = (_p.sent()).data;
|
|
423
|
-
|
|
441
|
+
boardInfoStatus = undefined;
|
|
424
442
|
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
425
443
|
throw new Error(data.errors[0].description);
|
|
426
444
|
if (!board_id) return [3, 3];
|
|
@@ -445,26 +463,28 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
445
463
|
case 6:
|
|
446
464
|
if (countryCode)
|
|
447
465
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
448
|
-
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3,
|
|
466
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
|
|
449
467
|
if (!((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id)) return [3, 8];
|
|
450
468
|
return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id))];
|
|
451
469
|
case 7:
|
|
452
470
|
_p.sent();
|
|
453
471
|
_p.label = 8;
|
|
454
|
-
case 8:
|
|
455
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
456
|
-
return [3, 12];
|
|
472
|
+
case 8: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
457
473
|
case 9:
|
|
474
|
+
boardInfoStatus = _p.sent();
|
|
475
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
476
|
+
return [3, 13];
|
|
477
|
+
case 10:
|
|
458
478
|
birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
|
|
459
|
-
if (!birthCountry) return [3,
|
|
479
|
+
if (!birthCountry) return [3, 12];
|
|
460
480
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
461
|
-
case 10:
|
|
462
|
-
_p.sent();
|
|
463
|
-
_p.label = 11;
|
|
464
481
|
case 11:
|
|
465
|
-
|
|
482
|
+
_p.sent();
|
|
466
483
|
_p.label = 12;
|
|
467
484
|
case 12:
|
|
485
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
486
|
+
_p.label = 13;
|
|
487
|
+
case 13:
|
|
468
488
|
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, { otp: params.otp });
|
|
469
489
|
return [2, {
|
|
470
490
|
data: data,
|
|
@@ -480,7 +500,8 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
480
500
|
countries: countries,
|
|
481
501
|
countryCode: countryCode,
|
|
482
502
|
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
483
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business
|
|
503
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
504
|
+
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
484
505
|
},
|
|
485
506
|
formData: __assign({}, params)
|
|
486
507
|
}];
|
|
@@ -519,9 +540,9 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
|
|
|
519
540
|
}); });
|
|
520
541
|
export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
521
542
|
var _a, settings, individual, _b, notification, user, entity, _c, id, type, name, email, mobile, countryCode, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, data_status, userName, identification_id_type, isNameNonEditable, isEmailNonEditable, isMobileNumberNonEditable, isMobileCountryNonEditable, isNidNonEditable, isIssuedCountryNonEditable, isExpiryNonEditable, isIdTypeNonEditable, isNationalityNonEditable, isDOBNonEditable, isBirthCityNonEditable, isBirthCountryNonEditable, hasContact, hasPhone, hasIdentification, hasBirth, contact, requestBody, data;
|
|
522
|
-
var _d, _e, _f, _g, _h
|
|
523
|
-
return __generator(this, function (
|
|
524
|
-
switch (
|
|
543
|
+
var _d, _e, _f, _g, _h;
|
|
544
|
+
return __generator(this, function (_j) {
|
|
545
|
+
switch (_j.label) {
|
|
525
546
|
case 0:
|
|
526
547
|
_a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
|
|
527
548
|
_b = individual.data.verify.responseBody || {}, notification = _b.notification, user = _b.user, entity = _b.entity;
|
|
@@ -571,7 +592,7 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
571
592
|
date_of_birth: dob
|
|
572
593
|
})), (!((isBirthCityNonEditable && isBirthCountryNonEditable) || !hasBirth) && {
|
|
573
594
|
birth: {
|
|
574
|
-
city: isBirthCityNonEditable ? undefined :
|
|
595
|
+
city: isBirthCityNonEditable ? undefined : placeOfBirthCity === null || placeOfBirthCity === void 0 ? void 0 : placeOfBirthCity.id,
|
|
575
596
|
country: isBirthCountryNonEditable ? undefined : placeOfBirthCountry === null || placeOfBirthCountry === void 0 ? void 0 : placeOfBirthCountry.iso2
|
|
576
597
|
}
|
|
577
598
|
})), (!isNationalityNonEditable && {
|
|
@@ -585,22 +606,21 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
585
606
|
'identification.issued_country_code',
|
|
586
607
|
'identification.expiry',
|
|
587
608
|
'identification.type',
|
|
588
|
-
'birth.city',
|
|
589
609
|
'birth.country',
|
|
590
610
|
'date_of_birth',
|
|
591
611
|
'nationality'
|
|
592
612
|
], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_PERSONAL_INFO });
|
|
593
613
|
return [4, API.individualService.updateIndividual(requestBody)];
|
|
594
614
|
case 1:
|
|
595
|
-
data =
|
|
615
|
+
data = _j.sent();
|
|
596
616
|
if (!(type === IndividualType.USER || type === IndividualType.BUYER)) return [3, 3];
|
|
597
617
|
return [4, thunkApi.dispatch(retrieveDataList(code))];
|
|
598
618
|
case 2:
|
|
599
|
-
|
|
600
|
-
|
|
619
|
+
_j.sent();
|
|
620
|
+
_j.label = 3;
|
|
601
621
|
case 3:
|
|
602
622
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
603
|
-
(
|
|
623
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
|
|
604
624
|
return [2, { data: data, formData: params }];
|
|
605
625
|
}
|
|
606
626
|
});
|
|
@@ -975,7 +995,8 @@ export var individualSlice = createSlice({
|
|
|
975
995
|
}
|
|
976
996
|
if (birth === null || birth === void 0 ? void 0 : birth.city) {
|
|
977
997
|
var selectedCity = cityList === null || cityList === void 0 ? void 0 : cityList.find(function (city) {
|
|
978
|
-
|
|
998
|
+
var _a;
|
|
999
|
+
return city.id === ((_a = birth === null || birth === void 0 ? void 0 : birth.city) === null || _a === void 0 ? void 0 : _a.cityId);
|
|
979
1000
|
});
|
|
980
1001
|
state.data.individualPersonalData.placeOfBirthCity = selectedCity;
|
|
981
1002
|
}
|
|
@@ -1140,6 +1161,20 @@ export var individualSlice = createSlice({
|
|
|
1140
1161
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
1141
1162
|
state.error = action.error.message;
|
|
1142
1163
|
state.loading = false;
|
|
1164
|
+
})
|
|
1165
|
+
.addCase(retrieveBoardStatus.pending, function (state) {
|
|
1166
|
+
state.error = null;
|
|
1167
|
+
state.loading = true;
|
|
1168
|
+
})
|
|
1169
|
+
.addCase(retrieveBoardStatus.fulfilled, function (state, action) {
|
|
1170
|
+
state.error = null;
|
|
1171
|
+
state.loading = false;
|
|
1172
|
+
var flows = action.payload.flows;
|
|
1173
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
1174
|
+
})
|
|
1175
|
+
.addCase(retrieveBoardStatus.rejected, function (state, action) {
|
|
1176
|
+
state.error = action.error.message;
|
|
1177
|
+
state.loading = false;
|
|
1143
1178
|
})
|
|
1144
1179
|
.addCase(checkEmailAvailability.fulfilled, function (state, action) {
|
|
1145
1180
|
var _a;
|
|
@@ -12,6 +12,9 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
12
12
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
13
13
|
data: any;
|
|
14
14
|
}, void, {}>;
|
|
15
|
+
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
16
|
+
flows: any;
|
|
17
|
+
}, void, {}>;
|
|
15
18
|
export declare const retrieveEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
16
19
|
data: any;
|
|
17
20
|
}, string, {}>;
|
|
@@ -49,7 +49,7 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
|
|
52
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep } from '../../../app/settings';
|
|
53
53
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -68,12 +68,12 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
68
68
|
case 1:
|
|
69
69
|
data = (_e.sent()).data;
|
|
70
70
|
boardData = undefined;
|
|
71
|
-
if (((_b = data.errors) === null || _b === void 0 ? void 0 : _b.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
71
|
+
if (((_b = data === null || data === void 0 ? void 0 : data.errors) === null || _b === void 0 ? void 0 : _b.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
72
72
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
73
73
|
if (isInternally)
|
|
74
74
|
data.step_name = TAX_STEP_NAMES.TAX_INFO;
|
|
75
|
-
if (!data.id) return [3, 3];
|
|
76
|
-
return [4, API.boardService.retrieveBoardDetails(data
|
|
75
|
+
if (!(data === null || data === void 0 ? void 0 : data.id)) return [3, 3];
|
|
76
|
+
return [4, API.boardService.retrieveBoardDetails(data.id)];
|
|
77
77
|
case 2:
|
|
78
78
|
boardData = _e.sent();
|
|
79
79
|
_e.label = 3;
|
|
@@ -113,6 +113,21 @@ export var resendOTP = createAsyncThunk('resendOTPTax', function (params, thunkA
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}); });
|
|
116
|
+
export var retrieveBoardStatus = createAsyncThunk('tax/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
+
var tax, board_id, data;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
switch (_a.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
tax = thunkApi.getState().tax;
|
|
122
|
+
board_id = (tax.data.verify.responseBody || {}).board_id;
|
|
123
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
124
|
+
case 1:
|
|
125
|
+
data = _a.sent();
|
|
126
|
+
thunkApi.dispatch(handlePrevScreenStep());
|
|
127
|
+
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}); });
|
|
116
131
|
export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', function (entityID) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
132
|
var data;
|
|
118
133
|
return __generator(this, function (_a) {
|
|
@@ -361,6 +376,20 @@ export var taxSlice = createSlice({
|
|
|
361
376
|
.addCase(retrieveEntityInfo.rejected, function (state, action) {
|
|
362
377
|
state.error = action.error.message;
|
|
363
378
|
state.loading = false;
|
|
379
|
+
})
|
|
380
|
+
.addCase(retrieveBoardStatus.pending, function (state) {
|
|
381
|
+
state.error = null;
|
|
382
|
+
state.loading = true;
|
|
383
|
+
})
|
|
384
|
+
.addCase(retrieveBoardStatus.fulfilled, function (state, action) {
|
|
385
|
+
state.error = null;
|
|
386
|
+
state.loading = false;
|
|
387
|
+
var flows = action.payload.flows;
|
|
388
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
389
|
+
})
|
|
390
|
+
.addCase(retrieveBoardStatus.rejected, function (state, action) {
|
|
391
|
+
state.error = action.error.message;
|
|
392
|
+
state.loading = false;
|
|
364
393
|
})
|
|
365
394
|
.addCase(updateLeadSuccess.fulfilled, function (state, action) {
|
|
366
395
|
var _a;
|
|
@@ -33,7 +33,6 @@ import { findOrCreateElementAndInject } from '../../utils';
|
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { BANK_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { bankFeatureScreens } from '../featuresScreens';
|
|
36
|
-
import CustomFooter from '../shared/Footer';
|
|
37
36
|
import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
|
|
38
37
|
import Background from '../shared/Background';
|
|
39
38
|
var Bank = memo(function (_a) {
|
|
@@ -44,7 +43,7 @@ var Bank = memo(function (_a) {
|
|
|
44
43
|
useAppConfig(__assign(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
45
44
|
useErrorListener(bankError || error);
|
|
46
45
|
useStepStartedListener();
|
|
47
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation;
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
48
47
|
useVerifyToken({
|
|
49
48
|
verify: verifyLeadToken,
|
|
50
49
|
loadingScreenName: 'BANK_LOADING_DATA_STEP',
|
|
@@ -54,11 +53,11 @@ var Bank = memo(function (_a) {
|
|
|
54
53
|
settingLoading: settingLoading
|
|
55
54
|
});
|
|
56
55
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
57
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm',
|
|
56
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
58
57
|
var Element = _a.element, name = _a.name;
|
|
59
58
|
var isActive = activeScreen.name === name;
|
|
60
59
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
61
|
-
}) }) })) })) })));
|
|
60
|
+
}) })) })) })) })));
|
|
62
61
|
});
|
|
63
62
|
export function BankElement(props) {
|
|
64
63
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Bank, __assign({}, props)) })));
|
|
@@ -24,9 +24,9 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
24
24
|
import { useLanguage } from '../../../../hooks';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
26
|
import { BusinessType, DocumentPurpose } from '../../../../@types';
|
|
27
|
-
import { bankSelector, clearError, createBankAccount } from '../../../app/bank/bankStore';
|
|
27
|
+
import { bankSelector, clearError, createBankAccount, retrieveBoardStatus } from '../../../app/bank/bankStore';
|
|
28
28
|
import Form from '../../../../components/Form';
|
|
29
|
-
import {
|
|
29
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
30
30
|
import ConfirmPolicy from './ConfirmPolicy';
|
|
31
31
|
import BankStatement from './BankStatement';
|
|
32
32
|
import { getFileDetailsFromDocument, isKW, isStringMasked } from '../../../../utils';
|
|
@@ -49,7 +49,7 @@ var BankDetails = function () {
|
|
|
49
49
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
50
50
|
var _f = data.bankData, iban = _f.iban, beneficiaryName = _f.beneficiaryName, bankName = _f.bankName, bankStatementId = _f.bankStatementId, bankStatementUploading = _f.uploading, confirmPolicy = _f.confirmPolicy;
|
|
51
51
|
var verify = data.verify;
|
|
52
|
-
var _g = verify.responseBody || {}, bank_account = _g.bank_account, entity = _g.entity;
|
|
52
|
+
var _g = verify.responseBody || {}, bank_account = _g.bank_account, entity = _g.entity, flows = _g.flows;
|
|
53
53
|
var isKWCountry = React.useMemo(function () { return isKW(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
54
54
|
var isFL = ((_a = entity === null || entity === void 0 ? void 0 : entity.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === BusinessType.FL ? true : false;
|
|
55
55
|
var bankHasDocument = ((_c = (_b = bank_account === null || bank_account === void 0 ? void 0 : bank_account.document) === null || _b === void 0 ? void 0 : _b.file_details) === null || _c === void 0 ? void 0 : _c.length) > 0;
|
|
@@ -73,7 +73,11 @@ var BankDetails = function () {
|
|
|
73
73
|
var t = useTranslation().t;
|
|
74
74
|
var isAr = useLanguage().isAr;
|
|
75
75
|
var onBack = function () {
|
|
76
|
-
|
|
76
|
+
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
|
|
77
|
+
dispatch(handlePrevScreenStep());
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
dispatch(retrieveBoardStatus());
|
|
77
81
|
};
|
|
78
82
|
var disabled = ibanChecking || !methods.formState.isValid || !!error || bankStatementUploading;
|
|
79
83
|
React.useEffect(function () {
|
|
@@ -95,6 +99,6 @@ var BankDetails = function () {
|
|
|
95
99
|
'is_acknowledged'
|
|
96
100
|
]);
|
|
97
101
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
98
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, { readOnly: readOnly['beneficiaryName'] || noneEditable['beneficiary_name'] }), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking, readOnly: readOnly['iban'] || noneEditable['iban'] }), _jsx(BankName, { readOnly: readOnly['bankName'] || noneEditable['bank_name'] }), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument, defaultFiles: defaultBankFiles, readOnly: readOnly['bankStatementId'] || noneEditable['bank_statement_file_id'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_acknowledged'] }), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled,
|
|
102
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, { readOnly: readOnly['beneficiaryName'] || noneEditable['beneficiary_name'] }), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking, readOnly: readOnly['iban'] || noneEditable['iban'] }), _jsx(BankName, { readOnly: readOnly['bankName'] || noneEditable['bank_name'] }), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument, defaultFiles: defaultBankFiles, readOnly: readOnly['bankStatementId'] || noneEditable['bank_statement_file_id'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_acknowledged'] }), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
99
103
|
};
|
|
100
104
|
export default BankDetails;
|
|
@@ -17,7 +17,6 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import Box from '@mui/material/Box/Box';
|
|
19
19
|
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
21
20
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
22
21
|
import { maskPhone } from '../../../../utils';
|
|
23
22
|
import Form from '../../../../components/Form';
|
|
@@ -69,10 +68,7 @@ var VerifyNumber = function (_a) {
|
|
|
69
68
|
var onSubmit = function (formData) {
|
|
70
69
|
dispatch(verifyBankLeadOTP(formData));
|
|
71
70
|
};
|
|
72
|
-
var onBack = function () {
|
|
73
|
-
dispatch(handlePrevScreenStep());
|
|
74
|
-
};
|
|
75
71
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true,
|
|
72
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
77
73
|
};
|
|
78
74
|
export default React.memo(VerifyNumber);
|
|
@@ -33,7 +33,6 @@ import { findOrCreateElementAndInject } from '../../utils';
|
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { BRAND_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { brandFeatureScreens } from '../featuresScreens';
|
|
36
|
-
import CustomFooter from '../shared/Footer';
|
|
37
36
|
import { brandSelector, verifyLeadToken } from '../app/brand/brandStore';
|
|
38
37
|
import Background from '../shared/Background';
|
|
39
38
|
var Brand = memo(function (_a) {
|
|
@@ -44,7 +43,7 @@ var Brand = memo(function (_a) {
|
|
|
44
43
|
useAppConfig(__assign(__assign({ navigation: BRAND_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
45
44
|
useErrorListener(brandError || error);
|
|
46
45
|
useStepStartedListener();
|
|
47
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation;
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
48
47
|
useVerifyToken({
|
|
49
48
|
verify: verifyLeadToken,
|
|
50
49
|
loadingScreenName: 'BRAND_LOADING_DATA_STEP',
|
|
@@ -54,11 +53,11 @@ var Brand = memo(function (_a) {
|
|
|
54
53
|
settingLoading: settingLoading
|
|
55
54
|
});
|
|
56
55
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
57
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm',
|
|
56
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
58
57
|
var Element = _a.element, name = _a.name;
|
|
59
58
|
var isActive = activeScreen.name === name;
|
|
60
59
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
61
|
-
}) }) })) })) })));
|
|
60
|
+
}) })) })) })) })));
|
|
62
61
|
});
|
|
63
62
|
export function BrandElement(props) {
|
|
64
63
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Brand, __assign({}, props)) })));
|