@tap-payments/auth-jsconnect 2.3.80-test → 2.3.85-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/brand/brandStore.d.ts +3 -3
- package/build/features/app/brand/brandStore.js +133 -114
- package/build/features/app/connectExpress/connectExpressStore.d.ts +3 -3
- package/build/features/app/connectExpress/connectExpressStore.js +80 -76
- package/build/features/app/entity/entityStore.d.ts +3 -3
- package/build/features/app/entity/entityStore.js +130 -120
- package/build/features/app/individual/individualStore.d.ts +4 -4
- package/build/features/app/individual/individualStore.js +227 -219
- package/build/features/app/tax/taxStore.d.ts +2 -2
- package/build/features/app/tax/taxStore.js +59 -55
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +3 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +7 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +5 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +5 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -9
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +3 -2
- package/build/features/entity/screens/EntityName/EntityName.js +3 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +19 -18
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +3 -2
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +3 -2
- package/build/features/shared/Button/IndividualActionButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +4 -3
- package/package.json +1 -1
|
@@ -238,129 +238,139 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
}); });
|
|
241
|
-
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (
|
|
242
|
-
var
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
'license.type',
|
|
280
|
-
'license.issuing_date',
|
|
281
|
-
'license.expiry_date',
|
|
282
|
-
'license.additional_info.unified_number',
|
|
283
|
-
'type'
|
|
284
|
-
] });
|
|
285
|
-
return [4, API.entityService.updateEntity(payload)];
|
|
286
|
-
case 1:
|
|
287
|
-
data = _f.sent();
|
|
288
|
-
documentResponse = undefined;
|
|
289
|
-
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.CR);
|
|
290
|
-
if (!(!isDocumentsNonEditable && (params.certificateId || []).length > 0)) return [3, 7];
|
|
291
|
-
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
|
|
292
|
-
documentBody = {
|
|
293
|
-
id: document.id,
|
|
294
|
-
images: params.certificateId
|
|
295
|
-
};
|
|
296
|
-
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
297
|
-
case 2:
|
|
298
|
-
documentResponse = _f.sent();
|
|
299
|
-
return [3, 5];
|
|
300
|
-
case 3:
|
|
301
|
-
documentBody = {
|
|
302
|
-
entity_id: id || '',
|
|
303
|
-
documents: [
|
|
304
|
-
{
|
|
305
|
-
type: DocumentPurpose.CR,
|
|
306
|
-
images: params.certificateId
|
|
241
|
+
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (_a, thunkApi) {
|
|
242
|
+
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
243
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
244
|
+
var _b, settings, entity, _c, id, data_status, data_verification, documents, issuingDate, expiryDate, licenseType, licenseNumber, articleId, unifiedNumber, legalName, certificateId, entityType, issueDate, expDate, isFL, isLegalNameENNonEditable, isLegalNameARNonEditable, isLicenseTypeNonEditable, isEntityTypeNonEditable, isLicenseNumberNonEditable, isUnifiedNumberNonEditable, isIssuingDateNonEditable, isExpiryDateNonEditable, isDocumentsNonEditable, isAOAFileNonEditable, isEntityTypeVerified, isLicenseNonEditable, isLicenseAvailable, payload, data, documentResponse, document, documentBody, documentBody, list;
|
|
245
|
+
var _d, _e, _f;
|
|
246
|
+
return __generator(this, function (_g) {
|
|
247
|
+
switch (_g.label) {
|
|
248
|
+
case 0:
|
|
249
|
+
_b = thunkApi.getState(), settings = _b.settings, entity = _b.entity;
|
|
250
|
+
_c = ((_d = entity.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.entity) || {}, id = _c.id, data_status = _c.data_status, data_verification = _c.data_verification, documents = _c.documents;
|
|
251
|
+
issuingDate = formData.issuingDate, expiryDate = formData.expiryDate, licenseType = formData.licenseType, licenseNumber = formData.licenseNumber, articleId = formData.articleId, unifiedNumber = formData.unifiedNumber, legalName = formData.legalName, certificateId = formData.certificateId, entityType = formData.entityType;
|
|
252
|
+
issueDate = issuingDate && new Date(issuingDate).getTime();
|
|
253
|
+
expDate = expiryDate && new Date(expiryDate).getTime();
|
|
254
|
+
isFL = licenseType === BusinessType.FL;
|
|
255
|
+
isLegalNameENNonEditable = hasNoneEditableValue(data_status, 'legal_name.en');
|
|
256
|
+
isLegalNameARNonEditable = hasNoneEditableValue(data_status, 'legal_name.ar');
|
|
257
|
+
isLicenseTypeNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'type');
|
|
258
|
+
isEntityTypeNonEditable = hasNoneEditableValue(data_status, 'type');
|
|
259
|
+
isLicenseNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'number');
|
|
260
|
+
isUnifiedNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'additional_info');
|
|
261
|
+
isIssuingDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'issuing_date');
|
|
262
|
+
isExpiryDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'expiry_date');
|
|
263
|
+
isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
|
|
264
|
+
isAOAFileNonEditable = hasNoneEditableValue(data_status, 'AOA_file_id');
|
|
265
|
+
isEntityTypeVerified = hasVerifiedValue(data_verification, 'type');
|
|
266
|
+
isLicenseNonEditable = isLicenseNumberNonEditable && isLicenseTypeNonEditable && isIssuingDateNonEditable && isExpiryDateNonEditable && isUnifiedNumberNonEditable;
|
|
267
|
+
isLicenseAvailable = licenseNumber || licenseType || issueDate || expDate || unifiedNumber;
|
|
268
|
+
payload = __assign(__assign(__assign(__assign({ id: id, AOA_file_id: isAOAFileNonEditable ? undefined : articleId }, (!isLicenseNonEditable &&
|
|
269
|
+
isLicenseAvailable && {
|
|
270
|
+
license: __assign({ number: isLicenseNumberNonEditable || !licenseNumber ? undefined : licenseNumber, type: isLicenseTypeNonEditable || !licenseType ? undefined : isFL ? LicenseType.FL : LicenseType.CR, issuing_date: isIssuingDateNonEditable || !issueDate ? undefined : issueDate === null || issueDate === void 0 ? void 0 : issueDate.toString(), expiry_date: isExpiryDateNonEditable || !expDate ? undefined : expDate === null || expDate === void 0 ? void 0 : expDate.toString() }, (!(isUnifiedNumberNonEditable || !unifiedNumber) && {
|
|
271
|
+
additional_info: {
|
|
272
|
+
unified_number: unifiedNumber
|
|
273
|
+
}
|
|
274
|
+
}))
|
|
275
|
+
})), (!(isEntityTypeVerified || isEntityTypeNonEditable) && { type: entityType })), (!((isLegalNameENNonEditable && isLegalNameARNonEditable) || !legalName) && {
|
|
276
|
+
legal_name: {
|
|
277
|
+
en: isLegalNameENNonEditable ? undefined : legalName,
|
|
278
|
+
ar: isLegalNameARNonEditable ? undefined : legalName
|
|
307
279
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
280
|
+
})), { encryption_contract: [
|
|
281
|
+
'license.number',
|
|
282
|
+
'legal_name.ar',
|
|
283
|
+
'legal_name.en',
|
|
284
|
+
'license.type',
|
|
285
|
+
'license.issuing_date',
|
|
286
|
+
'license.expiry_date',
|
|
287
|
+
'license.additional_info.unified_number',
|
|
288
|
+
'type'
|
|
289
|
+
] });
|
|
290
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
291
|
+
case 1:
|
|
292
|
+
data = _g.sent();
|
|
293
|
+
documentResponse = undefined;
|
|
294
|
+
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.CR);
|
|
295
|
+
if (!(!isDocumentsNonEditable && (certificateId || []).length > 0)) return [3, 7];
|
|
296
|
+
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
|
|
297
|
+
documentBody = {
|
|
298
|
+
id: document.id,
|
|
299
|
+
images: certificateId
|
|
300
|
+
};
|
|
301
|
+
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
302
|
+
case 2:
|
|
303
|
+
documentResponse = _g.sent();
|
|
304
|
+
return [3, 5];
|
|
305
|
+
case 3:
|
|
306
|
+
documentBody = {
|
|
307
|
+
entity_id: id || '',
|
|
308
|
+
documents: [
|
|
309
|
+
{
|
|
310
|
+
type: DocumentPurpose.CR,
|
|
311
|
+
images: certificateId
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
};
|
|
315
|
+
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
316
|
+
case 4:
|
|
317
|
+
documentResponse = _g.sent();
|
|
318
|
+
_g.label = 5;
|
|
319
|
+
case 5: return [4, API.entityService.retrieveEntity(id)];
|
|
320
|
+
case 6:
|
|
321
|
+
data = _g.sent();
|
|
322
|
+
data.documentData = documentResponse;
|
|
323
|
+
_g.label = 7;
|
|
324
|
+
case 7: return [4, API.dataService.getActivities()];
|
|
325
|
+
case 8:
|
|
326
|
+
list = (_g.sent()).list;
|
|
327
|
+
data.activityList = list;
|
|
328
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
329
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, id);
|
|
330
|
+
return [2, { data: data, formData: originalFormData }];
|
|
331
|
+
}
|
|
332
|
+
});
|
|
327
333
|
});
|
|
328
|
-
});
|
|
329
|
-
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (
|
|
330
|
-
var
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
334
|
+
});
|
|
335
|
+
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (_a, thunkApi) {
|
|
336
|
+
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
337
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
338
|
+
var _b, settings, entity, _c, id, data_status, isCapitalPaidNonEditable, isCapitalShareCountNonEditable, isCapitalShareValueNonEditable, isActivitiesNonEditable, capitalShareCount, capitalShareValue, activities, capitalPaid, hasCapitalShares, isCapitalNonEditable, activityIds, payload, data;
|
|
339
|
+
var _d, _e, _f, _g;
|
|
340
|
+
return __generator(this, function (_h) {
|
|
341
|
+
switch (_h.label) {
|
|
342
|
+
case 0:
|
|
343
|
+
_b = thunkApi.getState(), settings = _b.settings, entity = _b.entity;
|
|
344
|
+
_c = ((_d = entity.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.entity) || {}, id = _c.id, data_status = _c.data_status;
|
|
345
|
+
isCapitalPaidNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'paid');
|
|
346
|
+
isCapitalShareCountNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.count');
|
|
347
|
+
isCapitalShareValueNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.value');
|
|
348
|
+
isActivitiesNonEditable = hasNoneEditableValue(data_status, 'activities');
|
|
349
|
+
capitalShareCount = formData.capitalShareCount, capitalShareValue = formData.capitalShareValue, activities = formData.activities, capitalPaid = formData.capitalPaid;
|
|
350
|
+
hasCapitalShares = capitalShareCount || capitalShareValue;
|
|
351
|
+
isCapitalNonEditable = (isCapitalPaidNonEditable && isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || (!capitalPaid && !hasCapitalShares);
|
|
352
|
+
activityIds = (_e = (activities || [])) === null || _e === void 0 ? void 0 : _e.map(function (_a) {
|
|
353
|
+
var id = _a.id;
|
|
354
|
+
return ({ id: id, action: 'add' });
|
|
355
|
+
});
|
|
356
|
+
payload = __assign({ id: id, activities: isActivitiesNonEditable || (activityIds === null || activityIds === void 0 ? void 0 : activityIds.length) === 0 ? undefined : activityIds }, (!isCapitalNonEditable && {
|
|
357
|
+
capital: __assign({ paid: isCapitalPaidNonEditable ? undefined : capitalPaid }, (!((isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || !hasCapitalShares) && {
|
|
358
|
+
shares: {
|
|
359
|
+
count: isCapitalShareCountNonEditable ? undefined : capitalShareCount,
|
|
360
|
+
value: isCapitalShareValueNonEditable ? undefined : capitalShareValue
|
|
361
|
+
}
|
|
362
|
+
}))
|
|
363
|
+
}));
|
|
364
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
365
|
+
case 1:
|
|
366
|
+
data = _h.sent();
|
|
367
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
368
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, id);
|
|
369
|
+
return [2, { data: data, formData: originalFormData }];
|
|
370
|
+
}
|
|
371
|
+
});
|
|
362
372
|
});
|
|
363
|
-
});
|
|
373
|
+
});
|
|
364
374
|
export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
365
375
|
var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
|
|
366
376
|
var _c, _d, _e, _f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { CountryCode, FlowsTypes, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState, ActionState, User, IndividualPersonalInfoFormValues, IndividualEmailMobileFormValues, IndividualMobileFormValues } from '../../../@types';
|
|
2
|
+
import { CountryCode, FlowsTypes, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState, ActionState, User, IndividualPersonalInfoFormValues, IndividualEmailMobileFormValues, IndividualMobileFormValues, AsyncThunkParams } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
4
|
interface VerifyLeadTokenProps {
|
|
5
5
|
token: string;
|
|
@@ -91,15 +91,15 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
91
91
|
export declare const updatePhoneInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
92
92
|
data: any;
|
|
93
93
|
formData: IndividualMobileFormValues;
|
|
94
|
-
}, IndividualMobileFormValues
|
|
94
|
+
}, AsyncThunkParams<IndividualMobileFormValues>, {}>;
|
|
95
95
|
export declare const updateIndividualPersonalInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
96
96
|
data: any;
|
|
97
97
|
formData: IndividualPersonalInfoFormValues;
|
|
98
|
-
}, IndividualPersonalInfoFormValues
|
|
98
|
+
}, AsyncThunkParams<IndividualPersonalInfoFormValues>, {}>;
|
|
99
99
|
export declare const updateIndividualInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
100
100
|
data: any;
|
|
101
101
|
formData: IndividualExtraFormValues;
|
|
102
|
-
}, IndividualExtraFormValues
|
|
102
|
+
}, AsyncThunkParams<IndividualExtraFormValues>, {}>;
|
|
103
103
|
export declare const checkEmailAvailability: import("@reduxjs/toolkit").AsyncThunk<{
|
|
104
104
|
response: any;
|
|
105
105
|
formData: string;
|