@tap-payments/auth-jsconnect 2.7.9-test → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +47 -4
- package/build/@types/app.js +22 -0
- package/build/@types/config.d.ts +4 -0
- package/build/@types/form.d.ts +11 -1
- package/build/@types/redux.d.ts +1 -0
- package/build/api/account.d.ts +4 -1
- package/build/api/account.js +15 -1
- package/build/api/auth.d.ts +35 -20
- package/build/api/auth.js +1 -1
- package/build/api/axios.js +1 -2
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +3 -2
- package/build/api/entity.js +12 -4
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +14 -25
- package/build/api/lead.d.ts +16 -3
- package/build/api/lead.js +16 -0
- package/build/api/user.d.ts +7 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.js +9 -8
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +353 -151
- package/build/assets/locales/en.json +349 -150
- package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -5
- package/build/components/AnimationFlow/AnimationFlow.js +5 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -1
- package/build/components/AnimationFlow/BottomSheet.js +42 -14
- package/build/components/AnimationFlow/Dialog.d.ts +4 -3
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/ArabicDatePicker/style.css +32 -3
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Input/Input.js +1 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +5 -7
- package/build/constants/api.js +11 -15
- package/build/constants/app.d.ts +40 -0
- package/build/constants/app.js +368 -36
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +4 -1
- package/build/constants/dummy.d.ts +4 -219
- package/build/constants/dummy.js +64 -6194
- package/build/constants/flows.d.ts +26 -0
- package/build/constants/flows.js +27 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/validation.d.ts +3 -0
- package/build/constants/validation.js +3 -0
- package/build/features/app/auth/authStore.d.ts +29 -8
- package/build/features/app/auth/authStore.js +495 -149
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +186 -153
- package/build/features/app/board/boardStore.d.ts +5 -1
- package/build/features/app/board/boardStore.js +82 -51
- package/build/features/app/brand/brandStore.d.ts +17 -33
- package/build/features/app/brand/brandStore.js +254 -257
- package/build/features/app/business/businessStore.d.ts +37 -15
- package/build/features/app/business/businessStore.js +443 -235
- package/build/features/app/connect/connectStore.d.ts +33 -5
- package/build/features/app/connect/connectStore.js +355 -120
- package/build/features/app/connectExpress/connectExpressStore.d.ts +64 -27
- package/build/features/app/connectExpress/connectExpressStore.js +807 -394
- package/build/features/app/entity/entityStore.d.ts +20 -36
- package/build/features/app/entity/entityStore.js +204 -238
- package/build/features/app/individual/individualStore.d.ts +18 -34
- package/build/features/app/individual/individualStore.js +269 -292
- package/build/features/app/kyc/kycStore.d.ts +67 -0
- package/build/features/app/kyc/kycStore.js +432 -0
- package/build/features/app/password/passwordStore.d.ts +33 -18
- package/build/features/app/password/passwordStore.js +260 -219
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +170 -136
- package/build/features/auth/Auth.d.ts +5 -6
- package/build/features/auth/Auth.js +40 -15
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -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.js +2 -8
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
- package/build/features/auth/screens/CivilID/CivilID.js +4 -35
- package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/DOB}/validation.d.ts +4 -4
- package/build/features/auth/screens/DOB/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.js +6 -38
- package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
- package/build/features/auth/screens/Mobile/validation.js +11 -3
- package/build/features/auth/screens/NID/IDNumber.js +1 -1
- package/build/features/auth/screens/NID/NID.js +7 -43
- package/build/features/auth/screens/NID/validation.d.ts +0 -3
- package/build/features/auth/screens/NID/validation.js +0 -1
- package/build/features/auth/screens/OTP/OTP.js +41 -10
- package/build/features/auth/screens/OTP/OTPInput.js +23 -6
- 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.js +3 -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/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/bank/Bank.d.ts +5 -1
- package/build/features/bank/Bank.js +22 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +7 -6
- package/build/features/board/Board.d.ts +2 -0
- package/build/features/board/Board.js +24 -13
- 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/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
- package/build/features/board/screens/Verify/Verify.js +3 -2
- package/build/features/brand/Brand.d.ts +5 -1
- package/build/features/brand/Brand.js +22 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +22 -4
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +26 -9
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +11 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -8
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +50 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +11 -5
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
- 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/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +72 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/business/screens/DOB/validation.d.ts +8 -0
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
- package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
- package/build/features/business/screens/IDBOD/validation.js +0 -1
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/index.js +2 -0
- package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/business/screens/MobileOwnership/validation.js +38 -0
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +15 -4
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/Connect.d.ts +5 -1
- package/build/features/connect/Connect.js +16 -9
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connect/screens/CivilID/CivilID.js +6 -1
- package/build/features/{auth/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
- package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +11 -5
- package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
- package/build/features/connect/screens/Individual/validation.js +11 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +12 -9
- package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/connect/screens/Mobile/validation.js +11 -3
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/index.js +2 -0
- package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +5 -11
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTP.js +6 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
- package/build/features/connectExpress/ConnectExpress.js +62 -39
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +10 -3
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +10 -10
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +3 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
- package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
- 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.js +3 -3
- package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/OTPInput.js +3 -3
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
- package/build/features/connectExpress/screens/{IdentityOTP/OTP.js → VerifyMobileAuthOTP/VerifyMobileAuthOTP.js} +22 -21
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +41 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/entity/Entity.d.ts +4 -1
- package/build/features/entity/Entity.js +22 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
- package/build/features/entity/screens/EntityName/EntityName.js +31 -14
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +5 -5
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
- package/build/features/entity/screens/EntityName/validation.js +1 -10
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +3 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +216 -13
- package/build/features/individual/Individual.d.ts +4 -1
- package/build/features/individual/Individual.js +22 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
- package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
- package/build/features/individual/screens/IndividualList/UserList.js +7 -7
- package/build/features/individual/screens/IndividualList/validation.js +11 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +73 -18
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/kyc/KYC.d.ts +11 -0
- package/build/features/kyc/KYC.js +99 -0
- package/build/features/kyc/index.d.ts +1 -0
- package/build/features/kyc/index.js +1 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
- package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
- package/build/features/kyc/screens/Loading/Loading.js +10 -0
- package/build/features/kyc/screens/Loading/index.d.ts +2 -0
- package/build/features/kyc/screens/Loading/index.js +2 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
- package/build/features/kyc/screens/OperatorError/index.js +2 -0
- package/build/features/kyc/screens/Success/Success.d.ts +5 -0
- package/build/features/kyc/screens/Success/Success.js +32 -0
- package/build/features/kyc/screens/Success/index.d.ts +2 -0
- package/build/features/kyc/screens/Success/index.js +2 -0
- package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
- package/build/features/kyc/screens/Terms/Header.js +36 -0
- package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
- package/build/features/kyc/screens/Terms/Terms.js +87 -0
- package/build/features/kyc/screens/Terms/index.d.ts +2 -0
- package/build/features/kyc/screens/Terms/index.js +2 -0
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
- package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
- package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
- package/build/features/kyc/screens/TokenError/index.js +2 -0
- package/build/features/kyc/screens/Users/Users.d.ts +3 -0
- package/build/features/kyc/screens/Users/Users.js +76 -0
- package/build/features/kyc/screens/Users/index.d.ts +2 -0
- package/build/features/kyc/screens/Users/index.js +2 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
- package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
- package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
- package/build/features/password/Password.d.ts +4 -1
- package/build/features/password/Password.js +88 -31
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
- package/build/features/password/screens/OTP/OTP.js +3 -3
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +7 -6
- package/build/features/shared/Address/CountryList.d.ts +5 -5
- package/build/features/shared/Address/InputSelect.d.ts +5 -5
- package/build/features/shared/Background/Background.js +1 -1
- package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/shared/Button/Button.js +3 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +18 -4
- package/build/features/shared/Button/NafathButton.d.ts +8 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +2 -1
- package/build/features/shared/Calender/Calender.js +3 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dialog/DialogContainer.js +5 -4
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/signIn/SignIn.js +18 -7
- package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/signIn/screens/Mobile/validation.js +11 -3
- package/build/features/signIn/screens/OTP/OTP.js +5 -4
- 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/tax/Tax.d.ts +4 -1
- package/build/features/tax/Tax.js +22 -9
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +7 -6
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useCountDown.d.ts +10 -0
- package/build/hooks/useCountDown.js +17 -0
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +2 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +4 -2
- package/build/hooks/useVerifyToken.js +9 -4
- package/build/index.css +360 -120
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +2 -1
- package/build/theme/shadows.js +1 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +16 -3
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +3 -0
- package/build/utils/string.d.ts +6 -2
- package/build/utils/string.js +28 -3
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +3 -4
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/business/screens/OTP/index.d.ts +0 -3
- package/build/features/business/screens/OTP/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
- package/build/features/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/OTPInput.d.ts +0 -0
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/validation.d.ts +0 -0
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/validation.js +0 -0
|
@@ -71,134 +71,113 @@ import API from '../../../api';
|
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
72
|
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
73
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';
|
|
74
|
+
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA, sendCustomEventToGTM } 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
|
|
79
|
-
var
|
|
80
|
-
return __generator(this, function (
|
|
81
|
-
switch (
|
|
78
|
+
var settings, payload, data, userList, recipientData, countries, _b, country_code, config, boardId, countryCode, publicKey, data_1, _c, business_id, recipient, board_id, board_info_id, notification, _d, id_1, type, individualData, birthCountry;
|
|
79
|
+
var _e, _f, _g, _h;
|
|
80
|
+
return __generator(this, function (_j) {
|
|
81
|
+
switch (_j.label) {
|
|
82
82
|
case 0:
|
|
83
|
+
settings = thunkApi.getState().settings;
|
|
83
84
|
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
84
85
|
notification: {
|
|
85
86
|
sms: false
|
|
86
87
|
}
|
|
87
88
|
}));
|
|
88
|
-
settings = thunkApi.getState().settings;
|
|
89
89
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
90
90
|
case 1:
|
|
91
|
-
data = (
|
|
92
|
-
|
|
93
|
-
boardInfoStatus = undefined;
|
|
91
|
+
data = (_j.sent()).data;
|
|
92
|
+
recipientData = undefined;
|
|
94
93
|
countries = settings.data.countries;
|
|
95
|
-
if (((
|
|
94
|
+
if (((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
96
95
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
97
96
|
if (isInternally)
|
|
98
97
|
data.step_name = INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (publicKey)
|
|
98
|
+
_b = data || {}, country_code = _b.country_code, config = _b.config, boardId = _b.id;
|
|
99
|
+
countryCode = country_code;
|
|
100
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
101
|
+
if (country_code)
|
|
102
|
+
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
103
|
+
if (publicKey)
|
|
105
104
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
109
|
-
return [3, 20];
|
|
105
|
+
if (!!country_code) return [3, 3];
|
|
106
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
110
107
|
case 2:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
data_1 = _j.sent();
|
|
109
|
+
countryCode = (_f = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _f === void 0 ? void 0 : _f.country;
|
|
110
|
+
if (countryCode)
|
|
111
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
112
|
+
_j.label = 3;
|
|
116
113
|
case 3:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (!(id && type)) return [3, 5];
|
|
121
|
-
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
114
|
+
if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 4];
|
|
115
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
116
|
+
return [3, 18];
|
|
122
117
|
case 4:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 17];
|
|
119
|
+
_c = data || {}, business_id = _c.business_id, recipient = _c.recipient, board_id = _c.id, board_info_id = _c.board_info_id;
|
|
120
|
+
recipientData = recipient;
|
|
121
|
+
if (!!((_g = data === null || data === void 0 ? void 0 : data.recipient) === null || _g === void 0 ? void 0 : _g.id)) return [3, 6];
|
|
122
|
+
if (!(board_id && board_info_id)) return [3, 6];
|
|
123
|
+
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
126
124
|
case 5:
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
notification = (_j.sent()).notification;
|
|
126
|
+
recipientData = notification === null || notification === void 0 ? void 0 : notification.recipient;
|
|
127
|
+
if (!(recipientData === null || recipientData === void 0 ? void 0 : recipientData.id))
|
|
128
|
+
throw new Error('individual_id_missing');
|
|
129
|
+
_j.label = 6;
|
|
129
130
|
case 6:
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
_d = recipientData || {}, id_1 = _d.id, type = _d.type;
|
|
132
|
+
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id_1, type: type, countryCode: countryCode })).unwrap()];
|
|
132
133
|
case 7:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 11];
|
|
139
|
-
if (!((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id)) return [3, 9];
|
|
140
|
-
return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id)).unwrap()];
|
|
134
|
+
individualData = (_j.sent()).data;
|
|
135
|
+
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 10];
|
|
136
|
+
if (!business_id) return [3, 9];
|
|
137
|
+
return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
|
|
141
138
|
case 8:
|
|
142
|
-
userList =
|
|
143
|
-
|
|
139
|
+
userList = _j.sent();
|
|
140
|
+
_j.label = 9;
|
|
144
141
|
case 9:
|
|
145
|
-
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id ===
|
|
146
|
-
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
147
|
-
case 10:
|
|
148
|
-
boardInfoStatus = _p.sent();
|
|
142
|
+
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === id_1; });
|
|
149
143
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
150
|
-
return [3,
|
|
144
|
+
return [3, 16];
|
|
145
|
+
case 10:
|
|
146
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 13];
|
|
147
|
+
if (!business_id) return [3, 12];
|
|
148
|
+
return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
|
|
151
149
|
case 11:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id)).unwrap()];
|
|
150
|
+
userList = _j.sent();
|
|
151
|
+
_j.label = 12;
|
|
155
152
|
case 12:
|
|
156
|
-
userList = _p.sent();
|
|
157
|
-
_p.label = 13;
|
|
158
|
-
case 13: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
159
|
-
case 14:
|
|
160
|
-
boardInfoStatus = _p.sent();
|
|
161
153
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
162
|
-
return [3,
|
|
163
|
-
case
|
|
164
|
-
birthCountry = ((
|
|
165
|
-
if (!birthCountry) return [3,
|
|
154
|
+
return [3, 16];
|
|
155
|
+
case 13:
|
|
156
|
+
birthCountry = ((_h = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _h === void 0 ? void 0 : _h.country) || countryCode;
|
|
157
|
+
if (!birthCountry) return [3, 15];
|
|
166
158
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
167
|
-
case
|
|
168
|
-
|
|
169
|
-
|
|
159
|
+
case 14:
|
|
160
|
+
_j.sent();
|
|
161
|
+
_j.label = 15;
|
|
162
|
+
case 15:
|
|
163
|
+
if (isInternally)
|
|
164
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
165
|
+
else
|
|
166
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
167
|
+
_j.label = 16;
|
|
168
|
+
case 16: return [3, 18];
|
|
170
169
|
case 17:
|
|
171
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
172
|
-
_p.label = 18;
|
|
173
|
-
case 18: return [3, 20];
|
|
174
|
-
case 19:
|
|
175
170
|
if (isUpdatePhoneInfo) {
|
|
176
171
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
|
|
177
172
|
}
|
|
178
|
-
|
|
179
|
-
case
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
187
|
-
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
188
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
189
|
-
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
190
|
-
name: (_m = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _m === void 0 ? void 0 : _m.names,
|
|
191
|
-
contact: (_o = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _o === void 0 ? void 0 : _o.contact,
|
|
192
|
-
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
193
|
-
countries: countries,
|
|
194
|
-
countryCode: countryCode,
|
|
195
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
196
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
197
|
-
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
198
|
-
},
|
|
199
|
-
token: token,
|
|
200
|
-
userList: userList || []
|
|
201
|
-
}];
|
|
173
|
+
_j.label = 18;
|
|
174
|
+
case 18: return [2, {
|
|
175
|
+
data: data,
|
|
176
|
+
countries: countries,
|
|
177
|
+
countryCode: countryCode,
|
|
178
|
+
token: token,
|
|
179
|
+
userList: userList || []
|
|
180
|
+
}];
|
|
202
181
|
}
|
|
203
182
|
});
|
|
204
183
|
});
|
|
@@ -411,140 +390,139 @@ export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', fun
|
|
|
411
390
|
});
|
|
412
391
|
}); });
|
|
413
392
|
export var retrieveBoardStatus = createAsyncThunk('individual/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
414
|
-
var individual, board_id, data;
|
|
415
|
-
return __generator(this, function (
|
|
416
|
-
switch (
|
|
393
|
+
var individual, _a, board_id, board_info_id, data;
|
|
394
|
+
return __generator(this, function (_b) {
|
|
395
|
+
switch (_b.label) {
|
|
417
396
|
case 0:
|
|
418
397
|
individual = thunkApi.getState().individual;
|
|
419
|
-
|
|
398
|
+
_a = individual.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id;
|
|
399
|
+
if (!board_id || !board_info_id)
|
|
400
|
+
throw new Error('Internal server error');
|
|
420
401
|
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
421
402
|
case 1:
|
|
422
|
-
data =
|
|
403
|
+
data = _b.sent();
|
|
404
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id })).unwrap()];
|
|
405
|
+
case 2:
|
|
406
|
+
_b.sent();
|
|
423
407
|
thunkApi.dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
424
408
|
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
425
409
|
}
|
|
426
410
|
});
|
|
427
411
|
}); });
|
|
428
|
-
export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (
|
|
429
|
-
var _a,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
412
|
+
export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (_a, thunkApi) {
|
|
413
|
+
var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
|
|
414
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
415
|
+
var _b, individual, settings, individualData, _c, user, data, data_3, data_state;
|
|
416
|
+
var _d, _e, _f;
|
|
417
|
+
return __generator(this, function (_g) {
|
|
418
|
+
switch (_g.label) {
|
|
419
|
+
case 0:
|
|
420
|
+
_b = thunkApi.getState(), individual = _b.individual, settings = _b.settings;
|
|
421
|
+
individualData = (_d = individual.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.user;
|
|
422
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
423
|
+
case 1:
|
|
424
|
+
_c = _g.sent(), user = _c.user, data = __rest(_c, ["user"]);
|
|
425
|
+
if (!((individualData === null || individualData === void 0 ? void 0 : individualData.id) === (user === null || user === void 0 ? void 0 : user.id))) return [3, 2];
|
|
426
|
+
individualData = user;
|
|
427
|
+
return [3, 4];
|
|
428
|
+
case 2:
|
|
429
|
+
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && id && type)) return [3, 4];
|
|
430
|
+
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: settings.data.businessCountry.iso2 })).unwrap()];
|
|
431
|
+
case 3:
|
|
432
|
+
data_3 = (_g.sent()).data;
|
|
433
|
+
individualData = data_3;
|
|
434
|
+
_g.label = 4;
|
|
435
|
+
case 4:
|
|
436
|
+
data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && (data === null || data === void 0 ? void 0 : data.individuals) ? data === null || data === void 0 ? void 0 : data.individuals : individualData) || {}).data_state;
|
|
437
|
+
return [2, {
|
|
438
|
+
data: __assign(__assign(__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: (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.contact }), (data_state && {
|
|
439
|
+
individuals: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.individuals), { data_state: data_state })
|
|
440
|
+
})), { board_status: data === null || data === void 0 ? void 0 : data.status })
|
|
441
|
+
}];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
440
444
|
});
|
|
441
|
-
});
|
|
445
|
+
});
|
|
442
446
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
443
|
-
var _a, individual, settings, responseBody,
|
|
444
|
-
var _e, _f, _g, _h, _j, _k, _l
|
|
445
|
-
return __generator(this, function (
|
|
446
|
-
switch (
|
|
447
|
+
var _a, individual, settings, responseBody, countries, payload, data, userList, recipientData, publicKey, countryCode, _b, business_id, recipient, board_id, board_info_id, notification, _c, id, type, individualData, birthCountry;
|
|
448
|
+
var _d, _e, _f, _g, _h, _j, _k, _l;
|
|
449
|
+
return __generator(this, function (_m) {
|
|
450
|
+
switch (_m.label) {
|
|
447
451
|
case 0:
|
|
448
452
|
_a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
|
|
449
453
|
responseBody = individual.data.verify.responseBody;
|
|
450
|
-
_b = responseBody || {}, board_id = _b.board_id, board_info_id = _b.board_info_id;
|
|
451
454
|
countries = settings.data.countries;
|
|
452
455
|
payload = {
|
|
453
456
|
data: params.otp,
|
|
454
|
-
service_name: (
|
|
457
|
+
service_name: (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name,
|
|
455
458
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
456
459
|
step_name: INDIVIDUAl_STEP_NAMES.PHONE_AUTH,
|
|
457
460
|
encryption_contract: ['data']
|
|
458
461
|
};
|
|
459
462
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
460
463
|
case 1:
|
|
461
|
-
data = (
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
|
|
464
|
+
data = (_m.sent()).data;
|
|
465
|
+
recipientData = undefined;
|
|
466
|
+
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
465
467
|
throw new Error(data.errors[0].description);
|
|
466
|
-
publicKey = (
|
|
467
|
-
|
|
468
|
+
publicKey = (_f = data === null || data === void 0 ? void 0 : data.config) === null || _f === void 0 ? void 0 : _f.public_key;
|
|
469
|
+
countryCode = data === null || data === void 0 ? void 0 : data.country_code;
|
|
470
|
+
if (publicKey)
|
|
468
471
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
+
if (!((_g = settings.data.businessCountry) === null || _g === void 0 ? void 0 : _g.iso2) && countryCode)
|
|
473
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryCode));
|
|
474
|
+
_b = data || {}, business_id = _b.business_id, recipient = _b.recipient, board_id = _b.id, board_info_id = _b.board_info_id;
|
|
475
|
+
recipientData = recipient;
|
|
476
|
+
if (!!((_h = data === null || data === void 0 ? void 0 : data.recipient) === null || _h === void 0 ? void 0 : _h.id)) return [3, 3];
|
|
477
|
+
if (!(board_id && board_info_id)) return [3, 3];
|
|
478
|
+
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
472
479
|
case 2:
|
|
473
|
-
|
|
474
|
-
|
|
480
|
+
notification = (_m.sent()).notification;
|
|
481
|
+
recipientData = notification === null || notification === void 0 ? void 0 : notification.recipient;
|
|
482
|
+
if (!(recipientData === null || recipientData === void 0 ? void 0 : recipientData.id))
|
|
483
|
+
throw new Error('individual_id_missing');
|
|
484
|
+
_m.label = 3;
|
|
475
485
|
case 3:
|
|
476
|
-
|
|
477
|
-
if (!(board_id && board_info_id)) return [3, 6];
|
|
478
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
479
|
-
case 4:
|
|
480
|
-
boardInfoData = _t.sent();
|
|
481
|
-
notification = (boardInfoData || {}).notification;
|
|
482
|
-
_c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
|
|
483
|
-
if (!(id && type)) return [3, 6];
|
|
486
|
+
_c = recipientData || {}, id = _c.id, type = _c.type;
|
|
484
487
|
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
|
|
488
|
+
case 4:
|
|
489
|
+
individualData = (_m.sent()).data;
|
|
490
|
+
if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 7];
|
|
491
|
+
if (!business_id) return [3, 6];
|
|
492
|
+
return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
|
|
485
493
|
case 5:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
_t.label = 6;
|
|
494
|
+
userList = _m.sent();
|
|
495
|
+
_m.label = 6;
|
|
489
496
|
case 6:
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
if (!((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id)) return [3, 8];
|
|
494
|
-
return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id)).unwrap()];
|
|
497
|
+
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === id; });
|
|
498
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
499
|
+
return [3, 13];
|
|
495
500
|
case 7:
|
|
496
|
-
|
|
497
|
-
|
|
501
|
+
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
|
|
502
|
+
if (!business_id) return [3, 9];
|
|
503
|
+
return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
|
|
498
504
|
case 8:
|
|
499
|
-
userList =
|
|
500
|
-
|
|
505
|
+
userList = _m.sent();
|
|
506
|
+
_m.label = 9;
|
|
501
507
|
case 9:
|
|
502
|
-
boardInfoStatus = _t.sent();
|
|
503
508
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
504
|
-
return [3,
|
|
509
|
+
return [3, 13];
|
|
505
510
|
case 10:
|
|
506
|
-
|
|
507
|
-
if (!
|
|
508
|
-
return [4, thunkApi.dispatch(getIndividualList((_m = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _m === void 0 ? void 0 : _m.id))];
|
|
509
|
-
case 11:
|
|
510
|
-
_t.sent();
|
|
511
|
-
_t.label = 12;
|
|
512
|
-
case 12: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
513
|
-
case 13:
|
|
514
|
-
boardInfoStatus = _t.sent();
|
|
515
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
516
|
-
return [3, 17];
|
|
517
|
-
case 14:
|
|
518
|
-
birthCountry = ((_o = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _o === void 0 ? void 0 : _o.country) || countryCode;
|
|
519
|
-
if (!birthCountry) return [3, 16];
|
|
511
|
+
birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
|
|
512
|
+
if (!birthCountry) return [3, 12];
|
|
520
513
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
521
|
-
case
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
case
|
|
514
|
+
case 11:
|
|
515
|
+
_m.sent();
|
|
516
|
+
_m.label = 12;
|
|
517
|
+
case 12:
|
|
525
518
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
526
|
-
|
|
527
|
-
case
|
|
528
|
-
(
|
|
529
|
-
individuals = (boardData || {}).individuals;
|
|
530
|
-
_d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
|
|
519
|
+
_m.label = 13;
|
|
520
|
+
case 13:
|
|
521
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, { otp: params.otp });
|
|
531
522
|
return [2, {
|
|
532
523
|
data: data,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
536
|
-
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
537
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
538
|
-
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
539
|
-
name: (_r = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _r === void 0 ? void 0 : _r.names,
|
|
540
|
-
contact: (_s = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _s === void 0 ? void 0 : _s.contact,
|
|
541
|
-
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
542
|
-
countries: countries,
|
|
543
|
-
countryCode: countryCode,
|
|
544
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
545
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
546
|
-
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
547
|
-
},
|
|
524
|
+
countries: countries,
|
|
525
|
+
countryCode: countryCode,
|
|
548
526
|
formData: __assign({}, params),
|
|
549
527
|
userList: userList
|
|
550
528
|
}];
|
|
@@ -584,21 +562,20 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
|
|
|
584
562
|
});
|
|
585
563
|
});
|
|
586
564
|
export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
|
|
587
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
565
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
588
566
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
589
|
-
var _b, settings, individual, _c,
|
|
567
|
+
var _b, settings, individual, _c, recipient, user, entity, id, countryCode, name, email, mobile, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, _d, data_status, objects, ids, 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, individualData, data, _e, isUser, isBuyer, isUserORBuyerType;
|
|
590
568
|
var _f, _g, _h, _j, _k;
|
|
591
569
|
return __generator(this, function (_l) {
|
|
592
570
|
switch (_l.label) {
|
|
593
571
|
case 0:
|
|
594
572
|
_b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
|
|
595
|
-
_c = individual.data.verify.responseBody || {},
|
|
596
|
-
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user :
|
|
597
|
-
_d = user || {}, objects = _d.objects, ids = _d.ids;
|
|
573
|
+
_c = individual.data.verify.responseBody || {}, recipient = _c.recipient, user = _c.user, entity = _c.entity;
|
|
574
|
+
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : recipient) || {}).id;
|
|
598
575
|
countryCode = (originalFormData || {}).countryCode;
|
|
599
576
|
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;
|
|
600
577
|
code = entity === null || entity === void 0 ? void 0 : entity.country;
|
|
601
|
-
|
|
578
|
+
_d = user || {}, data_status = _d.data_status, objects = _d.objects, ids = _d.ids;
|
|
602
579
|
userName = getUserNameObject(name);
|
|
603
580
|
identification_id_type = nid ? (nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA) : undefined;
|
|
604
581
|
if (isOtherThanKWOrSA(settings.data.businessCountry.iso2)) {
|
|
@@ -667,12 +644,14 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
667
644
|
'date_of_birth',
|
|
668
645
|
'nationality'
|
|
669
646
|
], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_PERSONAL_INFO });
|
|
647
|
+
individualData = undefined;
|
|
648
|
+
if (!isDirty) return [3, 2];
|
|
670
649
|
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
671
650
|
case 1:
|
|
672
651
|
data = _l.sent();
|
|
673
|
-
|
|
652
|
+
individualData = data;
|
|
653
|
+
_l.label = 2;
|
|
674
654
|
case 2:
|
|
675
|
-
currencyData = _l.sent();
|
|
676
655
|
_e = getIndividualType(objects), isUser = _e.isUser, isBuyer = _e.isBuyer;
|
|
677
656
|
isUserORBuyerType = isUser || isBuyer;
|
|
678
657
|
if (!isUserORBuyerType) return [3, 4];
|
|
@@ -683,31 +662,35 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
683
662
|
case 4:
|
|
684
663
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
685
664
|
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
|
|
686
|
-
return [2, { data:
|
|
665
|
+
return [2, { data: individualData, formData: originalFormData }];
|
|
687
666
|
}
|
|
688
667
|
});
|
|
689
668
|
});
|
|
690
669
|
});
|
|
691
670
|
export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (_a, thunkApi) {
|
|
692
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
671
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
693
672
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
694
|
-
var _b, settings, individual, _c,
|
|
695
|
-
var
|
|
696
|
-
return __generator(this, function (
|
|
697
|
-
switch (
|
|
673
|
+
var _b, settings, individual, _c, verify, individualPersonalData, _d, recipient, user, userList, business, individualResData, userRes, userResInfo, id, _e, 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, _f, isUser, isShareholder, isBoardMember, isBuyer, isCustomer, isUserORBuyerType, payload, businessCountry, hasCivilIdDocument, hasSignatureDocument, isSendSignatureFile, civilIdDocument, signatureDocument, documentBody, documentBody, documentsList, documentBody, data, individualData, requestBody, user_2, userListRes;
|
|
674
|
+
var _g, _h;
|
|
675
|
+
return __generator(this, function (_j) {
|
|
676
|
+
switch (_j.label) {
|
|
698
677
|
case 0:
|
|
699
678
|
_b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
|
|
700
|
-
_c = individual.data
|
|
701
|
-
|
|
702
|
-
|
|
679
|
+
_c = individual.data, verify = _c.verify, individualPersonalData = _c.individualPersonalData;
|
|
680
|
+
_d = verify.responseBody || {}, recipient = _d.recipient, user = _d.user, userList = _d.userList, business = _d.business;
|
|
681
|
+
individualResData = individualPersonalData.responseBody || {};
|
|
682
|
+
userRes = (sortUserList(mapUserList(individualResData === null || individualResData === void 0 ? void 0 : individualResData.individuals)) || [])[0];
|
|
683
|
+
userResInfo = userRes || user;
|
|
684
|
+
id = (((userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.is_authorized) ? userResInfo : recipient) || {}).id;
|
|
685
|
+
_e = userResInfo || {}, objects = _e.objects, ids = _e.ids;
|
|
703
686
|
isKWOrSAValue = isKWOrSA(settings.data.businessCountry.iso2);
|
|
704
687
|
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;
|
|
705
|
-
isOccupationNonEditable = hasNoneEditableValue(
|
|
706
|
-
isSourceIncomeNonEditable = hasNoneEditableValue(
|
|
707
|
-
isPEPNonEditable = hasNoneEditableValue(
|
|
708
|
-
isInfluencerNonEditable = hasNoneEditableValue(
|
|
709
|
-
isMonthlyIncomeNonEditable = hasNoneEditableValue(
|
|
710
|
-
isAuthorizedNonEditable = hasNoneEditableValue(
|
|
688
|
+
isOccupationNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'occupation');
|
|
689
|
+
isSourceIncomeNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'source_of_income');
|
|
690
|
+
isPEPNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'is_relative_PEP');
|
|
691
|
+
isInfluencerNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'is_influencer');
|
|
692
|
+
isMonthlyIncomeNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'monthly_income');
|
|
693
|
+
isAuthorizedNonEditable = hasNoneEditableValue(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.data_status, 'is_authorized');
|
|
711
694
|
isSharesAvailable = shareCount || shareValue;
|
|
712
695
|
pepInfo = isPEPNonEditable || isPEP === null ? undefined : isPEP;
|
|
713
696
|
influencerInfo = isInfluencerNonEditable || isInfluencer === null ? undefined : isInfluencer;
|
|
@@ -739,7 +722,7 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
739
722
|
source_income: sourceIncomeInfo,
|
|
740
723
|
monthly_income: monthlyIncomeInfo
|
|
741
724
|
};
|
|
742
|
-
|
|
725
|
+
_f = getIndividualType(objects), isUser = _f.isUser, isShareholder = _f.isShareholder, isBoardMember = _f.isBoardMember, isBuyer = _f.isBuyer, isCustomer = _f.isCustomer;
|
|
743
726
|
isUserORBuyerType = isUser || isBuyer;
|
|
744
727
|
payload = userPayload;
|
|
745
728
|
if (objects === null || objects === void 0 ? void 0 : objects.length) {
|
|
@@ -749,8 +732,8 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
749
732
|
hasCivilIdDocument = (civilID || []).length > 0;
|
|
750
733
|
hasSignatureDocument = (signatureFileId || []).length > 0;
|
|
751
734
|
isSendSignatureFile = isAuthorized && isUserORBuyerType;
|
|
752
|
-
civilIdDocument = getRecentDocumentBasedOnPurpose(
|
|
753
|
-
signatureDocument = getRecentDocumentBasedOnPurpose(
|
|
735
|
+
civilIdDocument = getRecentDocumentBasedOnPurpose(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.documents, DocumentPurpose.IDENTITY_DOCUMENT);
|
|
736
|
+
signatureDocument = getRecentDocumentBasedOnPurpose(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.documents, DocumentPurpose.CUSTOMER_SIGNATURE);
|
|
754
737
|
if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 2];
|
|
755
738
|
documentBody = {
|
|
756
739
|
id: civilIdDocument.id,
|
|
@@ -758,8 +741,8 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
758
741
|
};
|
|
759
742
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
760
743
|
case 1:
|
|
761
|
-
|
|
762
|
-
|
|
744
|
+
_j.sent();
|
|
745
|
+
_j.label = 2;
|
|
763
746
|
case 2:
|
|
764
747
|
if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 4];
|
|
765
748
|
documentBody = {
|
|
@@ -768,8 +751,8 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
768
751
|
};
|
|
769
752
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
770
753
|
case 3:
|
|
771
|
-
|
|
772
|
-
|
|
754
|
+
_j.sent();
|
|
755
|
+
_j.label = 4;
|
|
773
756
|
case 4:
|
|
774
757
|
documentsList = [];
|
|
775
758
|
if (hasCivilIdDocument && !(civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id))
|
|
@@ -784,23 +767,33 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
784
767
|
};
|
|
785
768
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
786
769
|
case 5:
|
|
787
|
-
|
|
788
|
-
|
|
770
|
+
_j.sent();
|
|
771
|
+
_j.label = 6;
|
|
789
772
|
case 6:
|
|
773
|
+
data = undefined, individualData = userResInfo || {};
|
|
790
774
|
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 });
|
|
775
|
+
if (!isDirty) return [3, 8];
|
|
791
776
|
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
792
777
|
case 7:
|
|
793
|
-
data =
|
|
794
|
-
|
|
778
|
+
data = _j.sent();
|
|
779
|
+
user_2 = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
|
|
780
|
+
individualData = user_2;
|
|
781
|
+
_j.label = 8;
|
|
782
|
+
case 8:
|
|
795
783
|
userListRes = userList || [];
|
|
796
|
-
|
|
784
|
+
userListRes = userListRes.map(function (u) {
|
|
785
|
+
if (u.id === individualData.id) {
|
|
786
|
+
return individualData;
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
if (!((userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id) && !(userResInfo === null || userResInfo === void 0 ? void 0 : userResInfo.is_authorized) && isAuthorized && (business === null || business === void 0 ? void 0 : business.id))) return [3, 10];
|
|
797
790
|
return [4, thunkApi.dispatch(getIndividualList(business === null || business === void 0 ? void 0 : business.id)).unwrap()];
|
|
798
|
-
case 8:
|
|
799
|
-
userListRes = _h.sent();
|
|
800
|
-
_h.label = 9;
|
|
801
791
|
case 9:
|
|
792
|
+
userListRes = _j.sent();
|
|
793
|
+
_j.label = 10;
|
|
794
|
+
case 10:
|
|
802
795
|
thunkApi.dispatch(handleNextScreenStep());
|
|
803
|
-
(
|
|
796
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
|
|
804
797
|
return [2, { data: data, formData: originalFormData, individualData: individualData, userList: userListRes, isKWOrSACountry: isKWOrSAValue }];
|
|
805
798
|
}
|
|
806
799
|
});
|
|
@@ -832,43 +825,45 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
|
|
|
832
825
|
});
|
|
833
826
|
});
|
|
834
827
|
export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
835
|
-
var _a, settings, individual, _b,
|
|
836
|
-
var
|
|
837
|
-
return __generator(this, function (
|
|
838
|
-
switch (
|
|
828
|
+
var _a, settings, individual, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, iType, boardInfoStatusData;
|
|
829
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
830
|
+
return __generator(this, function (_p) {
|
|
831
|
+
switch (_p.label) {
|
|
839
832
|
case 0:
|
|
840
833
|
_a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
|
|
841
|
-
_b = individual.data.verify.responseBody || {},
|
|
842
|
-
|
|
834
|
+
_b = individual.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
835
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
836
|
+
if (!board_id)
|
|
843
837
|
return [2];
|
|
844
838
|
payload = {
|
|
845
839
|
lang: settings.data.language,
|
|
846
|
-
step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS
|
|
847
|
-
id: id
|
|
840
|
+
step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS
|
|
848
841
|
};
|
|
849
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
842
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
850
843
|
case 1:
|
|
851
|
-
data =
|
|
852
|
-
|
|
844
|
+
data = _p.sent();
|
|
845
|
+
sendCustomEventToGTM({
|
|
846
|
+
event: 'Send Event',
|
|
847
|
+
event_category: 'Board Flows - Individual',
|
|
848
|
+
event_action: 'Individual Update Success Page',
|
|
849
|
+
event_label: settings.data.businessCountry.iso2
|
|
850
|
+
});
|
|
851
|
+
if (!showBoard && mode === 'content') {
|
|
852
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
853
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
854
|
+
return [2, { response: __assign({}, data), formData: params }];
|
|
855
|
+
}
|
|
856
|
+
_d = ((_j = data === null || data === void 0 ? void 0 : data.notification) === null || _j === void 0 ? void 0 : _j.recipient) || {}, id = _d.id, iType = _d.type;
|
|
857
|
+
return [4, Promise.all([
|
|
858
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
859
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: iType })).unwrap()
|
|
860
|
+
])];
|
|
853
861
|
case 2:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
_h.sent();
|
|
858
|
-
individualDataRes = undefined;
|
|
859
|
-
_c = primaryUser || {}, is_authorized = _c.is_authorized, userId = _c.id, type = _c.object;
|
|
860
|
-
if (!!is_authorized) return [3, 5];
|
|
861
|
-
return [4, thunkApi
|
|
862
|
-
.dispatch(retrieveIndividualInfo({ id: userId, type: type, countryCode: settings.data.businessCountry.iso2 }))
|
|
863
|
-
.unwrap()];
|
|
864
|
-
case 4:
|
|
865
|
-
individualDataRes = _h.sent();
|
|
866
|
-
_h.label = 5;
|
|
867
|
-
case 5:
|
|
868
|
-
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
|
|
869
|
-
(_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
|
|
862
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
863
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
864
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
870
865
|
thunkApi.dispatch(handleNextScreenStep());
|
|
871
|
-
return [2, {
|
|
866
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
872
867
|
}
|
|
873
868
|
});
|
|
874
869
|
}); });
|
|
@@ -890,9 +885,9 @@ var initialState = {
|
|
|
890
885
|
error: null,
|
|
891
886
|
loading: false,
|
|
892
887
|
cityLoading: false,
|
|
888
|
+
addOrRequestDetailLoading: false,
|
|
893
889
|
data: {
|
|
894
890
|
flowName: FlowsTypes.INDIVIDUAL,
|
|
895
|
-
currency: '',
|
|
896
891
|
verify: {
|
|
897
892
|
token: ''
|
|
898
893
|
},
|
|
@@ -966,8 +961,8 @@ export var individualSlice = createSlice({
|
|
|
966
961
|
})
|
|
967
962
|
.addCase(verifyToken.fulfilled, function (state, action) {
|
|
968
963
|
state.error = null;
|
|
969
|
-
var _a = action.payload, data = _a.data, token = _a.token,
|
|
970
|
-
state.data.verify.responseBody = __assign(__assign(__assign(
|
|
964
|
+
var _a = action.payload, data = _a.data, token = _a.token, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList;
|
|
965
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, board_id: data.id, userList: userList });
|
|
971
966
|
state.data.verify.token = token;
|
|
972
967
|
})
|
|
973
968
|
.addCase(verifyToken.rejected, function (state, action) {
|
|
@@ -1007,30 +1002,24 @@ export var individualSlice = createSlice({
|
|
|
1007
1002
|
state.error = null;
|
|
1008
1003
|
})
|
|
1009
1004
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
1010
|
-
var _a;
|
|
1011
1005
|
state.loading = false;
|
|
1012
1006
|
state.error = null;
|
|
1013
|
-
var
|
|
1014
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
1015
|
-
if (description) {
|
|
1016
|
-
state.error = description;
|
|
1017
|
-
return;
|
|
1018
|
-
}
|
|
1007
|
+
var _a = action.payload, data = _a.data, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList, formData = _a.formData;
|
|
1019
1008
|
state.data.otpData = formData;
|
|
1020
1009
|
state.data.otpData.responseBody = data;
|
|
1021
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody),
|
|
1010
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, userList: userList });
|
|
1022
1011
|
})
|
|
1023
1012
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
1024
1013
|
state.loading = false;
|
|
1025
1014
|
state.error = action.error.message;
|
|
1026
1015
|
})
|
|
1027
1016
|
.addCase(addDetailsAsync.pending, function (state) {
|
|
1028
|
-
state.
|
|
1017
|
+
state.addOrRequestDetailLoading = true;
|
|
1029
1018
|
state.error = null;
|
|
1030
1019
|
})
|
|
1031
1020
|
.addCase(addDetailsAsync.fulfilled, function (state, action) {
|
|
1032
1021
|
var _a, _b, _c, _d;
|
|
1033
|
-
state.
|
|
1022
|
+
state.addOrRequestDetailLoading = false;
|
|
1034
1023
|
state.error = null;
|
|
1035
1024
|
var _e = action.payload, userList = _e.userList, individualId = _e.individualId, countries = _e.countries;
|
|
1036
1025
|
var primaryUser = (state.data.verify.responseBody || {}).user;
|
|
@@ -1099,15 +1088,15 @@ export var individualSlice = createSlice({
|
|
|
1099
1088
|
state.data.individualData.isAuthorized = is_authorized;
|
|
1100
1089
|
})
|
|
1101
1090
|
.addCase(addDetailsAsync.rejected, function (state, action) {
|
|
1102
|
-
state.
|
|
1091
|
+
state.addOrRequestDetailLoading = false;
|
|
1103
1092
|
state.error = action.error.message;
|
|
1104
1093
|
})
|
|
1105
1094
|
.addCase(requestDetailsByEmail.pending, function (state) {
|
|
1106
|
-
state.
|
|
1095
|
+
state.addOrRequestDetailLoading = true;
|
|
1107
1096
|
state.error = null;
|
|
1108
1097
|
})
|
|
1109
1098
|
.addCase(requestDetailsByEmail.fulfilled, function (state, action) {
|
|
1110
|
-
state.
|
|
1099
|
+
state.addOrRequestDetailLoading = false;
|
|
1111
1100
|
state.error = null;
|
|
1112
1101
|
var _a = action.payload, data = _a.data, individualData = _a.individualData;
|
|
1113
1102
|
var userList = (state.data.verify.responseBody || {}).userList;
|
|
@@ -1120,7 +1109,7 @@ export var individualSlice = createSlice({
|
|
|
1120
1109
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { requestEmailData: data, userList: list });
|
|
1121
1110
|
})
|
|
1122
1111
|
.addCase(requestDetailsByEmail.rejected, function (state, action) {
|
|
1123
|
-
state.
|
|
1112
|
+
state.addOrRequestDetailLoading = false;
|
|
1124
1113
|
state.error = action.error.message;
|
|
1125
1114
|
})
|
|
1126
1115
|
.addCase(retrieveIndividualInfo.pending, function (state) {
|
|
@@ -1192,6 +1181,7 @@ export var individualSlice = createSlice({
|
|
|
1192
1181
|
state.data.individualData.isAuthorized = is_authorized;
|
|
1193
1182
|
})
|
|
1194
1183
|
.addCase(retrieveIndividualInfo.rejected, function (state, action) {
|
|
1184
|
+
state.addOrRequestDetailLoading = false;
|
|
1195
1185
|
state.error = action.error.message;
|
|
1196
1186
|
})
|
|
1197
1187
|
.addCase(getIndividualList.pending, function (state) {
|
|
@@ -1280,14 +1270,11 @@ export var individualSlice = createSlice({
|
|
|
1280
1270
|
state.error = null;
|
|
1281
1271
|
})
|
|
1282
1272
|
.addCase(updateIndividualPersonalInfo.fulfilled, function (state, action) {
|
|
1283
|
-
var _a;
|
|
1284
1273
|
state.loading = false;
|
|
1285
1274
|
state.error = null;
|
|
1286
|
-
var
|
|
1275
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
1287
1276
|
state.data.individualPersonalData = formData;
|
|
1288
1277
|
state.data.individualPersonalData.responseBody = data;
|
|
1289
|
-
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
1290
|
-
state.data.currency = currencyData.code.english;
|
|
1291
1278
|
})
|
|
1292
1279
|
.addCase(updateIndividualPersonalInfo.rejected, function (state, action) {
|
|
1293
1280
|
state.loading = false;
|
|
@@ -1301,11 +1288,11 @@ export var individualSlice = createSlice({
|
|
|
1301
1288
|
state.loading = false;
|
|
1302
1289
|
state.error = null;
|
|
1303
1290
|
var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData, userList = _a.userList, isKWOrSACountry = _a.isKWOrSACountry;
|
|
1304
|
-
state.data.individualData = formData;
|
|
1291
|
+
state.data.individualData = __assign(__assign({}, formData), { civilID: undefined, signatureFileId: undefined });
|
|
1305
1292
|
state.data.individualData.responseBody = data;
|
|
1306
1293
|
var user = (state.data.verify.responseBody || {}).user;
|
|
1307
1294
|
var isSameUser = (user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id);
|
|
1308
|
-
var userInfo = __assign(__assign({}, user), (isSameUser &&
|
|
1295
|
+
var userInfo = __assign(__assign({}, user), (isSameUser && individualData && __assign({}, individualData)));
|
|
1309
1296
|
if (isSameUser && !isKWOrSACountry)
|
|
1310
1297
|
userInfo = __assign(__assign({}, user), { is_authorized: individualData.is_authorized });
|
|
1311
1298
|
var list = userList || [];
|
|
@@ -1365,18 +1352,8 @@ export var individualSlice = createSlice({
|
|
|
1365
1352
|
var _a;
|
|
1366
1353
|
state.loading = false;
|
|
1367
1354
|
state.error = null;
|
|
1368
|
-
var _b = action.payload || {},
|
|
1369
|
-
|
|
1370
|
-
if (description) {
|
|
1371
|
-
state.error = description;
|
|
1372
|
-
return;
|
|
1373
|
-
}
|
|
1374
|
-
var flows = response.flows;
|
|
1375
|
-
var individuals = (state.data.verify.responseBody || {}).individuals;
|
|
1376
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
1377
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (data_state && {
|
|
1378
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
1379
|
-
}));
|
|
1355
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
1356
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, recipient: (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient });
|
|
1380
1357
|
})
|
|
1381
1358
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
1382
1359
|
state.loading = true;
|