@tap-payments/auth-jsconnect 2.5.0-test → 2.5.1
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/README.md +1 -1
- package/build/@types/app.d.ts +143 -12
- package/build/@types/app.js +18 -1
- package/build/@types/config.d.ts +45 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +15 -1
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/api/account.d.ts +5 -0
- package/build/api/account.js +16 -2
- package/build/api/auth.d.ts +12 -1
- package/build/api/auth.js +18 -1
- package/build/api/availabilityServices.d.ts +1 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +8 -1
- package/build/api/entity.d.ts +27 -0
- package/build/api/entity.js +37 -1
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +16 -4
- package/build/api/lead.d.ts +11 -0
- package/build/api/lead.js +47 -1
- package/build/api/operator.d.ts +10 -0
- package/build/api/operator.js +9 -1
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/settings.d.ts +23 -3
- package/build/app/settings.js +134 -41
- package/build/app/store.d.ts +4 -0
- package/build/assets/locales/ar.json +324 -131
- package/build/assets/locales/en.json +322 -132
- package/build/components/AnimationFlow/AnimationFlow.d.ts +14 -3
- package/build/components/AnimationFlow/AnimationFlow.js +16 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +7 -2
- package/build/components/AnimationFlow/BottomSheet.js +37 -12
- package/build/components/AnimationFlow/Dialog.d.ts +11 -2
- package/build/components/AnimationFlow/Dialog.js +7 -11
- package/build/components/AnimationFlow/Error.d.ts +1 -2
- package/build/components/AnimationFlow/Loader.d.ts +6 -2
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/Button/Button.d.ts +1 -1
- package/build/components/CheckBox/CheckBox.d.ts +1 -1
- package/build/components/Collapse/Collapse.d.ts +1 -2
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/ExpandIcon/ExpandIcon.d.ts +3 -2
- package/build/components/FileInput/DragAndDrop.d.ts +1 -2
- package/build/components/FileInput/UploadInput.d.ts +1 -2
- package/build/components/Footer/Footer.d.ts +1 -1
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Form/Form.d.ts +1 -1
- package/build/components/Input/Input.d.ts +1 -1
- package/build/components/InputAdornment/InputAdornment.d.ts +1 -1
- package/build/components/List/List.d.ts +1 -1
- package/build/components/ListItem/ListItem.d.ts +1 -1
- package/build/components/Loader/Loader.d.ts +1 -1
- package/build/components/LogoBadge/LogoBadge.d.ts +1 -1
- package/build/components/OTPField/OTPField.d.ts +1 -1
- package/build/components/OTPTimer/OTPTimer.d.ts +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +1 -2
- package/build/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/build/components/Providers/ReduxProvider.d.ts +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Radio/Radio.d.ts +1 -1
- package/build/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/Text/Text.d.ts +1 -1
- package/build/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/components/Warning/Warning.d.ts +1 -1
- package/build/constants/api.d.ts +9 -0
- package/build/constants/api.js +19 -1
- package/build/constants/app.d.ts +39 -0
- package/build/constants/app.js +314 -10
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +3 -1
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +610 -6141
- package/build/constants/validation.d.ts +5 -0
- package/build/constants/validation.js +6 -1
- package/build/features/app/auth/authStore.d.ts +278 -0
- package/build/features/app/auth/authStore.js +1166 -0
- package/build/features/app/bank/bankStore.d.ts +11 -0
- package/build/features/app/bank/bankStore.js +66 -24
- package/build/features/app/board/boardStore.d.ts +69 -0
- package/build/features/app/board/boardStore.js +263 -0
- package/build/features/app/brand/brandStore.d.ts +10 -0
- package/build/features/app/brand/brandStore.js +83 -39
- package/build/features/app/business/businessStore.d.ts +4 -7
- package/build/features/app/business/businessStore.js +217 -150
- package/build/features/app/connect/connectStore.d.ts +22 -19
- package/build/features/app/connect/connectStore.js +113 -134
- package/build/features/app/connectExpress/connectExpressStore.d.ts +97 -10
- package/build/features/app/connectExpress/connectExpressStore.js +706 -125
- package/build/features/app/entity/entityStore.d.ts +10 -0
- package/build/features/app/entity/entityStore.js +106 -59
- package/build/features/app/individual/individualStore.d.ts +19 -0
- package/build/features/app/individual/individualStore.js +247 -141
- package/build/features/app/password/passwordStore.d.ts +39 -1
- package/build/features/app/password/passwordStore.js +192 -108
- package/build/features/app/tax/taxStore.d.ts +10 -0
- package/build/features/app/tax/taxStore.js +61 -21
- package/build/features/auth/Auth.d.ts +15 -0
- package/build/features/auth/Auth.js +160 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +71 -0
- package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
- package/build/features/auth/screens/AccountNotFound/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.js +73 -0
- package/build/features/auth/screens/AuthMerchant/MerchantList.d.ts +11 -0
- package/build/features/auth/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/auth/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/auth/screens/AuthMerchant/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/auth/screens/AuthMerchant/validation.js +4 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +57 -0
- package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
- package/build/features/auth/screens/AuthSwitch/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +96 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +2 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +9 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/auth/screens/AuthenticationList/validation.js +68 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/auth/screens/BusinessCountry/index.js +2 -0
- package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/auth/screens/CivilID/CivilID.js +57 -0
- package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
- package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
- package/build/features/auth/screens/CivilID/index.d.ts +3 -0
- package/build/features/auth/screens/CivilID/index.js +2 -0
- package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
- package/build/features/auth/screens/CivilID/validation.js +4 -0
- package/build/features/auth/screens/Email/Email.d.ts +5 -0
- package/build/features/auth/screens/Email/Email.js +57 -0
- package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
- package/build/features/auth/screens/Email/EmailField.js +52 -0
- package/build/features/auth/screens/Email/index.d.ts +3 -0
- package/build/features/auth/screens/Email/index.js +2 -0
- package/build/features/auth/screens/Email/validation.d.ts +8 -0
- package/build/features/auth/screens/Email/validation.js +4 -0
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
- package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
- package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
- package/build/features/auth/screens/EmailSent/index.js +2 -0
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
- package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
- package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
- package/build/features/auth/screens/MigratingData/index.js +2 -0
- package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/auth/screens/Mobile/Mobile.js +82 -0
- package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
- package/build/features/auth/screens/Mobile/MobileNumber.js +158 -0
- package/build/features/auth/screens/Mobile/index.d.ts +3 -0
- package/build/features/auth/screens/Mobile/index.js +2 -0
- package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
- package/build/features/auth/screens/Mobile/validation.js +35 -0
- package/build/features/auth/screens/NID/DOB.d.ts +6 -0
- package/build/features/auth/screens/NID/DOB.js +47 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
- package/build/features/auth/screens/NID/IDNumber.js +55 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +62 -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 +11 -0
- package/build/features/auth/screens/NID/validation.js +11 -0
- package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTP.js +121 -0
- package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTPInput.js +85 -0
- package/build/features/auth/screens/OTP/index.d.ts +3 -0
- package/build/features/auth/screens/OTP/index.js +2 -0
- package/build/features/auth/screens/OTP/validation.d.ts +8 -0
- package/build/features/auth/screens/OTP/validation.js +4 -0
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/auth/screens/Password/Password.d.ts +5 -0
- package/build/features/auth/screens/Password/Password.js +61 -0
- package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
- package/build/features/auth/screens/Password/PasswordField.js +28 -0
- package/build/features/auth/screens/Password/index.d.ts +3 -0
- package/build/features/auth/screens/Password/index.js +2 -0
- package/build/features/auth/screens/Password/validation.d.ts +8 -0
- package/build/features/auth/screens/Password/validation.js +4 -0
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +44 -0
- package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
- package/build/features/auth/screens/PreparingData/index.js +2 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyPACI/index.js +2 -0
- package/build/features/bank/Bank.d.ts +3 -2
- package/build/features/bank/Bank.js +11 -7
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/BankDetails.js +6 -5
- package/build/features/bank/screens/BankDetails/BankName.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +1 -2
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/bank/screens/Success/Success.d.ts +1 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/bank/screens/Verify/OTPInput.js +3 -1
- package/build/features/bank/screens/Verify/Verify.d.ts +1 -1
- package/build/features/bank/screens/Verify/Verify.js +7 -7
- package/build/features/board/Board.d.ts +10 -0
- package/build/features/board/Board.js +81 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +34 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/board/screens/Verify/OTPInput.js +51 -0
- package/build/features/board/screens/Verify/Verify.d.ts +5 -0
- package/build/features/board/screens/Verify/Verify.js +74 -0
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/board/screens/Verify/validation.d.ts +8 -0
- package/build/features/board/screens/Verify/validation.js +4 -0
- package/build/features/brand/Brand.d.ts +3 -2
- package/build/features/brand/Brand.js +11 -7
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +15 -58
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +3 -2
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +13 -37
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +9 -30
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +3 -8
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +7 -5
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/validation.d.ts +21 -0
- package/build/features/brand/screens/BrandInfo/validation.js +5 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +3 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +1 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/brand/screens/Success/Success.d.ts +1 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/brand/screens/Verify/OTPInput.js +3 -1
- package/build/features/brand/screens/Verify/Verify.d.ts +1 -1
- package/build/features/brand/screens/Verify/Verify.js +3 -3
- package/build/features/business/Business.d.ts +1 -2
- package/build/features/business/Business.js +16 -10
- package/build/features/business/screens/Activities/Activities.d.ts +1 -2
- package/build/features/business/screens/Activities/Activities.js +19 -9
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +9 -25
- package/build/features/business/screens/Activities/LicenseName.d.ts +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +7 -13
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/Header.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +5 -13
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -2
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +23 -7
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +1 -1
- package/build/features/business/screens/BusinessType/EntityName.d.ts +1 -2
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseNumber.js +9 -8
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -27
- package/build/features/business/screens/BusinessType/SelectType.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Switch.d.ts +1 -1
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +16 -0
- package/build/features/business/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/business/screens/CivilID/CivilID.js +3 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +21 -70
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.d.ts +1 -1
- package/build/features/business/screens/Customers/Customers.js +43 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -2
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +10 -4
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +16 -30
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -2
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +3 -8
- package/build/features/business/screens/IDBOD/DOB.d.ts +1 -1
- package/build/features/business/screens/IDBOD/ID.d.ts +1 -1
- package/build/features/business/screens/IDBOD/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.d.ts +1 -1
- package/build/features/business/screens/IDBOD/IDBOD.js +18 -18
- package/build/features/business/screens/IDBOD/validation.d.ts +10 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -0
- package/build/features/business/screens/OTP/OTP.d.ts +1 -1
- package/build/features/business/screens/OTP/OTP.js +3 -3
- package/build/features/business/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/business/screens/OTP/OTPInput.js +5 -2
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/business/screens/Success/Success.d.ts +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/business/screens/Verify/OTPInput.js +3 -1
- package/build/features/business/screens/Verify/Verify.d.ts +1 -1
- package/build/features/business/screens/Verify/Verify.js +14 -4
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/Connect.d.ts +5 -2
- package/build/features/connect/Connect.js +47 -31
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +1 -1
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +6 -28
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +1 -2
- package/build/features/connect/screens/BrandSegment/TeamSize.js +1 -1
- package/build/features/connect/screens/BrandSegment/validation.d.ts +0 -9
- package/build/features/connect/screens/BrandSegment/validation.js +0 -3
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +107 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connect/screens/CivilID/CivilID.js +13 -4
- package/build/features/connect/screens/Individual/Email.d.ts +1 -1
- package/build/features/connect/screens/Individual/Individual.d.ts +1 -1
- package/build/features/connect/screens/Individual/Individual.js +4 -5
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
- package/build/features/connect/screens/Individual/Name.d.ts +1 -1
- package/build/features/connect/screens/Individual/validation.js +8 -3
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/BrandName.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/Merchant.d.ts +1 -1
- package/build/features/connect/screens/Merchant/Merchant.js +3 -3
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -2
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Merchant/TAC.d.ts +1 -1
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +14 -7
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -8
- package/build/features/connect/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connect/screens/Mobile/validation.js +8 -3
- package/build/features/connect/screens/NID/DOB.d.ts +1 -2
- package/build/features/connect/screens/NID/NID.d.ts +1 -1
- package/build/features/connect/screens/NID/NID.js +13 -6
- package/build/features/connect/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTP.js +4 -4
- package/build/features/connect/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTPInput.js +4 -2
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connect/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/ThankYou/ThankYou.d.ts +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -4
- package/build/features/connectExpress/ConnectExpress.js +69 -40
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +1 -1
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +104 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +9 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +68 -0
- package/build/features/connectExpress/screens/Brand/Brand.d.ts +1 -1
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +17 -5
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +4 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +21 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +8 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +5 -27
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +3 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +68 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +15 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +7 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +1 -1
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/IdentityOTP/OTP.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +11 -10
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +11 -7
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -6
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +17 -11
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/NID/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/NID.js +13 -4
- package/build/features/connectExpress/screens/NID/TAC.d.ts +3 -8
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +8 -5
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +10 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +10 -5
- package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTPInput.js +15 -3
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -7
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/entity/Entity.d.ts +3 -2
- package/build/features/entity/Entity.js +11 -7
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +10 -25
- package/build/features/entity/screens/EntityCapital/ActivityList.js +5 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +6 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -5
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +1 -2
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +3 -3
- package/build/features/entity/screens/EntityName/Article.d.ts +1 -2
- package/build/features/entity/screens/EntityName/EntityName.d.ts +1 -2
- package/build/features/entity/screens/EntityName/EntityName.js +15 -7
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +16 -58
- package/build/features/entity/screens/EntityName/EntityTypeList.js +8 -5
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/ExpiryDate.js +6 -7
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/IssuingDate.js +6 -7
- package/build/features/entity/screens/EntityName/LegalName.d.ts +1 -1
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +1 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +1 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +9 -10
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +1 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +31 -3
- package/build/features/entity/screens/EntityName/validation.js +38 -9
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/entity/screens/Success/Success.d.ts +1 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/entity/screens/Verify/OTPInput.js +3 -1
- package/build/features/entity/screens/Verify/Verify.d.ts +1 -1
- package/build/features/entity/screens/Verify/Verify.js +3 -3
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +208 -9
- package/build/features/individual/Individual.d.ts +3 -2
- package/build/features/individual/Individual.js +11 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +5 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +15 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +14 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -27
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +4 -3
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +1 -1
- package/build/features/individual/screens/IndividualList/Email.d.ts +1 -1
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +9 -25
- package/build/features/individual/screens/IndividualList/IndividualList.js +14 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualList/UserList.d.ts +1 -2
- package/build/features/individual/screens/IndividualList/UserList.js +11 -7
- package/build/features/individual/screens/IndividualList/validation.js +8 -3
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -27
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +5 -13
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +8 -5
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +72 -63
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +7 -4
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +3 -2
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +8 -3
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/individual/screens/Success/Success.d.ts +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/individual/screens/Verify/OTPInput.js +3 -1
- package/build/features/individual/screens/Verify/Verify.d.ts +1 -1
- package/build/features/individual/screens/Verify/Verify.js +3 -3
- package/build/features/password/Password.d.ts +3 -2
- package/build/features/password/Password.js +92 -32
- package/build/features/password/screens/CreatePassword/ConditionText.d.ts +1 -2
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/CreatePassword.js +13 -6
- package/build/features/password/screens/CreatePassword/Password.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +1 -2
- package/build/features/password/screens/OTP/OTP.d.ts +1 -1
- package/build/features/password/screens/OTP/OTP.js +3 -3
- package/build/features/password/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/password/screens/OTP/OTPInput.js +5 -2
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/password/screens/Success/Success.d.ts +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/password/screens/Verify/OTPInput.js +3 -1
- package/build/features/password/screens/Verify/Verify.d.ts +1 -1
- package/build/features/password/screens/Verify/Verify.js +7 -7
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +1 -2
- package/build/features/shared/Address/Address.d.ts +1 -2
- package/build/features/shared/Address/CountryList.d.ts +14 -46
- package/build/features/shared/Address/InputSelect.d.ts +14 -46
- package/build/features/shared/Address/InputText.d.ts +1 -1
- package/build/features/shared/Background/Background.d.ts +3 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/Background/LogoBackground.d.ts +1 -1
- package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +1 -2
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +14 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/AbsherButton.d.ts +1 -2
- package/build/features/shared/Button/Button.d.ts +1 -2
- package/build/features/shared/Button/Button.js +11 -5
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -2
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -2
- package/build/features/shared/Button/FlowsButtons.js +21 -14
- package/build/features/shared/Button/IndividualActionButtons.d.ts +1 -1
- package/build/features/shared/Button/MobileButton.d.ts +1 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -2
- package/build/features/shared/Calender/Calender.d.ts +1 -2
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +1 -2
- package/build/features/shared/Chip/Chip.d.ts +1 -2
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +1 -1
- package/build/features/shared/DataLoading/DataLoading.d.ts +4 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- package/build/features/shared/Dialog/CloseDialog.d.ts +1 -2
- package/build/features/shared/Dialog/DialogContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +1 -2
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +1 -2
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +1 -2
- package/build/features/shared/Footer/Footer.d.ts +1 -2
- package/build/features/shared/Footer/Footer.js +2 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -2
- package/build/features/shared/GenericError/GenericError.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +6 -14
- package/build/features/shared/InputSelect/InputSelect.d.ts +1 -2
- package/build/features/shared/Mandatory/Mandatory.d.ts +1 -2
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/PaciVerification/PaciVerification.d.ts +1 -1
- package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +1 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +1 -2
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +1 -1
- package/build/features/shared/Search/Search.d.ts +1 -2
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +1 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +8 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -14
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +3 -8
- package/build/features/shared/UploadFile/FileUpload.js +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +3 -8
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +3 -8
- package/build/features/shared/UploadFile/UploadWrapper.js +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +3 -8
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +3 -8
- package/build/features/signIn/SignIn.d.ts +1 -2
- package/build/features/signIn/SignIn.js +4 -3
- package/build/features/signIn/screens/Email/Email.d.ts +1 -1
- package/build/features/signIn/screens/Email/Email.js +2 -1
- package/build/features/signIn/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +2 -1
- package/build/features/signIn/screens/Mobile/MobileNumber.js +6 -3
- package/build/features/signIn/screens/Mobile/validation.js +8 -3
- package/build/features/signIn/screens/OTP/OTP.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTP.js +3 -3
- package/build/features/signIn/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -2
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/signIn/screens/Password/Password.d.ts +1 -1
- package/build/features/signIn/screens/Password/Password.js +2 -1
- package/build/features/signIn/screens/Password/PasswordInput.d.ts +1 -1
- package/build/features/tax/Tax.d.ts +3 -2
- package/build/features/tax/Tax.js +11 -7
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +1 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +1 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +1 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +4 -3
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +1 -2
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +1 -2
- package/build/features/tax/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/tax/screens/Verify/OTPInput.js +3 -1
- package/build/features/tax/screens/Verify/Verify.d.ts +1 -1
- package/build/features/tax/screens/Verify/Verify.js +7 -7
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +10 -17
- package/build/hooks/useAppDispatch.d.ts +2 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +1 -1
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +1 -1
- package/build/hooks/useFormReadOnly.d.ts +1 -1
- package/build/hooks/useSetFromDefaultValues.d.ts +1 -1
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/index.css +360 -120
- package/build/index.d.ts +4 -2
- package/build/index.js +6 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +2 -1
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +3 -0
- package/build/utils/common.js +33 -0
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/build/utils/locale.js +2 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +14 -0
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +24 -5
- package/build/utils/validation.d.ts +3 -0
- package/build/utils/validation.js +10 -0
- package/package.json +2 -2
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +0 -66
|
@@ -69,25 +69,27 @@ var _a;
|
|
|
69
69
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
70
|
import API from '../../../api';
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
|
-
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
73
|
-
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES } from '../../../constants';
|
|
74
|
-
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType } from '../../../utils';
|
|
72
|
+
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
73
|
+
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES, MONTHLY_INCOME_LIST } from '../../../constants';
|
|
74
|
+
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA } from '../../../utils';
|
|
75
75
|
export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
|
|
76
76
|
var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
|
|
77
77
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
-
var payload, settings, data,
|
|
79
|
-
var _d, _e, _f, _g, _h, _j, _k, _l;
|
|
80
|
-
return __generator(this, function (
|
|
81
|
-
switch (
|
|
78
|
+
var payload, settings, data, individualData, boardData, countryCode, boardInfoData, userList, boardInfoStatus, countries, publicKey, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry, individuals, _c, is_authorized, data_state;
|
|
79
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
80
|
+
return __generator(this, function (_p) {
|
|
81
|
+
switch (_p.label) {
|
|
82
82
|
case 0:
|
|
83
|
-
payload = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
84
|
+
notification: {
|
|
85
|
+
sms: false
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
87
88
|
settings = thunkApi.getState().settings;
|
|
88
89
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
89
90
|
case 1:
|
|
90
|
-
data = (
|
|
91
|
+
data = (_p.sent()).data;
|
|
92
|
+
individualData = undefined;
|
|
91
93
|
boardInfoStatus = undefined;
|
|
92
94
|
countries = settings.data.countries;
|
|
93
95
|
if (((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
@@ -104,63 +106,79 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
104
106
|
}
|
|
105
107
|
if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 2];
|
|
106
108
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
107
|
-
return [3,
|
|
109
|
+
return [3, 20];
|
|
108
110
|
case 2:
|
|
109
|
-
if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
111
|
+
if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 19];
|
|
110
112
|
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
111
113
|
board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
|
|
112
114
|
if (!(board_id && board_info_id)) return [3, 5];
|
|
113
115
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
114
116
|
case 3:
|
|
115
|
-
boardInfoData =
|
|
117
|
+
boardInfoData = _p.sent();
|
|
116
118
|
notification = (boardInfoData || {}).notification;
|
|
117
119
|
_b = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _b.id, type = _b.type;
|
|
118
120
|
if (!(id && type)) return [3, 5];
|
|
119
121
|
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
120
122
|
case 4:
|
|
121
|
-
data_1 = (
|
|
123
|
+
data_1 = (_p.sent()).data;
|
|
122
124
|
individualData = data_1 || {};
|
|
123
|
-
|
|
125
|
+
_p.label = 5;
|
|
124
126
|
case 5:
|
|
125
127
|
if (!board_id) return [3, 7];
|
|
126
128
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
127
129
|
case 6:
|
|
128
|
-
boardData =
|
|
129
|
-
|
|
130
|
+
boardData = _p.sent();
|
|
131
|
+
_p.label = 7;
|
|
130
132
|
case 7:
|
|
131
|
-
if (!countryCode) {
|
|
132
|
-
countryCode =
|
|
133
|
-
|
|
134
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
133
|
+
if (!countryCode && ((_f = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _f === void 0 ? void 0 : _f.country)) {
|
|
134
|
+
countryCode = boardData.entity.country;
|
|
135
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
135
136
|
}
|
|
136
|
-
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
|
|
137
|
+
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 11];
|
|
137
138
|
if (!((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id)) return [3, 9];
|
|
138
|
-
return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id))];
|
|
139
|
+
return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id)).unwrap()];
|
|
139
140
|
case 8:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
case 9:
|
|
141
|
+
userList = _p.sent();
|
|
142
|
+
_p.label = 9;
|
|
143
|
+
case 9:
|
|
144
|
+
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id); });
|
|
145
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
143
146
|
case 10:
|
|
144
|
-
boardInfoStatus =
|
|
147
|
+
boardInfoStatus = _p.sent();
|
|
145
148
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
146
|
-
return [3,
|
|
149
|
+
return [3, 18];
|
|
147
150
|
case 11:
|
|
148
|
-
|
|
149
|
-
if (!
|
|
150
|
-
return [4, thunkApi.dispatch(
|
|
151
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 15];
|
|
152
|
+
if (!((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id)) return [3, 13];
|
|
153
|
+
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id)).unwrap()];
|
|
151
154
|
case 12:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
case 13:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
userList = _p.sent();
|
|
156
|
+
_p.label = 13;
|
|
157
|
+
case 13: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
158
|
+
case 14:
|
|
159
|
+
boardInfoStatus = _p.sent();
|
|
160
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
161
|
+
return [3, 18];
|
|
158
162
|
case 15:
|
|
163
|
+
birthCountry = ((_l = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _l === void 0 ? void 0 : _l.country) || countryCode;
|
|
164
|
+
if (!birthCountry) return [3, 17];
|
|
165
|
+
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
166
|
+
case 16:
|
|
167
|
+
_p.sent();
|
|
168
|
+
_p.label = 17;
|
|
169
|
+
case 17:
|
|
170
|
+
if (isInternally)
|
|
171
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
172
|
+
else
|
|
173
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
174
|
+
_p.label = 18;
|
|
175
|
+
case 18: return [3, 20];
|
|
176
|
+
case 19:
|
|
159
177
|
if (isUpdatePhoneInfo) {
|
|
160
178
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
|
|
161
179
|
}
|
|
162
|
-
|
|
163
|
-
case
|
|
180
|
+
_p.label = 20;
|
|
181
|
+
case 20:
|
|
164
182
|
individuals = (boardData || {}).individuals;
|
|
165
183
|
_c = individualData || {}, is_authorized = _c.is_authorized, data_state = _c.data_state;
|
|
166
184
|
return [2, {
|
|
@@ -171,8 +189,8 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
171
189
|
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
172
190
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
173
191
|
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
174
|
-
name: (
|
|
175
|
-
contact: (
|
|
192
|
+
name: (_m = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _m === void 0 ? void 0 : _m.names,
|
|
193
|
+
contact: (_o = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _o === void 0 ? void 0 : _o.contact,
|
|
176
194
|
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
177
195
|
countries: countries,
|
|
178
196
|
countryCode: countryCode,
|
|
@@ -180,7 +198,8 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
180
198
|
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
181
199
|
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
182
200
|
},
|
|
183
|
-
token: token
|
|
201
|
+
token: token,
|
|
202
|
+
userList: userList || []
|
|
184
203
|
}];
|
|
185
204
|
}
|
|
186
205
|
});
|
|
@@ -417,16 +436,16 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetai
|
|
|
417
436
|
case 1:
|
|
418
437
|
_a = _d.sent(), user = _a.user, data = __rest(_a, ["user"]);
|
|
419
438
|
return [2, {
|
|
420
|
-
data: __assign(__assign({}, data), { brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.contact })
|
|
439
|
+
data: __assign(__assign({}, data), { brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.contact, board_status: data === null || data === void 0 ? void 0 : data.status })
|
|
421
440
|
}];
|
|
422
441
|
}
|
|
423
442
|
});
|
|
424
443
|
}); });
|
|
425
444
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
426
|
-
var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData,
|
|
427
|
-
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
428
|
-
return __generator(this, function (
|
|
429
|
-
switch (
|
|
445
|
+
var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, individualData, boardInfoData, userList, boardData, boardInfoStatus, countryCode, publicKey, notification, _c, id, type, data_3, birthCountry, individuals, _d, is_authorized, data_state;
|
|
446
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
447
|
+
return __generator(this, function (_t) {
|
|
448
|
+
switch (_t.label) {
|
|
430
449
|
case 0:
|
|
431
450
|
_a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
|
|
432
451
|
responseBody = individual.data.verify.responseBody;
|
|
@@ -441,59 +460,81 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
441
460
|
};
|
|
442
461
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
443
462
|
case 1:
|
|
444
|
-
data = (
|
|
445
|
-
|
|
463
|
+
data = (_t.sent()).data;
|
|
464
|
+
individualData = undefined;
|
|
465
|
+
countryCode = undefined;
|
|
446
466
|
if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
|
|
447
467
|
throw new Error(data.errors[0].description);
|
|
448
468
|
publicKey = (_g = data === null || data === void 0 ? void 0 : data.config) === null || _g === void 0 ? void 0 : _g.public_key;
|
|
449
469
|
if (publicKey) {
|
|
450
470
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
451
471
|
}
|
|
472
|
+
if (data === null || data === void 0 ? void 0 : data.country_code) {
|
|
473
|
+
countryCode = data.country_code;
|
|
474
|
+
thunkApi.dispatch(handleSetCountryByIso2(data.country_code));
|
|
475
|
+
}
|
|
452
476
|
if (!board_id) return [3, 3];
|
|
453
477
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
454
478
|
case 2:
|
|
455
|
-
boardData =
|
|
456
|
-
|
|
479
|
+
boardData = _t.sent();
|
|
480
|
+
_t.label = 3;
|
|
457
481
|
case 3:
|
|
458
|
-
countryCode
|
|
482
|
+
if (!countryCode && ((_h = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _h === void 0 ? void 0 : _h.country)) {
|
|
483
|
+
countryCode = boardData.entity.country;
|
|
484
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
485
|
+
}
|
|
459
486
|
if (!(board_id && board_info_id)) return [3, 6];
|
|
460
487
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
461
488
|
case 4:
|
|
462
|
-
boardInfoData =
|
|
489
|
+
boardInfoData = _t.sent();
|
|
463
490
|
notification = (boardInfoData || {}).notification;
|
|
464
491
|
_c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
|
|
465
492
|
if (!(id && type)) return [3, 6];
|
|
466
493
|
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
467
494
|
case 5:
|
|
468
|
-
data_3 = (
|
|
495
|
+
data_3 = (_t.sent()).data;
|
|
469
496
|
individualData = data_3 || {};
|
|
470
|
-
|
|
497
|
+
_t.label = 6;
|
|
471
498
|
case 6:
|
|
472
499
|
if (countryCode)
|
|
473
500
|
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
474
|
-
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
|
|
501
|
+
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 10];
|
|
475
502
|
if (!((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id)) return [3, 8];
|
|
476
|
-
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id))];
|
|
503
|
+
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id)).unwrap()];
|
|
477
504
|
case 7:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
case 8:
|
|
505
|
+
userList = _t.sent();
|
|
506
|
+
_t.label = 8;
|
|
507
|
+
case 8:
|
|
508
|
+
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id); });
|
|
509
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
481
510
|
case 9:
|
|
482
|
-
boardInfoStatus =
|
|
511
|
+
boardInfoStatus = _t.sent();
|
|
483
512
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
484
|
-
return [3,
|
|
513
|
+
return [3, 17];
|
|
485
514
|
case 10:
|
|
486
|
-
|
|
487
|
-
if (!
|
|
488
|
-
return [4, thunkApi.dispatch(
|
|
515
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 14];
|
|
516
|
+
if (!((_l = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _l === void 0 ? void 0 : _l.id)) return [3, 12];
|
|
517
|
+
return [4, thunkApi.dispatch(getIndividualList((_m = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _m === void 0 ? void 0 : _m.id))];
|
|
489
518
|
case 11:
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
case 12:
|
|
493
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
494
|
-
_r.label = 13;
|
|
519
|
+
_t.sent();
|
|
520
|
+
_t.label = 12;
|
|
521
|
+
case 12: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
495
522
|
case 13:
|
|
496
|
-
|
|
523
|
+
boardInfoStatus = _t.sent();
|
|
524
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
525
|
+
return [3, 17];
|
|
526
|
+
case 14:
|
|
527
|
+
birthCountry = ((_o = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _o === void 0 ? void 0 : _o.country) || countryCode;
|
|
528
|
+
if (!birthCountry) return [3, 16];
|
|
529
|
+
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
530
|
+
case 15:
|
|
531
|
+
_t.sent();
|
|
532
|
+
_t.label = 16;
|
|
533
|
+
case 16:
|
|
534
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
535
|
+
_t.label = 17;
|
|
536
|
+
case 17:
|
|
537
|
+
(_q = (_p = settings.data.appConfig).onStepCompleted) === null || _q === void 0 ? void 0 : _q.call(_p, settings.data.activeScreen.name, { otp: params.otp });
|
|
497
538
|
individuals = (boardData || {}).individuals;
|
|
498
539
|
_d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
|
|
499
540
|
return [2, {
|
|
@@ -504,8 +545,8 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
504
545
|
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
505
546
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
506
547
|
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
507
|
-
name: (
|
|
508
|
-
contact: (
|
|
548
|
+
name: (_r = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _r === void 0 ? void 0 : _r.names,
|
|
549
|
+
contact: (_s = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _s === void 0 ? void 0 : _s.contact,
|
|
509
550
|
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
510
551
|
countries: countries,
|
|
511
552
|
countryCode: countryCode,
|
|
@@ -513,7 +554,8 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
|
|
|
513
554
|
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
514
555
|
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
515
556
|
},
|
|
516
|
-
formData: __assign({}, params)
|
|
557
|
+
formData: __assign({}, params),
|
|
558
|
+
userList: userList
|
|
517
559
|
}];
|
|
518
560
|
}
|
|
519
561
|
});
|
|
@@ -553,7 +595,7 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
|
|
|
553
595
|
export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
|
|
554
596
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
555
597
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
556
|
-
var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, name, email, mobile,
|
|
598
|
+
var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, countryCode, name, email, mobile, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, data_status, userName, identification_id_type, isGenderNonEditable, isNameENNonEditable, isNameARNonEditable, isEmailNonEditable, isMobileNumberNonEditable, isMobileCountryNonEditable, isNidNonEditable, isIssuedCountryNonEditable, isExpiryNonEditable, isIdTypeNonEditable, isNationalityNonEditable, isDOBNonEditable, isBirthCityNonEditable, isBirthCountryNonEditable, hasContact, hasPhone, hasIdentification, hasBirth, nameIsEditable, contact, requestBody, data, _e, isUser, isBuyer, isUserORBuyerType;
|
|
557
599
|
var _f, _g, _h, _j, _k;
|
|
558
600
|
return __generator(this, function (_l) {
|
|
559
601
|
switch (_l.label) {
|
|
@@ -562,11 +604,15 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
562
604
|
_c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user, entity = _c.entity;
|
|
563
605
|
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
|
|
564
606
|
_d = user || {}, objects = _d.objects, ids = _d.ids;
|
|
565
|
-
|
|
607
|
+
countryCode = (originalFormData || {}).countryCode;
|
|
608
|
+
name = formData.name, email = formData.email, mobile = formData.mobile, gender = formData.gender, nid = formData.nid, issuedCountry = formData.issuedCountry, expiryDate = formData.expiryDate, dob = formData.dob, placeOfBirthCountry = formData.placeOfBirthCountry, placeOfBirthCity = formData.placeOfBirthCity, nationality = formData.nationality;
|
|
566
609
|
code = entity === null || entity === void 0 ? void 0 : entity.country;
|
|
567
610
|
data_status = (user || {}).data_status;
|
|
568
611
|
userName = getUserNameObject(name);
|
|
569
612
|
identification_id_type = nid ? (nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA) : undefined;
|
|
613
|
+
if (isOtherThanKWOrSA(settings.data.businessCountry.iso2)) {
|
|
614
|
+
identification_id_type = IDENTIFICATION_TYPE.NID;
|
|
615
|
+
}
|
|
570
616
|
isGenderNonEditable = hasNoneEditableValue(data_status, 'gender');
|
|
571
617
|
isNameENNonEditable = hasNoneEditableValue(data_status, 'name.en');
|
|
572
618
|
isNameARNonEditable = hasNoneEditableValue(data_status, 'name.ar');
|
|
@@ -581,13 +627,14 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
581
627
|
isDOBNonEditable = hasNoneEditableValue(data_status, 'birth.date');
|
|
582
628
|
isBirthCityNonEditable = hasNoneEditableValue(data_status, 'birth.city');
|
|
583
629
|
isBirthCountryNonEditable = hasNoneEditableValue(data_status, 'birth.country');
|
|
584
|
-
hasContact = email || mobile
|
|
630
|
+
hasContact = email || mobile;
|
|
585
631
|
hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
|
|
586
632
|
hasIdentification = nid && (issuedCountry || identification_id_type || expiryDate);
|
|
587
633
|
hasBirth = placeOfBirthCity || placeOfBirthCountry;
|
|
588
634
|
nameIsEditable = userName.first && !(isNameENNonEditable && isNameARNonEditable);
|
|
589
635
|
contact = hasContact && !(isEmailNonEditable && isMobileCountryNonEditable && isMobileNumberNonEditable)
|
|
590
|
-
? __assign({ email: isEmailNonEditable ? undefined : email }, (!(
|
|
636
|
+
? __assign({ email: isEmailNonEditable ? undefined : email }, (!(isMobileCountryNonEditable && isMobileNumberNonEditable) &&
|
|
637
|
+
hasPhone && {
|
|
591
638
|
phone: {
|
|
592
639
|
country_code: isMobileCountryNonEditable ? undefined : (_h = countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
593
640
|
number: isMobileNumberNonEditable || !mobile ? undefined : mobile
|
|
@@ -650,27 +697,30 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
650
697
|
export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (_a, thunkApi) {
|
|
651
698
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
652
699
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
653
|
-
var _b, settings, individual, _c, notification, user, id, _d, objects, ids, occupation, sourceIncome, monthlyIncome, isPEP, isInfluencer, shareCount, shareValue, civilID, signatureFileId, isOccupationNonEditable, isSourceIncomeNonEditable, isPEPNonEditable, isInfluencerNonEditable, isMonthlyIncomeNonEditable, isSharesAvailable, pepInfo, influencerInfo, occupationInfo, sourceIncomeInfo, monthlyIncomeInfo, userPayload, shareHolderPayload, boardMemberPayload, buyerMemberPayload, _e, isUser, isShareholder, isBoardMember, isBuyer, isCustomer, isUserORBuyerType, payload,
|
|
700
|
+
var _b, settings, individual, _c, notification, user, userList, business, id, _d, objects, ids, isKWOrSAValue, occupation, sourceIncome, monthlyIncome, isPEP, isInfluencer, shareCount, shareValue, civilID, signatureFileId, isAuthorized, isOccupationNonEditable, isSourceIncomeNonEditable, isPEPNonEditable, isInfluencerNonEditable, isMonthlyIncomeNonEditable, isAuthorizedNonEditable, isSharesAvailable, pepInfo, influencerInfo, occupationInfo, sourceIncomeInfo, monthlyIncomeInfo, isAuthorizedInfo, userPayload, shareHolderPayload, boardMemberPayload, buyerMemberPayload, _e, isUser, isShareholder, isBoardMember, isBuyer, isCustomer, isUserORBuyerType, payload, businessCountry, hasCivilIdDocument, hasSignatureDocument, isSendSignatureFile, civilIdDocument, signatureDocument, documentBody, documentBody, documentsList, documentBody, requestBody, data, individualData, userListRes;
|
|
654
701
|
var _f, _g;
|
|
655
702
|
return __generator(this, function (_h) {
|
|
656
703
|
switch (_h.label) {
|
|
657
704
|
case 0:
|
|
658
705
|
_b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
|
|
659
|
-
_c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user;
|
|
706
|
+
_c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user, userList = _c.userList, business = _c.business;
|
|
660
707
|
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
|
|
661
708
|
_d = user || {}, objects = _d.objects, ids = _d.ids;
|
|
662
|
-
|
|
709
|
+
isKWOrSAValue = isKWOrSA(settings.data.businessCountry.iso2);
|
|
710
|
+
occupation = formData.occupation, sourceIncome = formData.sourceIncome, monthlyIncome = formData.monthlyIncome, isPEP = formData.isPEP, isInfluencer = formData.isInfluencer, shareCount = formData.shareCount, shareValue = formData.shareValue, civilID = formData.civilID, signatureFileId = formData.signatureFileId, isAuthorized = formData.isAuthorized;
|
|
663
711
|
isOccupationNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'occupation');
|
|
664
712
|
isSourceIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'source_of_income');
|
|
665
713
|
isPEPNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_relative_PEP');
|
|
666
714
|
isInfluencerNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_influencer');
|
|
667
715
|
isMonthlyIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'monthly_income');
|
|
716
|
+
isAuthorizedNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_authorized');
|
|
668
717
|
isSharesAvailable = shareCount || shareValue;
|
|
669
|
-
pepInfo = isPEPNonEditable ? undefined : isPEP;
|
|
670
|
-
influencerInfo = isInfluencerNonEditable ? undefined : isInfluencer;
|
|
718
|
+
pepInfo = isPEPNonEditable || isPEP === null ? undefined : isPEP;
|
|
719
|
+
influencerInfo = isInfluencerNonEditable || isInfluencer === null ? undefined : isInfluencer;
|
|
671
720
|
occupationInfo = isOccupationNonEditable || !(occupation === null || occupation === void 0 ? void 0 : occupation.id) ? undefined : { chapter: { id: occupation.id } };
|
|
672
721
|
sourceIncomeInfo = isSourceIncomeNonEditable || !(sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.id) ? undefined : [{ id: sourceIncome.id }];
|
|
673
722
|
monthlyIncomeInfo = isMonthlyIncomeNonEditable || !(monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.id) ? undefined : { id: monthlyIncome.id };
|
|
723
|
+
isAuthorizedInfo = isAuthorizedNonEditable || isKWOrSAValue ? undefined : { is_authorized: isAuthorized };
|
|
674
724
|
userPayload = {
|
|
675
725
|
occupation: occupationInfo,
|
|
676
726
|
source_income: sourceIncomeInfo,
|
|
@@ -699,76 +749,86 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
699
749
|
isUserORBuyerType = isUser || isBuyer;
|
|
700
750
|
payload = userPayload;
|
|
701
751
|
if (objects === null || objects === void 0 ? void 0 : objects.length) {
|
|
702
|
-
payload = __assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {}));
|
|
752
|
+
payload = __assign(__assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {})), (isAuthorizedInfo && isAuthorizedInfo));
|
|
703
753
|
}
|
|
704
|
-
requestBody = __assign(__assign({ ids: (ids === null || ids === void 0 ? void 0 : ids.length) ? ids : [id] }, payload), { encryption_contract: [], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO });
|
|
705
|
-
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
706
|
-
case 1:
|
|
707
|
-
data = _h.sent();
|
|
708
754
|
businessCountry = settings.data.businessCountry;
|
|
709
755
|
hasCivilIdDocument = (civilID || []).length > 0;
|
|
710
756
|
hasSignatureDocument = (signatureFileId || []).length > 0;
|
|
711
|
-
isSendSignatureFile =
|
|
757
|
+
isSendSignatureFile = isAuthorized && isUserORBuyerType;
|
|
712
758
|
civilIdDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT);
|
|
713
759
|
signatureDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE);
|
|
714
|
-
if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3,
|
|
760
|
+
if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 2];
|
|
715
761
|
documentBody = {
|
|
716
762
|
id: civilIdDocument.id,
|
|
717
763
|
images: civilID
|
|
718
764
|
};
|
|
719
765
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
720
|
-
case
|
|
766
|
+
case 1:
|
|
721
767
|
_h.sent();
|
|
722
|
-
_h.label =
|
|
723
|
-
case
|
|
724
|
-
if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3,
|
|
768
|
+
_h.label = 2;
|
|
769
|
+
case 2:
|
|
770
|
+
if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 4];
|
|
725
771
|
documentBody = {
|
|
726
772
|
id: signatureDocument.id,
|
|
727
773
|
images: signatureFileId
|
|
728
774
|
};
|
|
729
775
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
730
|
-
case
|
|
776
|
+
case 3:
|
|
731
777
|
_h.sent();
|
|
732
|
-
_h.label =
|
|
733
|
-
case
|
|
778
|
+
_h.label = 4;
|
|
779
|
+
case 4:
|
|
734
780
|
documentsList = [];
|
|
735
781
|
if (hasCivilIdDocument && !(civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id))
|
|
736
782
|
documentsList.push({ type: DocumentPurpose.IDENTITY_DOCUMENT, images: civilID });
|
|
737
783
|
if (isSendSignatureFile && hasSignatureDocument && !(signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id))
|
|
738
784
|
documentsList.push({ type: DocumentPurpose.CUSTOMER_SIGNATURE, images: signatureFileId });
|
|
739
|
-
if (!(documentsList.length > 0)) return [3,
|
|
785
|
+
if (!(documentsList.length > 0)) return [3, 6];
|
|
740
786
|
documentBody = {
|
|
741
787
|
individual_type_id: ((ids === null || ids === void 0 ? void 0 : ids.length) ? ids.find(function (i) { return i.includes('usr_'); }) : id) || '',
|
|
742
788
|
country: businessCountry.iso2,
|
|
743
789
|
documents: documentsList
|
|
744
790
|
};
|
|
745
791
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
746
|
-
case
|
|
792
|
+
case 5:
|
|
747
793
|
_h.sent();
|
|
748
|
-
_h.label =
|
|
794
|
+
_h.label = 6;
|
|
795
|
+
case 6:
|
|
796
|
+
requestBody = __assign(__assign({ ids: (ids === null || ids === void 0 ? void 0 : ids.length) ? ids : [id] }, payload), { encryption_contract: [], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO });
|
|
797
|
+
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
749
798
|
case 7:
|
|
799
|
+
data = _h.sent();
|
|
750
800
|
individualData = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
|
|
801
|
+
userListRes = userList || [];
|
|
802
|
+
if (!((user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id) && !(user === null || user === void 0 ? void 0 : user.is_authorized) && isAuthorized && (business === null || business === void 0 ? void 0 : business.id))) return [3, 9];
|
|
803
|
+
return [4, thunkApi.dispatch(getIndividualList(business === null || business === void 0 ? void 0 : business.id)).unwrap()];
|
|
804
|
+
case 8:
|
|
805
|
+
userListRes = _h.sent();
|
|
806
|
+
_h.label = 9;
|
|
807
|
+
case 9:
|
|
751
808
|
thunkApi.dispatch(handleNextScreenStep());
|
|
752
809
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
|
|
753
|
-
return [2, { data: data, formData: originalFormData, individualData: individualData }];
|
|
810
|
+
return [2, { data: data, formData: originalFormData, individualData: individualData, userList: userListRes, isKWOrSACountry: isKWOrSAValue }];
|
|
754
811
|
}
|
|
755
812
|
});
|
|
756
813
|
});
|
|
757
814
|
});
|
|
758
|
-
export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
|
|
815
|
+
export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
|
|
759
816
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
760
817
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
761
|
-
var requestBody, data;
|
|
762
|
-
|
|
763
|
-
|
|
818
|
+
var settings, requestBody, data;
|
|
819
|
+
var _b;
|
|
820
|
+
return __generator(this, function (_c) {
|
|
821
|
+
switch (_c.label) {
|
|
764
822
|
case 0:
|
|
823
|
+
settings = thunkApi.getState().settings;
|
|
765
824
|
requestBody = {
|
|
766
825
|
email: email,
|
|
826
|
+
country: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
|
|
767
827
|
encryption_contract: ['email']
|
|
768
828
|
};
|
|
769
829
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
770
830
|
case 1:
|
|
771
|
-
data = (
|
|
831
|
+
data = (_c.sent()).data;
|
|
772
832
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
773
833
|
if (!data.errors)
|
|
774
834
|
return [2, { response: data, formData: email }];
|
|
@@ -778,13 +838,14 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
|
|
|
778
838
|
});
|
|
779
839
|
});
|
|
780
840
|
export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
781
|
-
var _a, settings, individual, _b, id, infoId, primaryUser, payload, data, boardInfoStatus, individualDataRes,
|
|
782
|
-
var
|
|
783
|
-
return __generator(this, function (
|
|
784
|
-
switch (
|
|
841
|
+
var _a, settings, individual, _b, id, infoId, primaryUser, _c, showBoard, mode, payload, data, boardInfoStatus, individualDataRes, _d, is_authorized, userId, type;
|
|
842
|
+
var _e, _f, _g, _h, _j, _k, _l, _m;
|
|
843
|
+
return __generator(this, function (_o) {
|
|
844
|
+
switch (_o.label) {
|
|
785
845
|
case 0:
|
|
786
846
|
_a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
|
|
787
847
|
_b = individual.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id, primaryUser = _b.primaryUser;
|
|
848
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
788
849
|
if (!id)
|
|
789
850
|
return [2];
|
|
790
851
|
payload = {
|
|
@@ -794,34 +855,54 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
|
|
|
794
855
|
};
|
|
795
856
|
return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
|
|
796
857
|
case 1:
|
|
797
|
-
data =
|
|
858
|
+
data = _o.sent();
|
|
859
|
+
if (!showBoard && mode === 'content') {
|
|
860
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
861
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
862
|
+
return [2, { response: __assign({}, data), formData: params }];
|
|
863
|
+
}
|
|
798
864
|
return [4, API.boardService.retrieveBoardInfoStatus(id)];
|
|
799
865
|
case 2:
|
|
800
|
-
boardInfoStatus =
|
|
866
|
+
boardInfoStatus = _o.sent();
|
|
801
867
|
return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
|
|
802
868
|
case 3:
|
|
803
|
-
|
|
869
|
+
_o.sent();
|
|
804
870
|
individualDataRes = undefined;
|
|
805
|
-
|
|
871
|
+
_d = primaryUser || {}, is_authorized = _d.is_authorized, userId = _d.id, type = _d.object;
|
|
806
872
|
if (!!is_authorized) return [3, 5];
|
|
807
873
|
return [4, thunkApi
|
|
808
874
|
.dispatch(retrieveIndividualInfo({ id: userId, type: type, countryCode: settings.data.businessCountry.iso2 }))
|
|
809
875
|
.unwrap()];
|
|
810
876
|
case 4:
|
|
811
|
-
individualDataRes =
|
|
812
|
-
|
|
877
|
+
individualDataRes = _o.sent();
|
|
878
|
+
_o.label = 5;
|
|
813
879
|
case 5:
|
|
814
|
-
(
|
|
815
|
-
(
|
|
880
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, {});
|
|
881
|
+
(_m = (_l = settings.data.appConfig).onFlowCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, { data: data });
|
|
816
882
|
thunkApi.dispatch(handleNextScreenStep());
|
|
817
883
|
return [2, { response: __assign(__assign({}, data), { flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [] }), formData: params, individualData: individualDataRes === null || individualDataRes === void 0 ? void 0 : individualDataRes.data }];
|
|
818
884
|
}
|
|
819
885
|
});
|
|
820
886
|
}); });
|
|
887
|
+
export var onCloseCompleteIndividual = createAsyncThunk('individual/onCloseCompleteIndividual', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
888
|
+
var individual, _a, merchant, brand, entity;
|
|
889
|
+
return __generator(this, function (_b) {
|
|
890
|
+
switch (_b.label) {
|
|
891
|
+
case 0:
|
|
892
|
+
individual = thunkApi.getState().individual;
|
|
893
|
+
_a = individual.data.verify.responseBody || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
|
|
894
|
+
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
895
|
+
case 1:
|
|
896
|
+
_b.sent();
|
|
897
|
+
return [2];
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
}); });
|
|
821
901
|
var initialState = {
|
|
822
902
|
error: null,
|
|
823
903
|
loading: false,
|
|
824
904
|
cityLoading: false,
|
|
905
|
+
addOrRequestDetailLoading: false,
|
|
825
906
|
data: {
|
|
826
907
|
flowName: FlowsTypes.INDIVIDUAL,
|
|
827
908
|
verify: {
|
|
@@ -861,7 +942,8 @@ var initialState = {
|
|
|
861
942
|
isPEP: null,
|
|
862
943
|
isInfluencer: null,
|
|
863
944
|
shareCount: '',
|
|
864
|
-
shareValue: ''
|
|
945
|
+
shareValue: '',
|
|
946
|
+
isAuthorized: false
|
|
865
947
|
}
|
|
866
948
|
}
|
|
867
949
|
};
|
|
@@ -896,8 +978,8 @@ export var individualSlice = createSlice({
|
|
|
896
978
|
})
|
|
897
979
|
.addCase(verifyToken.fulfilled, function (state, action) {
|
|
898
980
|
state.error = null;
|
|
899
|
-
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
|
|
900
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
|
|
981
|
+
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse, userList = _a.userList;
|
|
982
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id, userList: userList });
|
|
901
983
|
state.data.verify.token = token;
|
|
902
984
|
})
|
|
903
985
|
.addCase(verifyToken.rejected, function (state, action) {
|
|
@@ -940,7 +1022,7 @@ export var individualSlice = createSlice({
|
|
|
940
1022
|
var _a;
|
|
941
1023
|
state.loading = false;
|
|
942
1024
|
state.error = null;
|
|
943
|
-
var _b = action.payload, data = _b.data, formData = _b.formData, boardResponse = _b.boardResponse;
|
|
1025
|
+
var _b = action.payload, data = _b.data, formData = _b.formData, boardResponse = _b.boardResponse, userList = _b.userList;
|
|
944
1026
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
945
1027
|
if (description) {
|
|
946
1028
|
state.error = description;
|
|
@@ -948,26 +1030,26 @@ export var individualSlice = createSlice({
|
|
|
948
1030
|
}
|
|
949
1031
|
state.data.otpData = formData;
|
|
950
1032
|
state.data.otpData.responseBody = data;
|
|
951
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
|
|
1033
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), boardResponse), { userList: userList });
|
|
952
1034
|
})
|
|
953
1035
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
954
1036
|
state.loading = false;
|
|
955
1037
|
state.error = action.error.message;
|
|
956
1038
|
})
|
|
957
1039
|
.addCase(addDetailsAsync.pending, function (state) {
|
|
958
|
-
state.
|
|
1040
|
+
state.addOrRequestDetailLoading = true;
|
|
959
1041
|
state.error = null;
|
|
960
1042
|
})
|
|
961
1043
|
.addCase(addDetailsAsync.fulfilled, function (state, action) {
|
|
962
1044
|
var _a, _b, _c, _d;
|
|
963
|
-
state.
|
|
1045
|
+
state.addOrRequestDetailLoading = false;
|
|
964
1046
|
state.error = null;
|
|
965
1047
|
var _e = action.payload, userList = _e.userList, individualId = _e.individualId, countries = _e.countries;
|
|
966
1048
|
var primaryUser = (state.data.verify.responseBody || {}).user;
|
|
967
1049
|
var user = (userList || []).find(function (user) { return user.individual_id === individualId; });
|
|
968
1050
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList });
|
|
969
1051
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList, user: __assign(__assign({}, user), { is_authorized: (user === null || user === void 0 ? void 0 : user.is_authorized) !== undefined ? user === null || user === void 0 ? void 0 : user.is_authorized : primaryUser === null || primaryUser === void 0 ? void 0 : primaryUser.is_authorized }) });
|
|
970
|
-
var _f = user || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares;
|
|
1052
|
+
var _f = user || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares, is_authorized = _f.is_authorized;
|
|
971
1053
|
var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
|
|
972
1054
|
var cityList = (state.data.verify.responseBody || {}).cityList;
|
|
973
1055
|
if (user)
|
|
@@ -1025,17 +1107,19 @@ export var individualSlice = createSlice({
|
|
|
1025
1107
|
state.data.individualData.isPEP = is_relative_PEP;
|
|
1026
1108
|
if (is_influencer !== undefined)
|
|
1027
1109
|
state.data.individualData.isInfluencer = is_influencer;
|
|
1110
|
+
if (is_authorized !== undefined)
|
|
1111
|
+
state.data.individualData.isAuthorized = is_authorized;
|
|
1028
1112
|
})
|
|
1029
1113
|
.addCase(addDetailsAsync.rejected, function (state, action) {
|
|
1030
|
-
state.
|
|
1114
|
+
state.addOrRequestDetailLoading = false;
|
|
1031
1115
|
state.error = action.error.message;
|
|
1032
1116
|
})
|
|
1033
1117
|
.addCase(requestDetailsByEmail.pending, function (state) {
|
|
1034
|
-
state.
|
|
1118
|
+
state.addOrRequestDetailLoading = true;
|
|
1035
1119
|
state.error = null;
|
|
1036
1120
|
})
|
|
1037
1121
|
.addCase(requestDetailsByEmail.fulfilled, function (state, action) {
|
|
1038
|
-
state.
|
|
1122
|
+
state.addOrRequestDetailLoading = false;
|
|
1039
1123
|
state.error = null;
|
|
1040
1124
|
var _a = action.payload, data = _a.data, individualData = _a.individualData;
|
|
1041
1125
|
var userList = (state.data.verify.responseBody || {}).userList;
|
|
@@ -1060,7 +1144,7 @@ export var individualSlice = createSlice({
|
|
|
1060
1144
|
var _e = action.payload, data = _e.data, countries = _e.countries;
|
|
1061
1145
|
var user = (state.data.verify.responseBody || {}).user;
|
|
1062
1146
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { primaryUser: data, user: __assign(__assign({}, data), { is_authorized: data.is_authorized !== undefined ? data.is_authorized : user === null || user === void 0 ? void 0 : user.is_authorized }) });
|
|
1063
|
-
var _f = data || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares;
|
|
1147
|
+
var _f = data || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares, is_authorized = _f.is_authorized;
|
|
1064
1148
|
var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
|
|
1065
1149
|
var cityList = (state.data.verify.responseBody || {}).cityList;
|
|
1066
1150
|
if (data)
|
|
@@ -1116,8 +1200,11 @@ export var individualSlice = createSlice({
|
|
|
1116
1200
|
state.data.individualData.occupation = selectedOccupation;
|
|
1117
1201
|
state.data.individualData.isPEP = is_relative_PEP;
|
|
1118
1202
|
state.data.individualData.isInfluencer = is_influencer;
|
|
1203
|
+
if (is_authorized !== undefined)
|
|
1204
|
+
state.data.individualData.isAuthorized = is_authorized;
|
|
1119
1205
|
})
|
|
1120
1206
|
.addCase(retrieveIndividualInfo.rejected, function (state, action) {
|
|
1207
|
+
state.addOrRequestDetailLoading = false;
|
|
1121
1208
|
state.error = action.error.message;
|
|
1122
1209
|
})
|
|
1123
1210
|
.addCase(getIndividualList.pending, function (state) {
|
|
@@ -1138,17 +1225,17 @@ export var individualSlice = createSlice({
|
|
|
1138
1225
|
state.error = null;
|
|
1139
1226
|
})
|
|
1140
1227
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
1141
|
-
var _a;
|
|
1228
|
+
var _a, _b;
|
|
1142
1229
|
state.loading = false;
|
|
1143
1230
|
state.error = null;
|
|
1144
|
-
var
|
|
1231
|
+
var _c = action.payload, sourceIncome = _c.sourceIncome, monthlyIncome = _c.monthlyIncome, occupationData = _c.occupation;
|
|
1145
1232
|
var data = state.data.individualData.responseBody;
|
|
1146
1233
|
var sourceIncomeList = (sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.list) || [];
|
|
1147
|
-
var monthlyIncomeList = (monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) ||
|
|
1234
|
+
var monthlyIncomeList = ((_a = monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) === null || _a === void 0 ? void 0 : _a.length) ? monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list : MONTHLY_INCOME_LIST;
|
|
1148
1235
|
var occupationList = (occupationData === null || occupationData === void 0 ? void 0 : occupationData.list) || [];
|
|
1149
1236
|
state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: sourceIncomeList, monthlyIncomeList: monthlyIncomeList, occupationList: occupationList });
|
|
1150
|
-
var
|
|
1151
|
-
var selectedSourceIncome =
|
|
1237
|
+
var _d = ((_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user) || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation;
|
|
1238
|
+
var selectedSourceIncome = sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); });
|
|
1152
1239
|
if (!!selectedSourceIncome)
|
|
1153
1240
|
state.data.individualData.sourceIncome = selectedSourceIncome;
|
|
1154
1241
|
var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
|
|
@@ -1223,16 +1310,20 @@ export var individualSlice = createSlice({
|
|
|
1223
1310
|
.addCase(updateIndividualInfo.fulfilled, function (state, action) {
|
|
1224
1311
|
state.loading = false;
|
|
1225
1312
|
state.error = null;
|
|
1226
|
-
var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData;
|
|
1313
|
+
var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData, userList = _a.userList, isKWOrSACountry = _a.isKWOrSACountry;
|
|
1227
1314
|
state.data.individualData = formData;
|
|
1228
1315
|
state.data.individualData.responseBody = data;
|
|
1229
|
-
var
|
|
1316
|
+
var user = (state.data.verify.responseBody || {}).user;
|
|
1317
|
+
var isSameUser = (user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id);
|
|
1318
|
+
var userInfo = __assign(__assign({}, user), (isSameUser && (individualData === null || individualData === void 0 ? void 0 : individualData.documents) && { documents: individualData === null || individualData === void 0 ? void 0 : individualData.documents }));
|
|
1319
|
+
if (isSameUser && !isKWOrSACountry)
|
|
1320
|
+
userInfo = __assign(__assign({}, user), { is_authorized: individualData.is_authorized });
|
|
1230
1321
|
var list = userList || [];
|
|
1231
1322
|
list = list.map(function (user) {
|
|
1232
1323
|
var userInfo = user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id) ? individualData : user;
|
|
1233
1324
|
return userInfo;
|
|
1234
1325
|
});
|
|
1235
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: list });
|
|
1326
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { user: userInfo, userList: list });
|
|
1236
1327
|
})
|
|
1237
1328
|
.addCase(updateIndividualInfo.rejected, function (state, action) {
|
|
1238
1329
|
state.loading = false;
|
|
@@ -1292,7 +1383,10 @@ export var individualSlice = createSlice({
|
|
|
1292
1383
|
}
|
|
1293
1384
|
var flows = response.flows;
|
|
1294
1385
|
var individuals = (state.data.verify.responseBody || {}).individuals;
|
|
1295
|
-
|
|
1386
|
+
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
1387
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (data_state && {
|
|
1388
|
+
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
1389
|
+
}));
|
|
1296
1390
|
})
|
|
1297
1391
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
1298
1392
|
state.loading = true;
|
|
@@ -1301,6 +1395,18 @@ export var individualSlice = createSlice({
|
|
|
1301
1395
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
1302
1396
|
state.loading = false;
|
|
1303
1397
|
state.error = action.error.message;
|
|
1398
|
+
})
|
|
1399
|
+
.addCase(onCloseCompleteIndividual.pending, function (state) {
|
|
1400
|
+
state.loading = true;
|
|
1401
|
+
state.error = null;
|
|
1402
|
+
})
|
|
1403
|
+
.addCase(onCloseCompleteIndividual.fulfilled, function (state) {
|
|
1404
|
+
state.loading = false;
|
|
1405
|
+
state.error = null;
|
|
1406
|
+
})
|
|
1407
|
+
.addCase(onCloseCompleteIndividual.rejected, function (state, action) {
|
|
1408
|
+
state.loading = false;
|
|
1409
|
+
state.error = action.error.message;
|
|
1304
1410
|
});
|
|
1305
1411
|
}
|
|
1306
1412
|
});
|