@tap-payments/auth-jsconnect 2.3.2 → 2.3.3
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/app/settings.js +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +6 -4
- package/build/components/ArabicDatePicker/style.css +2 -1
- package/build/features/app/bank/bankStore.js +17 -9
- package/build/features/app/brand/brandStore.js +25 -17
- package/build/features/app/business/businessStore.js +47 -39
- package/build/features/app/entity/entityStore.js +29 -21
- package/build/features/app/individual/individualStore.js +61 -51
- package/build/features/app/password/passwordStore.js +18 -10
- package/build/features/app/tax/taxStore.js +28 -20
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +1 -1
- package/build/features/connect/Connect.d.ts +1 -0
- package/build/features/connect/Connect.js +9 -5
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +1 -0
- package/build/features/entity/screens/EntityCapital/ActivityList.js +5 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +1 -1
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.js +6 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -1
- package/build/features/entity/screens/EntityName/IssuingDate.js +2 -1
- package/build/features/entity/screens/EntityName/LegalName.js +1 -1
- package/package.json +1 -1
|
@@ -69,16 +69,16 @@ var _a;
|
|
|
69
69
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
70
|
import API from '../../../api';
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
|
-
import { handleNextScreenStep, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
72
|
+
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, 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, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType } 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, boardInfoStatus, countries, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry, individuals, _c, is_authorized, data_state;
|
|
79
|
-
var _d, _e, _f, _g, _h, _j, _k;
|
|
80
|
-
return __generator(this, function (
|
|
81
|
-
switch (
|
|
78
|
+
var payload, settings, data, boardData, individualData, countryCode, boardInfoData, boardInfoStatus, countries, publicKey, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry, individuals, _c, is_authorized, data_state;
|
|
79
|
+
var _d, _e, _f, _g, _h, _j, _k, _l;
|
|
80
|
+
return __generator(this, function (_m) {
|
|
81
|
+
switch (_m.label) {
|
|
82
82
|
case 0:
|
|
83
83
|
payload = {
|
|
84
84
|
service_name: 'tap_email',
|
|
@@ -87,7 +87,7 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
87
87
|
settings = thunkApi.getState().settings;
|
|
88
88
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
89
89
|
case 1:
|
|
90
|
-
data = (
|
|
90
|
+
data = (_m.sent()).data;
|
|
91
91
|
boardInfoStatus = undefined;
|
|
92
92
|
countries = settings.data.countries;
|
|
93
93
|
if (((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
@@ -98,6 +98,10 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
98
98
|
countryCode = data === null || data === void 0 ? void 0 : data.country_code;
|
|
99
99
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
100
100
|
}
|
|
101
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
102
|
+
if (publicKey) {
|
|
103
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
104
|
+
}
|
|
101
105
|
if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 2];
|
|
102
106
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
103
107
|
return [3, 16];
|
|
@@ -108,54 +112,54 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
108
112
|
if (!(board_id && board_info_id)) return [3, 5];
|
|
109
113
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
110
114
|
case 3:
|
|
111
|
-
boardInfoData =
|
|
115
|
+
boardInfoData = _m.sent();
|
|
112
116
|
notification = (boardInfoData || {}).notification;
|
|
113
117
|
_b = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _b.id, type = _b.type;
|
|
114
118
|
if (!(id && type)) return [3, 5];
|
|
115
119
|
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
116
120
|
case 4:
|
|
117
|
-
data_1 = (
|
|
121
|
+
data_1 = (_m.sent()).data;
|
|
118
122
|
individualData = data_1 || {};
|
|
119
|
-
|
|
123
|
+
_m.label = 5;
|
|
120
124
|
case 5:
|
|
121
125
|
if (!board_id) return [3, 7];
|
|
122
126
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
123
127
|
case 6:
|
|
124
|
-
boardData =
|
|
125
|
-
|
|
128
|
+
boardData = _m.sent();
|
|
129
|
+
_m.label = 7;
|
|
126
130
|
case 7:
|
|
127
131
|
if (!countryCode) {
|
|
128
|
-
countryCode = (
|
|
132
|
+
countryCode = (_f = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _f === void 0 ? void 0 : _f.country;
|
|
129
133
|
if (countryCode)
|
|
130
134
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
131
135
|
}
|
|
132
136
|
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
|
|
133
|
-
if (!((
|
|
134
|
-
return [4, thunkApi.dispatch(getIndividualList((
|
|
137
|
+
if (!((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id)) return [3, 9];
|
|
138
|
+
return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id))];
|
|
135
139
|
case 8:
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
_m.sent();
|
|
141
|
+
_m.label = 9;
|
|
138
142
|
case 9: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
139
143
|
case 10:
|
|
140
|
-
boardInfoStatus =
|
|
144
|
+
boardInfoStatus = _m.sent();
|
|
141
145
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
142
146
|
return [3, 14];
|
|
143
147
|
case 11:
|
|
144
|
-
birthCountry = ((
|
|
148
|
+
birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
|
|
145
149
|
if (!birthCountry) return [3, 13];
|
|
146
150
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
147
151
|
case 12:
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
_m.sent();
|
|
153
|
+
_m.label = 13;
|
|
150
154
|
case 13:
|
|
151
155
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
152
|
-
|
|
156
|
+
_m.label = 14;
|
|
153
157
|
case 14: return [3, 16];
|
|
154
158
|
case 15:
|
|
155
159
|
if (isUpdatePhoneInfo) {
|
|
156
160
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
|
|
157
161
|
}
|
|
158
|
-
|
|
162
|
+
_m.label = 16;
|
|
159
163
|
case 16:
|
|
160
164
|
individuals = (boardData || {}).individuals;
|
|
161
165
|
_c = individualData || {}, is_authorized = _c.is_authorized, data_state = _c.data_state;
|
|
@@ -167,8 +171,8 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
167
171
|
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
168
172
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
169
173
|
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
170
|
-
name: (
|
|
171
|
-
contact: (
|
|
174
|
+
name: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.names,
|
|
175
|
+
contact: (_l = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _l === void 0 ? void 0 : _l.contact,
|
|
172
176
|
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
173
177
|
countries: countries,
|
|
174
178
|
countryCode: countryCode,
|
|
@@ -419,10 +423,10 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetai
|
|
|
419
423
|
});
|
|
420
424
|
}); });
|
|
421
425
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
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, individuals, _d, is_authorized, data_state;
|
|
423
|
-
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
424
|
-
return __generator(this, function (
|
|
425
|
-
switch (
|
|
426
|
+
var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, boardInfoStatus, publicKey, countryCode, notification, _c, id, type, data_3, birthCountry, individuals, _d, is_authorized, data_state;
|
|
427
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
428
|
+
return __generator(this, function (_r) {
|
|
429
|
+
switch (_r.label) {
|
|
426
430
|
case 0:
|
|
427
431
|
_a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
|
|
428
432
|
responseBody = individual.data.verify.responseBody;
|
|
@@ -437,55 +441,59 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
437
441
|
};
|
|
438
442
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
439
443
|
case 1:
|
|
440
|
-
data = (
|
|
444
|
+
data = (_r.sent()).data;
|
|
441
445
|
boardInfoStatus = undefined;
|
|
442
446
|
if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
|
|
443
447
|
throw new Error(data.errors[0].description);
|
|
448
|
+
publicKey = (_g = data === null || data === void 0 ? void 0 : data.config) === null || _g === void 0 ? void 0 : _g.public_key;
|
|
449
|
+
if (publicKey) {
|
|
450
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
451
|
+
}
|
|
444
452
|
if (!board_id) return [3, 3];
|
|
445
453
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
446
454
|
case 2:
|
|
447
|
-
boardData =
|
|
448
|
-
|
|
455
|
+
boardData = _r.sent();
|
|
456
|
+
_r.label = 3;
|
|
449
457
|
case 3:
|
|
450
|
-
countryCode = (
|
|
458
|
+
countryCode = (_h = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _h === void 0 ? void 0 : _h.country;
|
|
451
459
|
if (!(board_id && board_info_id)) return [3, 6];
|
|
452
460
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
453
461
|
case 4:
|
|
454
|
-
boardInfoData =
|
|
462
|
+
boardInfoData = _r.sent();
|
|
455
463
|
notification = (boardInfoData || {}).notification;
|
|
456
464
|
_c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
|
|
457
465
|
if (!(id && type)) return [3, 6];
|
|
458
466
|
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
459
467
|
case 5:
|
|
460
|
-
data_3 = (
|
|
468
|
+
data_3 = (_r.sent()).data;
|
|
461
469
|
individualData = data_3 || {};
|
|
462
|
-
|
|
470
|
+
_r.label = 6;
|
|
463
471
|
case 6:
|
|
464
472
|
if (countryCode)
|
|
465
473
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
466
474
|
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
|
|
467
|
-
if (!((
|
|
468
|
-
return [4, thunkApi.dispatch(getIndividualList((
|
|
475
|
+
if (!((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id)) return [3, 8];
|
|
476
|
+
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id))];
|
|
469
477
|
case 7:
|
|
470
|
-
|
|
471
|
-
|
|
478
|
+
_r.sent();
|
|
479
|
+
_r.label = 8;
|
|
472
480
|
case 8: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
473
481
|
case 9:
|
|
474
|
-
boardInfoStatus =
|
|
482
|
+
boardInfoStatus = _r.sent();
|
|
475
483
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
476
484
|
return [3, 13];
|
|
477
485
|
case 10:
|
|
478
|
-
birthCountry = ((
|
|
486
|
+
birthCountry = ((_l = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _l === void 0 ? void 0 : _l.country) || countryCode;
|
|
479
487
|
if (!birthCountry) return [3, 12];
|
|
480
488
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
481
489
|
case 11:
|
|
482
|
-
|
|
483
|
-
|
|
490
|
+
_r.sent();
|
|
491
|
+
_r.label = 12;
|
|
484
492
|
case 12:
|
|
485
493
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
486
|
-
|
|
494
|
+
_r.label = 13;
|
|
487
495
|
case 13:
|
|
488
|
-
(
|
|
496
|
+
(_o = (_m = settings.data.appConfig).onStepCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, settings.data.activeScreen.name, { otp: params.otp });
|
|
489
497
|
individuals = (boardData || {}).individuals;
|
|
490
498
|
_d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
|
|
491
499
|
return [2, {
|
|
@@ -496,8 +504,8 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
496
504
|
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
497
505
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
498
506
|
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
499
|
-
name: (
|
|
500
|
-
contact: (
|
|
507
|
+
name: (_p = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _p === void 0 ? void 0 : _p.names,
|
|
508
|
+
contact: (_q = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _q === void 0 ? void 0 : _q.contact,
|
|
501
509
|
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
502
510
|
countries: countries,
|
|
503
511
|
countryCode: countryCode,
|
|
@@ -545,7 +553,7 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
|
|
|
545
553
|
export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
|
|
546
554
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
547
555
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
548
|
-
var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, name, email, mobile,
|
|
556
|
+
var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, countryCode, name, email, mobile, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, data_status, userName, identification_id_type, isGenderNonEditable, isNameENNonEditable, isNameARNonEditable, isEmailNonEditable, isMobileNumberNonEditable, isMobileCountryNonEditable, isNidNonEditable, isIssuedCountryNonEditable, isExpiryNonEditable, isIdTypeNonEditable, isNationalityNonEditable, isDOBNonEditable, isBirthCityNonEditable, isBirthCountryNonEditable, hasContact, hasPhone, hasIdentification, hasBirth, nameIsEditable, contact, requestBody, data, _e, isUser, isBuyer, isUserORBuyerType;
|
|
549
557
|
var _f, _g, _h, _j, _k;
|
|
550
558
|
return __generator(this, function (_l) {
|
|
551
559
|
switch (_l.label) {
|
|
@@ -554,7 +562,8 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
554
562
|
_c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user, entity = _c.entity;
|
|
555
563
|
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
|
|
556
564
|
_d = user || {}, objects = _d.objects, ids = _d.ids;
|
|
557
|
-
|
|
565
|
+
countryCode = (originalFormData || {}).countryCode;
|
|
566
|
+
name = formData.name, email = formData.email, mobile = formData.mobile, gender = formData.gender, nid = formData.nid, issuedCountry = formData.issuedCountry, expiryDate = formData.expiryDate, dob = formData.dob, placeOfBirthCountry = formData.placeOfBirthCountry, placeOfBirthCity = formData.placeOfBirthCity, nationality = formData.nationality;
|
|
558
567
|
code = entity === null || entity === void 0 ? void 0 : entity.country;
|
|
559
568
|
data_status = (user || {}).data_status;
|
|
560
569
|
userName = getUserNameObject(name);
|
|
@@ -573,13 +582,14 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
573
582
|
isDOBNonEditable = hasNoneEditableValue(data_status, 'birth.date');
|
|
574
583
|
isBirthCityNonEditable = hasNoneEditableValue(data_status, 'birth.city');
|
|
575
584
|
isBirthCountryNonEditable = hasNoneEditableValue(data_status, 'birth.country');
|
|
576
|
-
hasContact = email || mobile
|
|
585
|
+
hasContact = email || mobile;
|
|
577
586
|
hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
|
|
578
587
|
hasIdentification = nid && (issuedCountry || identification_id_type || expiryDate);
|
|
579
588
|
hasBirth = placeOfBirthCity || placeOfBirthCountry;
|
|
580
589
|
nameIsEditable = userName.first && !(isNameENNonEditable && isNameARNonEditable);
|
|
581
590
|
contact = hasContact && !(isEmailNonEditable && isMobileCountryNonEditable && isMobileNumberNonEditable)
|
|
582
|
-
? __assign({ email: isEmailNonEditable ? undefined : email }, (!(
|
|
591
|
+
? __assign({ email: isEmailNonEditable ? undefined : email }, (!(isMobileCountryNonEditable && isMobileNumberNonEditable) &&
|
|
592
|
+
hasPhone && {
|
|
583
593
|
phone: {
|
|
584
594
|
country_code: isMobileCountryNonEditable ? undefined : (_h = countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
585
595
|
number: isMobileNumberNonEditable || !mobile ? undefined : mobile
|
|
@@ -49,11 +49,11 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
52
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
53
53
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { retrieveIndividualData } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
var payload, data, boardStatusData, boardInfoData, boardData, individualData, _a, board_id, board_info_id, _b, id_1, type_1, serviceCallBack, _c, boardRes, individualRes, countryIso2, info, hasPasswordCompleted;
|
|
56
|
+
var payload, data, boardStatusData, boardInfoData, boardData, individualData, _a, board_id, board_info_id, config, publicKey, _b, id_1, type_1, serviceCallBack, _c, boardRes, individualRes, countryIso2, info, hasPasswordCompleted;
|
|
57
57
|
var _d, _e, _f, _g, _h;
|
|
58
58
|
return __generator(this, function (_j) {
|
|
59
59
|
switch (_j.label) {
|
|
@@ -67,7 +67,11 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
|
|
|
67
67
|
data = (_j.sent()).data;
|
|
68
68
|
individualData = undefined;
|
|
69
69
|
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 8];
|
|
70
|
-
_a = data || {}, board_id = _a.id, board_info_id = _a.board_info_id;
|
|
70
|
+
_a = data || {}, board_id = _a.id, board_info_id = _a.board_info_id, config = _a.config;
|
|
71
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
72
|
+
if (publicKey) {
|
|
73
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
74
|
+
}
|
|
71
75
|
if (!board_id) return [3, 7];
|
|
72
76
|
if (!board_info_id) return [3, 3];
|
|
73
77
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
@@ -145,10 +149,10 @@ export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails
|
|
|
145
149
|
});
|
|
146
150
|
}); });
|
|
147
151
|
export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
148
|
-
var _a, password, settings, responseBody, payload, data, flows, hasPasswordCompleted;
|
|
149
|
-
var _b, _c, _d, _e;
|
|
150
|
-
return __generator(this, function (
|
|
151
|
-
switch (
|
|
152
|
+
var _a, password, settings, responseBody, payload, data, publicKey, flows, hasPasswordCompleted;
|
|
153
|
+
var _b, _c, _d, _e, _f;
|
|
154
|
+
return __generator(this, function (_g) {
|
|
155
|
+
switch (_g.label) {
|
|
152
156
|
case 0:
|
|
153
157
|
_a = thunkApi.getState(), password = _a.password, settings = _a.settings;
|
|
154
158
|
responseBody = password.data.verify.responseBody;
|
|
@@ -161,11 +165,15 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
|
|
|
161
165
|
};
|
|
162
166
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
163
167
|
case 1:
|
|
164
|
-
data = (
|
|
168
|
+
data = (_g.sent()).data;
|
|
165
169
|
if (!data.errors) {
|
|
166
|
-
|
|
170
|
+
publicKey = (_c = data === null || data === void 0 ? void 0 : data.config) === null || _c === void 0 ? void 0 : _c.public_key;
|
|
171
|
+
if (publicKey) {
|
|
172
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
173
|
+
}
|
|
174
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
167
175
|
flows = (responseBody || {}).flows;
|
|
168
|
-
hasPasswordCompleted = ((
|
|
176
|
+
hasPasswordCompleted = ((_f = flows === null || flows === void 0 ? void 0 : flows.find(function (flow) { return flow.name === 'password'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
|
|
169
177
|
if (hasPasswordCompleted) {
|
|
170
178
|
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
171
179
|
}
|
|
@@ -49,16 +49,16 @@ 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, handlePrevScreenStep } from '../../../app/settings';
|
|
52
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep, handlePublicKey } from '../../../app/settings';
|
|
53
53
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, retrieveIndividualData, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data, boardData, boardInfoData, individualData, _b, id_1, type_1, serviceCallBack, _c, boardRes, individualRes, countryIso2;
|
|
59
|
-
var _d, _e, _f, _g;
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
switch (
|
|
58
|
+
var payload, data, boardData, boardInfoData, individualData, publicKey, _b, id_1, type_1, serviceCallBack, _c, boardRes, individualRes, countryIso2;
|
|
59
|
+
var _d, _e, _f, _g, _h;
|
|
60
|
+
return __generator(this, function (_j) {
|
|
61
|
+
switch (_j.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
payload = {
|
|
64
64
|
service_name: 'tap_email',
|
|
@@ -66,31 +66,35 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
66
66
|
};
|
|
67
67
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
68
68
|
case 1:
|
|
69
|
-
data = (
|
|
69
|
+
data = (_j.sent()).data;
|
|
70
70
|
individualData = undefined;
|
|
71
71
|
if (((_d = data === null || data === void 0 ? void 0 : data.errors) === null || _d === void 0 ? void 0 : _d.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
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
76
|
+
if (publicKey) {
|
|
77
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
78
|
+
}
|
|
75
79
|
if (!(data === null || data === void 0 ? void 0 : data.id)) return [3, 6];
|
|
76
80
|
if (!data.board_info_id) return [3, 3];
|
|
77
81
|
return [4, API.boardService.retrieveBoardInfo({ id: data.id, infoId: data.board_info_id })];
|
|
78
82
|
case 2:
|
|
79
|
-
boardInfoData =
|
|
80
|
-
|
|
83
|
+
boardInfoData = _j.sent();
|
|
84
|
+
_j.label = 3;
|
|
81
85
|
case 3: return [4, API.boardService.retrieveBoardDetails(data.id)];
|
|
82
86
|
case 4:
|
|
83
|
-
boardData =
|
|
84
|
-
_b = ((
|
|
87
|
+
boardData = _j.sent();
|
|
88
|
+
_b = ((_f = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _f === void 0 ? void 0 : _f.recipient) || {}, id_1 = _b.id, type_1 = _b.type;
|
|
85
89
|
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
|
|
86
90
|
return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
|
|
87
91
|
case 5:
|
|
88
|
-
_c =
|
|
92
|
+
_c = _j.sent(), boardRes = _c.boardRes, individualRes = _c.individualRes;
|
|
89
93
|
boardData = boardRes;
|
|
90
94
|
individualData = individualRes;
|
|
91
|
-
|
|
95
|
+
_j.label = 6;
|
|
92
96
|
case 6:
|
|
93
|
-
countryIso2 = (
|
|
97
|
+
countryIso2 = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.country;
|
|
94
98
|
if (countryIso2)
|
|
95
99
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
96
100
|
if (data.step_name === TAX_STEP_NAMES.PHONE_AUTH) {
|
|
@@ -102,7 +106,7 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
102
106
|
return [2, {
|
|
103
107
|
data: data,
|
|
104
108
|
individualData: individualData,
|
|
105
|
-
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (
|
|
109
|
+
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _h === void 0 ? void 0 : _h.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business, notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification }),
|
|
106
110
|
token: token
|
|
107
111
|
}];
|
|
108
112
|
}
|
|
@@ -153,10 +157,10 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', functi
|
|
|
153
157
|
});
|
|
154
158
|
}); });
|
|
155
159
|
export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
156
|
-
var _a, tax, settings, responseBody, payload, data;
|
|
157
|
-
var _b, _c, _d, _e;
|
|
158
|
-
return __generator(this, function (
|
|
159
|
-
switch (
|
|
160
|
+
var _a, tax, settings, responseBody, payload, data, publicKey;
|
|
161
|
+
var _b, _c, _d, _e, _f;
|
|
162
|
+
return __generator(this, function (_g) {
|
|
163
|
+
switch (_g.label) {
|
|
160
164
|
case 0:
|
|
161
165
|
_a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
|
|
162
166
|
responseBody = tax.data.verify.responseBody;
|
|
@@ -169,10 +173,14 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
169
173
|
};
|
|
170
174
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
171
175
|
case 1:
|
|
172
|
-
data = (
|
|
176
|
+
data = (_g.sent()).data;
|
|
173
177
|
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
174
178
|
throw new Error(data.errors[0].description);
|
|
175
|
-
|
|
179
|
+
publicKey = (_d = data === null || data === void 0 ? void 0 : data.config) === null || _d === void 0 ? void 0 : _d.public_key;
|
|
180
|
+
if (publicKey) {
|
|
181
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
182
|
+
}
|
|
183
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
|
|
176
184
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
|
|
177
185
|
return [2, { data: data, formData: params }];
|
|
178
186
|
}
|
|
@@ -125,7 +125,7 @@ var ExpectedSalesRange = function (_a) {
|
|
|
125
125
|
}, [anchorEl, expectedSalesRangeValue]);
|
|
126
126
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('expected_sales_monthly', {
|
|
127
127
|
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
128
|
-
}),
|
|
128
|
+
}), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(InputStyled, { readOnly: readOnly, value: isAr ? (_b = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.en) !== null && _c !== void 0 ? _c : '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
|
|
129
129
|
var isOnlyOneItem = !item.sub || item.sub.length === 1;
|
|
130
130
|
if (isOnlyOneItem)
|
|
131
131
|
onSelectItem(item);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface ConnectLibProps extends LibConfig {
|
|
4
4
|
configToken?: string;
|
|
5
|
+
leadId?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function ConnectElement(props: ConnectLibProps): JSX.Element;
|
|
7
8
|
export declare function renderConnectLib(config: ConnectLibProps, elementId: string): {
|
|
@@ -63,16 +63,17 @@ import Background from '../shared/Background';
|
|
|
63
63
|
var Connect = memo(function (props) {
|
|
64
64
|
var theme = useAppTheme().theme;
|
|
65
65
|
var dispatch = useAppDispatch();
|
|
66
|
+
var leadId = props.leadId, configToken = props.configToken;
|
|
66
67
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
67
68
|
var _b = useAppSelector(connectSelector), connectError = _b.error, loading = _b.loading, customLoading = _b.customLoading;
|
|
68
69
|
var onVerifyConfigTokenSuccess = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
-
var
|
|
70
|
+
var id;
|
|
70
71
|
return __generator(this, function (_a) {
|
|
71
72
|
switch (_a.label) {
|
|
72
73
|
case 0:
|
|
73
|
-
|
|
74
|
-
if (!
|
|
75
|
-
return [4, dispatch(retrieveLead(
|
|
74
|
+
id = (data === null || data === void 0 ? void 0 : data.lead_id) || leadId;
|
|
75
|
+
if (!id) return [3, 2];
|
|
76
|
+
return [4, dispatch(retrieveLead(id))];
|
|
76
77
|
case 1:
|
|
77
78
|
_a.sent();
|
|
78
79
|
_a.label = 2;
|
|
@@ -80,7 +81,7 @@ var Connect = memo(function (props) {
|
|
|
80
81
|
}
|
|
81
82
|
});
|
|
82
83
|
}); };
|
|
83
|
-
useAppConfig(__assign(__assign(__assign({ navigation: CONNECT_SCREENS_NAVIGATION, maturity: 'full' }, props), { configToken:
|
|
84
|
+
useAppConfig(__assign(__assign(__assign({ navigation: CONNECT_SCREENS_NAVIGATION, maturity: 'full' }, props), { configToken: configToken }), (configToken && { onVerifyConfigTokenSuccess: onVerifyConfigTokenSuccess })));
|
|
84
85
|
useErrorListener(connectError || error, {
|
|
85
86
|
event: 'Send Event',
|
|
86
87
|
event_category: 'User Registration Flow',
|
|
@@ -96,6 +97,9 @@ var Connect = memo(function (props) {
|
|
|
96
97
|
if (!settingLoading) {
|
|
97
98
|
if (isKW((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2))
|
|
98
99
|
dispatch(handleCurrentActiveScreen('CONNECT_MOBILE_STEP'));
|
|
100
|
+
if (leadId && !configToken) {
|
|
101
|
+
dispatch(retrieveLead(leadId));
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
}, [settingLoading]);
|
|
101
105
|
React.useEffect(function () {
|
|
@@ -28,6 +28,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
28
28
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
29
29
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
30
30
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
31
|
+
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
31
32
|
interface ActivityListProps {
|
|
32
33
|
onListOpen?: () => void;
|
|
33
34
|
onListClose?: () => void;
|
|
@@ -85,6 +85,10 @@ var DivisionListStyled = styled((SimpleList))(function () { return ({
|
|
|
85
85
|
var ActivityListStyled = styled((SimpleList))(function () { return ({
|
|
86
86
|
height: 'fit-content'
|
|
87
87
|
}); });
|
|
88
|
+
export var MandatoryStyled = styled('span')(function (_a) {
|
|
89
|
+
var theme = _a.theme;
|
|
90
|
+
return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
|
|
91
|
+
});
|
|
88
92
|
var ActivityList = function (_a) {
|
|
89
93
|
var onListClose = _a.onListClose, onListOpen = _a.onListOpen, readOnly = _a.readOnly;
|
|
90
94
|
var _b = React.useState([]), activities = _b[0], setActivities = _b[1];
|
|
@@ -248,7 +252,7 @@ var ActivityList = function (_a) {
|
|
|
248
252
|
if (item)
|
|
249
253
|
setSubIndex(item.id);
|
|
250
254
|
}, [anchorEl, controlValue]);
|
|
251
|
-
return (_jsxs(ScreenContainer, { children: [
|
|
255
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('activities'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(InputStyled, { readOnly: readOnly, value: getSelectedActivities() || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_activities'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsxs(Collapse, __assign({ in: !!(controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) }, { children: [_jsx(SelectedInputStyled, { readOnly: readOnly, anchorEl: activityAnchorEl, value: t('selected_activities'), onClick: !!activityAnchorEl ? handleCloseActivityMenu : handleOpenActivityMenu, placeholder: t('choose_activities'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!activityAnchorEl }) }), _jsx(Collapse, __assign({ in: !!activityAnchorEl }, { children: _jsx(ActivityListStyled, { sx: { pt: 0, pb: 0 }, list: controlValue || [], onSelectItem: function (activity, e) {
|
|
252
256
|
e.stopPropagation();
|
|
253
257
|
onSelectItem(activity);
|
|
254
258
|
}, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (activity, idx) {
|
|
@@ -40,6 +40,6 @@ var CapitalPaid = function (_a) {
|
|
|
40
40
|
var error = (_b = capitalPaidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
41
41
|
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
|
|
42
42
|
currency: t(findCurrencyByIso2(countryCode))
|
|
43
|
-
}), onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
|
|
43
|
+
}), required: true, onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
|
|
44
44
|
};
|
|
45
45
|
export default React.memo(CapitalPaid);
|
|
@@ -35,6 +35,6 @@ var CapitalShareCount = function (_a) {
|
|
|
35
35
|
var capitalShareCountControl = useController({ control: control, name: 'capitalShareCount' });
|
|
36
36
|
var capitalShareCountValue = capitalShareCountControl.field.value;
|
|
37
37
|
var error = (_b = capitalShareCountControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
38
|
-
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_count_label'), onChange: handleChange, value: capitalShareCountValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_count_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareCountValue, isVerified: isVerified }) }) })));
|
|
38
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { required: true, readOnly: readOnly, label: t('capital_share_count_label'), onChange: handleChange, value: capitalShareCountValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_count_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareCountValue, isVerified: isVerified }) }) })));
|
|
39
39
|
};
|
|
40
40
|
export default React.memo(CapitalShareCount);
|
|
@@ -40,6 +40,6 @@ var CapitalShareValue = function (_a) {
|
|
|
40
40
|
var error = (_b = capitalShareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
41
41
|
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
|
|
42
42
|
currency: t(findCurrencyByIso2(countryCode))
|
|
43
|
-
}), onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
|
|
43
|
+
}), required: true, onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
|
|
44
44
|
};
|
|
45
45
|
export default React.memo(CapitalShareValue);
|
|
@@ -63,6 +63,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
63
63
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
64
64
|
isSelected: boolean;
|
|
65
65
|
}, {}, {}>;
|
|
66
|
+
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
66
67
|
export interface EntityTypeListProps {
|
|
67
68
|
onListOpen?: () => void;
|
|
68
69
|
onListClose?: () => void;
|