@tap-payments/auth-jsconnect 2.4.34-test → 2.4.37-test
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/features/app/bank/bankStore.js +1 -1
- package/build/features/app/business/businessStore.js +23 -22
- package/build/features/app/entity/entityStore.js +1 -1
- package/build/features/app/individual/individualStore.js +1 -1
- package/build/features/app/tax/taxStore.js +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +6 -1
- package/package.json +1 -1
|
@@ -98,7 +98,7 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_
|
|
|
98
98
|
thunkApi.dispatch(handleCurrentActiveScreen('BANK_VERIFY_STEP'));
|
|
99
99
|
}
|
|
100
100
|
else if (data.step_name === BANK_STEP_NAMES.BANK_INFO) {
|
|
101
|
-
|
|
101
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
102
102
|
}
|
|
103
103
|
return [2, {
|
|
104
104
|
data: data,
|
|
@@ -468,7 +468,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
468
468
|
});
|
|
469
469
|
}); });
|
|
470
470
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
471
|
-
var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, brandData, _c, message, error,
|
|
471
|
+
var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, brandData, brandRes, _c, message, error, list, documentData, entityData, entityId, documentBody, payload_1;
|
|
472
472
|
var _d, _e;
|
|
473
473
|
return __generator(this, function (_f) {
|
|
474
474
|
switch (_f.label) {
|
|
@@ -504,30 +504,31 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
504
504
|
brandData = undefined;
|
|
505
505
|
_f.label = 2;
|
|
506
506
|
case 2:
|
|
507
|
-
_f.trys.push([2,
|
|
507
|
+
_f.trys.push([2, 5, , 6]);
|
|
508
508
|
return [4, API.accountService.createAccount(accountBody)];
|
|
509
509
|
case 3:
|
|
510
510
|
accountData = _f.sent();
|
|
511
|
-
return [
|
|
511
|
+
return [4, API.brandService.retrieveBrand(brand === null || brand === void 0 ? void 0 : brand.id)];
|
|
512
512
|
case 4:
|
|
513
|
+
brandRes = (_f.sent()).brand;
|
|
514
|
+
brandData = brandRes;
|
|
515
|
+
return [3, 6];
|
|
516
|
+
case 5:
|
|
513
517
|
_c = _f.sent();
|
|
514
518
|
message = _c.message;
|
|
515
519
|
error = message;
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
case
|
|
524
|
-
case 7: return [3, 8];
|
|
525
|
-
case 8: return [4, API.dataService.getActivitiesIsIc()];
|
|
526
|
-
case 9:
|
|
520
|
+
if ((error === null || error === void 0 ? void 0 : error.toLowerCase()) === 'entity with license already exist') {
|
|
521
|
+
stepName = 'BUSINESS_VERIFY_BRAND_INFO';
|
|
522
|
+
}
|
|
523
|
+
else
|
|
524
|
+
throw new Error(error);
|
|
525
|
+
return [3, 6];
|
|
526
|
+
case 6: return [4, API.dataService.getActivitiesIsIc()];
|
|
527
|
+
case 7:
|
|
527
528
|
list = (_f.sent()).list;
|
|
528
529
|
entityData = undefined;
|
|
529
530
|
entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
|
|
530
|
-
if (!((certificateId || []).length > 0)) return [3,
|
|
531
|
+
if (!((certificateId || []).length > 0)) return [3, 9];
|
|
531
532
|
documentBody = {
|
|
532
533
|
entity_id: entityId || '',
|
|
533
534
|
documents: [
|
|
@@ -538,20 +539,20 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
538
539
|
]
|
|
539
540
|
};
|
|
540
541
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
541
|
-
case
|
|
542
|
+
case 8:
|
|
542
543
|
documentData = _f.sent();
|
|
543
|
-
_f.label =
|
|
544
|
-
case
|
|
545
|
-
if (!(articleId && entityId)) return [3,
|
|
544
|
+
_f.label = 9;
|
|
545
|
+
case 9:
|
|
546
|
+
if (!(articleId && entityId)) return [3, 11];
|
|
546
547
|
payload_1 = {
|
|
547
548
|
id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
|
|
548
549
|
AOA_file_id: articleId
|
|
549
550
|
};
|
|
550
551
|
return [4, API.entityService.updateEntity(payload_1)];
|
|
551
|
-
case
|
|
552
|
+
case 10:
|
|
552
553
|
entityData = _f.sent();
|
|
553
|
-
_f.label =
|
|
554
|
-
case
|
|
554
|
+
_f.label = 11;
|
|
555
|
+
case 11:
|
|
555
556
|
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
556
557
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
557
558
|
return [2, { data: __assign(__assign({}, data), { brand: brandData }), formData: params, accountData: accountData, documentData: documentData, entityData: entityData, isicActivityList: list || [] }];
|
|
@@ -124,7 +124,7 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
124
124
|
return [4, API.entityService.retrieveEntityType()];
|
|
125
125
|
case 9:
|
|
126
126
|
entityTypes = _j.sent();
|
|
127
|
-
|
|
127
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
128
128
|
_j.label = 10;
|
|
129
129
|
case 10: return [2, {
|
|
130
130
|
data: data,
|
|
@@ -148,7 +148,7 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
148
148
|
_l.sent();
|
|
149
149
|
_l.label = 13;
|
|
150
150
|
case 13:
|
|
151
|
-
|
|
151
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
152
152
|
_l.label = 14;
|
|
153
153
|
case 14: return [3, 16];
|
|
154
154
|
case 15:
|
|
@@ -97,7 +97,7 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
97
97
|
thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
|
|
98
98
|
}
|
|
99
99
|
else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
100
|
-
|
|
100
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
101
101
|
}
|
|
102
102
|
return [2, {
|
|
103
103
|
data: data,
|
|
@@ -97,12 +97,17 @@ var ActivityList = function (_a) {
|
|
|
97
97
|
var _f = React.useState(''), subItemIndex = _f[0], setSubItemIndex = _f[1];
|
|
98
98
|
var t = useTranslation().t;
|
|
99
99
|
var isAr = useLanguage().isAr;
|
|
100
|
-
var
|
|
100
|
+
var _g = useFormContext(), control = _g.control, setValue = _g.setValue;
|
|
101
101
|
var activitiesControl = useController({ name: 'activities', control: control });
|
|
102
102
|
var data = useAppSelector(businessSelector).data;
|
|
103
103
|
var entity = (data.verify.responseBody || {}).entity;
|
|
104
104
|
var activityList = (data.businessTypeData.responseBody || {}).activityList;
|
|
105
105
|
var controlValue = activitiesControl.field.value;
|
|
106
|
+
var selectedActivity = data.activitiesData.activities;
|
|
107
|
+
React.useEffect(function () {
|
|
108
|
+
if ((selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) !== (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length))
|
|
109
|
+
setValue('activities', selectedActivity);
|
|
110
|
+
}, [selectedActivity]);
|
|
106
111
|
var handleOpenActivityMenu = function (event) {
|
|
107
112
|
setActivityAnchorEl(event.currentTarget);
|
|
108
113
|
};
|