@tap-payments/auth-jsconnect 2.0.48-test → 2.0.48
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 +34 -34
- package/build/@types/app.d.ts +163 -25
- package/build/@types/app.js +44 -3
- package/build/@types/form.d.ts +75 -19
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/user.d.ts +141 -0
- package/build/@types/user.js +1 -0
- package/build/api/account.d.ts +5 -0
- package/build/api/account.js +9 -1
- package/build/api/auth.d.ts +33 -12
- package/build/api/auth.js +51 -4
- package/build/api/axios.js +2 -2
- package/build/api/board.d.ts +17 -0
- package/build/api/board.js +17 -1
- package/build/api/brand.d.ts +3 -1
- package/build/api/brand.js +18 -1
- package/build/api/country.d.ts +7 -1
- package/build/api/country.js +12 -2
- package/build/api/data.d.ts +46 -7
- package/build/api/data.js +73 -17
- package/build/api/entity.d.ts +89 -13
- package/build/api/entity.js +50 -10
- package/build/api/file.d.ts +13 -0
- package/build/api/file.js +24 -0
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +3 -1
- package/build/api/index.d.ts +75 -19
- package/build/api/index.js +5 -3
- package/build/api/individual.d.ts +134 -21
- package/build/api/individual.js +37 -2
- package/build/api/lead.d.ts +15 -6
- package/build/api/lead.js +24 -1
- package/build/api/location.d.ts +5 -0
- package/build/api/location.js +19 -0
- package/build/api/user.d.ts +6 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +2 -2
- package/build/app/rootReducer.js +4 -4
- package/build/app/settings.d.ts +11 -2
- package/build/app/settings.js +50 -32
- package/build/app/store.d.ts +5 -5
- package/build/assets/locales/ar.json +323 -183
- package/build/assets/locales/en.json +258 -108
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +6 -8
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -3
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
- package/build/components/ArabicDatePicker/index.d.ts +2 -0
- package/build/components/ArabicDatePicker/index.js +2 -0
- package/build/components/ArabicDatePicker/style.css +24 -0
- package/build/components/Button/Button.js +1 -5
- package/build/components/DatePicker/DatePicker.js +5 -3
- package/build/components/FileInput/DragAndDrop.d.ts +12 -2
- package/build/components/FileInput/DragAndDrop.js +109 -11
- package/build/components/Lottie/Lottie.d.ts +4204 -0
- package/build/components/Lottie/Lottie.js +66 -0
- package/build/components/Lottie/files/account_creating.json +732 -0
- package/build/components/Lottie/files/error.json +692 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/start_loading.json +1140 -0
- package/build/components/Lottie/files/still_loading.json +1140 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPField/OTPField.d.ts +2 -1
- package/build/components/OTPField/OTPField.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +16 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/Radio/Radio.js +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +5 -2
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SimpleList/SimpleList.d.ts +4 -1
- package/build/components/SimpleList/SimpleList.js +22 -10
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +12 -3
- package/build/constants/api.d.ts +14 -0
- package/build/constants/api.js +30 -2
- package/build/constants/app.d.ts +27 -4
- package/build/constants/app.js +248 -39
- package/build/constants/assets.d.ts +21 -0
- package/build/constants/assets.js +23 -2
- package/build/constants/dummy.d.ts +1 -1
- package/build/constants/dummy.js +2 -2
- package/build/constants/validation.d.ts +13 -0
- package/build/constants/validation.js +14 -1
- package/build/features/app/bank/bankStore.d.ts +18 -8
- package/build/features/app/bank/bankStore.js +107 -80
- package/build/features/app/brand/brandStore.d.ts +103 -0
- package/build/features/app/brand/brandStore.js +674 -0
- package/build/features/app/business/businessStore.d.ts +42 -6
- package/build/features/app/business/businessStore.js +513 -362
- package/build/features/app/connect/connectStore.d.ts +32 -32
- package/build/features/app/connect/connectStore.js +464 -373
- package/build/features/app/connectExpress/connectExpressStore.d.ts +120 -0
- package/build/features/app/connectExpress/connectExpressStore.js +1019 -0
- package/build/features/app/entity/entityStore.d.ts +52 -13
- package/build/features/app/entity/entityStore.js +437 -191
- package/build/features/app/individual/individualStore.d.ts +62 -9
- package/build/features/app/individual/individualStore.js +766 -158
- package/build/features/app/password/passwordStore.d.ts +5 -12
- package/build/features/app/password/passwordStore.js +49 -33
- package/build/features/app/signIn/signInStore.js +23 -46
- package/build/features/app/tax/taxStore.d.ts +9 -3
- package/build/features/app/tax/taxStore.js +120 -101
- package/build/features/bank/Bank.d.ts +5 -3
- package/build/features/bank/Bank.js +39 -36
- package/build/features/bank/screens/BankDetails/BankDetails.js +28 -10
- package/build/features/bank/screens/BankDetails/BankName.js +15 -11
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +19 -13
- package/build/features/bank/screens/BankDetails/Beneficiary.js +19 -21
- package/build/features/bank/screens/BankDetails/IBAN.js +15 -8
- package/build/features/bank/screens/BankDetails/validation.d.ts +29 -13
- package/build/features/bank/screens/BankDetails/validation.js +34 -28
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/bank/screens/Success/Success.js +7 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/brand/Brand.d.ts +9 -0
- package/build/features/brand/Brand.js +72 -0
- package/build/features/brand/index.d.ts +1 -0
- package/build/features/brand/index.js +1 -0
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +91 -0
- package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +58 -33
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +82 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +146 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +97 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +133 -0
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +36 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +82 -0
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
- package/build/features/brand/screens/BrandActivities/TAC.js +84 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +3 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +42 -0
- package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
- package/build/features/brand/screens/BrandActivities/index.js +2 -0
- package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
- package/build/features/brand/screens/BrandActivities/validation.js +32 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +79 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +143 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +42 -0
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/Segments.js +74 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.js +74 -0
- package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandInfo/index.js +2 -0
- package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
- package/build/features/brand/screens/BrandInfo/validation.js +116 -0
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/brand/screens/Success/Success.d.ts +5 -0
- package/build/features/brand/screens/Success/Success.js +20 -0
- package/build/features/brand/screens/Success/index.d.ts +3 -0
- package/build/features/brand/screens/Success/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/OTPInput.js +2 -2
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/Verify.d.ts +0 -0
- package/build/features/brand/screens/Verify/Verify.js +91 -0
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.d.ts +0 -0
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.js +0 -0
- package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +0 -0
- package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +0 -0
- package/build/features/business/Business.d.ts +4 -3
- package/build/features/business/Business.js +12 -17
- package/build/features/business/screens/Activities/Activities.js +8 -17
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +38 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +49 -16
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
- package/build/features/business/screens/Activities/validation.d.ts +0 -51
- package/build/features/business/screens/Activities/validation.js +4 -10
- package/build/features/business/screens/BusinessType/Article.d.ts +6 -0
- package/build/features/business/screens/BusinessType/Article.js +87 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +23 -9
- package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
- package/build/features/business/screens/BusinessType/EntityName.js +56 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +43 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +27 -7
- package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +34 -0
- package/build/features/business/screens/BusinessType/LicenseType.js +103 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +22 -0
- package/build/features/business/screens/BusinessType/validation.js +60 -3
- package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/business/screens/CivilID/CivilID.js +67 -0
- package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/business/screens/CivilID/IDNumber.js +59 -0
- package/build/features/business/screens/CivilID/index.d.ts +3 -0
- package/build/features/business/screens/CivilID/index.js +2 -0
- package/build/features/business/screens/CivilID/validation.d.ts +8 -0
- package/build/features/business/screens/CivilID/validation.js +4 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +16 -3
- package/build/features/business/screens/Customers/CustomerLocations.js +31 -8
- package/build/features/business/screens/Customers/Customers.js +15 -9
- package/build/features/business/screens/Customers/ExpectedCustomers.js +15 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +36 -15
- package/build/features/business/screens/Customers/RefundPolicy.js +6 -2
- package/build/features/business/screens/Customers/TransactionPolicy.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
- package/build/features/business/screens/OTP/OTP.js +15 -2
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/business/screens/Success/Success.js +10 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/business/screens/Verify/Verify.js +4 -4
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/business/screens/VerifyPACI/index.js +2 -0
- package/build/features/connect/Connect.d.ts +4 -4
- package/build/features/connect/Connect.js +32 -21
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +102 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +11 -3
- package/build/features/connect/screens/Individual/Individual.js +46 -29
- package/build/features/connect/screens/Individual/validation.js +2 -8
- package/build/features/connect/screens/Merchant/BrandList.js +29 -8
- package/build/features/connect/screens/Merchant/BrandName.js +12 -8
- package/build/features/connect/screens/Merchant/Merchant.js +46 -73
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +4 -4
- package/build/features/connect/screens/Merchant/SalesChannels.js +26 -102
- package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
- package/build/features/connect/screens/Merchant/Segments.js +74 -0
- package/build/features/connect/screens/Merchant/TAC.js +6 -2
- package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
- package/build/features/connect/screens/Merchant/TeamSize.js +74 -0
- package/build/features/connect/screens/Merchant/validation.d.ts +19 -123
- package/build/features/connect/screens/Merchant/validation.js +110 -173
- package/build/features/connect/screens/Mobile/Mobile.js +33 -12
- package/build/features/connect/screens/NID/NID.js +5 -1
- package/build/features/connect/screens/OTP/OTP.js +20 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +9 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +95 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
- package/build/features/connectExpress/ConnectExpress.js +84 -0
- package/build/features/connectExpress/index.d.ts +1 -0
- package/build/features/connectExpress/index.js +1 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
- package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
- package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
- package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
- package/build/features/connectExpress/screens/Brand/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
- package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +55 -0
- package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CivilID/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
- package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
- package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +8 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +140 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +80 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +8 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +144 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +34 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +94 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +83 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +89 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +8 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
- package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts → connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts} +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
- package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerName.js → connectExpress/screens/CollectIndividualInfo/Name.js} +15 -16
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +0 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +27 -12
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.d.ts +0 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +10 -2
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +0 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +0 -0
- package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.d.ts +0 -0
- package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.js +0 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +110 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +12 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +151 -0
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/Mobile/TAC.js +83 -0
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
- package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
- package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
- package/build/features/connectExpress/screens/Mobile/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
- package/build/features/connectExpress/screens/NID/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/DOB.js +47 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +61 -0
- package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
- package/build/features/connectExpress/screens/NID/NID.js +92 -0
- package/build/features/connectExpress/screens/NID/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/TAC.js +83 -0
- package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
- package/build/features/connectExpress/screens/NID/index.js +2 -0
- package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
- package/build/features/connectExpress/screens/NID/validation.js +22 -0
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
- package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
- package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
- package/build/features/connectExpress/screens/OTP/OTP.d.ts +5 -0
- package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
- package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
- package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OTP/index.js +2 -0
- package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/OTP/validation.js +4 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.d.ts +5 -3
- package/build/features/entity/Entity.js +39 -37
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
- package/build/features/entity/screens/EntityCapital/ActivityList.js +175 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -0
- package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
- package/build/features/entity/screens/EntityCapital/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
- package/build/features/entity/screens/EntityCapital/validation.js +21 -0
- package/build/features/entity/screens/EntityName/Article.d.ts +6 -0
- package/build/features/entity/screens/EntityName/Article.js +87 -0
- package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/EntityName.js +93 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
- package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/LegalName.js +48 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +6 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +48 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +6 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.js +51 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -0
- package/build/features/entity/screens/EntityName/index.d.ts +2 -0
- package/build/features/entity/screens/EntityName/index.js +2 -0
- package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
- package/build/features/entity/screens/EntityName/validation.js +116 -0
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/entity/screens/Success/Success.js +7 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/entity/screens/Verify/Verify.js +18 -5
- package/build/features/featuresScreens.d.ts +2 -2
- package/build/features/featuresScreens.js +161 -14
- package/build/features/individual/Individual.d.ts +5 -3
- package/build/features/individual/Individual.js +39 -37
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +64 -46
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +35 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +12 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +19 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +31 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +35 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +41 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +48 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +31 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +19 -23
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +10 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +31 -0
- package/build/features/individual/screens/IndividualList/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualList/Email.js +48 -0
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
- package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.js +143 -0
- package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
- package/build/features/individual/screens/IndividualList/UserList.js +186 -0
- package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualList/index.js +2 -0
- package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/validation.js +39 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +109 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +10 -0
- package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +14 -24
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +50 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +50 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +34 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +81 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +48 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +139 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +52 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/individual/screens/Success/Success.js +7 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/individual/screens/Verify/Verify.js +13 -7
- package/build/features/password/Password.d.ts +5 -3
- package/build/features/password/Password.js +12 -17
- package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
- package/build/features/password/screens/OTP/OTP.js +15 -2
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/password/screens/Success/Success.js +7 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
- package/build/features/password/screens/Verify/Verify.js +16 -3
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Address/Address.d.ts +16 -0
- package/build/features/shared/Address/Address.js +73 -0
- package/build/features/shared/Address/CountryList.d.ts +72 -0
- package/build/features/shared/Address/CountryList.js +89 -0
- package/build/features/{entity/screens/EntityInfoConfirm/ActivitiesList.d.ts → shared/Address/InputSelect.d.ts} +28 -11
- package/build/features/shared/Address/InputSelect.js +172 -0
- package/build/features/shared/Address/InputText.d.ts +12 -0
- package/build/features/shared/Address/InputText.js +12 -0
- package/build/features/shared/Address/index.d.ts +2 -0
- package/build/features/shared/Address/index.js +2 -0
- package/build/features/shared/Background/Background.d.ts +2 -5
- package/build/features/shared/Background/Background.js +7 -9
- package/build/features/shared/Button/Button.js +13 -3
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -0
- package/build/features/shared/Button/FlowsButtons.js +42 -10
- package/build/features/shared/Button/ListButton.d.ts +18 -0
- package/build/features/shared/Button/ListButton.js +125 -0
- package/build/features/shared/Button/MobileButton.d.ts +2 -1
- package/build/features/shared/Button/MobileButton.js +2 -2
- package/build/features/shared/Button/index.d.ts +2 -1
- package/build/features/shared/Button/index.js +2 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
- package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
- package/build/features/shared/CreateAccountLoading/index.js +2 -0
- package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
- package/build/features/shared/DataLoading/DataLoading.js +58 -0
- package/build/features/shared/DataLoading/index.d.ts +2 -0
- package/build/features/shared/DataLoading/index.js +2 -0
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +71 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/GenericError/GenericError.d.ts +7 -0
- package/build/features/shared/GenericError/GenericError.js +55 -0
- package/build/features/shared/GenericError/index.d.ts +2 -0
- package/build/features/shared/GenericError/index.js +2 -0
- package/build/features/shared/Input/Input.d.ts +8 -6
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
- package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.d.ts +7 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
- package/build/features/shared/PaciVerification/VerifyPACISuccess.d.ts +5 -0
- package/build/features/shared/PaciVerification/VerifyPACISuccess.js +8 -0
- package/build/features/shared/PaciVerification/index.d.ts +2 -0
- package/build/features/shared/PaciVerification/index.js +2 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +11 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +100 -0
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +12 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +149 -0
- package/build/features/shared/SalesChannels/index.d.ts +2 -0
- package/build/features/shared/SalesChannels/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +115 -0
- package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
- package/build/features/shared/SuccessFlowButtons/index.js +2 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +12 -4
- package/build/features/shared/UploadFile/UploadFile.js +32 -17
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +38 -0
- package/build/features/shared/UploadMultipleFile/UploadFile.js +184 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +32 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +171 -0
- package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
- package/build/features/shared/UploadMultipleFile/index.js +2 -0
- package/build/features/signIn/SignIn.d.ts +4 -3
- package/build/features/signIn/SignIn.js +12 -18
- package/build/features/signIn/screens/Email/Email.js +4 -2
- package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
- package/build/features/signIn/screens/OTP/OTP.js +14 -1
- package/build/features/signIn/screens/Password/Password.js +15 -2
- package/build/features/tax/Tax.d.ts +5 -3
- package/build/features/tax/Tax.js +39 -38
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/tax/screens/Success/Success.js +9 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +23 -11
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +48 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +14 -4
- package/build/features/tax/screens/TaxDetails/validation.d.ts +7 -4
- package/build/features/tax/screens/TaxDetails/validation.js +10 -4
- package/build/features/tax/screens/Verify/Verify.js +16 -3
- package/build/hooks/index.d.ts +5 -0
- package/build/hooks/index.js +5 -0
- package/build/hooks/useAppConfig.d.ts +5 -1
- package/build/hooks/useAppConfig.js +6 -4
- package/build/hooks/useAppDispatch.d.ts +2 -2
- package/build/hooks/useCountUp.d.ts +9 -0
- package/build/hooks/useCountUp.js +17 -0
- package/build/hooks/useCountry.d.ts +4 -0
- package/build/hooks/useCountry.js +7 -0
- package/build/hooks/useErrorListener.js +0 -6
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
- package/build/hooks/useSetFromDefaultValues.js +26 -0
- package/build/hooks/useVerifyToken.d.ts +15 -0
- package/build/hooks/useVerifyToken.js +25 -0
- package/build/index.d.ts +12 -12
- package/build/index.js +13 -24
- package/build/theme/typography.js +1 -1
- package/build/utils/array.d.ts +53 -1
- package/build/utils/array.js +90 -3
- package/build/utils/common.d.ts +2 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +2 -0
- package/build/utils/date.js +11 -0
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/html.d.ts +1 -2
- package/build/utils/html.js +6 -11
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.js +3 -0
- package/build/utils/locale.js +1 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +12 -0
- package/build/utils/string.d.ts +30 -2
- package/build/utils/string.js +131 -6
- package/build/utils/validation.d.ts +3 -0
- package/build/utils/validation.js +9 -0
- package/package.json +4 -3
- package/build/api/ip.d.ts +0 -4
- package/build/api/ip.js +0 -12
- package/build/features/app/auth/authStore.d.ts +0 -35
- package/build/features/app/auth/authStore.js +0 -148
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/auth/Auth.d.ts +0 -9
- package/build/features/auth/Auth.js +0 -72
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
- package/build/features/business/screens/Activities/SalesChannels.js +0 -112
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -9
- package/build/features/connect/screens/Merchant/SocialMedia.js +0 -162
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
- package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
- package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
|
@@ -56,17 +56,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
|
-
import moment from 'moment';
|
|
60
59
|
import API from '../../../api';
|
|
61
|
-
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
62
|
-
import {
|
|
63
|
-
import { convertNumbers2English, getEighteenYearsAgo, hasKey } from '../../../utils';
|
|
64
|
-
import { handleNextScreenStep } from '../../../app/settings';
|
|
60
|
+
import { BusinessType, FlowsTypes, DocumentPurpose } from '../../../@types';
|
|
61
|
+
import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
62
|
+
import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW, isSA, dateFormat } from '../../../utils';
|
|
63
|
+
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
65
64
|
export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var payload, data,
|
|
67
|
-
var _a
|
|
68
|
-
return __generator(this, function (
|
|
69
|
-
switch (
|
|
65
|
+
var payload, data, countryIso2, boardData, brandData, leadData, entity_activities, steps, brand, board_id, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, activityList;
|
|
66
|
+
var _a;
|
|
67
|
+
return __generator(this, function (_b) {
|
|
68
|
+
switch (_b.label) {
|
|
70
69
|
case 0:
|
|
71
70
|
payload = {
|
|
72
71
|
service_name: 'tap_email',
|
|
@@ -74,81 +73,97 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
74
73
|
};
|
|
75
74
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
76
75
|
case 1:
|
|
77
|
-
data = (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
data = (_b.sent()).data;
|
|
77
|
+
if ((_a = data.errors) === null || _a === void 0 ? void 0 : _a.length)
|
|
78
|
+
throw new Error(data.errors[0].description);
|
|
79
|
+
if (data.mw_error)
|
|
80
|
+
throw new Error(data.mw_error);
|
|
81
|
+
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
82
|
+
if (countryIso2)
|
|
83
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
84
|
+
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 19];
|
|
85
|
+
boardData = undefined;
|
|
86
|
+
brandData = undefined;
|
|
82
87
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
83
88
|
case 2:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
case 4:
|
|
93
|
-
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
|
|
89
|
+
leadData = (_b.sent()).data;
|
|
90
|
+
countryIso2 = leadData === null || leadData === void 0 ? void 0 : leadData.country_code;
|
|
91
|
+
if (!countryIso2)
|
|
92
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
93
|
+
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
|
|
94
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
95
|
+
}
|
|
96
|
+
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
|
|
94
97
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
95
98
|
}
|
|
96
|
-
if (!(data.step_name ===
|
|
97
|
-
|
|
98
|
-
brandID =
|
|
99
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 18];
|
|
100
|
+
entity_activities = leadData.entity_activities, steps = leadData.steps, brand = leadData.brand, board_id = leadData.board_id;
|
|
101
|
+
brandID = brand === null || brand === void 0 ? void 0 : brand.id;
|
|
99
102
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
100
103
|
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
101
104
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
102
105
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
103
|
-
if (!hasBusinessCompleted) return [3,
|
|
104
|
-
return [4,
|
|
106
|
+
if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 4];
|
|
107
|
+
return [4, API.dataService.getActivities()];
|
|
108
|
+
case 3:
|
|
109
|
+
activityList = (_b.sent()).list;
|
|
110
|
+
leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
|
|
111
|
+
_b.label = 4;
|
|
112
|
+
case 4:
|
|
113
|
+
if (!hasBusinessCompleted) return [3, 8];
|
|
114
|
+
if (!board_id) return [3, 7];
|
|
115
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
105
116
|
case 5:
|
|
106
|
-
|
|
107
|
-
thunkApi.dispatch(
|
|
108
|
-
return [3, 17];
|
|
117
|
+
boardData = _b.sent();
|
|
118
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
109
119
|
case 6:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return [3, 17];
|
|
120
|
+
_b.sent();
|
|
121
|
+
_b.label = 7;
|
|
113
122
|
case 7:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return [3, 17];
|
|
123
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
124
|
+
return [3, 18];
|
|
117
125
|
case 8:
|
|
118
|
-
if (!
|
|
119
|
-
|
|
126
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 9];
|
|
127
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
128
|
+
return [3, 18];
|
|
120
129
|
case 9:
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
if (!hasBusinessCustomersCompleted) return [3, 10];
|
|
131
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
132
|
+
return [3, 18];
|
|
123
133
|
case 10:
|
|
124
|
-
|
|
134
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 13];
|
|
135
|
+
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
136
|
+
case 11:
|
|
137
|
+
_b.sent();
|
|
125
138
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
126
139
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
127
|
-
case 11:
|
|
128
|
-
brandInfo = _g.sent();
|
|
129
|
-
return [3, 17];
|
|
130
140
|
case 12:
|
|
131
|
-
|
|
132
|
-
return [
|
|
141
|
+
brandData = _b.sent();
|
|
142
|
+
return [3, 18];
|
|
133
143
|
case 13:
|
|
134
|
-
|
|
144
|
+
if (!hasBusinessCRInfoCompleted) return [3, 15];
|
|
135
145
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
136
146
|
case 14:
|
|
137
|
-
|
|
147
|
+
brandData = _b.sent();
|
|
138
148
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
139
|
-
return [3,
|
|
140
|
-
case 15:
|
|
149
|
+
return [3, 18];
|
|
150
|
+
case 15:
|
|
151
|
+
if (!isSA(countryIso2)) return [3, 17];
|
|
152
|
+
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
141
153
|
case 16:
|
|
142
|
-
|
|
154
|
+
_b.sent();
|
|
155
|
+
_b.label = 17;
|
|
156
|
+
case 17:
|
|
143
157
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
144
|
-
|
|
145
|
-
case
|
|
158
|
+
_b.label = 18;
|
|
159
|
+
case 18: return [2, {
|
|
146
160
|
data: data,
|
|
147
|
-
leadData: __assign(__assign({},
|
|
161
|
+
leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
|
|
148
162
|
token: token,
|
|
149
|
-
|
|
150
|
-
boardId:
|
|
163
|
+
brandData: brandData,
|
|
164
|
+
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
|
|
151
165
|
}];
|
|
166
|
+
case 19: return [2, { data: data, isRequireOTP: true }];
|
|
152
167
|
}
|
|
153
168
|
});
|
|
154
169
|
}); });
|
|
@@ -170,144 +185,232 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
|
|
|
170
185
|
});
|
|
171
186
|
}); });
|
|
172
187
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
|
-
var _a, business, settings, isNID, responseBody,
|
|
174
|
-
var _b, _c, _d, _e, _f, _g, _h
|
|
175
|
-
return __generator(this, function (
|
|
176
|
-
switch (
|
|
188
|
+
var _a, business, settings, isNID, responseBody, stepName, payload, data, brandData, leadData, brand, country_code, steps, board_id, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, entity_activities, activityList, boardResponse;
|
|
189
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
190
|
+
return __generator(this, function (_j) {
|
|
191
|
+
switch (_j.label) {
|
|
177
192
|
case 0:
|
|
178
193
|
_a = thunkApi.getState(), business = _a.business, settings = _a.settings;
|
|
179
194
|
isNID = business.data.otpData.isNID;
|
|
180
195
|
responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
|
|
181
|
-
verifyResponse = business.data.verify.responseBody;
|
|
182
196
|
stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
|
|
183
|
-
brandID = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
|
|
184
197
|
payload = {
|
|
185
198
|
data: params.otp,
|
|
186
|
-
service_name: ((
|
|
187
|
-
verify_token: ((
|
|
199
|
+
service_name: ((_c = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.service_name) || ((_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name),
|
|
200
|
+
verify_token: ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _e === void 0 ? void 0 : _e.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
|
|
188
201
|
step_name: stepName,
|
|
189
202
|
encryption_contract: ['data']
|
|
190
203
|
};
|
|
191
204
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
192
205
|
case 1:
|
|
193
|
-
data = (
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return [4,
|
|
206
|
+
data = (_j.sent()).data;
|
|
207
|
+
if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
|
|
208
|
+
throw new Error(data.errors[0].description);
|
|
209
|
+
brandData = undefined;
|
|
210
|
+
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
198
211
|
case 2:
|
|
199
|
-
|
|
200
|
-
(
|
|
201
|
-
|
|
212
|
+
leadData = (_j.sent()).data;
|
|
213
|
+
thunkApi.dispatch(updateStepName(stepName));
|
|
214
|
+
brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id;
|
|
215
|
+
brandID = brand === null || brand === void 0 ? void 0 : brand.id;
|
|
216
|
+
countryIso2 = country_code;
|
|
217
|
+
if (countryIso2)
|
|
218
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
219
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
|
|
202
220
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
203
221
|
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
204
222
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
205
223
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return [
|
|
224
|
+
isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
225
|
+
if (!(isSA(countryIso2) && !isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 4];
|
|
226
|
+
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
209
227
|
case 3:
|
|
210
|
-
|
|
211
|
-
|
|
228
|
+
_j.sent();
|
|
229
|
+
_j.label = 4;
|
|
212
230
|
case 4:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return [
|
|
231
|
+
entity_activities = leadData.entity_activities;
|
|
232
|
+
if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 6];
|
|
233
|
+
return [4, API.dataService.getActivities()];
|
|
216
234
|
case 5:
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
235
|
+
activityList = (_j.sent()).list;
|
|
236
|
+
leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
|
|
237
|
+
_j.label = 6;
|
|
220
238
|
case 6:
|
|
221
|
-
if (!
|
|
222
|
-
thunkApi.dispatch(handleNextScreenStep(
|
|
223
|
-
return [3,
|
|
239
|
+
if (!isNID) return [3, 7];
|
|
240
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
241
|
+
return [3, 20];
|
|
224
242
|
case 7:
|
|
225
|
-
if (!
|
|
226
|
-
thunkApi.dispatch(
|
|
227
|
-
|
|
228
|
-
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
229
|
-
return [4, API.brandService.retrieveBrand(brandID)];
|
|
243
|
+
if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 8];
|
|
244
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
245
|
+
return [3, 20];
|
|
230
246
|
case 8:
|
|
231
|
-
|
|
232
|
-
return [3,
|
|
247
|
+
if (!hasBusinessCompleted) return [3, 12];
|
|
248
|
+
if (!board_id) return [3, 11];
|
|
249
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
233
250
|
case 9:
|
|
234
|
-
|
|
235
|
-
|
|
251
|
+
boardResponse = _j.sent();
|
|
252
|
+
leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
|
|
253
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
236
254
|
case 10:
|
|
237
|
-
|
|
238
|
-
|
|
255
|
+
_j.sent();
|
|
256
|
+
_j.label = 11;
|
|
239
257
|
case 11:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return [3, 13];
|
|
258
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
259
|
+
return [3, 20];
|
|
243
260
|
case 12:
|
|
261
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 13];
|
|
262
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
263
|
+
return [3, 20];
|
|
264
|
+
case 13:
|
|
265
|
+
if (!hasBusinessCustomersCompleted) return [3, 14];
|
|
266
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
267
|
+
return [3, 20];
|
|
268
|
+
case 14:
|
|
269
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 17];
|
|
270
|
+
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
271
|
+
case 15:
|
|
272
|
+
_j.sent();
|
|
273
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
274
|
+
return [4, API.brandService.retrieveBrand(brandID)];
|
|
275
|
+
case 16:
|
|
276
|
+
brandData = _j.sent();
|
|
277
|
+
return [3, 20];
|
|
278
|
+
case 17:
|
|
279
|
+
if (!hasBusinessCRInfoCompleted) return [3, 19];
|
|
280
|
+
return [4, API.brandService.retrieveBrand(brandID)];
|
|
281
|
+
case 18:
|
|
282
|
+
brandData = _j.sent();
|
|
283
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
284
|
+
return [3, 20];
|
|
285
|
+
case 19:
|
|
244
286
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
245
|
-
|
|
246
|
-
case
|
|
287
|
+
_j.label = 20;
|
|
288
|
+
case 20: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData }];
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}); });
|
|
292
|
+
export var verifyPACI = createAsyncThunk('businessVerifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
293
|
+
var _a, settings, business, responseBody, expiry, interval, maxCalls, count, data, isSuccess;
|
|
294
|
+
var _b, _c, _d, _e;
|
|
295
|
+
return __generator(this, function (_f) {
|
|
296
|
+
switch (_f.label) {
|
|
297
|
+
case 0:
|
|
298
|
+
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
299
|
+
responseBody = business.data.civilIdData.responseBody;
|
|
300
|
+
expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
|
|
301
|
+
interval = 5;
|
|
302
|
+
maxCalls = Math.floor(expiry / interval);
|
|
303
|
+
if (thunkApi.signal.aborted) {
|
|
304
|
+
return [2, { response: null }];
|
|
305
|
+
}
|
|
306
|
+
count = 1;
|
|
307
|
+
_f.label = 1;
|
|
308
|
+
case 1:
|
|
309
|
+
if (!(count <= maxCalls)) return [3, 7];
|
|
310
|
+
return [4, API.authService.getTokenVerify(responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token)];
|
|
311
|
+
case 2:
|
|
312
|
+
data = _f.sent();
|
|
313
|
+
isSuccess = ((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
314
|
+
if (!isSuccess) return [3, 4];
|
|
315
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
316
|
+
(_e = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _e === void 0 ? void 0 : _e.call(params);
|
|
317
|
+
return [4, sleep(3000)];
|
|
318
|
+
case 3:
|
|
319
|
+
_f.sent();
|
|
320
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
321
|
+
return [2, { response: data }];
|
|
322
|
+
case 4: return [4, sleep(interval * 1000)];
|
|
323
|
+
case 5:
|
|
324
|
+
_f.sent();
|
|
325
|
+
_f.label = 6;
|
|
326
|
+
case 6:
|
|
327
|
+
count++;
|
|
328
|
+
return [3, 1];
|
|
329
|
+
case 7: throw new Error('paci_verification_failed');
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}); });
|
|
333
|
+
export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
334
|
+
var _a, settings, business, stepName, lead_id, requestBody, data;
|
|
335
|
+
var _b, _c;
|
|
336
|
+
return __generator(this, function (_d) {
|
|
337
|
+
switch (_d.label) {
|
|
338
|
+
case 0:
|
|
339
|
+
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
340
|
+
stepName = BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID;
|
|
341
|
+
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
342
|
+
requestBody = {
|
|
343
|
+
id: lead_id || '',
|
|
344
|
+
identification: {
|
|
345
|
+
id: params.civilId,
|
|
346
|
+
issued_country_code: settings.data.businessCountry.iso2,
|
|
347
|
+
type: 'civil_id'
|
|
348
|
+
},
|
|
349
|
+
step_name: stepName,
|
|
350
|
+
encryption_contract: ['identification.id', 'identification.issued_country_code', 'identification.type']
|
|
351
|
+
};
|
|
352
|
+
return [4, API.leadService.updateLead(requestBody)];
|
|
353
|
+
case 1:
|
|
354
|
+
data = _d.sent();
|
|
355
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
356
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
357
|
+
return [2, { response: data, formData: params }];
|
|
247
358
|
}
|
|
248
359
|
});
|
|
249
360
|
}); });
|
|
250
361
|
export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
251
|
-
var _a, settings, business, identification_id_type, stepName, requestBody, data;
|
|
252
|
-
var _b, _c
|
|
253
|
-
return __generator(this, function (
|
|
254
|
-
switch (
|
|
362
|
+
var _a, settings, business, identification_id_type, stepName, lead_id, requestBody, data;
|
|
363
|
+
var _b, _c;
|
|
364
|
+
return __generator(this, function (_d) {
|
|
365
|
+
switch (_d.label) {
|
|
255
366
|
case 0:
|
|
256
367
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
257
368
|
identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
258
369
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
370
|
+
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
259
371
|
requestBody = {
|
|
260
|
-
id:
|
|
261
|
-
|
|
262
|
-
|
|
372
|
+
id: lead_id || '',
|
|
373
|
+
identification: {
|
|
374
|
+
id: params.nid,
|
|
375
|
+
issued_country_code: settings.data.businessCountry.iso2,
|
|
376
|
+
type: identification_id_type
|
|
377
|
+
},
|
|
263
378
|
date_of_birth: params.dob,
|
|
264
|
-
country_code: settings.data.businessCountry.iso2,
|
|
265
379
|
step_name: stepName,
|
|
266
|
-
encryption_contract: ['
|
|
380
|
+
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
267
381
|
};
|
|
268
382
|
return [4, API.leadService.updateLead(requestBody)];
|
|
269
383
|
case 1:
|
|
270
|
-
data =
|
|
271
|
-
thunkApi.dispatch(updateStepName(stepName));
|
|
384
|
+
data = _d.sent();
|
|
272
385
|
thunkApi.dispatch(handleNextScreenStep());
|
|
273
|
-
(
|
|
386
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
274
387
|
return [2, { data: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
|
|
275
388
|
}
|
|
276
389
|
});
|
|
277
390
|
}); });
|
|
278
391
|
export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
279
|
-
var _a, settings, business, _b, nid, dob, type, stepName, requestBody, data;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
switch (_d.label) {
|
|
392
|
+
var _a, settings, business, _b, nid, dob, type, stepName, lead_id, requestBody, data;
|
|
393
|
+
return __generator(this, function (_c) {
|
|
394
|
+
switch (_c.label) {
|
|
283
395
|
case 0:
|
|
284
396
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
285
397
|
_b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
|
|
286
398
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
399
|
+
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
287
400
|
requestBody = {
|
|
288
|
-
id:
|
|
289
|
-
|
|
290
|
-
|
|
401
|
+
id: lead_id || '',
|
|
402
|
+
identification: {
|
|
403
|
+
id: nid,
|
|
404
|
+
issued_country_code: settings.data.businessCountry.iso2,
|
|
405
|
+
type: type
|
|
406
|
+
},
|
|
291
407
|
date_of_birth: dob,
|
|
292
|
-
country_code: settings.data.businessCountry.iso2,
|
|
293
408
|
step_name: stepName,
|
|
294
|
-
encryption_contract: ['
|
|
409
|
+
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
295
410
|
};
|
|
296
411
|
return [4, API.leadService.updateLead(requestBody)];
|
|
297
412
|
case 1:
|
|
298
|
-
data =
|
|
299
|
-
thunkApi.dispatch(updateStepName(stepName));
|
|
300
|
-
return [2, data];
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}); });
|
|
304
|
-
export var retrieveChannels = createAsyncThunk('retrieveChannels', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
305
|
-
var data;
|
|
306
|
-
return __generator(this, function (_a) {
|
|
307
|
-
switch (_a.label) {
|
|
308
|
-
case 0: return [4, API.dataService.getChannelsOfServices()];
|
|
309
|
-
case 1:
|
|
310
|
-
data = (_a.sent()).data;
|
|
413
|
+
data = _c.sent();
|
|
311
414
|
return [2, data];
|
|
312
415
|
}
|
|
313
416
|
});
|
|
@@ -332,31 +435,42 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
332
435
|
case 1:
|
|
333
436
|
data = _c.sent();
|
|
334
437
|
return [2, {
|
|
335
|
-
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, 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: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.
|
|
438
|
+
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, 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: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals })
|
|
336
439
|
}];
|
|
337
440
|
}
|
|
338
441
|
});
|
|
339
442
|
}); });
|
|
340
443
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
341
|
-
var _a, settings, business, payload, data, accountBody, accountData;
|
|
444
|
+
var _a, settings, business, isNonSA, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, articleId, documentBody, payload_1;
|
|
342
445
|
var _b, _c, _d, _e, _f, _g;
|
|
343
446
|
return __generator(this, function (_h) {
|
|
344
447
|
switch (_h.label) {
|
|
345
448
|
case 0:
|
|
346
449
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
450
|
+
isNonSA = !isSA(settings.data.businessCountry.iso2);
|
|
451
|
+
isFL = ((_b = params.selectedLicense) === null || _b === void 0 ? void 0 : _b.type) === BusinessType.FL;
|
|
347
452
|
payload = {
|
|
348
|
-
id: ((
|
|
349
|
-
license_number: params.licenseNumber,
|
|
350
|
-
license_type:
|
|
453
|
+
id: ((_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id) || '',
|
|
454
|
+
license_number: isNonSA && isFL ? '' : params.licenseNumber,
|
|
455
|
+
license_type: isFL ? 'freelance' : 'commercial_registration',
|
|
351
456
|
business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
|
|
352
457
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
|
|
458
|
+
business: isNonSA && isFL ? undefined : { ar: params.entityLegalName, en: params.entityLegalName },
|
|
353
459
|
encryption_contract: ['license_number', 'business_type', 'license_type']
|
|
354
460
|
};
|
|
355
461
|
return [4, API.leadService.updateLead(payload)];
|
|
356
462
|
case 1:
|
|
357
463
|
data = _h.sent();
|
|
464
|
+
entity_activities = data.entity_activities;
|
|
465
|
+
if (!!entity_activities) return [3, 3];
|
|
466
|
+
return [4, API.dataService.getActivities()];
|
|
467
|
+
case 2:
|
|
468
|
+
list = (_h.sent()).list;
|
|
469
|
+
data.entity_activities = list;
|
|
470
|
+
_h.label = 3;
|
|
471
|
+
case 3:
|
|
358
472
|
accountBody = {
|
|
359
|
-
lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.
|
|
473
|
+
lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.lead_id,
|
|
360
474
|
notify: {
|
|
361
475
|
email: false,
|
|
362
476
|
phone: false
|
|
@@ -366,43 +480,91 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
366
480
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
|
|
367
481
|
};
|
|
368
482
|
return [4, API.accountService.createAccount(accountBody)];
|
|
369
|
-
case
|
|
483
|
+
case 4:
|
|
370
484
|
accountData = _h.sent();
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
485
|
+
entityData = undefined;
|
|
486
|
+
entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
|
|
487
|
+
articleId = business.data.businessTypeData.articleId;
|
|
488
|
+
if (!((params.certificateId || []).length > 0)) return [3, 6];
|
|
489
|
+
documentBody = {
|
|
490
|
+
entity_id: entityId || '',
|
|
491
|
+
documents: [
|
|
492
|
+
{
|
|
493
|
+
images: params.certificateId
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
};
|
|
497
|
+
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
498
|
+
case 5:
|
|
499
|
+
documentData = _h.sent();
|
|
500
|
+
_h.label = 6;
|
|
501
|
+
case 6:
|
|
502
|
+
if (!(articleId && entityId)) return [3, 8];
|
|
503
|
+
payload_1 = {
|
|
504
|
+
id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
|
|
505
|
+
AOA_file_id: articleId
|
|
506
|
+
};
|
|
507
|
+
return [4, API.entityService.updateEntity(payload_1)];
|
|
508
|
+
case 7:
|
|
509
|
+
entityData = _h.sent();
|
|
510
|
+
_h.label = 8;
|
|
511
|
+
case 8:
|
|
374
512
|
thunkApi.dispatch(handleNextScreenStep());
|
|
375
513
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
376
|
-
return [2, { data: data, formData: params, accountData: accountData }];
|
|
514
|
+
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
|
|
377
515
|
}
|
|
378
516
|
});
|
|
379
517
|
}); });
|
|
518
|
+
export var uploadArticle = createAsyncThunk('businessUploadArticle', function (_a) {
|
|
519
|
+
var file = _a.file, onProgress = _a.onProgress;
|
|
520
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
521
|
+
var typeArray, type, uploadPayload, onUploadProgress, data;
|
|
522
|
+
var _b;
|
|
523
|
+
return __generator(this, function (_c) {
|
|
524
|
+
switch (_c.label) {
|
|
525
|
+
case 0:
|
|
526
|
+
typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
|
|
527
|
+
type = typeArray[1] || '';
|
|
528
|
+
uploadPayload = {
|
|
529
|
+
file_link_create: true,
|
|
530
|
+
title: file === null || file === void 0 ? void 0 : file.name,
|
|
531
|
+
purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
|
|
532
|
+
type: type,
|
|
533
|
+
file: file
|
|
534
|
+
};
|
|
535
|
+
onUploadProgress = function (progressEvent) {
|
|
536
|
+
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
537
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
538
|
+
};
|
|
539
|
+
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
540
|
+
case 1:
|
|
541
|
+
data = _c.sent();
|
|
542
|
+
return [2, { data: data }];
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
});
|
|
380
547
|
export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
381
|
-
var _a, settings, business,
|
|
548
|
+
var _a, settings, business, activities, stepName, id, requestBody, data;
|
|
382
549
|
var _b, _c, _d, _e, _f;
|
|
383
550
|
return __generator(this, function (_g) {
|
|
384
551
|
switch (_g.label) {
|
|
385
552
|
case 0:
|
|
386
553
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
387
|
-
channel = params.salesChannels.map(function (_a) {
|
|
388
|
-
var id = _a.id;
|
|
389
|
-
return id;
|
|
390
|
-
});
|
|
391
554
|
activities = (_b = (params.activities || [])) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
|
|
392
|
-
var
|
|
393
|
-
return
|
|
555
|
+
var id = _a.id;
|
|
556
|
+
return ({ id: id });
|
|
394
557
|
});
|
|
395
558
|
stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
|
|
396
559
|
id = (_d = (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
|
|
397
560
|
requestBody = {
|
|
398
561
|
id: id,
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
business_operation_start_at: params.operationStartDate
|
|
562
|
+
activities: activities,
|
|
563
|
+
operations: {
|
|
564
|
+
start_date: params.operationStartDate
|
|
403
565
|
},
|
|
404
566
|
step_name: stepName,
|
|
405
|
-
encryption_contract: ['
|
|
567
|
+
encryption_contract: ['operations.start_date']
|
|
406
568
|
};
|
|
407
569
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
408
570
|
case 1:
|
|
@@ -415,49 +577,59 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
415
577
|
}
|
|
416
578
|
});
|
|
417
579
|
}); });
|
|
418
|
-
export var retrieveDataList = createAsyncThunk('
|
|
419
|
-
var _a, customerBases, expectedSales, expectedCustomerSales;
|
|
580
|
+
export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
581
|
+
var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
|
|
420
582
|
return __generator(this, function (_b) {
|
|
421
583
|
switch (_b.label) {
|
|
422
|
-
case 0:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
584
|
+
case 0:
|
|
585
|
+
settings = thunkApi.getState().settings;
|
|
586
|
+
countryISO2 = settings.data.businessCountry.iso2;
|
|
587
|
+
dataBody = {
|
|
588
|
+
page: 0
|
|
589
|
+
};
|
|
590
|
+
salesDataBody = {
|
|
591
|
+
page: 0,
|
|
592
|
+
country_code: [countryISO2]
|
|
593
|
+
};
|
|
594
|
+
return [4, Promise.all([
|
|
595
|
+
API.dataService.getCustomerBases(dataBody),
|
|
596
|
+
API.dataService.getExpectedSales(salesDataBody),
|
|
597
|
+
API.dataService.getExpectedCustomerSales(dataBody)
|
|
598
|
+
])];
|
|
427
599
|
case 1:
|
|
428
|
-
_a = _b.sent(), customerBases = _a[0].
|
|
600
|
+
_a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
|
|
429
601
|
return [2, {
|
|
430
602
|
customerBases: customerBases,
|
|
431
603
|
expectedSales: expectedSales,
|
|
432
|
-
expectedCustomerSales: expectedCustomerSales
|
|
604
|
+
expectedCustomerSales: expectedCustomerSales,
|
|
605
|
+
countryISO2: countryISO2
|
|
433
606
|
}];
|
|
434
607
|
}
|
|
435
608
|
});
|
|
436
609
|
}); });
|
|
437
610
|
export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
438
|
-
var _a, settings, business, id, customerBase, stepName, requestBody, data;
|
|
611
|
+
var _a, settings, business, id, customerLocation, customerBase, sales, stepName, requestBody, data;
|
|
439
612
|
var _b, _c, _d, _e, _f, _g;
|
|
440
613
|
return __generator(this, function (_h) {
|
|
441
614
|
switch (_h.label) {
|
|
442
615
|
case 0:
|
|
443
616
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
444
617
|
id = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
618
|
+
customerLocation = params.customerLocations.map(function (location) { return ({
|
|
619
|
+
id: location === null || location === void 0 ? void 0 : location.id
|
|
620
|
+
}); });
|
|
621
|
+
customerBase = { id: ((_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id) || '', period: 'monthly', locations: customerLocation };
|
|
622
|
+
sales = { id: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '', period: 'monthly' };
|
|
449
623
|
stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
|
|
450
624
|
requestBody = {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
monthly_sales_range: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '',
|
|
455
|
-
agree_refund: params.refundPolicy,
|
|
456
|
-
agree_chargeback: params.transactionPolicy
|
|
625
|
+
operations: {
|
|
626
|
+
customer_base: customerBase,
|
|
627
|
+
sales: sales
|
|
457
628
|
},
|
|
629
|
+
term: ['refund', 'chargeback'],
|
|
458
630
|
id: id,
|
|
459
631
|
step_name: stepName,
|
|
460
|
-
encryption_contract: [
|
|
632
|
+
encryption_contract: []
|
|
461
633
|
};
|
|
462
634
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
463
635
|
case 1:
|
|
@@ -470,39 +642,41 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
|
|
|
470
642
|
});
|
|
471
643
|
}); });
|
|
472
644
|
export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
473
|
-
var _a, settings, business, _b, steps,
|
|
645
|
+
var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id;
|
|
474
646
|
var _c, _d, _e, _f;
|
|
475
647
|
return __generator(this, function (_g) {
|
|
476
648
|
switch (_g.label) {
|
|
477
649
|
case 0:
|
|
478
650
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
479
|
-
_b = business.data.verify.responseBody || {}, steps = _b.steps,
|
|
651
|
+
_b = business.data.verify.responseBody || {}, steps = _b.steps, lead_id = _b.lead_id;
|
|
480
652
|
flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
|
|
481
|
-
if (flowCompleted || !
|
|
653
|
+
if (flowCompleted || !lead_id)
|
|
482
654
|
return [2];
|
|
483
655
|
boardResponse = undefined;
|
|
484
656
|
payload = {
|
|
485
657
|
lang: settings.data.language,
|
|
486
658
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
|
|
487
|
-
id:
|
|
659
|
+
id: lead_id,
|
|
488
660
|
encryption_contract: []
|
|
489
661
|
};
|
|
490
662
|
return [4, API.leadService.updateLead(payload)];
|
|
491
663
|
case 1:
|
|
492
664
|
data = _g.sent();
|
|
493
665
|
board_id = data === null || data === void 0 ? void 0 : data.board_id;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
666
|
+
if (!board_id) return [3, 4];
|
|
667
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
497
668
|
case 2:
|
|
498
669
|
boardResponse = _g.sent();
|
|
499
|
-
|
|
670
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
500
671
|
case 3:
|
|
501
|
-
|
|
672
|
+
_g.sent();
|
|
673
|
+
_g.label = 4;
|
|
674
|
+
case 4:
|
|
675
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
502
676
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
503
677
|
thunkApi.dispatch(handleNextScreenStep());
|
|
504
678
|
return [2, {
|
|
505
|
-
response: __assign(__assign({}, data), { flows:
|
|
679
|
+
response: __assign(__assign({}, data), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] }),
|
|
506
680
|
formData: params
|
|
507
681
|
}];
|
|
508
682
|
}
|
|
@@ -517,7 +691,7 @@ export var updateStepName = createAsyncThunk('updateStepName', function (stepNam
|
|
|
517
691
|
business = thunkApi.getState().business;
|
|
518
692
|
payload = {
|
|
519
693
|
step_name: stepName,
|
|
520
|
-
id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.
|
|
694
|
+
id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.lead_id) || '',
|
|
521
695
|
encryption_contract: []
|
|
522
696
|
};
|
|
523
697
|
return [4, API.leadService.updateLead(payload)];
|
|
@@ -531,6 +705,9 @@ var initialState = {
|
|
|
531
705
|
error: null,
|
|
532
706
|
loading: false,
|
|
533
707
|
customLoading: false,
|
|
708
|
+
uploading: false,
|
|
709
|
+
uploadingArticle: false,
|
|
710
|
+
uploadingArticleError: null,
|
|
534
711
|
data: {
|
|
535
712
|
flowName: FlowsTypes.BUSINESS,
|
|
536
713
|
verify: {
|
|
@@ -540,18 +717,21 @@ var initialState = {
|
|
|
540
717
|
otp: '',
|
|
541
718
|
isNID: false
|
|
542
719
|
},
|
|
720
|
+
civilIdData: {
|
|
721
|
+
civilId: ''
|
|
722
|
+
},
|
|
543
723
|
nidData: {
|
|
544
724
|
nid: '',
|
|
545
725
|
dob: getEighteenYearsAgo(),
|
|
546
726
|
type: ''
|
|
547
727
|
},
|
|
548
728
|
businessTypeData: {
|
|
549
|
-
licenseNumber: ''
|
|
729
|
+
licenseNumber: '',
|
|
730
|
+
entityLegalName: ''
|
|
550
731
|
},
|
|
551
732
|
activitiesData: {
|
|
552
733
|
activities: [],
|
|
553
|
-
|
|
554
|
-
operationStartDate: '1998-08-22'
|
|
734
|
+
operationStartDate: ''
|
|
555
735
|
},
|
|
556
736
|
customersData: {
|
|
557
737
|
customerLocations: [],
|
|
@@ -574,6 +754,12 @@ export var businessSlice = createSlice({
|
|
|
574
754
|
},
|
|
575
755
|
resetOTPScreen: function (state) {
|
|
576
756
|
state.data.otpData.otp = '';
|
|
757
|
+
},
|
|
758
|
+
clearArticleId: function (state) {
|
|
759
|
+
state.data.businessTypeData.articleId = '';
|
|
760
|
+
},
|
|
761
|
+
uploadingStatus: function (state, action) {
|
|
762
|
+
state.uploading = action.payload;
|
|
577
763
|
}
|
|
578
764
|
},
|
|
579
765
|
extraReducers: function (builder) {
|
|
@@ -583,68 +769,47 @@ export var businessSlice = createSlice({
|
|
|
583
769
|
state.customLoading = true;
|
|
584
770
|
})
|
|
585
771
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
586
|
-
var _a, _b
|
|
772
|
+
var _a, _b;
|
|
587
773
|
state.error = null;
|
|
588
774
|
state.customLoading = false;
|
|
589
|
-
var
|
|
590
|
-
var
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId });
|
|
596
|
-
state.data.verify.token = token;
|
|
775
|
+
var _c = action.payload, data = _c.data, boardId = _c.boardId, brandData = _c.brandData, leadData = _c.leadData, token = _c.token, isRequireOTP = _c.isRequireOTP;
|
|
776
|
+
var responseBody = state.data.verify.responseBody;
|
|
777
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
|
|
778
|
+
if (token)
|
|
779
|
+
state.data.verify.token = token;
|
|
597
780
|
state.data.otpData.isNID = false;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
605
|
-
}
|
|
606
|
-
var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
|
|
607
|
-
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
608
|
-
var _j = brand || {}, website = _j.website, social = _j.social;
|
|
609
|
-
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
610
|
-
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
611
|
-
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
612
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
|
|
613
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
|
|
614
|
-
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
615
|
-
selectedChannels = [websiteData, socialData];
|
|
616
|
-
else if (isHasTwitter || isHasInstagram)
|
|
617
|
-
selectedChannels = [socialData];
|
|
618
|
-
else if (isHasWebsite)
|
|
619
|
-
selectedChannels = [websiteData];
|
|
620
|
-
if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
621
|
-
selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
|
|
622
|
-
var _a;
|
|
623
|
-
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
state.data.activitiesData.salesChannels = selectedChannels;
|
|
781
|
+
if (isRequireOTP)
|
|
782
|
+
return;
|
|
783
|
+
var _d = state.data.verify.responseBody || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_type = _d.business_type;
|
|
784
|
+
var issuingDate = (brandData === null || brandData === void 0 ? void 0 : brandData.business_operation_start_at) || ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
|
|
785
|
+
if (issuingDate)
|
|
786
|
+
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
627
787
|
var activities = entity_activities || [];
|
|
628
788
|
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
629
|
-
var
|
|
630
|
-
return
|
|
789
|
+
var activities = (brandData || {}).activities;
|
|
790
|
+
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
|
|
631
791
|
});
|
|
632
|
-
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [
|
|
792
|
+
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
633
793
|
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
var
|
|
637
|
-
var
|
|
794
|
+
var license = (entity || {}).license;
|
|
795
|
+
if (license) {
|
|
796
|
+
var number_1 = license.number;
|
|
797
|
+
var _e = state.data.businessTypeData || {}, busResData = _e.responseBody, selectedLicense = _e.selectedLicense;
|
|
798
|
+
var licenseList = (busResData || {}).licenseList;
|
|
638
799
|
var selectedLicenseData = selectedLicense;
|
|
639
|
-
if (
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
800
|
+
if (number_1) {
|
|
801
|
+
var findLicense = (_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (_a) {
|
|
802
|
+
var license = _a.license;
|
|
803
|
+
return (license === null || license === void 0 ? void 0 : license.number) === number_1;
|
|
804
|
+
});
|
|
805
|
+
if (findLicense)
|
|
806
|
+
selectedLicenseData = findLicense;
|
|
807
|
+
else if (!findLicense && business_type === BusinessType.FL) {
|
|
808
|
+
selectedLicenseData = __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: number_1 } });
|
|
809
|
+
}
|
|
810
|
+
else
|
|
811
|
+
selectedLicenseData = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: number_1 } });
|
|
812
|
+
state.data.businessTypeData.licenseNumber = number_1;
|
|
648
813
|
}
|
|
649
814
|
state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
|
|
650
815
|
}
|
|
@@ -675,67 +840,43 @@ export var businessSlice = createSlice({
|
|
|
675
840
|
state.error = null;
|
|
676
841
|
})
|
|
677
842
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
678
|
-
var _a, _b
|
|
843
|
+
var _a, _b;
|
|
679
844
|
state.loading = false;
|
|
680
845
|
state.error = null;
|
|
681
|
-
var
|
|
682
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
683
|
-
if (description) {
|
|
684
|
-
state.error = description;
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
846
|
+
var _c = action.payload, data = _c.data, formData = _c.formData, brand = _c.brand, leadData = _c.leadData;
|
|
687
847
|
state.data.otpData = formData;
|
|
688
848
|
state.data.otpData.responseBody = data;
|
|
689
|
-
|
|
690
|
-
var
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
|
|
695
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
696
|
-
}
|
|
697
|
-
var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
|
|
698
|
-
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
699
|
-
var _j = brand || {}, website = _j.website, social = _j.social;
|
|
700
|
-
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
701
|
-
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
702
|
-
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
703
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
|
|
704
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
|
|
705
|
-
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
706
|
-
selectedChannels = [websiteData, socialData];
|
|
707
|
-
else if (isHasTwitter || isHasInstagram)
|
|
708
|
-
selectedChannels = [socialData];
|
|
709
|
-
else if (isHasWebsite)
|
|
710
|
-
selectedChannels = [websiteData];
|
|
711
|
-
if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
712
|
-
selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
|
|
713
|
-
var _a;
|
|
714
|
-
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
state.data.activitiesData.salesChannels = selectedChannels;
|
|
849
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
|
|
850
|
+
var _d = leadData || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_type = _d.business_type;
|
|
851
|
+
var issuingDate = (brand === null || brand === void 0 ? void 0 : brand.business_operation_start_at) || ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
|
|
852
|
+
if (issuingDate)
|
|
853
|
+
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
718
854
|
var activities = entity_activities || [];
|
|
719
855
|
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
720
|
-
var
|
|
721
|
-
return
|
|
856
|
+
var activities = (brand || {}).activities;
|
|
857
|
+
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return value.id === activity.id; });
|
|
722
858
|
});
|
|
723
|
-
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [
|
|
859
|
+
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
724
860
|
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
var
|
|
728
|
-
var
|
|
861
|
+
var license = (entity || {}).license;
|
|
862
|
+
if (license) {
|
|
863
|
+
var number_2 = license.number;
|
|
864
|
+
var _e = state.data.businessTypeData || {}, busResData = _e.responseBody, selectedLicense = _e.selectedLicense;
|
|
865
|
+
var licenseList = (busResData || {}).licenseList;
|
|
729
866
|
var selectedLicenseData = selectedLicense;
|
|
730
|
-
if (
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
867
|
+
if (number_2) {
|
|
868
|
+
var findLicense = (_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (_a) {
|
|
869
|
+
var license = _a.license;
|
|
870
|
+
return (license === null || license === void 0 ? void 0 : license.number) === number_2;
|
|
871
|
+
});
|
|
872
|
+
if (findLicense)
|
|
873
|
+
selectedLicenseData = findLicense;
|
|
874
|
+
else if (!findLicense && business_type === BusinessType.FL) {
|
|
875
|
+
selectedLicenseData = __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: number_2 } });
|
|
876
|
+
}
|
|
877
|
+
else
|
|
878
|
+
selectedLicenseData = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: number_2 } });
|
|
879
|
+
state.data.businessTypeData.licenseNumber = number_2;
|
|
739
880
|
}
|
|
740
881
|
state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
|
|
741
882
|
}
|
|
@@ -743,6 +884,42 @@ export var businessSlice = createSlice({
|
|
|
743
884
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
744
885
|
state.loading = false;
|
|
745
886
|
state.error = action.error.message;
|
|
887
|
+
})
|
|
888
|
+
.addCase(createCivilIdAuth.pending, function (state) {
|
|
889
|
+
state.loading = true;
|
|
890
|
+
state.error = null;
|
|
891
|
+
})
|
|
892
|
+
.addCase(createCivilIdAuth.fulfilled, function (state, action) {
|
|
893
|
+
var _a;
|
|
894
|
+
state.loading = false;
|
|
895
|
+
state.error = null;
|
|
896
|
+
var _b = action.payload, formData = _b.formData, response = _b.response;
|
|
897
|
+
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
898
|
+
if (description) {
|
|
899
|
+
state.error = description;
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
|
|
903
|
+
})
|
|
904
|
+
.addCase(createCivilIdAuth.rejected, function (state, action) {
|
|
905
|
+
state.loading = false;
|
|
906
|
+
state.error = action.error.message;
|
|
907
|
+
})
|
|
908
|
+
.addCase(verifyPACI.pending, function (state) {
|
|
909
|
+
state.loading = true;
|
|
910
|
+
state.error = null;
|
|
911
|
+
})
|
|
912
|
+
.addCase(verifyPACI.fulfilled, function (state, action) {
|
|
913
|
+
state.loading = false;
|
|
914
|
+
state.error = null;
|
|
915
|
+
state.data.otpData.responseBody = action.payload.response;
|
|
916
|
+
})
|
|
917
|
+
.addCase(verifyPACI.rejected, function (state, action) {
|
|
918
|
+
state.loading = false;
|
|
919
|
+
var error = action.error.message;
|
|
920
|
+
if (error !== 'Aborted') {
|
|
921
|
+
state.error = error;
|
|
922
|
+
}
|
|
746
923
|
})
|
|
747
924
|
.addCase(updateLeadIdentity.pending, function (state) {
|
|
748
925
|
state.loading = true;
|
|
@@ -836,42 +1013,6 @@ export var businessSlice = createSlice({
|
|
|
836
1013
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
837
1014
|
state.error = action.error.message;
|
|
838
1015
|
state.loading = false;
|
|
839
|
-
})
|
|
840
|
-
.addCase(retrieveChannels.pending, function (state) {
|
|
841
|
-
state.error = null;
|
|
842
|
-
state.loading = true;
|
|
843
|
-
})
|
|
844
|
-
.addCase(retrieveChannels.fulfilled, function (state, action) {
|
|
845
|
-
var _a;
|
|
846
|
-
state.error = null;
|
|
847
|
-
state.loading = false;
|
|
848
|
-
var data = action.payload || {};
|
|
849
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
850
|
-
if (description) {
|
|
851
|
-
state.error = description;
|
|
852
|
-
return;
|
|
853
|
-
}
|
|
854
|
-
var channels = data || [];
|
|
855
|
-
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { channelList: channels });
|
|
856
|
-
var brand = (state.data.verify.responseBody || {}).brand;
|
|
857
|
-
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
858
|
-
var _b = brand || {}, website = _b.website, social = _b.social;
|
|
859
|
-
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
860
|
-
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
861
|
-
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
862
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
|
|
863
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
|
|
864
|
-
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
865
|
-
selectedChannels = [websiteData, socialData];
|
|
866
|
-
else if (isHasTwitter || isHasInstagram)
|
|
867
|
-
selectedChannels = [socialData];
|
|
868
|
-
else if (isHasWebsite)
|
|
869
|
-
selectedChannels = [websiteData];
|
|
870
|
-
state.data.activitiesData.salesChannels = selectedChannels;
|
|
871
|
-
})
|
|
872
|
-
.addCase(retrieveChannels.rejected, function (state, action) {
|
|
873
|
-
state.error = action.error.message;
|
|
874
|
-
state.loading = false;
|
|
875
1016
|
})
|
|
876
1017
|
.addCase(updateLeadBusinessType.pending, function (state) {
|
|
877
1018
|
state.loading = true;
|
|
@@ -881,28 +1022,38 @@ export var businessSlice = createSlice({
|
|
|
881
1022
|
var _a;
|
|
882
1023
|
state.loading = false;
|
|
883
1024
|
state.error = null;
|
|
884
|
-
var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData;
|
|
1025
|
+
var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
|
|
885
1026
|
state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
|
|
886
1027
|
var entity = data.entity, entity_activities = data.entity_activities;
|
|
887
|
-
var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
|
|
1028
|
+
var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
|
|
888
1029
|
if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
|
|
889
1030
|
state.error = 'signup_user_exists_error';
|
|
890
1031
|
return;
|
|
891
1032
|
}
|
|
892
|
-
if (
|
|
893
|
-
|
|
894
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
1033
|
+
if (issuingDate) {
|
|
1034
|
+
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
895
1035
|
}
|
|
896
1036
|
var activities = entity_activities || [];
|
|
897
|
-
|
|
898
|
-
if (!!selectedActivity)
|
|
899
|
-
state.data.activitiesData.activities = [selectedActivity];
|
|
900
|
-
state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData);
|
|
1037
|
+
state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
|
|
901
1038
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
|
|
902
1039
|
})
|
|
903
1040
|
.addCase(updateLeadBusinessType.rejected, function (state, action) {
|
|
904
1041
|
state.loading = false;
|
|
905
1042
|
state.error = action.error.message;
|
|
1043
|
+
})
|
|
1044
|
+
.addCase(uploadArticle.pending, function (state) {
|
|
1045
|
+
state.uploadingArticleError = null;
|
|
1046
|
+
state.uploadingArticle = true;
|
|
1047
|
+
})
|
|
1048
|
+
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
1049
|
+
state.uploadingArticleError = null;
|
|
1050
|
+
state.uploadingArticle = false;
|
|
1051
|
+
var data = action.payload.data;
|
|
1052
|
+
state.data.businessTypeData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
1053
|
+
})
|
|
1054
|
+
.addCase(uploadArticle.rejected, function (state) {
|
|
1055
|
+
state.uploadingArticle = false;
|
|
1056
|
+
state.uploadingArticleError = 'file_upload_article_error';
|
|
906
1057
|
})
|
|
907
1058
|
.addCase(updateActivitiesInfo.pending, function (state) {
|
|
908
1059
|
state.loading = true;
|
|
@@ -913,10 +1064,7 @@ export var businessSlice = createSlice({
|
|
|
913
1064
|
state.error = null;
|
|
914
1065
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
915
1066
|
state.data.activitiesData = formData;
|
|
916
|
-
console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
|
|
917
|
-
console.log('updateActivitiesInfo', data);
|
|
918
1067
|
state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
|
|
919
|
-
console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
|
|
920
1068
|
})
|
|
921
1069
|
.addCase(updateActivitiesInfo.rejected, function (state, action) {
|
|
922
1070
|
state.loading = false;
|
|
@@ -930,16 +1078,16 @@ export var businessSlice = createSlice({
|
|
|
930
1078
|
var _a, _b;
|
|
931
1079
|
state.loading = false;
|
|
932
1080
|
state.error = null;
|
|
933
|
-
var
|
|
934
|
-
var
|
|
935
|
-
var
|
|
936
|
-
var
|
|
937
|
-
var
|
|
938
|
-
var expectedCustomerSales = payload.expectedCustomerSales || [];
|
|
939
|
-
var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
|
|
1081
|
+
var _c = action.payload, customerBases = _c.customerBases, expectedSales = _c.expectedSales, expectedCustomerSales = _c.expectedCustomerSales, countryISO2 = _c.countryISO2;
|
|
1082
|
+
var regional = customerBases.at(1);
|
|
1083
|
+
var local = customerBases.at(0);
|
|
1084
|
+
var expectedSale = (_b = (_a = expectedSales.at(0)) === null || _a === void 0 ? void 0 : _a.sub) === null || _b === void 0 ? void 0 : _b.at(4);
|
|
1085
|
+
var expectedCustomerSale = expectedCustomerSales.at(3);
|
|
940
1086
|
state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
941
|
-
if (
|
|
942
|
-
state.data.customersData.customerLocations = [
|
|
1087
|
+
if (local && isKW(countryISO2))
|
|
1088
|
+
state.data.customersData.customerLocations = [local];
|
|
1089
|
+
if (regional && local && isSA(countryISO2))
|
|
1090
|
+
state.data.customersData.customerLocations = [regional, local];
|
|
943
1091
|
if (!!expectedSale)
|
|
944
1092
|
state.data.customersData.expectedSale = expectedSale;
|
|
945
1093
|
if (!!expectedCustomerSale)
|
|
@@ -965,8 +1113,9 @@ export var businessSlice = createSlice({
|
|
|
965
1113
|
state.error = action.error.message;
|
|
966
1114
|
})
|
|
967
1115
|
.addCase(updateLeadSuccess.fulfilled, function (state, action) {
|
|
968
|
-
var _a;
|
|
1116
|
+
var _a, _b;
|
|
969
1117
|
state.loading = false;
|
|
1118
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
|
|
970
1119
|
state.error = null;
|
|
971
1120
|
var response = (action.payload || {}).response;
|
|
972
1121
|
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -974,18 +1123,20 @@ export var businessSlice = createSlice({
|
|
|
974
1123
|
state.error = description;
|
|
975
1124
|
return;
|
|
976
1125
|
}
|
|
977
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), response);
|
|
1126
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), response), { name: (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.name });
|
|
978
1127
|
})
|
|
979
1128
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
980
1129
|
state.loading = true;
|
|
1130
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: true });
|
|
981
1131
|
state.error = null;
|
|
982
1132
|
})
|
|
983
1133
|
.addCase(updateLeadSuccess.rejected, function (state, action) {
|
|
984
1134
|
state.loading = false;
|
|
1135
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
|
|
985
1136
|
state.error = action.error.message;
|
|
986
1137
|
});
|
|
987
1138
|
}
|
|
988
1139
|
});
|
|
989
|
-
export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
|
|
1140
|
+
export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, clearArticleId = _a.clearArticleId, uploadingStatus = _a.uploadingStatus;
|
|
990
1141
|
export default businessSlice.reducer;
|
|
991
1142
|
export var businessSelector = function (state) { return state.business; };
|