@tap-payments/auth-jsconnect 2.0.43-test → 2.0.43
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 +50 -20
- package/build/@types/app.js +9 -3
- package/build/@types/form.d.ts +21 -12
- package/build/api/auth.d.ts +28 -5
- package/build/api/auth.js +36 -1
- package/build/api/axios.js +2 -2
- package/build/api/brand.d.ts +2 -1
- package/build/api/brand.js +10 -1
- package/build/api/country.d.ts +3 -1
- package/build/api/country.js +3 -1
- package/build/api/data.d.ts +38 -7
- package/build/api/data.js +57 -17
- package/build/api/entity.d.ts +51 -5
- package/build/api/entity.js +39 -9
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +3 -1
- package/build/api/index.d.ts +44 -14
- package/build/api/individual.d.ts +76 -19
- package/build/api/individual.js +29 -2
- package/build/api/lead.d.ts +9 -6
- package/build/api/lead.js +8 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +0 -2
- package/build/app/settings.d.ts +9 -2
- package/build/app/settings.js +22 -11
- package/build/app/store.d.ts +0 -2
- package/build/assets/locales/ar.json +258 -183
- package/build/assets/locales/en.json +190 -108
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +6 -8
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -3
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
- package/build/components/ArabicDatePicker/index.d.ts +2 -0
- package/build/components/ArabicDatePicker/index.js +2 -0
- package/build/components/ArabicDatePicker/style.css +24 -0
- package/build/components/FileInput/DragAndDrop.d.ts +10 -1
- package/build/components/FileInput/DragAndDrop.js +108 -8
- package/build/components/Lottie/Lottie.d.ts +878 -0
- package/build/components/Lottie/Lottie.js +58 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPField/OTPField.d.ts +2 -1
- package/build/components/OTPField/OTPField.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
- package/build/constants/api.d.ts +6 -0
- package/build/constants/api.js +14 -1
- package/build/constants/app.d.ts +5 -5
- package/build/constants/app.js +62 -32
- package/build/constants/assets.d.ts +14 -0
- package/build/constants/assets.js +16 -2
- package/build/constants/dummy.d.ts +1 -1
- package/build/constants/dummy.js +2 -2
- package/build/constants/validation.d.ts +10 -0
- package/build/constants/validation.js +11 -1
- package/build/features/app/auth/authStore.d.ts +30 -4
- package/build/features/app/auth/authStore.js +182 -20
- package/build/features/app/bank/bankStore.d.ts +16 -0
- package/build/features/app/bank/bankStore.js +88 -41
- package/build/features/app/business/businessStore.d.ts +33 -5
- package/build/features/app/business/businessStore.js +487 -350
- package/build/features/app/connect/connectStore.d.ts +34 -31
- package/build/features/app/connect/connectStore.js +427 -300
- package/build/features/app/entity/entityStore.d.ts +40 -8
- package/build/features/app/entity/entityStore.js +387 -149
- package/build/features/app/individual/individualStore.d.ts +18 -0
- package/build/features/app/individual/individualStore.js +168 -89
- package/build/features/app/password/passwordStore.d.ts +1 -7
- package/build/features/app/password/passwordStore.js +31 -20
- package/build/features/app/tax/taxStore.js +23 -16
- package/build/features/auth/Auth.d.ts +2 -1
- package/build/features/auth/Auth.js +37 -9
- package/build/features/auth/screens/NID/DOB.d.ts +7 -0
- package/build/features/auth/screens/NID/DOB.js +47 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
- package/build/features/auth/screens/NID/IDNumber.js +64 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +68 -0
- package/build/features/auth/screens/NID/TAC.d.ts +3 -0
- package/build/features/auth/screens/NID/TAC.js +87 -0
- package/build/features/auth/screens/NID/index.d.ts +3 -0
- package/build/features/auth/screens/NID/index.js +2 -0
- package/build/features/auth/screens/NID/validation.d.ts +27 -0
- package/build/features/auth/screens/NID/validation.js +19 -0
- package/build/features/auth/screens/OTP/OTP.js +8 -4
- package/build/features/auth/screens/OTP/OTPInput.js +9 -2
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- package/build/features/bank/screens/BankDetails/BankName.js +2 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
- package/build/features/bank/screens/BankDetails/IBAN.js +4 -1
- package/build/features/bank/screens/BankDetails/validation.js +2 -2
- package/build/features/bank/screens/Success/Success.js +7 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -12
- package/build/features/business/Business.js +4 -4
- package/build/features/business/screens/Activities/Activities.js +16 -17
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
- package/build/features/business/screens/Activities/validation.d.ts +0 -51
- package/build/features/business/screens/Activities/validation.js +4 -10
- package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
- package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
- package/build/features/business/screens/BusinessType/EntityName.js +56 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +26 -7
- package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseType.js +78 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
- package/build/features/business/screens/BusinessType/validation.js +52 -3
- package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/business/screens/CivilID/CivilID.js +67 -0
- package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/business/screens/CivilID/IDNumber.js +59 -0
- package/build/features/business/screens/CivilID/index.d.ts +3 -0
- package/build/features/business/screens/CivilID/index.js +2 -0
- package/build/features/business/screens/CivilID/validation.d.ts +8 -0
- package/build/features/business/screens/CivilID/validation.js +4 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
- package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
- package/build/features/business/screens/Customers/Customers.js +15 -9
- package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
- package/build/features/business/screens/OTP/OTP.js +15 -2
- package/build/features/business/screens/Success/Success.js +10 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -11
- package/build/features/business/screens/Verify/Verify.js +4 -4
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +159 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +23 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/business/screens/VerifyPACI/index.js +2 -0
- package/build/features/connect/Connect.d.ts +1 -0
- package/build/features/connect/Connect.js +38 -10
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +102 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +11 -3
- package/build/features/connect/screens/Individual/Individual.js +44 -28
- package/build/features/connect/screens/Merchant/BrandList.js +15 -7
- package/build/features/connect/screens/Merchant/BrandName.js +7 -4
- package/build/features/connect/screens/Merchant/Merchant.js +48 -65
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +4 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +28 -31
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +3 -4
- package/build/features/connect/screens/Merchant/SocialMedia.js +106 -112
- package/build/features/connect/screens/Merchant/TAC.js +8 -2
- package/build/features/connect/screens/Merchant/validation.d.ts +13 -123
- package/build/features/connect/screens/Merchant/validation.js +106 -173
- package/build/features/connect/screens/Mobile/Mobile.js +33 -12
- package/build/features/connect/screens/NID/NID.js +5 -1
- package/build/features/connect/screens/OTP/OTP.js +20 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +8 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +23 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.js +6 -6
- package/build/features/entity/screens/Customers/CustomerLocations.d.ts +118 -0
- package/build/features/entity/screens/Customers/CustomerLocations.js +171 -0
- package/build/features/entity/screens/Customers/Customers.d.ts +5 -0
- package/build/features/entity/screens/Customers/Customers.js +90 -0
- package/build/features/entity/screens/Customers/ExpectedCustomers.d.ts +8 -0
- package/build/features/entity/screens/Customers/ExpectedCustomers.js +98 -0
- package/build/features/entity/screens/Customers/ExpectedSalesRange.d.ts +8 -0
- package/build/features/entity/screens/Customers/ExpectedSalesRange.js +127 -0
- package/build/features/entity/screens/Customers/RefundPolicy.d.ts +36 -0
- package/build/features/entity/screens/Customers/RefundPolicy.js +84 -0
- package/build/features/entity/screens/Customers/TransactionPolicy.d.ts +3 -0
- package/build/features/entity/screens/Customers/TransactionPolicy.js +44 -0
- package/build/features/entity/screens/Customers/index.d.ts +3 -0
- package/build/features/entity/screens/Customers/index.js +2 -0
- package/build/features/entity/screens/Customers/validation.d.ts +20 -0
- package/build/features/entity/screens/Customers/validation.js +13 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +2 -1
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +25 -15
- package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +3 -0
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +73 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +38 -10
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +20 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +34 -5
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +13 -18
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +75 -41
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +76 -10
- package/build/features/entity/screens/Success/Success.js +7 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +11 -10
- package/build/features/entity/screens/Verify/Verify.js +18 -5
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +30 -7
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +18 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
- package/build/features/individual/screens/Success/Success.js +7 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -12
- package/build/features/individual/screens/Verify/Verify.js +18 -5
- package/build/features/password/Password.js +4 -4
- package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
- package/build/features/password/screens/OTP/OTP.js +15 -2
- package/build/features/password/screens/Success/Success.js +7 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -13
- package/build/features/password/screens/Verify/Verify.js +16 -3
- package/build/features/shared/Background/Background.d.ts +2 -5
- package/build/features/shared/Background/Background.js +7 -3
- package/build/features/shared/Button/Button.js +1 -0
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/MobileButton.d.ts +2 -1
- package/build/features/shared/Button/MobileButton.js +2 -2
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +71 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +10 -3
- package/build/features/shared/UploadFile/UploadFile.js +24 -9
- package/build/features/signIn/SignIn.js +4 -4
- package/build/features/signIn/screens/Email/Email.js +4 -2
- package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
- package/build/features/signIn/screens/OTP/OTP.js +14 -1
- package/build/features/signIn/screens/Password/Password.js +15 -2
- package/build/features/tax/Tax.js +6 -6
- package/build/features/tax/screens/Success/Success.js +9 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +16 -3
- package/build/features/tax/screens/Verify/Verify.js +16 -3
- package/build/hooks/index.d.ts +2 -0
- package/build/hooks/index.js +2 -0
- package/build/hooks/useAppConfig.d.ts +3 -1
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useErrorListener.js +0 -6
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
- package/build/hooks/useSetFromDefaultValues.js +24 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +1 -4
- package/build/utils/array.d.ts +50 -1
- package/build/utils/array.js +66 -0
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +3 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +5 -0
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/index.d.ts +2 -0
- package/build/utils/index.js +2 -0
- package/build/utils/locale.js +1 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +12 -0
- package/build/utils/string.d.ts +14 -0
- package/build/utils/string.js +85 -3
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +4 -3
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
- package/build/features/business/screens/Activities/SalesChannels.js +0 -112
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
- package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
- package/build/features/otp/screens/OTPVerify/index.js +0 -2
- package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
- package/build/features/otp/screens/OTPVerify/validation.js +0 -4
|
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
|
|
|
16
16
|
import { FlowsButtons } from '../../../shared/Button';
|
|
17
17
|
import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
18
18
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
-
import { getResetFlowUrl, showLastFour } from '../../../../utils';
|
|
19
|
+
import { getResetFlowUrl, shortenBankName, showLastFour } from '../../../../utils';
|
|
20
20
|
import { entitySelector } from '../../../app/entity/entityStore';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
@@ -44,23 +44,24 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
var SuccessWithFlowButtons = function () {
|
|
47
|
-
var _a, _b, _c;
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
48
|
var t = useTranslation().t;
|
|
49
49
|
var isAr = useLanguage().isAr;
|
|
50
50
|
var data = useAppSelector(entitySelector).data;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
51
|
+
var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank, merchant = _e.merchant, vatID = _e.vatID, user = _e.user;
|
|
52
|
+
var _f = useState([]), buttons = _f[0], setButtons = _f[1];
|
|
53
53
|
var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
|
|
54
54
|
var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
|
|
55
|
-
var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
|
|
55
|
+
var bankName = shortenBankName(bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
|
|
56
56
|
var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
|
|
57
57
|
var taxID = vatID || '';
|
|
58
58
|
var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
|
|
59
59
|
var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
|
|
60
60
|
var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
|
|
61
|
-
var
|
|
61
|
+
var identification = (user || {}).identification;
|
|
62
|
+
var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
|
|
62
63
|
var settings = useAppSelector(settingsSelector);
|
|
63
|
-
var
|
|
64
|
+
var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
|
|
64
65
|
var email = (contact || { email: '' }).email;
|
|
65
66
|
var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
|
|
66
67
|
var reMapFlowData = function (flows) {
|
|
@@ -74,10 +75,10 @@ var SuccessWithFlowButtons = function () {
|
|
|
74
75
|
var title = t("".concat(name, "_flow_").concat(type), {
|
|
75
76
|
individual_name: username.toLowerCase() + maskedId,
|
|
76
77
|
business_type: brandName,
|
|
77
|
-
license_number: t('masking_symbols') + showLastFour(licenseNumber),
|
|
78
|
+
license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
|
|
78
79
|
bank_name: bankName,
|
|
79
|
-
iban: t('masking_symbols') + iban,
|
|
80
|
-
tax_id: t('masking_symbols') + showLastFour(taxID)
|
|
80
|
+
iban: iban ? t('masking_symbols') + iban : '',
|
|
81
|
+
tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
|
|
81
82
|
});
|
|
82
83
|
var isCompleted = status === 'completed' && name !== 'password';
|
|
83
84
|
var isIndividual = name === 'individual';
|
|
@@ -9,9 +9,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
25
|
+
import { useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
|
|
15
26
|
import { useTranslation } from 'react-i18next';
|
|
16
27
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
28
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
@@ -47,18 +58,20 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
47
58
|
flexDirection: 'column'
|
|
48
59
|
}); });
|
|
49
60
|
var VerifyNumber = function (_a) {
|
|
50
|
-
var _b, _c
|
|
61
|
+
var _b, _c;
|
|
51
62
|
var dispatch = useAppDispatch();
|
|
52
|
-
var
|
|
63
|
+
var _d = useAppSelector(entitySelector), data = _d.data, loading = _d.loading, error = _d.error;
|
|
64
|
+
var _e = data.otpData, responseBody = _e.responseBody, defaultValues = __rest(_e, ["responseBody"]);
|
|
53
65
|
var methods = useForm({
|
|
54
66
|
resolver: yupResolver(OTPValidation),
|
|
55
|
-
defaultValues:
|
|
67
|
+
defaultValues: defaultValues,
|
|
56
68
|
mode: 'onChange'
|
|
57
69
|
});
|
|
70
|
+
useSetFromDefaultValues(methods, defaultValues);
|
|
58
71
|
var t = useTranslation().t;
|
|
59
72
|
var isAr = useLanguage().isAr;
|
|
60
73
|
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
61
|
-
var phone = (
|
|
74
|
+
var phone = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.sent_to;
|
|
62
75
|
React.useEffect(function () {
|
|
63
76
|
if (error && methods.formState.isValid && phone)
|
|
64
77
|
dispatch(clearError());
|
|
@@ -7,5 +7,4 @@ export declare const bankFeatureScreens: Array<FeatureScreenStep>;
|
|
|
7
7
|
export declare const taxFeatureScreens: Array<FeatureScreenStep>;
|
|
8
8
|
export declare const signInFeatureScreens: Array<FeatureScreenStep>;
|
|
9
9
|
export declare const entityFeatureScreens: Array<FeatureScreenStep>;
|
|
10
|
-
export declare const otpFeatureScreens: Array<FeatureScreenStep>;
|
|
11
10
|
export declare const authFeatureScreens: Array<FeatureScreenStep>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import MobileScreen from './connect/screens/Mobile';
|
|
2
2
|
import NIDScreen from './connect/screens/NID';
|
|
3
|
+
import ConnectCivilIDScreen from '../features/connect/screens/CivilID';
|
|
4
|
+
import ConnectVerifyPACIScreen from './connect/screens/VerifyPACI';
|
|
3
5
|
import IndividualScreen from './connect/screens/Individual';
|
|
4
6
|
import MerchantInfoScreen from './connect/screens/Merchant';
|
|
5
7
|
import ConnectOTPScreen from './connect/screens/OTP';
|
|
@@ -13,6 +15,8 @@ import ActivitiesPage from './business/screens/Activities';
|
|
|
13
15
|
import SuccessPage from './business/screens/Success';
|
|
14
16
|
import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
|
|
15
17
|
import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
18
|
+
import BusCivilIDscreen from './business/screens/CivilID';
|
|
19
|
+
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
16
20
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
17
21
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
18
22
|
import PasswordOTPPage from './password/screens/OTP';
|
|
@@ -40,16 +44,21 @@ import SignInOTPPage from './signIn/screens/OTP';
|
|
|
40
44
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
41
45
|
import EntityVerifyPage from './entity/screens/Verify';
|
|
42
46
|
import EntityInfoConfirmPage from './entity/screens/EntityInfoConfirm';
|
|
47
|
+
import EntityCustomersPage from './entity/screens/Customers';
|
|
43
48
|
import EntitySuccessPage from './entity/screens/Success';
|
|
44
49
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
45
50
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
46
|
-
import
|
|
51
|
+
import AuthNIDPage from './auth/screens/NID';
|
|
47
52
|
import AuthVerifyPage from './auth/screens/OTP';
|
|
48
53
|
export var connectFeatureScreens = [
|
|
49
54
|
{
|
|
50
55
|
name: 'CONNECT_NID_STEP',
|
|
51
56
|
element: NIDScreen
|
|
52
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: 'CONNECT_CIVIL_ID_STEP',
|
|
60
|
+
element: ConnectCivilIDScreen
|
|
61
|
+
},
|
|
53
62
|
{
|
|
54
63
|
name: 'CONNECT_MOBILE_STEP',
|
|
55
64
|
element: MobileScreen
|
|
@@ -58,6 +67,10 @@ export var connectFeatureScreens = [
|
|
|
58
67
|
name: 'CONNECT_OTP_STEP',
|
|
59
68
|
element: ConnectOTPScreen
|
|
60
69
|
},
|
|
70
|
+
{
|
|
71
|
+
name: 'CONNECT_VERIFY_PACI_STEP',
|
|
72
|
+
element: ConnectVerifyPACIScreen
|
|
73
|
+
},
|
|
61
74
|
{
|
|
62
75
|
name: 'CONNECT_INDIVIDUAL_STEP',
|
|
63
76
|
element: IndividualScreen
|
|
@@ -80,6 +93,14 @@ export var businessFeatureScreens = [
|
|
|
80
93
|
name: 'BUSINESS_IDBOD_STEP',
|
|
81
94
|
element: IDBODPage
|
|
82
95
|
},
|
|
96
|
+
{
|
|
97
|
+
name: 'BUSINESS_CIVIL_ID_STEP',
|
|
98
|
+
element: BusCivilIDscreen
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'BUSINESS_VERIFY_PACI_STEP',
|
|
102
|
+
element: BusVerifyPACIScreen
|
|
103
|
+
},
|
|
83
104
|
{
|
|
84
105
|
name: 'BUSINESS_OTP_STEP',
|
|
85
106
|
element: BusinessOTPPage
|
|
@@ -207,6 +228,10 @@ export var entityFeatureScreens = [
|
|
|
207
228
|
name: 'ENTITY_INFO_STEP',
|
|
208
229
|
element: EntityInfoConfirmPage
|
|
209
230
|
},
|
|
231
|
+
{
|
|
232
|
+
name: 'ENTITY_CUSTOMERS_STEP',
|
|
233
|
+
element: EntityCustomersPage
|
|
234
|
+
},
|
|
210
235
|
{
|
|
211
236
|
name: 'ENTITY_DETAILS_SUCCESS_STEP',
|
|
212
237
|
element: EntitySuccessPage
|
|
@@ -217,13 +242,11 @@ export var entityFeatureScreens = [
|
|
|
217
242
|
},
|
|
218
243
|
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
219
244
|
];
|
|
220
|
-
export var otpFeatureScreens = [
|
|
221
|
-
{
|
|
222
|
-
name: 'OTP_VERIFY_STEP',
|
|
223
|
-
element: OtpVerifyPage
|
|
224
|
-
}
|
|
225
|
-
];
|
|
226
245
|
export var authFeatureScreens = [
|
|
246
|
+
{
|
|
247
|
+
name: 'AUTH_NID_STEP',
|
|
248
|
+
element: AuthNIDPage
|
|
249
|
+
},
|
|
227
250
|
{
|
|
228
251
|
name: 'AUTH_VERIFY_STEP',
|
|
229
252
|
element: AuthVerifyPage
|
|
@@ -28,7 +28,7 @@ var Individual = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error;
|
|
31
|
+
var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error, loading = _b.loading;
|
|
32
32
|
useAppConfig(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props));
|
|
33
33
|
useErrorListener(individualError || error);
|
|
34
34
|
useStepStartedListener();
|
|
@@ -43,10 +43,10 @@ var Individual = memo(function (props) {
|
|
|
43
43
|
dispatch(verifyLeadToken(token));
|
|
44
44
|
};
|
|
45
45
|
useEffect(function () {
|
|
46
|
-
if (!settingLoading)
|
|
46
|
+
if (!settingLoading && open)
|
|
47
47
|
verifyToken();
|
|
48
48
|
}, [settingLoading]);
|
|
49
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
|
|
49
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
|
|
50
50
|
var Element = _a.element, name = _a.name;
|
|
51
51
|
var isActive = activeScreen.name === name;
|
|
52
52
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -65,6 +65,6 @@ export function unmountIndividualLib(elementId, unmountTimeout) {
|
|
|
65
65
|
var _a;
|
|
66
66
|
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
67
67
|
removeElement(DIALOG_ID);
|
|
68
|
-
reactElement(elementId).unmount();
|
|
68
|
+
elementId && reactElement(elementId).unmount();
|
|
69
69
|
}, unmountTimeout);
|
|
70
70
|
}
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -9,13 +9,24 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import * as React from 'react';
|
|
14
25
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
15
26
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
27
|
import Box from '@mui/material/Box';
|
|
17
28
|
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
29
|
+
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
19
30
|
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
20
31
|
import Form from '../../../../components/Form';
|
|
21
32
|
import Collapse from '../../../../components/Collapse';
|
|
@@ -45,40 +56,22 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
45
56
|
var _b = useAppSelector(individualSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
46
57
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
47
58
|
var countries = settingsData.countries;
|
|
48
|
-
var _c = data.individualData
|
|
59
|
+
var _c = data.individualData, responseBody = _c.responseBody, defaultValues = __rest(_c, ["responseBody"]);
|
|
49
60
|
var methods = useForm({
|
|
50
61
|
resolver: yupResolver(IndividualInfoValidationSchema),
|
|
51
|
-
defaultValues:
|
|
62
|
+
defaultValues: defaultValues,
|
|
52
63
|
mode: 'onChange'
|
|
53
64
|
});
|
|
65
|
+
useSetFromDefaultValues(methods, defaultValues);
|
|
54
66
|
var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
|
|
55
67
|
var _e = React.useState(false), employerFieldsActive = _e[0], setEmployerFieldsActive = _e[1];
|
|
56
68
|
React.useEffect(function () {
|
|
57
69
|
var _a, _b;
|
|
58
|
-
if (((_b = (_a = methods.getValues('sourceIncome')) === null || _a === void 0 ? void 0 : _a.
|
|
70
|
+
if (((_b = (_a = methods.getValues('sourceIncome')) === null || _a === void 0 ? void 0 : _a.name.en) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'salary')
|
|
59
71
|
setEmployerFieldsActive(true);
|
|
60
|
-
else
|
|
72
|
+
else
|
|
61
73
|
setEmployerFieldsActive(false);
|
|
62
|
-
}
|
|
63
74
|
}, [methods.watch('sourceIncome')]);
|
|
64
|
-
React.useEffect(function () {
|
|
65
|
-
if (!!sourceIncome) {
|
|
66
|
-
methods.setValue('sourceIncome', sourceIncome);
|
|
67
|
-
}
|
|
68
|
-
if (!!monthlyIncome) {
|
|
69
|
-
methods.setValue('monthlyIncome', monthlyIncome);
|
|
70
|
-
}
|
|
71
|
-
if (!!employerLocation) {
|
|
72
|
-
methods.setValue('employerLocation', employerLocation);
|
|
73
|
-
}
|
|
74
|
-
if (!!occupation) {
|
|
75
|
-
methods.setValue('occupation', occupation);
|
|
76
|
-
}
|
|
77
|
-
if (isPEP !== undefined)
|
|
78
|
-
methods.setValue('isPEP', isPEP);
|
|
79
|
-
if (isInfluencer !== undefined)
|
|
80
|
-
methods.setValue('isInfluencer', isInfluencer);
|
|
81
|
-
}, [data.individualData]);
|
|
82
75
|
var onSubmit = function (data) {
|
|
83
76
|
dispatch(updateIndividualInfo(data));
|
|
84
77
|
};
|
|
@@ -95,7 +88,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
95
88
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Occupation, { onListOpen: function () { return handleMenuClick(ListType.OccupationList); }, onListClose: function () { return handleMenuClick(); }, show: !isEmployerLocationListActive && !isMonthlyIncomeListActive && !isSourceOfIncomeListActive }), _jsx(SourceOfIncome, { onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: !isEmployerLocationListActive && !isMonthlyIncomeListActive && !isOccupationListActive }), _jsx(MonthlyIncome, { show: !isEmployerLocationListActive && !isSourceOfIncomeListActive && !isOccupationListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EmployerName, { show: false }), _jsx(EmployerLocation, { show: !isSourceOfIncomeListActive &&
|
|
96
89
|
employerFieldsActive &&
|
|
97
90
|
!isMonthlyIncomeListActive &&
|
|
98
|
-
!isOccupationListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.EmployerLocationList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(PEPSwitch, { show: !listActive }), _jsx(InfluencerSwitch, { show: !listActive })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
91
|
+
!isOccupationListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.EmployerLocationList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(PEPSwitch, { show: !listActive }), _jsx(InfluencerSwitch, { show: !listActive })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
99
92
|
};
|
|
100
93
|
export default React.memo(AdditionalIndividualInfo);
|
|
101
94
|
AdditionalIndividualInfo.defaultProps = {};
|
|
@@ -35,6 +35,7 @@ import { individualSelector } from '../../../app/individual/individualStore';
|
|
|
35
35
|
import Text from '../../../../components/Text';
|
|
36
36
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
|
+
import Search from '../../../../features/shared/Search';
|
|
38
39
|
var Container = styled(Box)(function () { return ({
|
|
39
40
|
display: 'flex'
|
|
40
41
|
}); });
|
|
@@ -75,15 +76,26 @@ var MonthlyIncome = function (_a) {
|
|
|
75
76
|
var _a;
|
|
76
77
|
setAnchorEl(null);
|
|
77
78
|
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
79
|
+
if ((monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.length) > 0) {
|
|
80
|
+
setIncomeList(monthlyIncomeList);
|
|
81
|
+
}
|
|
78
82
|
};
|
|
79
83
|
var onSelectItem = function (source) {
|
|
80
84
|
onCloseList();
|
|
81
85
|
monthlyIncomeControl.field.onChange(source);
|
|
82
86
|
};
|
|
87
|
+
var handleSearch = function (value) {
|
|
88
|
+
var filteredList = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.filter(function (income) {
|
|
89
|
+
var _a, _b, _c, _d;
|
|
90
|
+
return ((_b = (_a = income === null || income === void 0 ? void 0 : income.range) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.replace(',', '').toLowerCase().includes(value.toLowerCase())) ||
|
|
91
|
+
((_d = (_c = income === null || income === void 0 ? void 0 : income.range) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.replace(',', '').toLowerCase().includes(value.toLowerCase()));
|
|
92
|
+
});
|
|
93
|
+
setIncomeList(filteredList);
|
|
94
|
+
};
|
|
83
95
|
var income = monthlyIncomeControl.field.value;
|
|
84
96
|
var error = (_b = monthlyIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
85
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(Input, { label: t('please_enter_actual_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(Input, { label: t('please_enter_actual_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), 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) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'range.en', list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
98
|
+
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(CheckIconStyled, {})] }));
|
|
99
|
+
} })] }))] })) })));
|
|
88
100
|
};
|
|
89
101
|
export default React.memo(MonthlyIncome);
|
|
@@ -35,6 +35,7 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
|
35
35
|
import Input from '../../../shared/Input';
|
|
36
36
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
|
+
import Search from '../../../../features/shared/Search';
|
|
38
39
|
var Container = styled(Box)(function () { return ({
|
|
39
40
|
display: 'flex'
|
|
40
41
|
}); });
|
|
@@ -80,10 +81,17 @@ var Occupation = function (_a) {
|
|
|
80
81
|
onCloseList();
|
|
81
82
|
occupationControl.field.onChange(occupation);
|
|
82
83
|
};
|
|
84
|
+
var handleSearch = function (value) {
|
|
85
|
+
var filteredList = occupationsList === null || occupationsList === void 0 ? void 0 : occupationsList.filter(function (occupation) {
|
|
86
|
+
return occupation.name.en.toLowerCase().includes(value.toLowerCase()) ||
|
|
87
|
+
occupation.name.ar.toLowerCase().includes(value.toLowerCase());
|
|
88
|
+
});
|
|
89
|
+
setOccupationList(filteredList);
|
|
90
|
+
};
|
|
83
91
|
var occupation = occupationControl.field.value;
|
|
84
92
|
var error = (_c = occupationControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
|
|
85
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('occupation_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('occupation_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name.ar : occupation === null || occupation === void 0 ? void 0 : occupation.name.en) || '', warningMessage: error && t(error) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'name.en', list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
94
|
+
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) && _jsx(CheckIconStyled, {})] }));
|
|
95
|
+
} })] }))] })) })));
|
|
88
96
|
};
|
|
89
97
|
export default Occupation;
|
|
@@ -82,8 +82,8 @@ var SourceOfIncome = function (_a) {
|
|
|
82
82
|
};
|
|
83
83
|
var source = sourceIncomeControl.field.value;
|
|
84
84
|
var error = (_c = sourceIncomeControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
|
|
85
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.
|
|
86
|
-
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.
|
|
85
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
86
|
+
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
|
|
87
87
|
} }) }))] })) })));
|
|
88
88
|
};
|
|
89
89
|
export default React.memo(SourceOfIncome);
|
|
@@ -7,10 +7,14 @@ import SuccessScreen from '../../../shared/SuccessScreen';
|
|
|
7
7
|
var Success = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
10
|
-
var _b = useAppSelector(individualSelector),
|
|
11
|
-
var
|
|
10
|
+
var _b = useAppSelector(individualSelector), error = _b.error, loading = _b.loading;
|
|
11
|
+
var _c = React.useState(false), clicked = _c[0], setClicked = _c[1];
|
|
12
|
+
React.useEffect(function () {
|
|
12
13
|
dispatch(updateBoardSuccess());
|
|
14
|
+
}, []);
|
|
15
|
+
var onSuccess = function () {
|
|
16
|
+
setClicked(true);
|
|
13
17
|
};
|
|
14
|
-
return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
|
|
18
|
+
return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
|
|
15
19
|
};
|
|
16
20
|
export default React.memo(Success);
|
|
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
|
|
|
16
16
|
import { FlowsButtons } from '../../../shared/Button';
|
|
17
17
|
import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
18
18
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
-
import { getResetFlowUrl, showLastFour } from '../../../../utils';
|
|
19
|
+
import { concatenateObjectValues, getResetFlowUrl, shortenBankName, showLastFour } from '../../../../utils';
|
|
20
20
|
import { individualSelector } from '../../../app/individual/individualStore';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
@@ -44,23 +44,27 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
var SuccessWithFlowButtons = function () {
|
|
47
|
-
var _a, _b, _c;
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
48
|
var t = useTranslation().t;
|
|
49
49
|
var isAr = useLanguage().isAr;
|
|
50
50
|
var data = useAppSelector(individualSelector).data;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
51
|
+
var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, user = _e.user;
|
|
52
|
+
var _f = useState([]), buttons = _f[0], setButtons = _f[1];
|
|
53
|
+
var _g = nameObj || {}, en = _g.en, ar = _g.ar;
|
|
54
|
+
var username = isAr
|
|
55
|
+
? concatenateObjectValues(ar || en, ['first', 'last'])
|
|
56
|
+
: concatenateObjectValues(en, ['first', 'last']);
|
|
54
57
|
var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
|
|
55
|
-
var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
|
|
58
|
+
var bankName = shortenBankName(bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
|
|
56
59
|
var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
|
|
57
|
-
var taxID = (entity === null || entity === void 0 ? void 0 : entity.
|
|
60
|
+
var taxID = (entity === null || entity === void 0 ? void 0 : entity.vat_id) || '';
|
|
58
61
|
var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
|
|
59
62
|
var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
|
|
60
63
|
var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
|
|
61
|
-
var
|
|
64
|
+
var identification = (user || {}).identification;
|
|
65
|
+
var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
|
|
62
66
|
var settings = useAppSelector(settingsSelector);
|
|
63
|
-
var
|
|
67
|
+
var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
|
|
64
68
|
var email = (contact || { email: '' }).email;
|
|
65
69
|
var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
|
|
66
70
|
var reMapFlowData = function (flows) {
|
|
@@ -74,10 +78,10 @@ var SuccessWithFlowButtons = function () {
|
|
|
74
78
|
var title = t("".concat(name, "_flow_").concat(type), {
|
|
75
79
|
individual_name: username.toLowerCase() + maskedId,
|
|
76
80
|
business_type: brandName,
|
|
77
|
-
license_number: t('masking_symbols') + showLastFour(licenseNumber),
|
|
81
|
+
license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
|
|
78
82
|
bank_name: bankName,
|
|
79
|
-
iban: t('masking_symbols') + iban,
|
|
80
|
-
tax_id: t('masking_symbols') + showLastFour(taxID)
|
|
83
|
+
iban: iban ? t('masking_symbols') + iban : '',
|
|
84
|
+
tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
|
|
81
85
|
});
|
|
82
86
|
var isCompleted = status === 'completed' && name !== 'password';
|
|
83
87
|
var isIndividual = name === 'individual';
|
|
@@ -9,9 +9,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
25
|
+
import { useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
|
|
15
26
|
import { useTranslation } from 'react-i18next';
|
|
16
27
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
28
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
@@ -47,18 +58,20 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
47
58
|
flexDirection: 'column'
|
|
48
59
|
}); });
|
|
49
60
|
var VerifyNumber = function (_a) {
|
|
50
|
-
var _b, _c
|
|
61
|
+
var _b, _c;
|
|
51
62
|
var dispatch = useAppDispatch();
|
|
52
|
-
var
|
|
63
|
+
var _d = useAppSelector(individualSelector), data = _d.data, loading = _d.loading, error = _d.error;
|
|
64
|
+
var _e = data.otpData, responseBody = _e.responseBody, defaultValues = __rest(_e, ["responseBody"]);
|
|
53
65
|
var methods = useForm({
|
|
54
66
|
resolver: yupResolver(OTPValidation),
|
|
55
|
-
defaultValues:
|
|
67
|
+
defaultValues: defaultValues,
|
|
56
68
|
mode: 'onChange'
|
|
57
69
|
});
|
|
70
|
+
useSetFromDefaultValues(methods, defaultValues);
|
|
58
71
|
var t = useTranslation().t;
|
|
59
72
|
var isAr = useLanguage().isAr;
|
|
60
73
|
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
61
|
-
var phone = (
|
|
74
|
+
var phone = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.sent_to;
|
|
62
75
|
React.useEffect(function () {
|
|
63
76
|
if (error && methods.formState.isValid && phone)
|
|
64
77
|
dispatch(clearError());
|
|
@@ -28,7 +28,7 @@ var Password = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var _b = useAppSelector(passwordSelector), customLoading = _b.customLoading, passwordError = _b.error;
|
|
31
|
+
var _b = useAppSelector(passwordSelector), customLoading = _b.customLoading, passwordError = _b.error, loading = _b.loading;
|
|
32
32
|
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
33
33
|
useErrorListener(passwordError || error);
|
|
34
34
|
useStepStartedListener();
|
|
@@ -50,10 +50,10 @@ var Password = memo(function (props) {
|
|
|
50
50
|
dispatch(verifyLeadToken(token));
|
|
51
51
|
};
|
|
52
52
|
useEffect(function () {
|
|
53
|
-
if (!settingLoading)
|
|
53
|
+
if (!settingLoading && open)
|
|
54
54
|
verifyToken();
|
|
55
55
|
}, [settingLoading]);
|
|
56
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
56
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
57
57
|
var Element = _a.element, name = _a.name;
|
|
58
58
|
var isActive = activeScreen.name === name;
|
|
59
59
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -72,6 +72,6 @@ export function unmountPasswordLib(elementId, unmountTimeout) {
|
|
|
72
72
|
var _a;
|
|
73
73
|
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
74
74
|
removeElement(DIALOG_ID);
|
|
75
|
-
reactElement(elementId).unmount();
|
|
75
|
+
elementId && reactElement(elementId).unmount();
|
|
76
76
|
}, unmountTimeout);
|
|
77
77
|
}
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import * as React from 'react';
|
|
14
25
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
@@ -16,7 +27,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
16
27
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
28
|
import Box from '@mui/material/Box';
|
|
18
29
|
import { styled } from '@mui/material/styles';
|
|
19
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
30
|
+
import { useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
|
|
20
31
|
import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../../app/settings';
|
|
21
32
|
import Form from '../../../../components/Form';
|
|
22
33
|
import { useLanguage } from '../../../../hooks';
|
|
@@ -39,11 +50,13 @@ var CreatePassword = function (_a) {
|
|
|
39
50
|
var dispatch = useAppDispatch();
|
|
40
51
|
var _b = useSelector(passwordSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
41
52
|
var operationType = data.verify.operationType;
|
|
53
|
+
var _c = data.passwordData, responseBody = _c.responseBody, defaultValues = __rest(_c, ["responseBody"]);
|
|
42
54
|
var methods = useForm({
|
|
43
55
|
resolver: yupResolver(PasswordValidation),
|
|
44
|
-
defaultValues:
|
|
56
|
+
defaultValues: defaultValues,
|
|
45
57
|
mode: 'onChange'
|
|
46
58
|
});
|
|
59
|
+
useSetFromDefaultValues(methods, defaultValues);
|
|
47
60
|
var onSubmit = function (data) {
|
|
48
61
|
if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
|
|
49
62
|
dispatch(storePasswordScreen(data));
|
|
@@ -55,6 +68,6 @@ var CreatePassword = function (_a) {
|
|
|
55
68
|
var onBack = function () {
|
|
56
69
|
dispatch(handleCurrentActiveScreen('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
57
70
|
};
|
|
58
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
71
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
59
72
|
};
|
|
60
73
|
export default React.memo(CreatePassword);
|