@tap-payments/auth-jsconnect 2.0.44 → 2.0.45
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 +70 -7
- package/build/@types/app.js +13 -0
- package/build/@types/form.d.ts +63 -34
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +6 -1
- package/build/api/account.js +9 -1
- package/build/api/auth.d.ts +24 -18
- package/build/api/auth.js +25 -5
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +3 -3
- package/build/api/board.d.ts +4 -3
- package/build/api/board.js +8 -1
- package/build/api/brand.d.ts +1 -0
- package/build/api/brand.js +9 -1
- package/build/api/data.d.ts +16 -8
- package/build/api/data.js +16 -0
- package/build/api/entity.d.ts +46 -16
- package/build/api/entity.js +26 -16
- package/build/api/file.d.ts +13 -0
- package/build/api/file.js +24 -0
- package/build/api/index.d.ts +30 -8
- package/build/api/index.js +5 -3
- package/build/api/individual.d.ts +10 -4
- package/build/api/lead.d.ts +16 -10
- package/build/api/lead.js +17 -1
- package/build/api/location.d.ts +5 -0
- package/build/api/location.js +19 -0
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +1 -1
- package/build/app/rootReducer.d.ts +2 -1
- package/build/app/rootReducer.js +4 -2
- package/build/app/settings.d.ts +17 -6
- package/build/app/settings.js +23 -19
- package/build/app/store.d.ts +8 -6
- package/build/assets/locales/ar.json +40 -1
- package/build/assets/locales/en.json +42 -1
- package/build/components/Button/Button.js +1 -5
- package/build/components/FileInput/DragAndDrop.d.ts +3 -2
- package/build/components/FileInput/DragAndDrop.js +5 -7
- package/build/components/Lottie/Lottie.d.ts +3536 -210
- package/build/components/Lottie/Lottie.js +11 -3
- package/build/components/Lottie/files/account_creating.json +732 -0
- package/build/components/Lottie/files/error.json +692 -0
- package/build/components/Lottie/files/start_loading.json +1140 -0
- package/build/components/Lottie/files/still_loading.json +1140 -0
- package/build/components/ProgressBar/CircularProgressBar.d.ts +3 -1
- package/build/components/ProgressBar/CircularProgressBar.js +2 -2
- package/build/components/Radio/Radio.js +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +4 -2
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SimpleList/SimpleList.d.ts +2 -1
- package/build/components/SimpleList/SimpleList.js +22 -10
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +12 -3
- package/build/constants/api.d.ts +8 -0
- package/build/constants/api.js +17 -1
- package/build/constants/app.d.ts +24 -2
- package/build/constants/app.js +182 -16
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +3 -0
- package/build/constants/validation.d.ts +3 -0
- package/build/constants/validation.js +3 -0
- package/build/features/app/bank/bankStore.d.ts +79 -23
- package/build/features/app/bank/bankStore.js +85 -111
- package/build/features/app/brand/brandStore.d.ts +191 -0
- package/build/features/app/brand/brandStore.js +654 -0
- package/build/features/app/business/businessStore.d.ts +185 -24
- package/build/features/app/business/businessStore.js +219 -217
- package/build/features/app/connect/connectStore.d.ts +124 -19
- package/build/features/app/connect/connectStore.js +228 -264
- package/build/features/app/connectExpress/connectExpressStore.d.ts +282 -0
- package/build/features/app/connectExpress/connectExpressStore.js +1013 -0
- package/build/features/app/entity/entityStore.d.ts +101 -24
- package/build/features/app/entity/entityStore.js +345 -341
- package/build/features/app/individual/individualStore.d.ts +83 -20
- package/build/features/app/individual/individualStore.js +166 -135
- package/build/features/app/password/passwordStore.d.ts +106 -17
- package/build/features/app/password/passwordStore.js +34 -29
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +24 -47
- package/build/features/app/tax/taxStore.d.ts +69 -9
- package/build/features/app/tax/taxStore.js +105 -94
- 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 +26 -22
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +11 -44
- package/build/features/bank/screens/BankDetails/IBAN.js +5 -2
- package/build/features/bank/screens/BankDetails/validation.d.ts +22 -6
- package/build/features/bank/screens/BankDetails/validation.js +11 -24
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- 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 +54 -41
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
- package/build/features/{entity/screens/Customers/CustomerLocations.js → brand/screens/BrandActivities/CustomerBase.js} +9 -37
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.js +7 -8
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.js +14 -11
- 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/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.js +1 -3
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
- package/build/features/{auth/screens/NID → brand/screens/BrandActivities}/TAC.js +8 -11
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.js +1 -3
- 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/{entity/screens/Customers → brand/screens/BrandActivities}/validation.js +9 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -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 +106 -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/brand/screens/Verify/OTPInput.js +47 -0
- package/build/features/{auth/screens/OTP/OTPInput.d.ts → brand/screens/Verify/Verify.d.ts} +0 -0
- package/build/features/brand/screens/Verify/Verify.js +91 -0
- package/build/features/brand/screens/Verify/index.d.ts +2 -0
- package/build/features/brand/screens/Verify/index.js +2 -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 +9 -14
- package/build/features/business/screens/Activities/Activities.js +6 -14
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -13
- package/build/features/business/screens/Activities/ActivitiesList.js +11 -17
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/Activities/validation.js +4 -1
- 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 +13 -12
- package/build/features/business/screens/BusinessType/EntityName.js +1 -1
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +12 -46
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +30 -2
- package/build/features/business/screens/BusinessType/LicenseType.js +31 -6
- package/build/features/business/screens/BusinessType/validation.d.ts +9 -6
- package/build/features/business/screens/BusinessType/validation.js +21 -13
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +11 -11
- package/build/features/business/screens/Customers/CustomerLocations.js +2 -3
- package/build/features/business/screens/Customers/ExpectedCustomers.js +2 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +8 -5
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +1 -3
- package/build/features/business/screens/Customers/TransactionPolicy.js +1 -3
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -96
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +9 -134
- package/build/features/connect/Connect.d.ts +4 -4
- package/build/features/connect/Connect.js +14 -31
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Individual/Individual.js +5 -8
- package/build/features/connect/screens/Individual/validation.js +2 -8
- package/build/features/connect/screens/Merchant/BrandList.js +15 -2
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connect/screens/Merchant/Merchant.js +32 -36
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -3
- package/build/features/connect/screens/Merchant/SalesChannels.js +28 -103
- 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 +1 -3
- 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 +6 -0
- package/build/features/connect/screens/Merchant/validation.js +12 -10
- package/build/features/connect/screens/ThankYou/ThankYou.js +9 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +9 -73
- 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 +142 -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/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +10 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +45 -0
- 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 +14 -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 +23 -12
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +9 -8
- 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/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -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/{auth → connectExpress}/screens/NID/DOB.d.ts +1 -2
- package/build/features/{auth → connectExpress}/screens/NID/DOB.js +9 -9
- package/build/features/{auth → connectExpress}/screens/NID/IDNumber.d.ts +4 -1
- package/build/features/{auth → connectExpress}/screens/NID/IDNumber.js +14 -17
- package/build/features/{auth → connectExpress}/screens/NID/NID.d.ts +0 -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/{auth → connectExpress}/screens/NID/index.d.ts +0 -0
- package/build/features/{auth → connectExpress}/screens/NID/index.js +0 -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/{auth/screens/NID → connectExpress/screens/NIDMissed}/NID.js +14 -23
- 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/{auth/screens/NID/TAC.d.ts → connectExpress/screens/OTP/OTP.d.ts} +2 -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 +42 -0
- package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.d.ts +0 -0
- package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.js +12 -18
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
- package/build/features/featuresScreens.d.ts +2 -1
- package/build/features/featuresScreens.js +128 -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.js +20 -18
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +30 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +5 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +24 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +42 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/password/Password.d.ts +5 -3
- package/build/features/password/Password.js +9 -14
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Address/Address.d.ts +11 -0
- package/build/features/shared/Address/Address.js +63 -0
- package/build/features/shared/Address/CountryList.d.ts +72 -0
- package/build/features/shared/Address/CountryList.js +89 -0
- package/build/features/shared/Address/InputSelect.d.ts +71 -0
- package/build/features/shared/Address/InputSelect.js +172 -0
- package/build/features/shared/Address/InputText.d.ts +11 -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.js +1 -5
- package/build/features/shared/Button/Button.js +2 -3
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +39 -7
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +6 -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/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 +9 -7
- 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/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +1 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +0 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +1 -1
- 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 +11 -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 +16 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +113 -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/UploadFile/UploadFile.d.ts +5 -4
- package/build/features/shared/UploadFile/UploadFile.js +13 -13
- 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 +27 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +149 -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 +9 -15
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +21 -23
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +42 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +3 -1
- package/build/hooks/useAppConfig.js +6 -4
- package/build/hooks/useAppDispatch.d.ts +2 -1
- 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/useSetFromDefaultValues.js +4 -2
- package/build/hooks/useVerifyToken.d.ts +15 -0
- package/build/hooks/useVerifyToken.js +25 -0
- package/build/index.d.ts +12 -11
- package/build/index.js +13 -21
- package/build/theme/typography.js +1 -1
- package/build/utils/array.d.ts +4 -1
- package/build/utils/array.js +24 -3
- package/build/utils/common.d.ts +1 -1
- package/build/utils/common.js +1 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +5 -0
- package/build/utils/html.d.ts +0 -1
- package/build/utils/html.js +2 -10
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/string.d.ts +2 -0
- package/build/utils/string.js +23 -2
- package/package.json +1 -1
- package/build/api/ip.d.ts +0 -4
- package/build/api/ip.js +0 -12
- package/build/features/app/auth/authStore.d.ts +0 -46
- package/build/features/app/auth/authStore.js +0 -261
- package/build/features/auth/Auth.d.ts +0 -10
- package/build/features/auth/Auth.js +0 -87
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/auth/screens/NID/validation.d.ts +0 -27
- package/build/features/auth/screens/NID/validation.js +0 -19
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -6
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -6
- package/build/features/connect/screens/Merchant/SocialMedia.js +0 -182
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
- package/build/features/entity/screens/Customers/CustomerLocations.d.ts +0 -118
- package/build/features/entity/screens/Customers/Customers.d.ts +0 -5
- package/build/features/entity/screens/Customers/Customers.js +0 -90
- package/build/features/entity/screens/Customers/RefundPolicy.d.ts +0 -36
- package/build/features/entity/screens/Customers/index.d.ts +0 -3
- package/build/features/entity/screens/Customers/index.js +0 -2
- package/build/features/entity/screens/Customers/validation.d.ts +0 -20
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -55
- package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -73
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -84
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
- 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 -141
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -83
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -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
60
|
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
62
|
-
import {
|
|
63
|
-
import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW, isSA } from '../../../utils';
|
|
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';
|
|
64
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,58 +73,53 @@ 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
|
-
|
|
82
|
-
|
|
83
|
-
if (
|
|
84
|
-
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
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)
|
|
85
83
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 19];
|
|
85
|
+
boardData = undefined;
|
|
86
|
+
brandData = undefined;
|
|
88
87
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
89
88
|
case 2:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
95
|
-
}
|
|
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));
|
|
96
93
|
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
|
|
97
94
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
98
95
|
}
|
|
99
96
|
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
|
|
100
97
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
101
98
|
}
|
|
102
|
-
if (!(data.step_name ===
|
|
103
|
-
|
|
104
|
-
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;
|
|
105
102
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
106
|
-
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) &&
|
|
107
|
-
hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
103
|
+
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
108
104
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
109
105
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
110
|
-
entity_activities
|
|
111
|
-
if (!(!entity_activities && hasBusinessCRInfoCompleted)) return [3, 4];
|
|
106
|
+
if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 4];
|
|
112
107
|
return [4, API.dataService.getActivities()];
|
|
113
108
|
case 3:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
activityList = (_b.sent()).list;
|
|
110
|
+
leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
|
|
111
|
+
_b.label = 4;
|
|
117
112
|
case 4:
|
|
118
113
|
if (!hasBusinessCompleted) return [3, 8];
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (!(!!board_id && !!board_info_id)) return [3, 6];
|
|
122
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
114
|
+
if (!board_id) return [3, 7];
|
|
115
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
123
116
|
case 5:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
case 6:
|
|
117
|
+
boardData = _b.sent();
|
|
118
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
119
|
+
case 6:
|
|
120
|
+
_b.sent();
|
|
121
|
+
_b.label = 7;
|
|
127
122
|
case 7:
|
|
128
|
-
_h.sent();
|
|
129
123
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
130
124
|
return [3, 18];
|
|
131
125
|
case 8:
|
|
@@ -140,35 +134,36 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
140
134
|
if (!hasBusinessCRActivitiesCompleted) return [3, 13];
|
|
141
135
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
142
136
|
case 11:
|
|
143
|
-
|
|
137
|
+
_b.sent();
|
|
144
138
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
145
139
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
146
140
|
case 12:
|
|
147
|
-
|
|
141
|
+
brandData = _b.sent();
|
|
148
142
|
return [3, 18];
|
|
149
143
|
case 13:
|
|
150
144
|
if (!hasBusinessCRInfoCompleted) return [3, 15];
|
|
151
145
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
152
146
|
case 14:
|
|
153
|
-
|
|
147
|
+
brandData = _b.sent();
|
|
154
148
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
155
149
|
return [3, 18];
|
|
156
150
|
case 15:
|
|
157
151
|
if (!isSA(countryIso2)) return [3, 17];
|
|
158
152
|
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
159
153
|
case 16:
|
|
160
|
-
|
|
161
|
-
|
|
154
|
+
_b.sent();
|
|
155
|
+
_b.label = 17;
|
|
162
156
|
case 17:
|
|
163
157
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
164
|
-
|
|
158
|
+
_b.label = 18;
|
|
165
159
|
case 18: return [2, {
|
|
166
160
|
data: data,
|
|
167
|
-
leadData: __assign(__assign({},
|
|
161
|
+
leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
|
|
168
162
|
token: token,
|
|
169
|
-
|
|
170
|
-
boardId:
|
|
163
|
+
brandData: brandData,
|
|
164
|
+
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
|
|
171
165
|
}];
|
|
166
|
+
case 19: return [2, { data: data, isRequireOTP: true }];
|
|
172
167
|
}
|
|
173
168
|
});
|
|
174
169
|
}); });
|
|
@@ -190,8 +185,8 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
|
|
|
190
185
|
});
|
|
191
186
|
}); });
|
|
192
187
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
193
|
-
var _a, business, settings, isNID, responseBody, stepName, payload, data,
|
|
194
|
-
var _c, _d, _e, _f, _g, _h;
|
|
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;
|
|
195
190
|
return __generator(this, function (_j) {
|
|
196
191
|
switch (_j.label) {
|
|
197
192
|
case 0:
|
|
@@ -201,22 +196,22 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
201
196
|
stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
|
|
202
197
|
payload = {
|
|
203
198
|
data: params.otp,
|
|
204
|
-
service_name: ((
|
|
205
|
-
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),
|
|
206
201
|
step_name: stepName,
|
|
207
202
|
encryption_contract: ['data']
|
|
208
203
|
};
|
|
209
204
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
210
205
|
case 1:
|
|
211
206
|
data = (_j.sent()).data;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
207
|
+
if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
|
|
208
|
+
throw new Error(data.errors[0].description);
|
|
209
|
+
brandData = undefined;
|
|
215
210
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
216
211
|
case 2:
|
|
217
|
-
|
|
212
|
+
leadData = (_j.sent()).data;
|
|
218
213
|
thunkApi.dispatch(updateStepName(stepName));
|
|
219
|
-
|
|
214
|
+
brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id;
|
|
220
215
|
brandID = brand === null || brand === void 0 ? void 0 : brand.id;
|
|
221
216
|
countryIso2 = country_code;
|
|
222
217
|
if (countryIso2)
|
|
@@ -233,12 +228,12 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
233
228
|
_j.sent();
|
|
234
229
|
_j.label = 4;
|
|
235
230
|
case 4:
|
|
236
|
-
entity_activities =
|
|
237
|
-
if (!(!entity_activities && hasBusinessCRInfoCompleted)) return [3, 6];
|
|
231
|
+
entity_activities = leadData.entity_activities;
|
|
232
|
+
if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 6];
|
|
238
233
|
return [4, API.dataService.getActivities()];
|
|
239
234
|
case 5:
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
activityList = (_j.sent()).list;
|
|
236
|
+
leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
|
|
242
237
|
_j.label = 6;
|
|
243
238
|
case 6:
|
|
244
239
|
if (!isNID) return [3, 7];
|
|
@@ -250,15 +245,16 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
250
245
|
return [3, 20];
|
|
251
246
|
case 8:
|
|
252
247
|
if (!hasBusinessCompleted) return [3, 12];
|
|
253
|
-
if (!
|
|
254
|
-
return [4, API.boardService.
|
|
248
|
+
if (!board_id) return [3, 11];
|
|
249
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
255
250
|
case 9:
|
|
256
251
|
boardResponse = _j.sent();
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
case 10:
|
|
260
|
-
case 11:
|
|
252
|
+
leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
|
|
253
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
254
|
+
case 10:
|
|
261
255
|
_j.sent();
|
|
256
|
+
_j.label = 11;
|
|
257
|
+
case 11:
|
|
262
258
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
263
259
|
return [3, 20];
|
|
264
260
|
case 12:
|
|
@@ -277,19 +273,19 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
277
273
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
278
274
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
279
275
|
case 16:
|
|
280
|
-
|
|
276
|
+
brandData = _j.sent();
|
|
281
277
|
return [3, 20];
|
|
282
278
|
case 17:
|
|
283
279
|
if (!hasBusinessCRInfoCompleted) return [3, 19];
|
|
284
280
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
285
281
|
case 18:
|
|
286
|
-
|
|
282
|
+
brandData = _j.sent();
|
|
287
283
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
288
284
|
return [3, 20];
|
|
289
285
|
case 19:
|
|
290
286
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
291
287
|
_j.label = 20;
|
|
292
|
-
case 20: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }),
|
|
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 }];
|
|
293
289
|
}
|
|
294
290
|
});
|
|
295
291
|
}); });
|
|
@@ -317,7 +313,8 @@ export var verifyPACI = createAsyncThunk('businessVerifyPACI', function (params,
|
|
|
317
313
|
isSuccess = ((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
318
314
|
if (!isSuccess) return [3, 4];
|
|
319
315
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
320
|
-
|
|
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)];
|
|
321
318
|
case 3:
|
|
322
319
|
_f.sent();
|
|
323
320
|
thunkApi.dispatch(handleNextScreenStep());
|
|
@@ -380,12 +377,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
380
377
|
},
|
|
381
378
|
date_of_birth: params.dob,
|
|
382
379
|
step_name: stepName,
|
|
383
|
-
encryption_contract: [
|
|
384
|
-
'identification.issued_country_code',
|
|
385
|
-
'identification.id',
|
|
386
|
-
'identification.type',
|
|
387
|
-
'date_of_birth'
|
|
388
|
-
]
|
|
380
|
+
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
389
381
|
};
|
|
390
382
|
return [4, API.leadService.updateLead(requestBody)];
|
|
391
383
|
case 1:
|
|
@@ -414,12 +406,7 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
414
406
|
},
|
|
415
407
|
date_of_birth: dob,
|
|
416
408
|
step_name: stepName,
|
|
417
|
-
encryption_contract: [
|
|
418
|
-
'identification.issued_country_code',
|
|
419
|
-
'identification.id',
|
|
420
|
-
'identification.type',
|
|
421
|
-
'date_of_birth'
|
|
422
|
-
]
|
|
409
|
+
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
423
410
|
};
|
|
424
411
|
return [4, API.leadService.updateLead(requestBody)];
|
|
425
412
|
case 1:
|
|
@@ -454,19 +441,21 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
454
441
|
});
|
|
455
442
|
}); });
|
|
456
443
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
457
|
-
var _a, settings, business, payload, data, entity_activities, list, accountBody, accountData, documentData, documentBody;
|
|
444
|
+
var _a, settings, business, isNonSA, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, articleId, documentBody, payload_1;
|
|
458
445
|
var _b, _c, _d, _e, _f, _g;
|
|
459
446
|
return __generator(this, function (_h) {
|
|
460
447
|
switch (_h.label) {
|
|
461
448
|
case 0:
|
|
462
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;
|
|
463
452
|
payload = {
|
|
464
|
-
id: ((
|
|
465
|
-
license_number: params.licenseNumber,
|
|
466
|
-
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',
|
|
467
456
|
business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
|
|
468
457
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
|
|
469
|
-
business: { ar: params.entityLegalName, en: params.entityLegalName },
|
|
458
|
+
business: isNonSA && isFL ? undefined : { ar: params.entityLegalName, en: params.entityLegalName },
|
|
470
459
|
encryption_contract: ['license_number', 'business_type', 'license_type']
|
|
471
460
|
};
|
|
472
461
|
return [4, API.leadService.updateLead(payload)];
|
|
@@ -493,13 +482,15 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
493
482
|
return [4, API.accountService.createAccount(accountBody)];
|
|
494
483
|
case 4:
|
|
495
484
|
accountData = _h.sent();
|
|
496
|
-
|
|
497
|
-
|
|
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];
|
|
498
489
|
documentBody = {
|
|
499
|
-
entity_id:
|
|
490
|
+
entity_id: entityId || '',
|
|
500
491
|
documents: [
|
|
501
492
|
{
|
|
502
|
-
images:
|
|
493
|
+
images: params.certificateId
|
|
503
494
|
}
|
|
504
495
|
]
|
|
505
496
|
};
|
|
@@ -508,32 +499,46 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
508
499
|
documentData = _h.sent();
|
|
509
500
|
_h.label = 6;
|
|
510
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:
|
|
511
512
|
thunkApi.dispatch(handleNextScreenStep());
|
|
512
513
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
513
|
-
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData }];
|
|
514
|
+
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
|
|
514
515
|
}
|
|
515
516
|
});
|
|
516
517
|
}); });
|
|
517
|
-
export var
|
|
518
|
+
export var uploadArticle = createAsyncThunk('businessUploadArticle', function (_a) {
|
|
518
519
|
var file = _a.file, onProgress = _a.onProgress;
|
|
519
520
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
520
|
-
var uploadPayload, onUploadProgress, data;
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
var typeArray, type, uploadPayload, onUploadProgress, data;
|
|
522
|
+
var _b;
|
|
523
|
+
return __generator(this, function (_c) {
|
|
524
|
+
switch (_c.label) {
|
|
523
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] || '';
|
|
524
528
|
uploadPayload = {
|
|
525
529
|
file_link_create: true,
|
|
526
530
|
title: file === null || file === void 0 ? void 0 : file.name,
|
|
527
|
-
purpose: '
|
|
531
|
+
purpose: 'article_of_association',
|
|
532
|
+
type: type,
|
|
528
533
|
file: file
|
|
529
534
|
};
|
|
530
535
|
onUploadProgress = function (progressEvent) {
|
|
531
536
|
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
532
537
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
533
538
|
};
|
|
534
|
-
return [4, API.
|
|
539
|
+
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
535
540
|
case 1:
|
|
536
|
-
data =
|
|
541
|
+
data = _c.sent();
|
|
537
542
|
return [2, { data: data }];
|
|
538
543
|
}
|
|
539
544
|
});
|
|
@@ -573,17 +578,18 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
573
578
|
});
|
|
574
579
|
}); });
|
|
575
580
|
export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
576
|
-
var settings, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
|
|
581
|
+
var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
|
|
577
582
|
return __generator(this, function (_b) {
|
|
578
583
|
switch (_b.label) {
|
|
579
584
|
case 0:
|
|
580
585
|
settings = thunkApi.getState().settings;
|
|
586
|
+
countryISO2 = settings.data.businessCountry.iso2;
|
|
581
587
|
dataBody = {
|
|
582
588
|
page: 0
|
|
583
589
|
};
|
|
584
590
|
salesDataBody = {
|
|
585
591
|
page: 0,
|
|
586
|
-
country_code: [
|
|
592
|
+
country_code: [countryISO2]
|
|
587
593
|
};
|
|
588
594
|
return [4, Promise.all([
|
|
589
595
|
API.dataService.getCustomerBases(dataBody),
|
|
@@ -591,11 +597,12 @@ export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', funct
|
|
|
591
597
|
API.dataService.getExpectedCustomerSales(dataBody)
|
|
592
598
|
])];
|
|
593
599
|
case 1:
|
|
594
|
-
_a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
|
|
600
|
+
_a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
|
|
595
601
|
return [2, {
|
|
596
602
|
customerBases: customerBases,
|
|
597
603
|
expectedSales: expectedSales,
|
|
598
|
-
expectedCustomerSales: expectedCustomerSales
|
|
604
|
+
expectedCustomerSales: expectedCustomerSales,
|
|
605
|
+
countryISO2: countryISO2
|
|
599
606
|
}];
|
|
600
607
|
}
|
|
601
608
|
});
|
|
@@ -635,7 +642,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
|
|
|
635
642
|
});
|
|
636
643
|
}); });
|
|
637
644
|
export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
638
|
-
var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id
|
|
645
|
+
var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id;
|
|
639
646
|
var _c, _d, _e, _f;
|
|
640
647
|
return __generator(this, function (_g) {
|
|
641
648
|
switch (_g.label) {
|
|
@@ -656,20 +663,20 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
|
|
|
656
663
|
case 1:
|
|
657
664
|
data = _g.sent();
|
|
658
665
|
board_id = data === null || data === void 0 ? void 0 : data.board_id;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
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)];
|
|
662
668
|
case 2:
|
|
663
669
|
boardResponse = _g.sent();
|
|
664
|
-
|
|
665
|
-
case 3:
|
|
666
|
-
case 4:
|
|
670
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
671
|
+
case 3:
|
|
667
672
|
_g.sent();
|
|
668
|
-
|
|
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, {});
|
|
669
676
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
670
677
|
thunkApi.dispatch(handleNextScreenStep());
|
|
671
678
|
return [2, {
|
|
672
|
-
response: __assign(__assign({}, data), { flows:
|
|
679
|
+
response: __assign(__assign({}, data), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] }),
|
|
673
680
|
formData: params
|
|
674
681
|
}];
|
|
675
682
|
}
|
|
@@ -699,6 +706,8 @@ var initialState = {
|
|
|
699
706
|
loading: false,
|
|
700
707
|
customLoading: false,
|
|
701
708
|
uploading: false,
|
|
709
|
+
uploadingArticle: false,
|
|
710
|
+
uploadingArticleError: null,
|
|
702
711
|
data: {
|
|
703
712
|
flowName: FlowsTypes.BUSINESS,
|
|
704
713
|
verify: {
|
|
@@ -718,12 +727,11 @@ var initialState = {
|
|
|
718
727
|
},
|
|
719
728
|
businessTypeData: {
|
|
720
729
|
licenseNumber: '',
|
|
721
|
-
entityLegalName: ''
|
|
722
|
-
uploading: false
|
|
730
|
+
entityLegalName: ''
|
|
723
731
|
},
|
|
724
732
|
activitiesData: {
|
|
725
733
|
activities: [],
|
|
726
|
-
operationStartDate:
|
|
734
|
+
operationStartDate: ''
|
|
727
735
|
},
|
|
728
736
|
customersData: {
|
|
729
737
|
customerLocations: [],
|
|
@@ -746,6 +754,12 @@ export var businessSlice = createSlice({
|
|
|
746
754
|
},
|
|
747
755
|
resetOTPScreen: function (state) {
|
|
748
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;
|
|
749
763
|
}
|
|
750
764
|
},
|
|
751
765
|
extraReducers: function (builder) {
|
|
@@ -755,49 +769,47 @@ export var businessSlice = createSlice({
|
|
|
755
769
|
state.customLoading = true;
|
|
756
770
|
})
|
|
757
771
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
758
|
-
var _a, _b
|
|
772
|
+
var _a, _b;
|
|
759
773
|
state.error = null;
|
|
760
774
|
state.customLoading = false;
|
|
761
|
-
var
|
|
762
|
-
var
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
|
|
768
|
-
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;
|
|
769
780
|
state.data.otpData.isNID = false;
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
if (
|
|
775
|
-
|
|
776
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
777
|
-
}
|
|
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));
|
|
778
787
|
var activities = entity_activities || [];
|
|
779
788
|
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
780
|
-
var
|
|
781
|
-
return
|
|
789
|
+
var activities = (brandData || {}).activities;
|
|
790
|
+
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
|
|
782
791
|
});
|
|
783
|
-
|
|
784
|
-
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
|
|
792
|
+
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
785
793
|
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
|
|
786
|
-
|
|
787
|
-
if (
|
|
788
|
-
var
|
|
789
|
-
var
|
|
790
|
-
var licenseList = (
|
|
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;
|
|
791
799
|
var selectedLicenseData = selectedLicense;
|
|
792
|
-
if (
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
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;
|
|
801
813
|
}
|
|
802
814
|
state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
|
|
803
815
|
}
|
|
@@ -828,49 +840,43 @@ export var businessSlice = createSlice({
|
|
|
828
840
|
state.error = null;
|
|
829
841
|
})
|
|
830
842
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
831
|
-
var _a, _b
|
|
843
|
+
var _a, _b;
|
|
832
844
|
state.loading = false;
|
|
833
845
|
state.error = null;
|
|
834
|
-
var
|
|
835
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
836
|
-
if (description) {
|
|
837
|
-
state.error = description;
|
|
838
|
-
return;
|
|
839
|
-
}
|
|
846
|
+
var _c = action.payload, data = _c.data, formData = _c.formData, brand = _c.brand, leadData = _c.leadData;
|
|
840
847
|
state.data.otpData = formData;
|
|
841
848
|
state.data.otpData.responseBody = data;
|
|
842
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: leadData === null || leadData === void 0 ? void 0 : leadData.flows });
|
|
843
|
-
var
|
|
844
|
-
var issuingDate = (
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
if (!!issuingDate) {
|
|
848
|
-
var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
|
|
849
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
850
|
-
}
|
|
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));
|
|
851
854
|
var activities = entity_activities || [];
|
|
852
855
|
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
853
|
-
var
|
|
854
|
-
return
|
|
856
|
+
var activities = (brand || {}).activities;
|
|
857
|
+
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return value.id === activity.id; });
|
|
855
858
|
});
|
|
856
|
-
|
|
857
|
-
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
|
|
859
|
+
state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
858
860
|
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
|
|
859
|
-
|
|
860
|
-
if (
|
|
861
|
-
var
|
|
862
|
-
var
|
|
863
|
-
var licenseList = (
|
|
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;
|
|
864
866
|
var selectedLicenseData = selectedLicense;
|
|
865
|
-
if (
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
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;
|
|
874
880
|
}
|
|
875
881
|
state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
|
|
876
882
|
}
|
|
@@ -879,7 +885,7 @@ export var businessSlice = createSlice({
|
|
|
879
885
|
state.loading = false;
|
|
880
886
|
state.error = action.error.message;
|
|
881
887
|
})
|
|
882
|
-
.addCase(createCivilIdAuth.pending, function (state
|
|
888
|
+
.addCase(createCivilIdAuth.pending, function (state) {
|
|
883
889
|
state.loading = true;
|
|
884
890
|
state.error = null;
|
|
885
891
|
})
|
|
@@ -1019,19 +1025,15 @@ export var businessSlice = createSlice({
|
|
|
1019
1025
|
var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
|
|
1020
1026
|
state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
|
|
1021
1027
|
var entity = data.entity, entity_activities = data.entity_activities;
|
|
1022
|
-
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();
|
|
1023
1029
|
if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
|
|
1024
1030
|
state.error = 'signup_user_exists_error';
|
|
1025
1031
|
return;
|
|
1026
1032
|
}
|
|
1027
|
-
if (
|
|
1028
|
-
|
|
1029
|
-
state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
|
|
1033
|
+
if (issuingDate) {
|
|
1034
|
+
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
1030
1035
|
}
|
|
1031
1036
|
var activities = entity_activities || [];
|
|
1032
|
-
var selectedActivity = activities[0];
|
|
1033
|
-
if (!!selectedActivity)
|
|
1034
|
-
state.data.activitiesData.activities = [selectedActivity];
|
|
1035
1037
|
state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
|
|
1036
1038
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
|
|
1037
1039
|
})
|
|
@@ -1039,19 +1041,19 @@ export var businessSlice = createSlice({
|
|
|
1039
1041
|
state.loading = false;
|
|
1040
1042
|
state.error = action.error.message;
|
|
1041
1043
|
})
|
|
1042
|
-
.addCase(
|
|
1043
|
-
state.
|
|
1044
|
-
state.
|
|
1044
|
+
.addCase(uploadArticle.pending, function (state) {
|
|
1045
|
+
state.uploadingArticleError = null;
|
|
1046
|
+
state.uploadingArticle = true;
|
|
1045
1047
|
})
|
|
1046
|
-
.addCase(
|
|
1047
|
-
state.
|
|
1048
|
-
state.
|
|
1048
|
+
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
1049
|
+
state.uploadingArticleError = null;
|
|
1050
|
+
state.uploadingArticle = false;
|
|
1049
1051
|
var data = action.payload.data;
|
|
1050
|
-
state.data.businessTypeData.
|
|
1052
|
+
state.data.businessTypeData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
1051
1053
|
})
|
|
1052
|
-
.addCase(
|
|
1053
|
-
state.
|
|
1054
|
-
state.
|
|
1054
|
+
.addCase(uploadArticle.rejected, function (state) {
|
|
1055
|
+
state.uploadingArticle = false;
|
|
1056
|
+
state.uploadingArticleError = 'file_upload_article_error';
|
|
1055
1057
|
})
|
|
1056
1058
|
.addCase(updateActivitiesInfo.pending, function (state) {
|
|
1057
1059
|
state.loading = true;
|
|
@@ -1073,19 +1075,19 @@ export var businessSlice = createSlice({
|
|
|
1073
1075
|
state.error = null;
|
|
1074
1076
|
})
|
|
1075
1077
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
1076
|
-
var _a, _b
|
|
1078
|
+
var _a, _b;
|
|
1077
1079
|
state.loading = false;
|
|
1078
1080
|
state.error = null;
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1083
|
-
var
|
|
1084
|
-
var expectedCustomerSales = ((_e = payload.expectedCustomerSales) === null || _e === void 0 ? void 0 : _e.list) || [];
|
|
1085
|
-
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);
|
|
1086
1086
|
state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
1087
|
-
if (
|
|
1088
|
-
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];
|
|
1089
1091
|
if (!!expectedSale)
|
|
1090
1092
|
state.data.customersData.expectedSale = expectedSale;
|
|
1091
1093
|
if (!!expectedCustomerSale)
|
|
@@ -1135,6 +1137,6 @@ export var businessSlice = createSlice({
|
|
|
1135
1137
|
});
|
|
1136
1138
|
}
|
|
1137
1139
|
});
|
|
1138
|
-
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;
|
|
1139
1141
|
export default businessSlice.reducer;
|
|
1140
1142
|
export var businessSelector = function (state) { return state.business; };
|