@tap-payments/auth-jsconnect 2.8.93-development → 2.8.95-development
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/form.d.ts +3 -0
- package/build/constants/app.d.ts +5 -0
- package/build/constants/app.js +43 -8
- package/build/features/app/auth/authStore.d.ts +6 -1
- package/build/features/app/auth/authStore.js +86 -28
- package/build/features/app/business/businessStore.d.ts +16 -3
- package/build/features/app/business/businessStore.js +54 -7
- package/build/features/app/connect/connectStore.d.ts +11 -2
- package/build/features/app/connect/connectStore.js +52 -5
- package/build/features/app/connectExpress/connectExpressStore.d.ts +23 -4
- package/build/features/app/connectExpress/connectExpressStore.js +73 -13
- package/build/features/auth/screens/DOB/DOB.d.ts +6 -0
- package/build/features/auth/screens/DOB/DOB.js +47 -0
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/auth/screens/DOB/validation.d.ts +8 -0
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -2
- package/build/features/business/screens/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +69 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/business/screens/DOB/validation.d.ts +8 -0
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/DOB/DOB.d.ts +6 -0
- package/build/features/connect/screens/DOB/DOB.js +47 -0
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Individual.js +10 -3
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +21 -4
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/DOB/DOB.js +47 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/featuresScreens.js +20 -0
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
68
68
|
var _a;
|
|
69
69
|
import API from '../../../api';
|
|
70
70
|
import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
71
|
-
import { CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
|
|
71
|
+
import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
|
|
72
72
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
73
73
|
import { AuthForType, FlowsTypes } from '../../../@types';
|
|
74
74
|
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData } from '../../../utils';
|
|
@@ -359,7 +359,7 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
|
|
|
359
359
|
});
|
|
360
360
|
}); });
|
|
361
361
|
export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
362
|
-
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone;
|
|
362
|
+
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
|
|
363
363
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
364
364
|
return __generator(this, function (_j) {
|
|
365
365
|
switch (_j.label) {
|
|
@@ -429,8 +429,10 @@ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (par
|
|
|
429
429
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
430
430
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
431
431
|
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, {});
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
isNextScreenDob = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.step_name) === COLLECT_DOB_INFO_NAFATH;
|
|
433
|
+
stepName = isNextScreenDob ? 'CONNECT_DOB_STEP' : 'CONNECT_INDIVIDUAL_STEP';
|
|
434
|
+
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
435
|
+
return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode, isNextScreenDob: isNextScreenDob }];
|
|
434
436
|
case 13: return [4, sleep(interval * 1000)];
|
|
435
437
|
case 14:
|
|
436
438
|
_j.sent();
|
|
@@ -442,6 +444,31 @@ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (par
|
|
|
442
444
|
}
|
|
443
445
|
});
|
|
444
446
|
}); });
|
|
447
|
+
export var updateLeadDOB = createAsyncThunk('connect/updateLeadDOB', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
448
|
+
var _a, settings, connect, lead_id, brandData, payload, leadResponse;
|
|
449
|
+
var _b, _c;
|
|
450
|
+
return __generator(this, function (_d) {
|
|
451
|
+
switch (_d.label) {
|
|
452
|
+
case 0:
|
|
453
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
454
|
+
lead_id = (connect.data.otpData.responseBody || {}).lead_id;
|
|
455
|
+
brandData = (connect.data.brandData.responseBody || {}).brandData;
|
|
456
|
+
payload = {
|
|
457
|
+
id: lead_id || '',
|
|
458
|
+
date_of_birth: params.dob,
|
|
459
|
+
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_DOB,
|
|
460
|
+
encryption_contract: ['date_of_birth']
|
|
461
|
+
};
|
|
462
|
+
return [4, API.leadService.updateLead(payload)];
|
|
463
|
+
case 1:
|
|
464
|
+
leadResponse = _d.sent();
|
|
465
|
+
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
|
|
466
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
|
|
467
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
468
|
+
return [2, { leadResponse: leadResponse, formData: params }];
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}); });
|
|
445
472
|
export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
446
473
|
var _a, settings, connect, lead_id, brandData, phoneCountry, payload, leadResponse;
|
|
447
474
|
var _b, _c, _d, _e, _f;
|
|
@@ -743,7 +770,11 @@ var initialState = {
|
|
|
743
770
|
otp: '',
|
|
744
771
|
authFor: AuthForType.MOBILE
|
|
745
772
|
},
|
|
773
|
+
dobData: {
|
|
774
|
+
dob: ''
|
|
775
|
+
},
|
|
746
776
|
individualData: {
|
|
777
|
+
isPrevDob: false,
|
|
747
778
|
name: '',
|
|
748
779
|
email: '',
|
|
749
780
|
mobile: '',
|
|
@@ -925,7 +956,7 @@ export var connectSlice = createSlice({
|
|
|
925
956
|
var _a;
|
|
926
957
|
state.loading = false;
|
|
927
958
|
state.error = null;
|
|
928
|
-
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode;
|
|
959
|
+
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode, isNextScreenDob = _b.isNextScreenDob;
|
|
929
960
|
var _c = leadResponse || {}, name = _c.name, contact = _c.contact, brand = _c.brand, brand_list = _c.brand_list, channel_list = _c.channel_list, is_new_individual = _c.is_new_individual, id = _c.id;
|
|
930
961
|
var _d = contact || {}, email = _d.email, phone = _d.phone;
|
|
931
962
|
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
@@ -941,6 +972,7 @@ export var connectSlice = createSlice({
|
|
|
941
972
|
state.data.individualData.countryCode = countryCode;
|
|
942
973
|
if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
|
|
943
974
|
state.data.brandData.brandName = brand.name.en;
|
|
975
|
+
state.data.individualData.isPrevDob = isNextScreenDob || false;
|
|
944
976
|
var brandList = [];
|
|
945
977
|
if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
|
|
946
978
|
var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
|
|
@@ -1007,6 +1039,21 @@ export var connectSlice = createSlice({
|
|
|
1007
1039
|
.addCase(verifyAuth.rejected, function (state, action) {
|
|
1008
1040
|
state.loading = false;
|
|
1009
1041
|
state.error = action.error.message;
|
|
1042
|
+
})
|
|
1043
|
+
.addCase(updateLeadDOB.fulfilled, function (state, action) {
|
|
1044
|
+
state.loading = false;
|
|
1045
|
+
state.error = null;
|
|
1046
|
+
var _a = action.payload, formData = _a.formData, leadResponse = _a.leadResponse;
|
|
1047
|
+
state.data.dobData = formData;
|
|
1048
|
+
state.data.dobData.responseBody = leadResponse;
|
|
1049
|
+
})
|
|
1050
|
+
.addCase(updateLeadDOB.pending, function (state) {
|
|
1051
|
+
state.loading = true;
|
|
1052
|
+
state.error = null;
|
|
1053
|
+
})
|
|
1054
|
+
.addCase(updateLeadDOB.rejected, function (state, action) {
|
|
1055
|
+
state.loading = false;
|
|
1056
|
+
state.error = action.error.message;
|
|
1010
1057
|
})
|
|
1011
1058
|
.addCase(updateLeadIndividual.fulfilled, function (state, action) {
|
|
1012
1059
|
var _a, _b, _c;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, FlowsTypes, ActionState, CountryCode, AuthForType, BusinessDataFormValues, AsyncThunkParams, AuthenticationListFormValues, AuthMerchantFormValues } from '../../../@types';
|
|
2
|
+
import { MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, FlowsTypes, ActionState, CountryCode, AuthForType, BusinessDataFormValues, AsyncThunkParams, AuthenticationListFormValues, AuthMerchantFormValues, DOBFormValues } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
4
|
export declare const updateBusinessCountryAsync: import("@reduxjs/toolkit").AsyncThunk<any, string, {}>;
|
|
5
5
|
export declare const retrieveLeadIdentityByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
@@ -46,7 +46,13 @@ export declare const createNafathAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
46
46
|
termAndConditionChecked?: boolean | undefined;
|
|
47
47
|
};
|
|
48
48
|
}, NIDFormValues, {}>;
|
|
49
|
-
export declare const verifyNafathAsync: import("@reduxjs/toolkit").AsyncThunk<
|
|
49
|
+
export declare const verifyNafathAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
50
|
+
data: any;
|
|
51
|
+
isNextScreenIsDob?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
data: any;
|
|
54
|
+
isNextScreenIsDob: boolean;
|
|
55
|
+
}, verifyPACIAsyncParams, {}>;
|
|
50
56
|
export declare const createCivilIdAuthAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
51
57
|
response: any;
|
|
52
58
|
formData: CivilFormValues;
|
|
@@ -65,7 +71,13 @@ export declare const createNIDNafathAuthIdentityAsync: import("@reduxjs/toolkit"
|
|
|
65
71
|
};
|
|
66
72
|
formData: NIDFormValues;
|
|
67
73
|
}, NIDFormValues, {}>;
|
|
68
|
-
export declare const verifyNafathIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<
|
|
74
|
+
export declare const verifyNafathIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
75
|
+
data: any;
|
|
76
|
+
isNextScreenIsDob?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
data: any;
|
|
79
|
+
isNextScreenIsDob: boolean;
|
|
80
|
+
}, verifyPACIAsyncParams, {}>;
|
|
69
81
|
export declare const verifyPaciLeadIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<any, verifyPACIAsyncParams, {}>;
|
|
70
82
|
export declare const checkEmailAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
71
83
|
response: any;
|
|
@@ -102,6 +114,10 @@ interface verifyPACIAsyncParams {
|
|
|
102
114
|
onSuccess: () => void;
|
|
103
115
|
onFailure?: () => void;
|
|
104
116
|
}
|
|
117
|
+
export declare const updateLeadDOBAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
118
|
+
response: any;
|
|
119
|
+
formData: DOBFormValues;
|
|
120
|
+
}, DOBFormValues, {}>;
|
|
105
121
|
export declare const updateLeadIndividualAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
106
122
|
response: any;
|
|
107
123
|
formData: IndividualFormValues;
|
|
@@ -127,9 +143,12 @@ export interface ConnectExpressData {
|
|
|
127
143
|
otpData: OTPFormValues & {
|
|
128
144
|
authFor: AuthForType;
|
|
129
145
|
};
|
|
146
|
+
dobData: DOBFormValues & ResponseData;
|
|
130
147
|
flowName: FlowsTypes;
|
|
131
148
|
leadId?: string;
|
|
132
|
-
individualData: IndividualFormValues
|
|
149
|
+
individualData: IndividualFormValues & {
|
|
150
|
+
isPrevDob?: boolean;
|
|
151
|
+
};
|
|
133
152
|
businessData: BusinessDataFormValues;
|
|
134
153
|
authenticationData: AuthenticationListFormValues;
|
|
135
154
|
authMerchantData: AuthMerchantFormValues;
|
|
@@ -59,7 +59,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
|
59
59
|
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen, handleSetCountryByIso2, onCloseComplete, storeAuthId } from '../../../app/settings';
|
|
60
60
|
import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@types';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { ADD_NEW_ENTITY, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
62
|
+
import { ADD_NEW_ENTITY, COLLECT_DOB_INFO_NAFATH, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
64
|
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData } from '../../../utils';
|
|
65
65
|
export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -341,7 +341,7 @@ export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth'
|
|
|
341
341
|
});
|
|
342
342
|
}); });
|
|
343
343
|
export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
344
|
-
var _a, settings, connectExpress, authData, _b, scope, redirectUrl, authConfigData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, expiry, interval, maxCalls, count, data, isSuccess, isFailed, authId, leadId, urlQueryStart, _c, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount;
|
|
344
|
+
var _a, settings, connectExpress, authData, _b, scope, redirectUrl, authConfigData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, expiry, interval, maxCalls, count, data, isSuccess, isFailed, authId, leadId, urlQueryStart, _c, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount, askDobInfo;
|
|
345
345
|
var _d, _e, _f, _g, _h, _j, _k, _l;
|
|
346
346
|
return __generator(this, function (_m) {
|
|
347
347
|
switch (_m.label) {
|
|
@@ -370,7 +370,7 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
|
|
|
370
370
|
isFailed = ((_g = (_f = data.auth) === null || _f === void 0 ? void 0 : _f.status) === null || _g === void 0 ? void 0 : _g.toLowerCase()) === 'failed';
|
|
371
371
|
if (isFailed) {
|
|
372
372
|
(_h = params.onFailure) === null || _h === void 0 ? void 0 : _h.call(params);
|
|
373
|
-
return [2, data];
|
|
373
|
+
return [2, { data: data }];
|
|
374
374
|
}
|
|
375
375
|
if (!isSuccess) return [3, 6];
|
|
376
376
|
authId = (_j = data.auth) === null || _j === void 0 ? void 0 : _j.id;
|
|
@@ -380,12 +380,12 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
|
|
|
380
380
|
if (settings.data.appConfig.mode === 'popup') {
|
|
381
381
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
382
382
|
thunkApi.dispatch(handleOpen(false));
|
|
383
|
-
return [2, data];
|
|
383
|
+
return [2, { data: data }];
|
|
384
384
|
}
|
|
385
385
|
if (redirectUrl) {
|
|
386
386
|
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
387
387
|
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
388
|
-
return [2, data];
|
|
388
|
+
return [2, { data: data }];
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 4];
|
|
@@ -394,7 +394,7 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
|
|
|
394
394
|
_c = _m.sent(), brandList = _c.brandList, entityList = _c.entityList;
|
|
395
395
|
if (brandList.length && entityList.length) {
|
|
396
396
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
397
|
-
return [2, data];
|
|
397
|
+
return [2, { data: data }];
|
|
398
398
|
}
|
|
399
399
|
_m.label = 4;
|
|
400
400
|
case 4: return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
@@ -403,14 +403,18 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
|
|
|
403
403
|
stepName = data.step_name;
|
|
404
404
|
needToCollectMoreInfo = stepName === 'collect_info';
|
|
405
405
|
creatingAccount = stepName === 'create_account';
|
|
406
|
+
askDobInfo = stepName === COLLECT_DOB_INFO_NAFATH;
|
|
406
407
|
(_l = params.onSuccess) === null || _l === void 0 ? void 0 : _l.call(params);
|
|
408
|
+
if (askDobInfo) {
|
|
409
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
410
|
+
}
|
|
407
411
|
if (creatingAccount) {
|
|
408
412
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
409
413
|
}
|
|
410
414
|
if (needToCollectMoreInfo) {
|
|
411
415
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
412
416
|
}
|
|
413
|
-
return [2, data];
|
|
417
|
+
return [2, { data: data, isNextScreenIsDob: askDobInfo }];
|
|
414
418
|
case 6: return [4, sleep(interval * 1000)];
|
|
415
419
|
case 7:
|
|
416
420
|
_m.sent();
|
|
@@ -676,7 +680,7 @@ export var createNIDNafathAuthIdentityAsync = createAsyncThunk('connectExpress/c
|
|
|
676
680
|
});
|
|
677
681
|
}); });
|
|
678
682
|
export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNafathIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
679
|
-
var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, isFailed, needToCollectMoreInfo, creatingAccount;
|
|
683
|
+
var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, isFailed, needToCollectMoreInfo, creatingAccount, askDobInfo;
|
|
680
684
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
681
685
|
return __generator(this, function (_h) {
|
|
682
686
|
switch (_h.label) {
|
|
@@ -700,7 +704,7 @@ export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNa
|
|
|
700
704
|
isFailed = ((_d = (_c = data.auth) === null || _c === void 0 ? void 0 : _c.status) === null || _d === void 0 ? void 0 : _d.toLowerCase()) === 'failed';
|
|
701
705
|
if (isFailed) {
|
|
702
706
|
(_e = params.onFailure) === null || _e === void 0 ? void 0 : _e.call(params);
|
|
703
|
-
return [2, data];
|
|
707
|
+
return [2, { data: data }];
|
|
704
708
|
}
|
|
705
709
|
if (!isSuccess) return [3, 4];
|
|
706
710
|
return [4, thunkApi.dispatch(getLeadByIdAsync((_f = data.auth) === null || _f === void 0 ? void 0 : _f.lead_id)).unwrap()];
|
|
@@ -708,14 +712,18 @@ export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNa
|
|
|
708
712
|
_h.sent();
|
|
709
713
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
710
714
|
creatingAccount = data.step_name === 'create_account';
|
|
715
|
+
askDobInfo = data.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
711
716
|
(_g = params.onSuccess) === null || _g === void 0 ? void 0 : _g.call(params);
|
|
717
|
+
if (askDobInfo) {
|
|
718
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
719
|
+
}
|
|
712
720
|
if (creatingAccount) {
|
|
713
721
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
714
722
|
}
|
|
715
723
|
if (needToCollectMoreInfo) {
|
|
716
724
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
717
725
|
}
|
|
718
|
-
return [2, data];
|
|
726
|
+
return [2, { data: data, isNextScreenIsDob: askDobInfo }];
|
|
719
727
|
case 4: return [4, sleep(interval * 1000)];
|
|
720
728
|
case 5:
|
|
721
729
|
_h.sent();
|
|
@@ -962,6 +970,37 @@ export var createEntity = createAsyncThunk('connectExpress/createEntity', functi
|
|
|
962
970
|
}
|
|
963
971
|
});
|
|
964
972
|
}); });
|
|
973
|
+
export var updateLeadDOBAsync = createAsyncThunk('connectExpress/updateLeadDOBAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
974
|
+
var _a, settings, connectExpress, id, dob, payload, data, needToCollectMoreInfo, creatingAccount;
|
|
975
|
+
var _b, _c, _d;
|
|
976
|
+
return __generator(this, function (_e) {
|
|
977
|
+
switch (_e.label) {
|
|
978
|
+
case 0:
|
|
979
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
980
|
+
id = (((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}).id;
|
|
981
|
+
dob = params.dob;
|
|
982
|
+
payload = {
|
|
983
|
+
id: id || '',
|
|
984
|
+
date_of_birth: dob,
|
|
985
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_DOB,
|
|
986
|
+
encryption_contract: ['date_of_birth']
|
|
987
|
+
};
|
|
988
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
989
|
+
case 1:
|
|
990
|
+
data = _e.sent();
|
|
991
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
992
|
+
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
993
|
+
creatingAccount = data.step_name === 'create_account';
|
|
994
|
+
if (creatingAccount) {
|
|
995
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
996
|
+
}
|
|
997
|
+
if (needToCollectMoreInfo) {
|
|
998
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
999
|
+
}
|
|
1000
|
+
return [2, { response: data, formData: params }];
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
}); });
|
|
965
1004
|
export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLeadIndividualAsync', function (_a, thunkApi) {
|
|
966
1005
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
967
1006
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1158,6 +1197,9 @@ var initialState = {
|
|
|
1158
1197
|
otp: '',
|
|
1159
1198
|
authFor: AuthForType.MOBILE
|
|
1160
1199
|
},
|
|
1200
|
+
dobData: {
|
|
1201
|
+
dob: ''
|
|
1202
|
+
},
|
|
1161
1203
|
individualData: {
|
|
1162
1204
|
name: '',
|
|
1163
1205
|
email: '',
|
|
@@ -1392,7 +1434,9 @@ export var connectSlice = createSlice({
|
|
|
1392
1434
|
.addCase(verifyNafathAsync.fulfilled, function (state, action) {
|
|
1393
1435
|
var _a;
|
|
1394
1436
|
state.loading = false;
|
|
1395
|
-
|
|
1437
|
+
var _b = action.payload, data = _b.data, isNextScreenIsDob = _b.isNextScreenIsDob;
|
|
1438
|
+
state.data.individualData.isPrevDob = isNextScreenIsDob || false;
|
|
1439
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData), data) });
|
|
1396
1440
|
})
|
|
1397
1441
|
.addCase(verifyNafathAsync.rejected, function (state, action) {
|
|
1398
1442
|
state.loading = false;
|
|
@@ -1422,10 +1466,12 @@ export var connectSlice = createSlice({
|
|
|
1422
1466
|
state.error = null;
|
|
1423
1467
|
})
|
|
1424
1468
|
.addCase(verifyNafathIdentityAsync.fulfilled, function (state, action) {
|
|
1425
|
-
var _a, _b
|
|
1469
|
+
var _a, _b;
|
|
1426
1470
|
state.loading = false;
|
|
1471
|
+
var _c = action.payload, data = _c.data, isNextScreenIsDob = _c.isNextScreenIsDob;
|
|
1427
1472
|
var auth = (((_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData) || {}).auth;
|
|
1428
|
-
state.data.
|
|
1473
|
+
state.data.individualData.isPrevDob = isNextScreenIsDob || false;
|
|
1474
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign(__assign({}, (_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.authData), data), { auth: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.auth), { id: auth === null || auth === void 0 ? void 0 : auth.id }) }) });
|
|
1429
1475
|
})
|
|
1430
1476
|
.addCase(verifyNafathIdentityAsync.rejected, function (state, action) {
|
|
1431
1477
|
state.loading = false;
|
|
@@ -1543,6 +1589,20 @@ export var connectSlice = createSlice({
|
|
|
1543
1589
|
if (action.error.message === 'Aborted')
|
|
1544
1590
|
return;
|
|
1545
1591
|
state.error = action.error.message;
|
|
1592
|
+
})
|
|
1593
|
+
.addCase(updateLeadDOBAsync.fulfilled, function (state, action) {
|
|
1594
|
+
state.loading = false;
|
|
1595
|
+
state.error = null;
|
|
1596
|
+
state.data.dobData = action.payload.formData;
|
|
1597
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { dobData: action.payload.response });
|
|
1598
|
+
})
|
|
1599
|
+
.addCase(updateLeadDOBAsync.pending, function (state) {
|
|
1600
|
+
state.loading = true;
|
|
1601
|
+
state.error = null;
|
|
1602
|
+
})
|
|
1603
|
+
.addCase(updateLeadDOBAsync.rejected, function (state, action) {
|
|
1604
|
+
state.loading = false;
|
|
1605
|
+
state.error = action.error.message;
|
|
1546
1606
|
})
|
|
1547
1607
|
.addCase(updateLeadIndividualAsync.fulfilled, function (state, action) {
|
|
1548
1608
|
var _a, _b;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
15
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
18
|
+
import { clearError, authSelector } from '../../../app/auth/authStore';
|
|
19
|
+
import Text from '../../../../components/Text';
|
|
20
|
+
import Calender from '../../../shared/Calender';
|
|
21
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
24
|
+
});
|
|
25
|
+
var DOB = function (_a) {
|
|
26
|
+
var _b;
|
|
27
|
+
var onDateClicked = _a.onDateClicked;
|
|
28
|
+
var t = useTranslation().t;
|
|
29
|
+
var control = useFormContext().control;
|
|
30
|
+
var dispatch = useAppDispatch();
|
|
31
|
+
var dobControl = useController({ control: control, name: 'dob' });
|
|
32
|
+
var error = useAppSelector(authSelector).error;
|
|
33
|
+
var handleBirthDateChange = function (data) {
|
|
34
|
+
dobControl.field.onChange(data);
|
|
35
|
+
handleClearError();
|
|
36
|
+
};
|
|
37
|
+
var handleClearError = function () {
|
|
38
|
+
if (error)
|
|
39
|
+
dispatch(clearError());
|
|
40
|
+
};
|
|
41
|
+
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
42
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
43
|
+
var spacing = _a.spacing;
|
|
44
|
+
return spacing(0, 2.5, 1.5, 2.5);
|
|
45
|
+
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
|
|
46
|
+
};
|
|
47
|
+
export default DOB;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
+
import { DOBValidationSchema } from './validation';
|
|
19
|
+
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
20
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { clearError, authSelector, updateLeadDOB } from '../../../app/auth/authStore';
|
|
22
|
+
import Form from '../../../../components/Form';
|
|
23
|
+
import Button from '../../../shared/Button';
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
+
import Collapse from '../../../../components/Collapse';
|
|
26
|
+
import DOB from './DOB';
|
|
27
|
+
import { deepCopy } from '../../../../utils';
|
|
28
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column'
|
|
31
|
+
}); });
|
|
32
|
+
var DOBForm = function (_a) {
|
|
33
|
+
var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
|
|
34
|
+
var isAr = useLanguage().isAr;
|
|
35
|
+
var dispatch = useAppDispatch();
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var _c = useAppSelector(authSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
38
|
+
var methods = useForm({
|
|
39
|
+
resolver: yupResolver(DOBValidationSchema),
|
|
40
|
+
defaultValues: data.dobData,
|
|
41
|
+
mode: 'onChange'
|
|
42
|
+
});
|
|
43
|
+
React.useEffect(function () {
|
|
44
|
+
if (error)
|
|
45
|
+
dispatch(clearError());
|
|
46
|
+
}, [methods.formState.isValid]);
|
|
47
|
+
var onSubmit = function (data) {
|
|
48
|
+
dispatch(updateLeadDOB(deepCopy(data)));
|
|
49
|
+
};
|
|
50
|
+
var handleCollapseOpenClose = function (flag) {
|
|
51
|
+
setCollapse(flag);
|
|
52
|
+
};
|
|
53
|
+
var onBack = function () {
|
|
54
|
+
dispatch(handlePrevScreenStep());
|
|
55
|
+
};
|
|
56
|
+
var disabled = !methods.formState.isValid;
|
|
57
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ sx: { mt: 10 }, loading: loading, isAr: isAr, onBackClicked: onBack, disabled: disabled, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
58
|
+
};
|
|
59
|
+
export default React.memo(DOBForm);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const DOBValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
5
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
+
}>>>;
|
|
@@ -40,7 +40,7 @@ var ListType;
|
|
|
40
40
|
var BusinessType = function (_a) {
|
|
41
41
|
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading, uploadingArticle = _b.uploadingArticle;
|
|
42
42
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
43
|
-
var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody;
|
|
43
|
+
var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody, isPrevDob = _c.isPrevDob;
|
|
44
44
|
var entityLicenseList = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.entityLicenseList) || [];
|
|
45
45
|
var t = useTranslation().t;
|
|
46
46
|
var isAr = useLanguage().isAr;
|
|
@@ -96,7 +96,7 @@ var BusinessType = function (_a) {
|
|
|
96
96
|
dispatch(updateLeadBusinessType(deepCopy(dataValues)));
|
|
97
97
|
};
|
|
98
98
|
var onBack = function () {
|
|
99
|
-
dispatch(handlePrevScreenStep());
|
|
99
|
+
dispatch(handlePrevScreenStep(isPrevDob ? 'BUSINESS_DOB_STEP' : 'BUSINESS_IDBOD_STEP'));
|
|
100
100
|
};
|
|
101
101
|
var isLicenseListActive = listActive === ListType.LicenseList;
|
|
102
102
|
var isEntityLicenseListActive = listActive === ListType.EntityLicenseList;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
18
|
+
import Text from '../../../../components/Text';
|
|
19
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
+
import Calender from '../../../shared/Calender';
|
|
21
|
+
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
22
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption), { cursor: 'pointer' }));
|
|
25
|
+
});
|
|
26
|
+
var BOD = function (_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var onDateClicked = _a.onDateClicked;
|
|
29
|
+
var t = useTranslation().t;
|
|
30
|
+
var control = useFormContext().control;
|
|
31
|
+
var dispatch = useAppDispatch();
|
|
32
|
+
var dobControl = useController({ control: control, name: 'dob' });
|
|
33
|
+
var error = useAppSelector(businessSelector).error;
|
|
34
|
+
var handleBirthDateChange = function (data) {
|
|
35
|
+
if (error)
|
|
36
|
+
dispatch(clearError());
|
|
37
|
+
dobControl.field.onChange(data);
|
|
38
|
+
};
|
|
39
|
+
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
40
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
41
|
+
var spacing = _a.spacing;
|
|
42
|
+
return spacing(0, 2.5, 1.5, 2.5);
|
|
43
|
+
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
|
|
44
|
+
};
|
|
45
|
+
export default React.memo(BOD);
|