@tap-payments/auth-jsconnect 2.6.3-test → 2.6.3
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 +73 -15
- 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 +14 -3
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +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 +25 -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/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +28 -3
- package/build/api/entity.js +23 -10
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +19 -27
- package/build/api/lead.d.ts +25 -3
- package/build/api/lead.js +47 -1
- package/build/api/operator.d.ts +8 -3
- package/build/api/operator.js +4 -16
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/settings.d.ts +14 -3
- package/build/app/settings.js +127 -41
- package/build/app/store.d.ts +4 -0
- package/build/assets/locales/ar.json +333 -142
- package/build/assets/locales/en.json +330 -142
- 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/Loader.d.ts +6 -1
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +9 -7
- package/build/constants/api.js +19 -15
- package/build/constants/app.d.ts +46 -0
- package/build/constants/app.js +380 -21
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +5 -1
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +614 -6141
- package/build/constants/validation.d.ts +5 -0
- package/build/constants/validation.js +6 -1
- package/build/features/app/auth/authStore.d.ts +103 -0
- package/build/features/app/auth/authStore.js +1179 -0
- package/build/features/app/bank/bankStore.d.ts +14 -18
- package/build/features/app/bank/bankStore.js +218 -158
- package/build/features/app/board/boardStore.d.ts +33 -0
- package/build/features/app/board/boardStore.js +269 -0
- package/build/features/app/brand/brandStore.d.ts +18 -31
- package/build/features/app/brand/brandStore.js +296 -263
- package/build/features/app/business/businessStore.d.ts +28 -10
- package/build/features/app/business/businessStore.js +361 -215
- package/build/features/app/connect/connectStore.d.ts +39 -15
- package/build/features/app/connect/connectStore.js +308 -207
- package/build/features/app/connectExpress/connectExpressStore.d.ts +63 -35
- package/build/features/app/connectExpress/connectExpressStore.js +764 -414
- package/build/features/app/entity/entityStore.d.ts +21 -34
- package/build/features/app/entity/entityStore.js +248 -246
- package/build/features/app/individual/individualStore.d.ts +24 -33
- package/build/features/app/individual/individualStore.js +336 -274
- package/build/features/app/password/passwordStore.d.ts +34 -18
- package/build/features/app/password/passwordStore.js +286 -219
- package/build/features/app/tax/taxStore.d.ts +14 -7
- package/build/features/app/tax/taxStore.js +202 -141
- package/build/features/auth/Auth.d.ts +14 -0
- package/build/features/auth/Auth.js +168 -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/{connectExpress/screens/AuthenticationList → auth/screens/AuthMerchant}/MerchantList.d.ts +2 -1
- 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 +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.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 +3 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +31 -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/DOB/DOB.js +47 -0
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/auth/screens/DOB/validation.d.ts +8 -0
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/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/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 +56 -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 +8 -0
- package/build/features/auth/screens/NID/validation.js +10 -0
- package/build/features/auth/screens/OTP/OTP.js +118 -0
- package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTPInput.js +27 -7
- 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/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/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 +2 -0
- package/build/features/bank/Bank.js +15 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +21 -7
- 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 +13 -5
- package/build/features/bank/screens/Verify/Verify.js +8 -7
- package/build/features/board/Board.d.ts +13 -0
- package/build/features/board/Board.js +87 -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/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/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 +44 -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/{business/screens/OTP → board/screens/Verify}/OTPInput.js +9 -7
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.js → board/screens/Verify/Verify.js} +25 -37
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/brand/Brand.d.ts +2 -0
- package/build/features/brand/Brand.js +15 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +9 -9
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- 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 +5 -2
- 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 +27 -7
- 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 +23 -7
- 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 +13 -5
- package/build/features/brand/screens/Verify/Verify.js +4 -3
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +27 -10
- 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 +24 -8
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
- 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.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +14 -12
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +51 -11
- 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 +10 -4
- 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/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +18 -19
- package/build/features/business/screens/IDBOD/validation.d.ts +7 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -1
- 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 +16 -5
- 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 +48 -31
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +4 -26
- 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 +113 -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.js +12 -4
- package/build/features/{connectExpress/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/Individual.js +12 -6
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
- package/build/features/connect/screens/Individual/validation.js +8 -3
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- 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/validation.js +8 -3
- 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 +10 -13
- 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 +7 -7
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- 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/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 -3
- package/build/features/connectExpress/ConnectExpress.js +70 -44
- 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/{AuthenticationList/TerminalList.d.ts → AuthMerchant/MerchantList.d.ts} +4 -3
- 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.js +30 -17
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +3 -3
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +52 -10
- 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/validation.d.ts +13 -10
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +66 -7
- 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.js +16 -5
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +20 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- 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.js +34 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +7 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
- 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/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/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -7
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +17 -11
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
- 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 +15 -12
- 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/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +10 -8
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +7 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +14 -16
- 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 -4
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -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 +2 -0
- package/build/features/entity/Entity.js +15 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +5 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +44 -19
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +9 -9
- 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 +5 -7
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -7
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -11
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/Verify.js +4 -3
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +250 -16
- package/build/features/individual/Individual.d.ts +2 -0
- package/build/features/individual/Individual.js +15 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +55 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
- 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/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualList/validation.js +8 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
- 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.js +1 -1
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/Verify.js +4 -3
- package/build/features/password/Password.d.ts +2 -0
- package/build/features/password/Password.js +94 -32
- package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
- package/build/features/password/screens/OTP/OTP.js +4 -4
- 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 +13 -5
- package/build/features/password/screens/Verify/Verify.js +8 -7
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Background/Background.d.ts +3 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -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/Button.js +11 -5
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +15 -3
- 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 +3 -3
- package/build/features/shared/Containers/ScreenContainer.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/Footer/Footer.js +2 -1
- 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 +6 -3
- package/build/features/signIn/screens/Mobile/validation.js +8 -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 +2 -0
- package/build/features/tax/Tax.js +15 -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 +13 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
- package/build/features/tax/screens/Verify/Verify.js +8 -7
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +9 -6
- package/build/hooks/useAppDispatch.d.ts +2 -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/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +1 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- 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 +4 -2
- 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 +3 -0
- package/build/utils/common.js +38 -2
- 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 +4 -1
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +24 -5
- package/build/utils/validation.d.ts +5 -0
- package/build/utils/validation.js +16 -0
- package/package.json +2 -2
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- 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
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +0 -100
- package/build/features/connectExpress/screens/AuthenticationList/TerminalList.js +0 -101
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- 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/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTP.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/OTPInput.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.js +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.js +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP/OTPInput.d.ts → board/screens/Verify/Verify.d.ts} +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.js +0 -0
|
@@ -69,119 +69,115 @@ 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, isSA, 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
|
-
payload = {
|
|
84
|
-
service_name: 'tap_email',
|
|
85
|
-
verify_token: token
|
|
86
|
-
};
|
|
87
83
|
settings = thunkApi.getState().settings;
|
|
84
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
85
|
+
notification: {
|
|
86
|
+
sms: false
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
88
89
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
89
90
|
case 1:
|
|
90
|
-
data = (
|
|
91
|
-
|
|
91
|
+
data = (_j.sent()).data;
|
|
92
|
+
recipientData = undefined;
|
|
92
93
|
countries = settings.data.countries;
|
|
93
|
-
if (((
|
|
94
|
+
if (((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
94
95
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
95
96
|
if (isInternally)
|
|
96
97
|
data.step_name = INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
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)
|
|
103
104
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
|
|
107
|
-
return [3, 16];
|
|
105
|
+
if (!!country_code) return [3, 3];
|
|
106
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
108
107
|
case 2:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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;
|
|
114
113
|
case 3:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (!(id && type)) return [3, 5];
|
|
119
|
-
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];
|
|
120
117
|
case 4:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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 })];
|
|
124
124
|
case 5:
|
|
125
|
-
|
|
126
|
-
|
|
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;
|
|
127
130
|
case 6:
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
_d = recipientData || {}, id_1 = _d.id, type = _d.type;
|
|
132
|
+
return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id_1, type: type, countryCode: countryCode })).unwrap()];
|
|
130
133
|
case 7:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
|
|
137
|
-
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))];
|
|
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()];
|
|
139
138
|
case 8:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
case 9:
|
|
143
|
-
|
|
144
|
-
boardInfoStatus = _m.sent();
|
|
139
|
+
userList = _j.sent();
|
|
140
|
+
_j.label = 9;
|
|
141
|
+
case 9:
|
|
142
|
+
userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === id_1; });
|
|
145
143
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
146
|
-
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()];
|
|
147
149
|
case 11:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
150
|
+
userList = _j.sent();
|
|
151
|
+
_j.label = 12;
|
|
151
152
|
case 12:
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
154
|
+
return [3, 16];
|
|
154
155
|
case 13:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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];
|
|
158
|
+
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
159
|
+
case 14:
|
|
160
|
+
_j.sent();
|
|
161
|
+
_j.label = 15;
|
|
158
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];
|
|
169
|
+
case 17:
|
|
159
170
|
if (isUpdatePhoneInfo) {
|
|
160
171
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
|
|
161
172
|
}
|
|
162
|
-
|
|
163
|
-
case
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
171
|
-
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
172
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
173
|
-
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
174
|
-
name: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.names,
|
|
175
|
-
contact: (_l = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _l === void 0 ? void 0 : _l.contact,
|
|
176
|
-
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
177
|
-
countries: countries,
|
|
178
|
-
countryCode: countryCode,
|
|
179
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
180
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
181
|
-
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
182
|
-
},
|
|
183
|
-
token: token
|
|
184
|
-
}];
|
|
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
|
+
}];
|
|
185
181
|
}
|
|
186
182
|
});
|
|
187
183
|
});
|
|
@@ -394,126 +390,141 @@ export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', fun
|
|
|
394
390
|
});
|
|
395
391
|
}); });
|
|
396
392
|
export var retrieveBoardStatus = createAsyncThunk('individual/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
397
|
-
var individual, board_id, data;
|
|
398
|
-
return __generator(this, function (
|
|
399
|
-
switch (
|
|
393
|
+
var individual, _a, board_id, board_info_id, data;
|
|
394
|
+
return __generator(this, function (_b) {
|
|
395
|
+
switch (_b.label) {
|
|
400
396
|
case 0:
|
|
401
397
|
individual = thunkApi.getState().individual;
|
|
402
|
-
|
|
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');
|
|
403
401
|
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
404
402
|
case 1:
|
|
405
|
-
data =
|
|
403
|
+
data = _b.sent();
|
|
404
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id })).unwrap()];
|
|
405
|
+
case 2:
|
|
406
|
+
_b.sent();
|
|
406
407
|
thunkApi.dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
407
408
|
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
408
409
|
}
|
|
409
410
|
});
|
|
410
411
|
}); });
|
|
411
|
-
export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (
|
|
412
|
-
var _a,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
+
});
|
|
423
444
|
});
|
|
424
|
-
});
|
|
445
|
+
});
|
|
425
446
|
export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
426
|
-
var _a, individual, settings, responseBody,
|
|
427
|
-
var _e, _f, _g, _h, _j, _k, _l
|
|
428
|
-
return __generator(this, function (
|
|
429
|
-
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) {
|
|
430
451
|
case 0:
|
|
431
452
|
_a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
|
|
432
453
|
responseBody = individual.data.verify.responseBody;
|
|
433
|
-
_b = responseBody || {}, board_id = _b.board_id, board_info_id = _b.board_info_id;
|
|
434
454
|
countries = settings.data.countries;
|
|
435
455
|
payload = {
|
|
436
456
|
data: params.otp,
|
|
437
|
-
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,
|
|
438
458
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
439
459
|
step_name: INDIVIDUAl_STEP_NAMES.PHONE_AUTH,
|
|
440
460
|
encryption_contract: ['data']
|
|
441
461
|
};
|
|
442
462
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
443
463
|
case 1:
|
|
444
|
-
data = (
|
|
445
|
-
|
|
446
|
-
if ((
|
|
464
|
+
data = (_m.sent()).data;
|
|
465
|
+
recipientData = undefined;
|
|
466
|
+
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
447
467
|
throw new Error(data.errors[0].description);
|
|
448
|
-
publicKey = (
|
|
449
|
-
|
|
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)
|
|
450
471
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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 })];
|
|
454
479
|
case 2:
|
|
455
|
-
|
|
456
|
-
|
|
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;
|
|
457
485
|
case 3:
|
|
458
|
-
|
|
459
|
-
if (!(board_id && board_info_id)) return [3, 6];
|
|
460
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
461
|
-
case 4:
|
|
462
|
-
boardInfoData = _r.sent();
|
|
463
|
-
notification = (boardInfoData || {}).notification;
|
|
464
|
-
_c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
|
|
465
|
-
if (!(id && type)) return [3, 6];
|
|
486
|
+
_c = recipientData || {}, id = _c.id, type = _c.type;
|
|
466
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()];
|
|
467
493
|
case 5:
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
_r.label = 6;
|
|
494
|
+
userList = _m.sent();
|
|
495
|
+
_m.label = 6;
|
|
471
496
|
case 6:
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
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))];
|
|
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];
|
|
477
500
|
case 7:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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()];
|
|
504
|
+
case 8:
|
|
505
|
+
userList = _m.sent();
|
|
506
|
+
_m.label = 9;
|
|
481
507
|
case 9:
|
|
482
|
-
boardInfoStatus = _r.sent();
|
|
483
508
|
thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
|
|
484
509
|
return [3, 13];
|
|
485
510
|
case 10:
|
|
486
|
-
birthCountry = ((
|
|
511
|
+
birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
|
|
487
512
|
if (!birthCountry) return [3, 12];
|
|
488
513
|
return [4, thunkApi.dispatch(getCityList(birthCountry))];
|
|
489
514
|
case 11:
|
|
490
|
-
|
|
491
|
-
|
|
515
|
+
_m.sent();
|
|
516
|
+
_m.label = 12;
|
|
492
517
|
case 12:
|
|
493
518
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
|
|
494
|
-
|
|
519
|
+
_m.label = 13;
|
|
495
520
|
case 13:
|
|
496
|
-
(
|
|
497
|
-
individuals = (boardData || {}).individuals;
|
|
498
|
-
_d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
|
|
521
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, { otp: params.otp });
|
|
499
522
|
return [2, {
|
|
500
523
|
data: data,
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
506
|
-
merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
|
|
507
|
-
name: (_p = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _p === void 0 ? void 0 : _p.names,
|
|
508
|
-
contact: (_q = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _q === void 0 ? void 0 : _q.contact,
|
|
509
|
-
individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
|
|
510
|
-
countries: countries,
|
|
511
|
-
countryCode: countryCode,
|
|
512
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
|
|
513
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
514
|
-
flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
|
|
515
|
-
},
|
|
516
|
-
formData: __assign({}, params)
|
|
524
|
+
countries: countries,
|
|
525
|
+
countryCode: countryCode,
|
|
526
|
+
formData: __assign({}, params),
|
|
527
|
+
userList: userList
|
|
517
528
|
}];
|
|
518
529
|
}
|
|
519
530
|
});
|
|
@@ -551,23 +562,28 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
|
|
|
551
562
|
});
|
|
552
563
|
});
|
|
553
564
|
export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
|
|
554
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
565
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
555
566
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
556
|
-
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;
|
|
557
568
|
var _f, _g, _h, _j, _k;
|
|
558
569
|
return __generator(this, function (_l) {
|
|
559
570
|
switch (_l.label) {
|
|
560
571
|
case 0:
|
|
561
572
|
_b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
|
|
562
|
-
_c = individual.data.verify.responseBody || {},
|
|
563
|
-
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user :
|
|
564
|
-
_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;
|
|
565
575
|
countryCode = (originalFormData || {}).countryCode;
|
|
566
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;
|
|
567
577
|
code = entity === null || entity === void 0 ? void 0 : entity.country;
|
|
568
|
-
|
|
578
|
+
_d = user || {}, data_status = _d.data_status, objects = _d.objects, ids = _d.ids;
|
|
569
579
|
userName = getUserNameObject(name);
|
|
570
580
|
identification_id_type = nid ? (nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA) : undefined;
|
|
581
|
+
if (isOtherThanKWOrSA(settings.data.businessCountry.iso2)) {
|
|
582
|
+
identification_id_type = IDENTIFICATION_TYPE.NID;
|
|
583
|
+
}
|
|
584
|
+
if (isSA(settings.data.businessCountry.iso2)) {
|
|
585
|
+
identification_id_type = IDENTIFICATION_TYPE.NAFATH;
|
|
586
|
+
}
|
|
571
587
|
isGenderNonEditable = hasNoneEditableValue(data_status, 'gender');
|
|
572
588
|
isNameENNonEditable = hasNoneEditableValue(data_status, 'name.en');
|
|
573
589
|
isNameARNonEditable = hasNoneEditableValue(data_status, 'name.ar');
|
|
@@ -585,7 +601,7 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
585
601
|
hasContact = email || mobile;
|
|
586
602
|
hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
|
|
587
603
|
hasIdentification = nid && (issuedCountry || identification_id_type || expiryDate);
|
|
588
|
-
hasBirth = placeOfBirthCity || placeOfBirthCountry;
|
|
604
|
+
hasBirth = (placeOfBirthCity === null || placeOfBirthCity === void 0 ? void 0 : placeOfBirthCity.id) || (placeOfBirthCountry === null || placeOfBirthCountry === void 0 ? void 0 : placeOfBirthCountry.iso2);
|
|
589
605
|
nameIsEditable = userName.first && !(isNameENNonEditable && isNameARNonEditable);
|
|
590
606
|
contact = hasContact && !(isEmailNonEditable && isMobileCountryNonEditable && isMobileNumberNonEditable)
|
|
591
607
|
? __assign({ email: isEmailNonEditable ? undefined : email }, (!(isMobileCountryNonEditable && isMobileNumberNonEditable) &&
|
|
@@ -631,48 +647,56 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
631
647
|
'date_of_birth',
|
|
632
648
|
'nationality'
|
|
633
649
|
], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_PERSONAL_INFO });
|
|
650
|
+
individualData = undefined;
|
|
651
|
+
if (!isDirty) return [3, 2];
|
|
634
652
|
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
635
653
|
case 1:
|
|
636
654
|
data = _l.sent();
|
|
655
|
+
individualData = data;
|
|
656
|
+
_l.label = 2;
|
|
657
|
+
case 2:
|
|
637
658
|
_e = getIndividualType(objects), isUser = _e.isUser, isBuyer = _e.isBuyer;
|
|
638
659
|
isUserORBuyerType = isUser || isBuyer;
|
|
639
|
-
if (!isUserORBuyerType) return [3,
|
|
660
|
+
if (!isUserORBuyerType) return [3, 4];
|
|
640
661
|
return [4, thunkApi.dispatch(retrieveDataList(code))];
|
|
641
|
-
case 2:
|
|
642
|
-
_l.sent();
|
|
643
|
-
_l.label = 3;
|
|
644
662
|
case 3:
|
|
663
|
+
_l.sent();
|
|
664
|
+
_l.label = 4;
|
|
665
|
+
case 4:
|
|
645
666
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
646
667
|
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
|
|
647
|
-
return [2, { data:
|
|
668
|
+
return [2, { data: individualData, formData: originalFormData }];
|
|
648
669
|
}
|
|
649
670
|
});
|
|
650
671
|
});
|
|
651
672
|
});
|
|
652
673
|
export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (_a, thunkApi) {
|
|
653
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
674
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
654
675
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
655
|
-
var _b, settings, individual, _c,
|
|
676
|
+
var _b, settings, individual, _c, recipient, 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, data, individualData, requestBody, user_2, userListRes;
|
|
656
677
|
var _f, _g;
|
|
657
678
|
return __generator(this, function (_h) {
|
|
658
679
|
switch (_h.label) {
|
|
659
680
|
case 0:
|
|
660
681
|
_b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
|
|
661
|
-
_c = individual.data.verify.responseBody || {},
|
|
662
|
-
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user :
|
|
682
|
+
_c = individual.data.verify.responseBody || {}, recipient = _c.recipient, user = _c.user, userList = _c.userList, business = _c.business;
|
|
683
|
+
id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : recipient) || {}).id;
|
|
663
684
|
_d = user || {}, objects = _d.objects, ids = _d.ids;
|
|
664
|
-
|
|
685
|
+
isKWOrSAValue = isKWOrSA(settings.data.businessCountry.iso2);
|
|
686
|
+
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;
|
|
665
687
|
isOccupationNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'occupation');
|
|
666
688
|
isSourceIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'source_of_income');
|
|
667
689
|
isPEPNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_relative_PEP');
|
|
668
690
|
isInfluencerNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_influencer');
|
|
669
691
|
isMonthlyIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'monthly_income');
|
|
692
|
+
isAuthorizedNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_authorized');
|
|
670
693
|
isSharesAvailable = shareCount || shareValue;
|
|
671
|
-
pepInfo = isPEPNonEditable ? undefined : isPEP;
|
|
672
|
-
influencerInfo = isInfluencerNonEditable ? undefined : isInfluencer;
|
|
694
|
+
pepInfo = isPEPNonEditable || isPEP === null ? undefined : isPEP;
|
|
695
|
+
influencerInfo = isInfluencerNonEditable || isInfluencer === null ? undefined : isInfluencer;
|
|
673
696
|
occupationInfo = isOccupationNonEditable || !(occupation === null || occupation === void 0 ? void 0 : occupation.id) ? undefined : { chapter: { id: occupation.id } };
|
|
674
697
|
sourceIncomeInfo = isSourceIncomeNonEditable || !(sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.id) ? undefined : [{ id: sourceIncome.id }];
|
|
675
698
|
monthlyIncomeInfo = isMonthlyIncomeNonEditable || !(monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.id) ? undefined : { id: monthlyIncome.id };
|
|
699
|
+
isAuthorizedInfo = isAuthorizedNonEditable || isKWOrSAValue ? undefined : { is_authorized: isAuthorized };
|
|
676
700
|
userPayload = {
|
|
677
701
|
occupation: occupationInfo,
|
|
678
702
|
source_income: sourceIncomeInfo,
|
|
@@ -701,76 +725,91 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
|
|
|
701
725
|
isUserORBuyerType = isUser || isBuyer;
|
|
702
726
|
payload = userPayload;
|
|
703
727
|
if (objects === null || objects === void 0 ? void 0 : objects.length) {
|
|
704
|
-
payload = __assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {}));
|
|
728
|
+
payload = __assign(__assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {})), (isAuthorizedInfo && isAuthorizedInfo));
|
|
705
729
|
}
|
|
706
|
-
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 });
|
|
707
|
-
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
708
|
-
case 1:
|
|
709
|
-
data = _h.sent();
|
|
710
730
|
businessCountry = settings.data.businessCountry;
|
|
711
731
|
hasCivilIdDocument = (civilID || []).length > 0;
|
|
712
732
|
hasSignatureDocument = (signatureFileId || []).length > 0;
|
|
713
|
-
isSendSignatureFile =
|
|
733
|
+
isSendSignatureFile = isAuthorized && isUserORBuyerType;
|
|
714
734
|
civilIdDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT);
|
|
715
735
|
signatureDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE);
|
|
716
|
-
if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3,
|
|
736
|
+
if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 2];
|
|
717
737
|
documentBody = {
|
|
718
738
|
id: civilIdDocument.id,
|
|
719
739
|
images: civilID
|
|
720
740
|
};
|
|
721
741
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
722
|
-
case
|
|
742
|
+
case 1:
|
|
723
743
|
_h.sent();
|
|
724
|
-
_h.label =
|
|
725
|
-
case
|
|
726
|
-
if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3,
|
|
744
|
+
_h.label = 2;
|
|
745
|
+
case 2:
|
|
746
|
+
if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 4];
|
|
727
747
|
documentBody = {
|
|
728
748
|
id: signatureDocument.id,
|
|
729
749
|
images: signatureFileId
|
|
730
750
|
};
|
|
731
751
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
732
|
-
case
|
|
752
|
+
case 3:
|
|
733
753
|
_h.sent();
|
|
734
|
-
_h.label =
|
|
735
|
-
case
|
|
754
|
+
_h.label = 4;
|
|
755
|
+
case 4:
|
|
736
756
|
documentsList = [];
|
|
737
757
|
if (hasCivilIdDocument && !(civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id))
|
|
738
758
|
documentsList.push({ type: DocumentPurpose.IDENTITY_DOCUMENT, images: civilID });
|
|
739
759
|
if (isSendSignatureFile && hasSignatureDocument && !(signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id))
|
|
740
760
|
documentsList.push({ type: DocumentPurpose.CUSTOMER_SIGNATURE, images: signatureFileId });
|
|
741
|
-
if (!(documentsList.length > 0)) return [3,
|
|
761
|
+
if (!(documentsList.length > 0)) return [3, 6];
|
|
742
762
|
documentBody = {
|
|
743
763
|
individual_type_id: ((ids === null || ids === void 0 ? void 0 : ids.length) ? ids.find(function (i) { return i.includes('usr_'); }) : id) || '',
|
|
744
764
|
country: businessCountry.iso2,
|
|
745
765
|
documents: documentsList
|
|
746
766
|
};
|
|
747
767
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
748
|
-
case
|
|
768
|
+
case 5:
|
|
749
769
|
_h.sent();
|
|
750
|
-
_h.label =
|
|
770
|
+
_h.label = 6;
|
|
771
|
+
case 6:
|
|
772
|
+
data = undefined, individualData = user || {};
|
|
773
|
+
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 });
|
|
774
|
+
if (!isDirty) return [3, 8];
|
|
775
|
+
return [4, API.individualService.updateMultipleIndividual(requestBody)];
|
|
751
776
|
case 7:
|
|
752
|
-
|
|
777
|
+
data = _h.sent();
|
|
778
|
+
user_2 = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
|
|
779
|
+
individualData = user_2;
|
|
780
|
+
_h.label = 8;
|
|
781
|
+
case 8:
|
|
782
|
+
userListRes = userList || [];
|
|
783
|
+
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, 10];
|
|
784
|
+
return [4, thunkApi.dispatch(getIndividualList(business === null || business === void 0 ? void 0 : business.id)).unwrap()];
|
|
785
|
+
case 9:
|
|
786
|
+
userListRes = _h.sent();
|
|
787
|
+
_h.label = 10;
|
|
788
|
+
case 10:
|
|
753
789
|
thunkApi.dispatch(handleNextScreenStep());
|
|
754
790
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
|
|
755
|
-
return [2, { data: data, formData: originalFormData, individualData: individualData }];
|
|
791
|
+
return [2, { data: data, formData: originalFormData, individualData: individualData, userList: userListRes, isKWOrSACountry: isKWOrSAValue }];
|
|
756
792
|
}
|
|
757
793
|
});
|
|
758
794
|
});
|
|
759
795
|
});
|
|
760
|
-
export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
|
|
796
|
+
export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
|
|
761
797
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
762
798
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
763
|
-
var requestBody, data;
|
|
764
|
-
|
|
765
|
-
|
|
799
|
+
var settings, requestBody, data;
|
|
800
|
+
var _b;
|
|
801
|
+
return __generator(this, function (_c) {
|
|
802
|
+
switch (_c.label) {
|
|
766
803
|
case 0:
|
|
804
|
+
settings = thunkApi.getState().settings;
|
|
767
805
|
requestBody = {
|
|
768
806
|
email: email,
|
|
807
|
+
country: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
|
|
769
808
|
encryption_contract: ['email']
|
|
770
809
|
};
|
|
771
810
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
772
811
|
case 1:
|
|
773
|
-
data = (
|
|
812
|
+
data = (_c.sent()).data;
|
|
774
813
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
775
814
|
if (!data.errors)
|
|
776
815
|
return [2, { response: data, formData: email }];
|
|
@@ -780,43 +819,59 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
|
|
|
780
819
|
});
|
|
781
820
|
});
|
|
782
821
|
export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
783
|
-
var _a, settings, individual, _b,
|
|
784
|
-
var
|
|
785
|
-
return __generator(this, function (
|
|
786
|
-
switch (
|
|
822
|
+
var _a, settings, individual, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, iType, boardInfoStatusData;
|
|
823
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
824
|
+
return __generator(this, function (_p) {
|
|
825
|
+
switch (_p.label) {
|
|
787
826
|
case 0:
|
|
788
827
|
_a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
|
|
789
|
-
_b = individual.data.verify.responseBody || {},
|
|
790
|
-
|
|
828
|
+
_b = individual.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
829
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
830
|
+
if (!board_id)
|
|
791
831
|
return [2];
|
|
792
832
|
payload = {
|
|
793
833
|
lang: settings.data.language,
|
|
794
|
-
step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS
|
|
795
|
-
id: id
|
|
834
|
+
step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS
|
|
796
835
|
};
|
|
797
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
836
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
798
837
|
case 1:
|
|
799
|
-
data =
|
|
800
|
-
|
|
838
|
+
data = _p.sent();
|
|
839
|
+
sendCustomEventToGTM({
|
|
840
|
+
event: 'Send Event',
|
|
841
|
+
event_category: 'Board Flows - Individual',
|
|
842
|
+
event_action: 'Individual Update Success Page',
|
|
843
|
+
event_label: settings.data.businessCountry.iso2
|
|
844
|
+
});
|
|
845
|
+
if (!showBoard && mode === 'content') {
|
|
846
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
847
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
848
|
+
return [2, { response: __assign({}, data), formData: params }];
|
|
849
|
+
}
|
|
850
|
+
_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;
|
|
851
|
+
return [4, Promise.all([
|
|
852
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
853
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: iType })).unwrap()
|
|
854
|
+
])];
|
|
801
855
|
case 2:
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
_h.sent();
|
|
806
|
-
individualDataRes = undefined;
|
|
807
|
-
_c = primaryUser || {}, is_authorized = _c.is_authorized, userId = _c.id, type = _c.object;
|
|
808
|
-
if (!!is_authorized) return [3, 5];
|
|
809
|
-
return [4, thunkApi
|
|
810
|
-
.dispatch(retrieveIndividualInfo({ id: userId, type: type, countryCode: settings.data.businessCountry.iso2 }))
|
|
811
|
-
.unwrap()];
|
|
812
|
-
case 4:
|
|
813
|
-
individualDataRes = _h.sent();
|
|
814
|
-
_h.label = 5;
|
|
815
|
-
case 5:
|
|
816
|
-
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
|
|
817
|
-
(_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
|
|
856
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
857
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
858
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
818
859
|
thunkApi.dispatch(handleNextScreenStep());
|
|
819
|
-
return [2, {
|
|
860
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
}); });
|
|
864
|
+
export var onCloseCompleteIndividual = createAsyncThunk('individual/onCloseCompleteIndividual', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
865
|
+
var individual, _a, merchant, brand, entity;
|
|
866
|
+
return __generator(this, function (_b) {
|
|
867
|
+
switch (_b.label) {
|
|
868
|
+
case 0:
|
|
869
|
+
individual = thunkApi.getState().individual;
|
|
870
|
+
_a = individual.data.verify.responseBody || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
|
|
871
|
+
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 }))];
|
|
872
|
+
case 1:
|
|
873
|
+
_b.sent();
|
|
874
|
+
return [2];
|
|
820
875
|
}
|
|
821
876
|
});
|
|
822
877
|
}); });
|
|
@@ -824,6 +879,7 @@ var initialState = {
|
|
|
824
879
|
error: null,
|
|
825
880
|
loading: false,
|
|
826
881
|
cityLoading: false,
|
|
882
|
+
addOrRequestDetailLoading: false,
|
|
827
883
|
data: {
|
|
828
884
|
flowName: FlowsTypes.INDIVIDUAL,
|
|
829
885
|
verify: {
|
|
@@ -863,7 +919,8 @@ var initialState = {
|
|
|
863
919
|
isPEP: null,
|
|
864
920
|
isInfluencer: null,
|
|
865
921
|
shareCount: '',
|
|
866
|
-
shareValue: ''
|
|
922
|
+
shareValue: '',
|
|
923
|
+
isAuthorized: false
|
|
867
924
|
}
|
|
868
925
|
}
|
|
869
926
|
};
|
|
@@ -898,8 +955,8 @@ export var individualSlice = createSlice({
|
|
|
898
955
|
})
|
|
899
956
|
.addCase(verifyToken.fulfilled, function (state, action) {
|
|
900
957
|
state.error = null;
|
|
901
|
-
var _a = action.payload, data = _a.data, token = _a.token,
|
|
902
|
-
state.data.verify.responseBody = __assign(__assign(__assign(
|
|
958
|
+
var _a = action.payload, data = _a.data, token = _a.token, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList;
|
|
959
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, board_id: data.id, userList: userList });
|
|
903
960
|
state.data.verify.token = token;
|
|
904
961
|
})
|
|
905
962
|
.addCase(verifyToken.rejected, function (state, action) {
|
|
@@ -939,37 +996,31 @@ export var individualSlice = createSlice({
|
|
|
939
996
|
state.error = null;
|
|
940
997
|
})
|
|
941
998
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
942
|
-
var _a;
|
|
943
999
|
state.loading = false;
|
|
944
1000
|
state.error = null;
|
|
945
|
-
var
|
|
946
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
947
|
-
if (description) {
|
|
948
|
-
state.error = description;
|
|
949
|
-
return;
|
|
950
|
-
}
|
|
1001
|
+
var _a = action.payload, data = _a.data, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList, formData = _a.formData;
|
|
951
1002
|
state.data.otpData = formData;
|
|
952
1003
|
state.data.otpData.responseBody = data;
|
|
953
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody),
|
|
1004
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, userList: userList });
|
|
954
1005
|
})
|
|
955
1006
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
956
1007
|
state.loading = false;
|
|
957
1008
|
state.error = action.error.message;
|
|
958
1009
|
})
|
|
959
1010
|
.addCase(addDetailsAsync.pending, function (state) {
|
|
960
|
-
state.
|
|
1011
|
+
state.addOrRequestDetailLoading = true;
|
|
961
1012
|
state.error = null;
|
|
962
1013
|
})
|
|
963
1014
|
.addCase(addDetailsAsync.fulfilled, function (state, action) {
|
|
964
1015
|
var _a, _b, _c, _d;
|
|
965
|
-
state.
|
|
1016
|
+
state.addOrRequestDetailLoading = false;
|
|
966
1017
|
state.error = null;
|
|
967
1018
|
var _e = action.payload, userList = _e.userList, individualId = _e.individualId, countries = _e.countries;
|
|
968
1019
|
var primaryUser = (state.data.verify.responseBody || {}).user;
|
|
969
1020
|
var user = (userList || []).find(function (user) { return user.individual_id === individualId; });
|
|
970
1021
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList });
|
|
971
1022
|
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 }) });
|
|
972
|
-
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;
|
|
1023
|
+
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;
|
|
973
1024
|
var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
|
|
974
1025
|
var cityList = (state.data.verify.responseBody || {}).cityList;
|
|
975
1026
|
if (user)
|
|
@@ -1027,17 +1078,19 @@ export var individualSlice = createSlice({
|
|
|
1027
1078
|
state.data.individualData.isPEP = is_relative_PEP;
|
|
1028
1079
|
if (is_influencer !== undefined)
|
|
1029
1080
|
state.data.individualData.isInfluencer = is_influencer;
|
|
1081
|
+
if (is_authorized !== undefined)
|
|
1082
|
+
state.data.individualData.isAuthorized = is_authorized;
|
|
1030
1083
|
})
|
|
1031
1084
|
.addCase(addDetailsAsync.rejected, function (state, action) {
|
|
1032
|
-
state.
|
|
1085
|
+
state.addOrRequestDetailLoading = false;
|
|
1033
1086
|
state.error = action.error.message;
|
|
1034
1087
|
})
|
|
1035
1088
|
.addCase(requestDetailsByEmail.pending, function (state) {
|
|
1036
|
-
state.
|
|
1089
|
+
state.addOrRequestDetailLoading = true;
|
|
1037
1090
|
state.error = null;
|
|
1038
1091
|
})
|
|
1039
1092
|
.addCase(requestDetailsByEmail.fulfilled, function (state, action) {
|
|
1040
|
-
state.
|
|
1093
|
+
state.addOrRequestDetailLoading = false;
|
|
1041
1094
|
state.error = null;
|
|
1042
1095
|
var _a = action.payload, data = _a.data, individualData = _a.individualData;
|
|
1043
1096
|
var userList = (state.data.verify.responseBody || {}).userList;
|
|
@@ -1050,7 +1103,7 @@ export var individualSlice = createSlice({
|
|
|
1050
1103
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { requestEmailData: data, userList: list });
|
|
1051
1104
|
})
|
|
1052
1105
|
.addCase(requestDetailsByEmail.rejected, function (state, action) {
|
|
1053
|
-
state.
|
|
1106
|
+
state.addOrRequestDetailLoading = false;
|
|
1054
1107
|
state.error = action.error.message;
|
|
1055
1108
|
})
|
|
1056
1109
|
.addCase(retrieveIndividualInfo.pending, function (state) {
|
|
@@ -1062,7 +1115,7 @@ export var individualSlice = createSlice({
|
|
|
1062
1115
|
var _e = action.payload, data = _e.data, countries = _e.countries;
|
|
1063
1116
|
var user = (state.data.verify.responseBody || {}).user;
|
|
1064
1117
|
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 }) });
|
|
1065
|
-
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;
|
|
1118
|
+
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;
|
|
1066
1119
|
var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
|
|
1067
1120
|
var cityList = (state.data.verify.responseBody || {}).cityList;
|
|
1068
1121
|
if (data)
|
|
@@ -1118,8 +1171,11 @@ export var individualSlice = createSlice({
|
|
|
1118
1171
|
state.data.individualData.occupation = selectedOccupation;
|
|
1119
1172
|
state.data.individualData.isPEP = is_relative_PEP;
|
|
1120
1173
|
state.data.individualData.isInfluencer = is_influencer;
|
|
1174
|
+
if (is_authorized !== undefined)
|
|
1175
|
+
state.data.individualData.isAuthorized = is_authorized;
|
|
1121
1176
|
})
|
|
1122
1177
|
.addCase(retrieveIndividualInfo.rejected, function (state, action) {
|
|
1178
|
+
state.addOrRequestDetailLoading = false;
|
|
1123
1179
|
state.error = action.error.message;
|
|
1124
1180
|
})
|
|
1125
1181
|
.addCase(getIndividualList.pending, function (state) {
|
|
@@ -1140,17 +1196,17 @@ export var individualSlice = createSlice({
|
|
|
1140
1196
|
state.error = null;
|
|
1141
1197
|
})
|
|
1142
1198
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
1143
|
-
var _a;
|
|
1199
|
+
var _a, _b;
|
|
1144
1200
|
state.loading = false;
|
|
1145
1201
|
state.error = null;
|
|
1146
|
-
var
|
|
1202
|
+
var _c = action.payload, sourceIncome = _c.sourceIncome, monthlyIncome = _c.monthlyIncome, occupationData = _c.occupation;
|
|
1147
1203
|
var data = state.data.individualData.responseBody;
|
|
1148
1204
|
var sourceIncomeList = (sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.list) || [];
|
|
1149
|
-
var monthlyIncomeList = (monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) ||
|
|
1205
|
+
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;
|
|
1150
1206
|
var occupationList = (occupationData === null || occupationData === void 0 ? void 0 : occupationData.list) || [];
|
|
1151
1207
|
state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: sourceIncomeList, monthlyIncomeList: monthlyIncomeList, occupationList: occupationList });
|
|
1152
|
-
var
|
|
1153
|
-
var selectedSourceIncome =
|
|
1208
|
+
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;
|
|
1209
|
+
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); });
|
|
1154
1210
|
if (!!selectedSourceIncome)
|
|
1155
1211
|
state.data.individualData.sourceIncome = selectedSourceIncome;
|
|
1156
1212
|
var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
|
|
@@ -1225,16 +1281,20 @@ export var individualSlice = createSlice({
|
|
|
1225
1281
|
.addCase(updateIndividualInfo.fulfilled, function (state, action) {
|
|
1226
1282
|
state.loading = false;
|
|
1227
1283
|
state.error = null;
|
|
1228
|
-
var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData;
|
|
1229
|
-
state.data.individualData = formData;
|
|
1284
|
+
var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData, userList = _a.userList, isKWOrSACountry = _a.isKWOrSACountry;
|
|
1285
|
+
state.data.individualData = __assign(__assign({}, formData), { civilID: undefined, signatureFileId: undefined });
|
|
1230
1286
|
state.data.individualData.responseBody = data;
|
|
1231
|
-
var
|
|
1287
|
+
var user = (state.data.verify.responseBody || {}).user;
|
|
1288
|
+
var isSameUser = (user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id);
|
|
1289
|
+
var userInfo = __assign(__assign({}, user), (isSameUser && individualData && __assign({}, individualData)));
|
|
1290
|
+
if (isSameUser && !isKWOrSACountry)
|
|
1291
|
+
userInfo = __assign(__assign({}, user), { is_authorized: individualData.is_authorized });
|
|
1232
1292
|
var list = userList || [];
|
|
1233
1293
|
list = list.map(function (user) {
|
|
1234
1294
|
var userInfo = user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id) ? individualData : user;
|
|
1235
1295
|
return userInfo;
|
|
1236
1296
|
});
|
|
1237
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: list });
|
|
1297
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { user: userInfo, userList: list });
|
|
1238
1298
|
})
|
|
1239
1299
|
.addCase(updateIndividualInfo.rejected, function (state, action) {
|
|
1240
1300
|
state.loading = false;
|
|
@@ -1286,18 +1346,8 @@ export var individualSlice = createSlice({
|
|
|
1286
1346
|
var _a;
|
|
1287
1347
|
state.loading = false;
|
|
1288
1348
|
state.error = null;
|
|
1289
|
-
var _b = action.payload || {},
|
|
1290
|
-
|
|
1291
|
-
if (description) {
|
|
1292
|
-
state.error = description;
|
|
1293
|
-
return;
|
|
1294
|
-
}
|
|
1295
|
-
var flows = response.flows;
|
|
1296
|
-
var individuals = (state.data.verify.responseBody || {}).individuals;
|
|
1297
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
1298
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (data_state && {
|
|
1299
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
1300
|
-
}));
|
|
1349
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
1350
|
+
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 });
|
|
1301
1351
|
})
|
|
1302
1352
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
1303
1353
|
state.loading = true;
|
|
@@ -1306,6 +1356,18 @@ export var individualSlice = createSlice({
|
|
|
1306
1356
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
1307
1357
|
state.loading = false;
|
|
1308
1358
|
state.error = action.error.message;
|
|
1359
|
+
})
|
|
1360
|
+
.addCase(onCloseCompleteIndividual.pending, function (state) {
|
|
1361
|
+
state.loading = true;
|
|
1362
|
+
state.error = null;
|
|
1363
|
+
})
|
|
1364
|
+
.addCase(onCloseCompleteIndividual.fulfilled, function (state) {
|
|
1365
|
+
state.loading = false;
|
|
1366
|
+
state.error = null;
|
|
1367
|
+
})
|
|
1368
|
+
.addCase(onCloseCompleteIndividual.rejected, function (state, action) {
|
|
1369
|
+
state.loading = false;
|
|
1370
|
+
state.error = action.error.message;
|
|
1309
1371
|
});
|
|
1310
1372
|
}
|
|
1311
1373
|
});
|