@tap-payments/auth-jsconnect 2.8.57-development → 2.8.59-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +0 -1
- package/build/@types/form.d.ts +0 -1
- package/build/@types/redux.d.ts +0 -1
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +4 -12
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -0
- package/build/constants/app.js +2 -0
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +165 -184
- package/build/features/app/board/boardStore.js +30 -52
- package/build/features/app/brand/brandStore.d.ts +33 -16
- package/build/features/app/brand/brandStore.js +242 -239
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +88 -77
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
- package/build/features/app/connectExpress/connectExpressStore.js +52 -110
- package/build/features/app/entity/entityStore.d.ts +36 -20
- package/build/features/app/entity/entityStore.js +246 -196
- package/build/features/app/individual/individualStore.d.ts +38 -22
- package/build/features/app/individual/individualStore.js +266 -263
- package/build/features/app/password/passwordStore.d.ts +23 -40
- package/build/features/app/password/passwordStore.js +233 -226
- package/build/features/app/tax/taxStore.d.ts +7 -13
- package/build/features/app/tax/taxStore.js +147 -168
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/bank/Bank.d.ts +0 -1
- package/build/features/bank/Bank.js +4 -7
- package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- package/build/features/board/Board.js +4 -8
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
- package/build/features/brand/Brand.d.ts +0 -1
- package/build/features/brand/Brand.js +4 -7
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/Business.js +4 -9
- package/build/features/business/screens/Activities/Activities.js +3 -12
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -10
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +3 -12
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -14
- package/build/features/business/screens/Verify/Verify.js +3 -13
- package/build/features/connect/Connect.js +2 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +8 -11
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +1 -2
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +0 -1
- package/build/features/entity/Entity.js +4 -7
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
- package/build/features/entity/screens/EntityName/EntityName.js +15 -32
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +7 -67
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
- package/build/features/individual/screens/IndividualList/UserList.js +9 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +1 -1
- package/build/features/password/Password.d.ts +0 -1
- package/build/features/password/Password.js +28 -75
- package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Button/FlowsButtons.js +3 -13
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -14
- package/build/features/signIn/SignIn.js +3 -12
- package/build/features/tax/Tax.d.ts +0 -1
- package/build/features/tax/Tax.js +4 -7
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/useVerifyToken.d.ts +2 -5
- package/build/hooks/useVerifyToken.js +5 -10
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +1 -2
- package/build/utils/string.d.ts +2 -5
- package/build/utils/string.js +5 -34
- package/package.json +2 -2
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
- package/build/features/bank/screens/OperatorError/index.js +0 -2
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/board/screens/OperatorError/index.d.ts +0 -3
- package/build/features/board/screens/OperatorError/index.js +0 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
- package/build/features/brand/screens/OperatorError/index.js +0 -2
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/business/screens/OperatorError/index.d.ts +0 -3
- package/build/features/business/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -31
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
- package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
- package/build/features/entity/screens/OperatorError/index.js +0 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -36
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
- package/build/features/individual/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/password/screens/OperatorError/index.d.ts +0 -3
- package/build/features/password/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
- package/build/features/signIn/screens/OperatorError/index.js +0 -2
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
- package/build/features/tax/screens/OperatorError/index.js +0 -2
- package/build/hooks/useFormDirtyCheck.d.ts +0 -10
- package/build/hooks/useFormDirtyCheck.js +0 -66
|
@@ -22,13 +22,11 @@ import ConnectExpressIdentityVerifyOTPScreen from './connectExpress/screens/Iden
|
|
|
22
22
|
import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
|
|
23
23
|
import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
|
|
24
24
|
import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
|
|
25
|
-
import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
|
|
26
25
|
import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
|
|
27
26
|
import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/AccountAlreadyCreated';
|
|
28
27
|
import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
|
|
29
28
|
import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerchant';
|
|
30
29
|
import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
|
|
31
|
-
import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
|
|
32
30
|
import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
|
|
33
31
|
import AuthSwitchScreen from './auth/screens/AuthSwitch';
|
|
34
32
|
import AuthMobileScreen from './auth/screens/Mobile';
|
|
@@ -59,15 +57,12 @@ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
|
59
57
|
import BusCivilIDscreen from './business/screens/CivilID';
|
|
60
58
|
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
61
59
|
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
62
|
-
import BusinessOperatorError from './business/screens/OperatorError';
|
|
63
60
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
64
61
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
65
|
-
import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
|
|
66
62
|
import PasswordOTPPage from './password/screens/OTP';
|
|
67
63
|
import SuccessPasswordPage from './password/screens/Success';
|
|
68
64
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
69
65
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
70
|
-
import PasswordOperatorError from './password/screens/OperatorError';
|
|
71
66
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
72
67
|
import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
73
68
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
@@ -77,26 +72,22 @@ import SuccessOwnerPage from './individual/screens/Success';
|
|
|
77
72
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
78
73
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
79
74
|
import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
|
|
80
|
-
import IndividualOperatorError from './individual/screens/OperatorError';
|
|
81
75
|
import BankVerifyPage from './bank/screens/Verify';
|
|
82
76
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
83
77
|
import BankSuccessPage from './bank/screens/Success';
|
|
84
78
|
import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
85
79
|
import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
|
|
86
80
|
import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
|
|
87
|
-
import BankOperatorError from './bank/screens/OperatorError';
|
|
88
81
|
import TaxVerifyPage from './tax/screens/Verify';
|
|
89
82
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
90
83
|
import TaxSuccessPage from './tax/screens/Success';
|
|
91
84
|
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
92
85
|
import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
|
|
93
86
|
import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
|
|
94
|
-
import TaxOperatorError from './tax/screens/OperatorError';
|
|
95
87
|
import SignInMobilePage from './signIn/screens/Mobile';
|
|
96
88
|
import SignInEmailPage from './signIn/screens/Email';
|
|
97
89
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
98
90
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
99
|
-
import SignInOperatorError from './signIn/screens/OperatorError';
|
|
100
91
|
import EntityVerifyPage from './entity/screens/Verify';
|
|
101
92
|
import EntityNamePage from './entity/screens/EntityName';
|
|
102
93
|
import EntityCapitalPage from './entity/screens/EntityCapital';
|
|
@@ -104,7 +95,6 @@ import EntitySuccessPage from './entity/screens/Success';
|
|
|
104
95
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
105
96
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
106
97
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
107
|
-
import EntityOperatorError from './entity/screens/OperatorError';
|
|
108
98
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
109
99
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
110
100
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
@@ -113,11 +103,9 @@ import BrandSuccessPage from './brand/screens/Success';
|
|
|
113
103
|
import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
114
104
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
115
105
|
import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
|
|
116
|
-
import BrandOperatorError from './brand/screens/OperatorError';
|
|
117
106
|
import BoardVerifyPage from './board/screens/Verify';
|
|
118
107
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
119
108
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
120
|
-
import BoardOperatorError from './board/screens/OperatorError';
|
|
121
109
|
export var connectFeatureScreens = [
|
|
122
110
|
{
|
|
123
111
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -209,10 +197,6 @@ export var connectExpressFeatureScreens = [
|
|
|
209
197
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
210
198
|
element: ConnectExpressCreateAccountLoaderScreen
|
|
211
199
|
},
|
|
212
|
-
{
|
|
213
|
-
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
214
|
-
element: ConnectExpressPreparingDataLoaderScreen
|
|
215
|
-
},
|
|
216
200
|
{
|
|
217
201
|
name: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
218
202
|
element: ConnectExpressCollectIndividualScreen
|
|
@@ -240,10 +224,6 @@ export var connectExpressFeatureScreens = [
|
|
|
240
224
|
{
|
|
241
225
|
name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
|
|
242
226
|
element: ConnectExpressAuthAccountCreatedLoaderScreen
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
246
|
-
element: ConnectExpressOperatorError
|
|
247
227
|
}
|
|
248
228
|
];
|
|
249
229
|
export var authFeatureScreens = [
|
|
@@ -356,11 +336,7 @@ export var businessFeatureScreens = [
|
|
|
356
336
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
357
337
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
358
338
|
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
359
|
-
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
360
|
-
{
|
|
361
|
-
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
362
|
-
element: BusinessOperatorError
|
|
363
|
-
}
|
|
339
|
+
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
364
340
|
];
|
|
365
341
|
export var passwordFeatureScreens = [
|
|
366
342
|
{
|
|
@@ -371,10 +347,6 @@ export var passwordFeatureScreens = [
|
|
|
371
347
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
372
348
|
element: CreatePasswordPage
|
|
373
349
|
},
|
|
374
|
-
{
|
|
375
|
-
name: 'PASSWORD_LOADING_DATA_STEP',
|
|
376
|
-
element: PasswordDataLoadingPage
|
|
377
|
-
},
|
|
378
350
|
{
|
|
379
351
|
name: 'PASSWORD_RESET_PASSWORD_OTP_STEP',
|
|
380
352
|
element: PasswordOTPPage
|
|
@@ -387,11 +359,7 @@ export var passwordFeatureScreens = [
|
|
|
387
359
|
name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
388
360
|
element: PasswordSuccessWithFlowPage
|
|
389
361
|
},
|
|
390
|
-
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
391
|
-
{
|
|
392
|
-
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
393
|
-
element: PasswordOperatorError
|
|
394
|
-
}
|
|
362
|
+
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
395
363
|
];
|
|
396
364
|
export var individualFeatureScreens = [
|
|
397
365
|
{
|
|
@@ -426,11 +394,7 @@ export var individualFeatureScreens = [
|
|
|
426
394
|
name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
427
395
|
element: IndividualSuccessWithFlowPage
|
|
428
396
|
},
|
|
429
|
-
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
430
|
-
{
|
|
431
|
-
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
432
|
-
element: IndividualOperatorError
|
|
433
|
-
}
|
|
397
|
+
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
434
398
|
];
|
|
435
399
|
export var bankFeatureScreens = [
|
|
436
400
|
{
|
|
@@ -453,11 +417,7 @@ export var bankFeatureScreens = [
|
|
|
453
417
|
name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
454
418
|
element: BankSuccessWithFlowPage
|
|
455
419
|
},
|
|
456
|
-
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
457
|
-
{
|
|
458
|
-
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
459
|
-
element: BankOperatorError
|
|
460
|
-
}
|
|
420
|
+
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
461
421
|
];
|
|
462
422
|
export var taxFeatureScreens = [
|
|
463
423
|
{
|
|
@@ -480,11 +440,7 @@ export var taxFeatureScreens = [
|
|
|
480
440
|
name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
481
441
|
element: TaxSuccessWithFlowPage
|
|
482
442
|
},
|
|
483
|
-
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
484
|
-
{
|
|
485
|
-
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
486
|
-
element: TaxOperatorError
|
|
487
|
-
}
|
|
443
|
+
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
488
444
|
];
|
|
489
445
|
export var signInFeatureScreens = [
|
|
490
446
|
{
|
|
@@ -502,10 +458,6 @@ export var signInFeatureScreens = [
|
|
|
502
458
|
{
|
|
503
459
|
name: 'SIGIN_PASSWORD_STEP',
|
|
504
460
|
element: SignInPasswordPage
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
508
|
-
element: SignInOperatorError
|
|
509
461
|
}
|
|
510
462
|
];
|
|
511
463
|
export var entityFeatureScreens = [
|
|
@@ -533,11 +485,7 @@ export var entityFeatureScreens = [
|
|
|
533
485
|
name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
534
486
|
element: EntitySuccessWithFlowPage
|
|
535
487
|
},
|
|
536
|
-
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
537
|
-
{
|
|
538
|
-
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
539
|
-
element: EntityOperatorError
|
|
540
|
-
}
|
|
488
|
+
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
541
489
|
];
|
|
542
490
|
export var brandFeatureScreens = [
|
|
543
491
|
{
|
|
@@ -568,11 +516,7 @@ export var brandFeatureScreens = [
|
|
|
568
516
|
name: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
569
517
|
element: BrandSuccessWithFlowPage
|
|
570
518
|
},
|
|
571
|
-
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
572
|
-
{
|
|
573
|
-
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
574
|
-
element: BrandOperatorError
|
|
575
|
-
}
|
|
519
|
+
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
576
520
|
];
|
|
577
521
|
export var boardFeatureScreens = [
|
|
578
522
|
{
|
|
@@ -586,9 +530,5 @@ export var boardFeatureScreens = [
|
|
|
586
530
|
{
|
|
587
531
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
588
532
|
element: BoardSuccessWithFlowPage
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
592
|
-
element: BoardOperatorError
|
|
593
533
|
}
|
|
594
534
|
];
|
|
@@ -2,7 +2,6 @@ import { LibConfig } from '../../@types';
|
|
|
2
2
|
export interface IndividualLibProps extends LibConfig {
|
|
3
3
|
verifyToken?: string;
|
|
4
4
|
configToken?: string;
|
|
5
|
-
loaderColor?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function IndividualElement(props: IndividualLibProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): {
|
|
@@ -36,7 +36,7 @@ import { individualFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Individual = memo(function (_a) {
|
|
39
|
-
var configToken = _a.configToken, verifyToken = _a.verifyToken,
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
41
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
42
42
|
var _c = useAppSelector(individualSelector), customLoading = _c.customLoading, individualError = _c.error, loading = _c.loading;
|
|
@@ -49,11 +49,8 @@ var Individual = memo(function (_a) {
|
|
|
49
49
|
loadingScreenName: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
|
-
mode: props.mode,
|
|
53
52
|
internalToken: verifyToken,
|
|
54
|
-
settingLoading: settingLoading
|
|
55
|
-
operatorErrorScreenName: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
56
|
-
isValidOperator: data.isValidOperator
|
|
53
|
+
settingLoading: settingLoading
|
|
57
54
|
});
|
|
58
55
|
React.useEffect(function () {
|
|
59
56
|
initializeGTM();
|
|
@@ -61,8 +58,8 @@ var Individual = memo(function (_a) {
|
|
|
61
58
|
title: 'Individual'
|
|
62
59
|
});
|
|
63
60
|
}, []);
|
|
64
|
-
var initialLoading = verifyToken
|
|
65
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
61
|
+
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
62
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
66
63
|
var Element = _a.element, name = _a.name;
|
|
67
64
|
var isActive = activeScreen.name === name;
|
|
68
65
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -17,9 +17,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
17
17
|
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import { alpha, styled } from '@mui/material/styles';
|
|
20
|
-
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified
|
|
20
|
+
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
21
21
|
import { DocumentPurpose, IndividualType } from '../../../../@types';
|
|
22
|
-
import { deepCopy, getIndividualType, isKW
|
|
22
|
+
import { deepCopy, getIndividualType, isKW } from '../../../../utils';
|
|
23
23
|
import Form from '../../../../components/Form';
|
|
24
24
|
import Collapse from '../../../../components/Collapse';
|
|
25
25
|
import Text from '../../../../components/Text';
|
|
@@ -37,7 +37,6 @@ import SignatureFile from './SignatureFile';
|
|
|
37
37
|
import ShareCount from './ShareCount';
|
|
38
38
|
import ShareValue from './ShareValue';
|
|
39
39
|
import { getFileDetailsFromDocument } from '../../../../utils';
|
|
40
|
-
import IsAuthorizedSwitch from './IsAuthorizedSwitch';
|
|
41
40
|
var TextBoxStyled = styled(Box)(function (_a) {
|
|
42
41
|
var theme = _a.theme;
|
|
43
42
|
return (__assign(__assign({ display: 'flex', justifyContent: 'center', flexDirection: 'row', padding: theme.spacing(1.8, 2.5, 1.8, 2.5) }, theme.typography.body1), { lineHeight: theme.spacing(2.5), color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium }));
|
|
@@ -53,21 +52,19 @@ var ListType;
|
|
|
53
52
|
ListType["OccupationList"] = "OccupationList";
|
|
54
53
|
})(ListType || (ListType = {}));
|
|
55
54
|
var AdditionalIndividualInfo = function (_a) {
|
|
56
|
-
var _b
|
|
55
|
+
var _b;
|
|
57
56
|
var t = useTranslation().t;
|
|
58
57
|
var isAr = useLanguage().isAr;
|
|
59
58
|
var dispatch = useAppDispatch();
|
|
60
|
-
var
|
|
59
|
+
var _c = useAppSelector(individualSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
61
60
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
62
61
|
var verify = data.verify;
|
|
63
62
|
var user = (verify.responseBody || {}).user;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
63
|
+
var _d = data.individualData, occupation = _d.occupation, sourceIncome = _d.sourceIncome, monthlyIncome = _d.monthlyIncome, employerName = _d.employerName, isPEP = _d.isPEP, isInfluencer = _d.isInfluencer, civilID = _d.civilID, signatureFileId = _d.signatureFileId, civilIDUploading = _d.civilIDUploading, signatureFileUploading = _d.signatureFileUploading, shareCount = _d.shareCount, shareValue = _d.shareValue;
|
|
64
|
+
var _e = user || {}, documents = _e.documents, is_authorized = _e.is_authorized, data_status = _e.data_status, data_verification = _e.data_verification, names = _e.names, role = _e.role, occupationRes = _e.occupation, is_relative_PEP = _e.is_relative_PEP, is_influencer = _e.is_influencer, objects = _e.objects;
|
|
66
65
|
var isKWCountry = React.useMemo(function () { return isKW(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
67
|
-
var isOtherThanKWAndSa = React.useMemo(function () { return !isKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
68
|
-
var showIsAuthorized = isOtherThanKWAndSa;
|
|
69
66
|
var methods = useForm({
|
|
70
|
-
resolver: yupResolver(IndividualInfoValidationSchema(objects, isKWCountry
|
|
67
|
+
resolver: yupResolver(IndividualInfoValidationSchema(objects, isKWCountry)),
|
|
71
68
|
defaultValues: {
|
|
72
69
|
occupation: occupation,
|
|
73
70
|
sourceIncome: sourceIncome,
|
|
@@ -80,8 +77,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
80
77
|
civilIDUploading: civilIDUploading,
|
|
81
78
|
signatureFileUploading: signatureFileUploading,
|
|
82
79
|
shareCount: shareCount,
|
|
83
|
-
shareValue: shareValue
|
|
84
|
-
isAuthorized: isAuthorized
|
|
80
|
+
shareValue: shareValue
|
|
85
81
|
},
|
|
86
82
|
mode: 'onChange'
|
|
87
83
|
});
|
|
@@ -95,57 +91,22 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
95
91
|
civilID: defaultCivilIdFiles,
|
|
96
92
|
signatureFileId: defaultSignatureFiles
|
|
97
93
|
});
|
|
98
|
-
var isDirty = useFormDirtyCheck(methods, {
|
|
99
|
-
occupation: ((_b = occupationRes === null || occupationRes === void 0 ? void 0 : occupationRes.chapter) === null || _b === void 0 ? void 0 : _b.id) && { id: occupationRes.chapter.id },
|
|
100
|
-
sourceIncome: source_income === null || source_income === void 0 ? void 0 : source_income[0],
|
|
101
|
-
monthlyIncome: monthly_income,
|
|
102
|
-
employerName: '',
|
|
103
|
-
isPEP: is_relative_PEP,
|
|
104
|
-
isInfluencer: is_influencer,
|
|
105
|
-
shareCount: (_c = shares === null || shares === void 0 ? void 0 : shares.count) === null || _c === void 0 ? void 0 : _c.toString(),
|
|
106
|
-
shareValue: (_d = shares === null || shares === void 0 ? void 0 : shares.value) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
107
|
-
isAuthorized: is_authorized
|
|
108
|
-
}, [
|
|
109
|
-
{
|
|
110
|
-
name: 'occupation',
|
|
111
|
-
keys: ['id']
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: 'sourceIncome',
|
|
115
|
-
keys: ['id']
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: 'monthlyIncome',
|
|
119
|
-
keys: ['id']
|
|
120
|
-
}
|
|
121
|
-
]).isDirty;
|
|
122
94
|
var noneEditable = useDataNoneEditable(data_status, [
|
|
123
95
|
'occupation',
|
|
124
96
|
'source_of_income',
|
|
125
97
|
'monthly_income',
|
|
126
98
|
'is_relative_PEP',
|
|
127
|
-
'is_influencer'
|
|
128
|
-
'is_authorized'
|
|
99
|
+
'is_influencer'
|
|
129
100
|
]);
|
|
130
101
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
131
102
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
132
103
|
var dataVerified = useDataVerified(data_verification, ['occupation', 'is_relative_PEP', 'is_influencer']);
|
|
133
|
-
var isOccupationVerified = dataVerified['occupation'] && (occupationRes === null || occupationRes === void 0 ? void 0 : occupationRes.id) === ((
|
|
104
|
+
var isOccupationVerified = dataVerified['occupation'] && (occupationRes === null || occupationRes === void 0 ? void 0 : occupationRes.id) === ((_b = watch('occupation')) === null || _b === void 0 ? void 0 : _b.id);
|
|
134
105
|
var isPEPSwitchVerified = dataVerified['is_relative_PEP'] && is_relative_PEP === watch('isPEP');
|
|
135
106
|
var isInfluencerSwitchVerified = dataVerified['is_influencer'] && is_influencer === watch('isInfluencer');
|
|
136
|
-
var
|
|
137
|
-
var _j = React.useState(), listActive = _j[0], setListActive = _j[1];
|
|
138
|
-
React.useEffect(function () {
|
|
139
|
-
sendCustomEventToGTM({
|
|
140
|
-
event: 'Send Event',
|
|
141
|
-
event_category: 'Board Flows - Individual',
|
|
142
|
-
event_action: 'Income Details Page',
|
|
143
|
-
event_label: settingsData.businessCountry.iso2
|
|
144
|
-
});
|
|
145
|
-
}, []);
|
|
107
|
+
var _f = React.useState(), listActive = _f[0], setListActive = _f[1];
|
|
146
108
|
var onSubmit = function (data) {
|
|
147
|
-
|
|
148
|
-
dispatch(updateIndividualInfo(formData));
|
|
109
|
+
dispatch(updateIndividualInfo(deepCopy(getFelids(data))));
|
|
149
110
|
};
|
|
150
111
|
var onBack = function () {
|
|
151
112
|
dispatch(handleCurrentActiveScreen('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
@@ -170,10 +131,9 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
170
131
|
return t('type_board_member');
|
|
171
132
|
return t('type_user');
|
|
172
133
|
};
|
|
173
|
-
var
|
|
134
|
+
var _g = React.useMemo(function () { return getIndividualType(objects); }, [objects]), isUser = _g.isUser, isShareholder = _g.isShareholder, isBoardMember = _g.isBoardMember, isBuyer = _g.isBuyer;
|
|
174
135
|
var isUserORBuyerType = isUser || isBuyer;
|
|
175
136
|
var isUserORBoardMemberType = isUser || isBoardMember;
|
|
176
|
-
var isAuthorizedValue = watch('isAuthorized');
|
|
177
137
|
var showSignatureFile = isUserORBuyerType;
|
|
178
138
|
var showOccupationFile = isUserORBuyerType;
|
|
179
139
|
var showSourceOfIncome = isUserORBuyerType;
|
|
@@ -184,7 +144,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
184
144
|
var isMonthlyIncomeListActive = listActive === ListType.MonthlyIncomeList;
|
|
185
145
|
var isOccupationListActive = listActive === ListType.OccupationList;
|
|
186
146
|
var disabled = !methods.formState.isValid || civilIDUploading || signatureFileUploading;
|
|
187
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !listActive && !!is_authorized, timeout: 500 }, { children:
|
|
147
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !listActive && !!is_authorized, timeout: 500 }, { children: _jsx(TextBoxStyled, { children: getUserName() || '' }) })), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Occupation, { isVerified: isOccupationVerified, readOnly: readOnly['occupation'] || noneEditable['occupation'], onListOpen: function () { return handleMenuClick(ListType.OccupationList); }, onListClose: function () { return handleMenuClick(); }, show: showOccupationFile && !isMonthlyIncomeListActive && !isSourceOfIncomeListActive }), _jsx(SourceOfIncome, { readOnly: readOnly['sourceIncome'] || noneEditable['source_of_income'], onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: showSourceOfIncome && !isMonthlyIncomeListActive && !isOccupationListActive }), _jsx(MonthlyIncome, { readOnly: readOnly['monthlyIncome'] || noneEditable['monthly_income'], show: showSourceOfIncome && !isSourceOfIncomeListActive && !isOccupationListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ShareCount, { show: !listActive && showShares, readOnly: readOnly['shareCount'] }), _jsx(ShareValue, { show: !listActive && showShares, readOnly: readOnly['shareValue'] }), _jsxs(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: [_jsx(CivilIDFile, { show: isKWCountry, readOnly: readOnly['civilID'], defaultFiles: defaultCivilIdFiles }), _jsx(SignatureFile, { show: is_authorized && showSignatureFile, readOnly: readOnly['signatureFileId'], defaultFiles: defaultSignatureFiles })] })), _jsx(PEPSwitch, { show: showIsPEP && !listActive, readOnly: readOnly['isPEP'] || noneEditable['is_relative_PEP'], isVerified: isPEPSwitchVerified }), _jsx(InfluencerSwitch, { show: showIsInfluencer && isKWCountry && !listActive, readOnly: readOnly['isInfluencer'] || noneEditable['is_influencer'], isVerified: isInfluencerSwitchVerified })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) }))] }));
|
|
188
148
|
};
|
|
189
149
|
export default React.memo(AdditionalIndividualInfo);
|
|
190
150
|
AdditionalIndividualInfo.defaultProps = {};
|
|
@@ -16,7 +16,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
18
|
import { settingsSelector } from '../../../../app/settings';
|
|
19
|
-
import {
|
|
19
|
+
import { hasVerifiedValue } from '../../../../utils';
|
|
20
20
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
@@ -52,9 +52,6 @@ var MonthlyIncome = function (props) {
|
|
|
52
52
|
return false;
|
|
53
53
|
return hasVerifiedValue(user === null || user === void 0 ? void 0 : user.data_verification, "monthly_income.".concat(item.id));
|
|
54
54
|
};
|
|
55
|
-
var getCurrency = React.useMemo(function () {
|
|
56
|
-
return t(getCurrencyByCountryIso2(countryCode.iso2));
|
|
57
|
-
}, [countryCode.iso2]);
|
|
58
55
|
React.useEffect(function () {
|
|
59
56
|
if ((monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.length) > 0) {
|
|
60
57
|
setIncomeList(monthlyIncomeList);
|
|
@@ -84,7 +81,7 @@ var MonthlyIncome = function (props) {
|
|
|
84
81
|
var income = monthlyIncomeControl.field.value;
|
|
85
82
|
var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
86
83
|
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: t('please_enter_actual_income', {
|
|
87
|
-
currency:
|
|
84
|
+
currency: t(data.currency)
|
|
88
85
|
}), required: true, readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
89
86
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIcon, { isVerified: isMonthlyIncomeVerified(item) })] }));
|
|
90
87
|
} }) }))] })) })));
|
|
@@ -14,9 +14,8 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import Collapse from '@mui/material/Collapse';
|
|
17
|
-
import { formatNumberAsCurrency,
|
|
17
|
+
import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
|
|
18
18
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
-
import { settingsSelector } from '../../../../app/settings';
|
|
20
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
20
|
import Input from '../../../shared/Input';
|
|
22
21
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
@@ -25,11 +24,10 @@ var ShareValue = function (_a) {
|
|
|
25
24
|
var _b;
|
|
26
25
|
var show = _a.show, readOnly = _a.readOnly;
|
|
27
26
|
var t = useTranslation().t;
|
|
28
|
-
var
|
|
27
|
+
var data = useAppSelector(individualSelector).data;
|
|
29
28
|
var control = useFormContext().control;
|
|
30
29
|
var bckError = useAppSelector(individualSelector).error;
|
|
31
30
|
var dispatch = useAppDispatch();
|
|
32
|
-
var countryCode = settingsData.businessCountry;
|
|
33
31
|
var handleChange = function (_a) {
|
|
34
32
|
var target = _a.target;
|
|
35
33
|
if (bckError)
|
|
@@ -37,14 +35,11 @@ var ShareValue = function (_a) {
|
|
|
37
35
|
var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
|
|
38
36
|
shareValueControl.field.onChange(value);
|
|
39
37
|
};
|
|
40
|
-
var getCurrency = React.useMemo(function () {
|
|
41
|
-
return t(getCurrencyByCountryIso2(countryCode.iso2));
|
|
42
|
-
}, [countryCode.iso2]);
|
|
43
38
|
var shareValueControl = useController({ control: control, name: 'shareValue' });
|
|
44
39
|
var shareValue = shareValueControl.field.value;
|
|
45
40
|
var error = (_b = shareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
46
41
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('share_value_label', {
|
|
47
|
-
currency:
|
|
42
|
+
currency: t(data.currency)
|
|
48
43
|
}), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: shareValue, error: error }) }) })) })));
|
|
49
44
|
};
|
|
50
45
|
export default React.memo(ShareValue);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { IndividualType } from '../../../../@types';
|
|
3
|
-
export declare const IndividualInfoValidationSchema: (objects: Array<IndividualType>, isKWCountry: boolean
|
|
3
|
+
export declare const IndividualInfoValidationSchema: (objects: Array<IndividualType>, isKWCountry: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
4
4
|
occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
5
5
|
sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
6
6
|
monthlyIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
@@ -10,7 +10,6 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
|
|
|
10
10
|
isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
|
|
11
11
|
shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
12
12
|
shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
13
|
-
isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
14
13
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
14
|
occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
16
15
|
sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
@@ -21,7 +20,6 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
|
|
|
21
20
|
isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
|
|
22
21
|
shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
23
22
|
shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
24
|
-
isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
25
23
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
26
24
|
occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
27
25
|
sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
@@ -32,5 +30,4 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
|
|
|
32
30
|
isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
|
|
33
31
|
shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
34
32
|
shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
35
|
-
isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
36
33
|
}>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { getIndividualType } from '../../../../utils';
|
|
3
|
-
export var IndividualInfoValidationSchema = function (objects, isKWCountry
|
|
3
|
+
export var IndividualInfoValidationSchema = function (objects, isKWCountry) {
|
|
4
4
|
var isUserType = getIndividualType(objects).isUser;
|
|
5
5
|
return yup.object().shape({
|
|
6
6
|
occupation: isUserType ? yup.object().required('alert_choose_occupation') : yup.object().optional(),
|
|
@@ -11,7 +11,6 @@ export var IndividualInfoValidationSchema = function (objects, isKWCountry, hasA
|
|
|
11
11
|
isPEP: isUserType ? yup.boolean().required('please_choose_relative_pep') : yup.boolean().optional().nullable(),
|
|
12
12
|
isInfluencer: isUserType && isKWCountry ? yup.boolean().required('please_choose_are_you_influncer') : yup.boolean().optional().nullable(),
|
|
13
13
|
shareCount: yup.string().optional(),
|
|
14
|
-
shareValue: yup.string().optional()
|
|
15
|
-
isAuthorized: hasAuthorizedField ? yup.boolean().required('please_choose_is_authorized') : yup.boolean().optional()
|
|
14
|
+
shareValue: yup.string().optional()
|
|
16
15
|
});
|
|
17
16
|
};
|
|
@@ -54,7 +54,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
54
54
|
import { styled } from '@mui/material/styles';
|
|
55
55
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
56
56
|
import { useAppDispatch } from '../../../../hooks';
|
|
57
|
-
import { isValidEmail
|
|
57
|
+
import { isValidEmail } from '../../../../utils';
|
|
58
58
|
import Collapse from '../../../../components/Collapse';
|
|
59
59
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
60
60
|
import Input from '../../../shared/Input';
|
|
@@ -103,8 +103,7 @@ var Email = function (_a) {
|
|
|
103
103
|
}
|
|
104
104
|
}, [emailValue, error]);
|
|
105
105
|
var handleEmailChange = function (event) {
|
|
106
|
-
|
|
107
|
-
emailControl.field.onChange(value);
|
|
106
|
+
emailControl.field.onChange(event.target.value);
|
|
108
107
|
};
|
|
109
108
|
var clearEmail = function () {
|
|
110
109
|
emailControl.field.onChange('');
|
|
@@ -16,13 +16,11 @@ import Box from '@mui/material/Box';
|
|
|
16
16
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
19
|
+
import Button from '../../../../components/Button';
|
|
19
20
|
import Collapse from '../../../../components/Collapse';
|
|
20
21
|
import Warning from '../../../../components/Warning';
|
|
21
|
-
import Button from '../../../../components/Button';
|
|
22
|
-
import Loader from '../../../../components/Loader';
|
|
23
|
-
import { sendCustomEventToGTM } from '../../../../utils';
|
|
24
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import { individualSelector
|
|
23
|
+
import { individualSelector } from '../../../app/individual/individualStore';
|
|
26
24
|
import UserList from './UserList';
|
|
27
25
|
var BoxStyled = styled(Box)(function (_a) {
|
|
28
26
|
var theme = _a.theme;
|
|
@@ -51,23 +49,12 @@ export var SubTitleStyled = styled(Text)(function (_a) {
|
|
|
51
49
|
var IndividualList = function () {
|
|
52
50
|
var dispatch = useAppDispatch();
|
|
53
51
|
var t = useTranslation().t;
|
|
54
|
-
var
|
|
52
|
+
var error = useAppSelector(individualSelector).error;
|
|
55
53
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
56
|
-
var flows = (data.verify.responseBody || {}).flows;
|
|
57
54
|
var onBack = function () {
|
|
58
|
-
|
|
59
|
-
event: 'Send Event',
|
|
60
|
-
event_category: 'Board Flows - Individual',
|
|
61
|
-
event_action: 'Individual Details Back Button',
|
|
62
|
-
event_label: settingsData.businessCountry.iso2
|
|
63
|
-
});
|
|
64
|
-
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
|
|
65
|
-
dispatch(handlePrevScreenStep());
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
dispatch(retrieveBoardStatus());
|
|
55
|
+
dispatch(handlePrevScreenStep());
|
|
69
56
|
};
|
|
70
57
|
var hideBack = settingsData.appConfig.mode === 'content';
|
|
71
|
-
return (_jsxs(ScreenContainer, { children: [_jsxs(BoxStyled, { children: [_jsxs(ContentStyled, { children: [_jsx(TitleStyled, { children: t('company_individuals') }), _jsx(SubTitleStyled, { children: t('company_individuals_add_or_request_details') })] }), _jsx(UserList, {})] }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'error' }, { children: t(error || '') })) })), !hideBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children:
|
|
58
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(BoxStyled, { children: [_jsxs(ContentStyled, { children: [_jsx(TitleStyled, { children: t('company_individuals') }), _jsx(SubTitleStyled, { children: t('company_individuals_add_or_request_details') })] }), _jsx(UserList, {})] }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'error' }, { children: t(error || '') })) })), !hideBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('back') })))] }));
|
|
72
59
|
};
|
|
73
60
|
export default IndividualList;
|