@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]) {
|
|
@@ -45,94 +45,101 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
+
var t = {};
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
+
t[p] = s[p];
|
|
52
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
+
t[p[i]] = s[p[i]];
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
48
59
|
var _a;
|
|
49
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
61
|
import API from '../../../api';
|
|
51
|
-
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
62
|
+
import { BusinessType, FieldType, FlowsTypes } from '../../../@types';
|
|
52
63
|
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
53
64
|
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
54
65
|
import moment from 'moment';
|
|
55
66
|
import { convertNumbers2English } from '../../../utils';
|
|
56
|
-
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (countryIso2)
|
|
107
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
108
|
-
}
|
|
109
|
-
info = (boardInfoData || {}).info;
|
|
110
|
-
hasEntityCompleted = ((_b = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _b === void 0 ? void 0 : _b.status) === 'completed';
|
|
111
|
-
if (hasEntityCompleted) {
|
|
67
|
+
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
|
|
68
|
+
var token = _a.token, isInternally = _a.isInternally;
|
|
69
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
70
|
+
var payload, data, boardData, entityData, boardInfoData, entityTypes, countryIso2, board_id, entityId, info, hasEntityCompleted;
|
|
71
|
+
var _b, _c, _d, _e;
|
|
72
|
+
return __generator(this, function (_f) {
|
|
73
|
+
switch (_f.label) {
|
|
74
|
+
case 0:
|
|
75
|
+
payload = {
|
|
76
|
+
service_name: 'tap_email',
|
|
77
|
+
verify_token: token
|
|
78
|
+
};
|
|
79
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
80
|
+
case 1:
|
|
81
|
+
data = (_f.sent()).data;
|
|
82
|
+
countryIso2 = undefined;
|
|
83
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
|
|
84
|
+
if (isInternally)
|
|
85
|
+
data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
|
|
86
|
+
if (data === null || data === void 0 ? void 0 : data.country_code) {
|
|
87
|
+
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
88
|
+
if (countryIso2)
|
|
89
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
90
|
+
}
|
|
91
|
+
if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 9];
|
|
92
|
+
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
93
|
+
if (!board_id) return [3, 4];
|
|
94
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
95
|
+
case 2:
|
|
96
|
+
boardInfoData = _f.sent();
|
|
97
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
98
|
+
case 3:
|
|
99
|
+
boardData = _f.sent();
|
|
100
|
+
_f.label = 4;
|
|
101
|
+
case 4:
|
|
102
|
+
entityId = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.id;
|
|
103
|
+
if (!entityId) return [3, 6];
|
|
104
|
+
return [4, API.entityService.retrieveEntity(entityId)];
|
|
105
|
+
case 5:
|
|
106
|
+
entityData = _f.sent();
|
|
107
|
+
_f.label = 6;
|
|
108
|
+
case 6:
|
|
109
|
+
if (!countryIso2) {
|
|
110
|
+
countryIso2 = entityData.country;
|
|
111
|
+
if (countryIso2)
|
|
112
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
113
|
+
}
|
|
114
|
+
info = (boardInfoData || {}).info;
|
|
115
|
+
hasEntityCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
|
|
116
|
+
if (!hasEntityCompleted) return [3, 7];
|
|
112
117
|
thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
return [3, 9];
|
|
119
|
+
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
120
|
+
case 8:
|
|
121
|
+
entityTypes = _f.sent();
|
|
122
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
123
|
+
_f.label = 9;
|
|
124
|
+
case 9: return [2, {
|
|
125
|
+
data: data,
|
|
126
|
+
boardResponse: {
|
|
127
|
+
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
128
|
+
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
129
|
+
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
130
|
+
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
131
|
+
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
132
|
+
name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
|
|
133
|
+
contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
|
|
134
|
+
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
135
|
+
entityTypes: entityTypes
|
|
136
|
+
},
|
|
137
|
+
token: token
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
134
141
|
});
|
|
135
|
-
});
|
|
142
|
+
});
|
|
136
143
|
export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
144
|
var entity, payload, data;
|
|
138
145
|
return __generator(this, function (_a) {
|
|
@@ -151,7 +158,7 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
|
|
|
151
158
|
});
|
|
152
159
|
}); });
|
|
153
160
|
export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
154
|
-
var _a, entity, settings, responseBody, payload, data, boardData, entityData, boardInfoData, board_id,
|
|
161
|
+
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, board_id, entityId, info, hasEntityCompleted;
|
|
155
162
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
156
163
|
return __generator(this, function (_j) {
|
|
157
164
|
switch (_j.label) {
|
|
@@ -171,41 +178,32 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
171
178
|
boardInfoData = undefined;
|
|
172
179
|
if (!!data.errors) return [3, 9];
|
|
173
180
|
board_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.id;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
181
|
+
if (!board_id) return [3, 4];
|
|
182
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
177
183
|
case 2:
|
|
178
184
|
boardInfoData = _j.sent();
|
|
179
|
-
_j.label = 3;
|
|
180
|
-
case 3:
|
|
181
|
-
if (!board_id) return [3, 5];
|
|
182
185
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
183
|
-
case
|
|
186
|
+
case 3:
|
|
184
187
|
boardData = _j.sent();
|
|
185
|
-
_j.label =
|
|
186
|
-
case
|
|
188
|
+
_j.label = 4;
|
|
189
|
+
case 4:
|
|
187
190
|
entityId = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.id;
|
|
188
|
-
if (!entityId) return [3,
|
|
191
|
+
if (!entityId) return [3, 6];
|
|
189
192
|
return [4, API.entityService.retrieveEntity(entityId)];
|
|
190
|
-
case
|
|
193
|
+
case 5:
|
|
191
194
|
entityData = _j.sent();
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return [4, API.dataService.getActivities()];
|
|
195
|
-
case 7:
|
|
196
|
-
data_2 = _j.sent();
|
|
197
|
-
entityData = __assign(__assign({}, entityData), { entity_activities: data_2.list });
|
|
198
|
-
_j.label = 8;
|
|
199
|
-
case 8:
|
|
195
|
+
_j.label = 6;
|
|
196
|
+
case 6:
|
|
200
197
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
201
198
|
info = (boardInfoData || {}).info;
|
|
202
199
|
hasEntityCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
|
|
203
|
-
if (hasEntityCompleted)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
200
|
+
if (!hasEntityCompleted) return [3, 7];
|
|
201
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
202
|
+
return [3, 9];
|
|
203
|
+
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
204
|
+
case 8:
|
|
205
|
+
entityTypes = _j.sent();
|
|
206
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
209
207
|
_j.label = 9;
|
|
210
208
|
case 9: return [2, {
|
|
211
209
|
data: data,
|
|
@@ -217,8 +215,8 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
217
215
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
218
216
|
name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
|
|
219
217
|
contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
|
|
220
|
-
flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info,
|
|
221
|
-
|
|
218
|
+
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
219
|
+
entityTypes: entityTypes
|
|
222
220
|
},
|
|
223
221
|
formData: params
|
|
224
222
|
}];
|
|
@@ -239,50 +237,82 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
239
237
|
}
|
|
240
238
|
});
|
|
241
239
|
}); });
|
|
242
|
-
export var
|
|
243
|
-
var _a, settings, entity, id,
|
|
244
|
-
var
|
|
245
|
-
return __generator(this, function (
|
|
246
|
-
switch (
|
|
240
|
+
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
241
|
+
var _a, settings, entity, entityData, _b, id, data_status, articleId, issuingDate, expiryDate, isFL, isLegalNameEditable, isLicenseTypeEditable, isEntityTypeEditable, isLicenseNumberEditable, isUnifiedNumberEditable, isIssuingDateEditable, isExpiryDateEditable, payload, data, documentBody, _c, list;
|
|
242
|
+
var _d, _e, _f, _g, _h, _j, _k;
|
|
243
|
+
return __generator(this, function (_l) {
|
|
244
|
+
switch (_l.label) {
|
|
247
245
|
case 0:
|
|
248
246
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
articleId = entity.data.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
};
|
|
263
|
-
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
264
|
-
case 1:
|
|
265
|
-
brandData = (_j.sent()).data;
|
|
247
|
+
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
248
|
+
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
249
|
+
articleId = entity.data.entityNameData.articleId;
|
|
250
|
+
issuingDate = new Date(params.issuingDate).getTime();
|
|
251
|
+
expiryDate = new Date(params.expiryDate).getTime();
|
|
252
|
+
isFL = params.licenseType === BusinessType.FL;
|
|
253
|
+
isLegalNameEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.legal_name) === FieldType.EDITABLE;
|
|
254
|
+
isLicenseTypeEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _d === void 0 ? void 0 : _d.type) === FieldType.EDITABLE;
|
|
255
|
+
isEntityTypeEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.type) === FieldType.EDITABLE;
|
|
256
|
+
isLicenseNumberEditable = ((_e = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _e === void 0 ? void 0 : _e.number) === FieldType.EDITABLE;
|
|
257
|
+
isUnifiedNumberEditable = ((_f = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _f === void 0 ? void 0 : _f.additional_info) === FieldType.EDITABLE;
|
|
258
|
+
isIssuingDateEditable = ((_g = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _g === void 0 ? void 0 : _g.issuing_date) === FieldType.EDITABLE;
|
|
259
|
+
isExpiryDateEditable = ((_h = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _h === void 0 ? void 0 : _h.expiry_date) === FieldType.EDITABLE;
|
|
266
260
|
payload = {
|
|
267
261
|
id: id,
|
|
262
|
+
AOA_file_id: articleId,
|
|
268
263
|
license: {
|
|
269
|
-
number: params.licenseNumber
|
|
270
|
-
type:
|
|
264
|
+
number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
|
|
265
|
+
type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
|
|
266
|
+
issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
|
|
267
|
+
expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
|
|
268
|
+
additional_info: isUnifiedNumberEditable && params.unifiedNumber
|
|
269
|
+
? {
|
|
270
|
+
unified_number: params.unifiedNumber
|
|
271
|
+
}
|
|
272
|
+
: undefined
|
|
271
273
|
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
type: isEntityTypeEditable && params.entityType ? params.entityType : undefined,
|
|
275
|
+
legal_name: isLegalNameEditable && params.legalName
|
|
276
|
+
? {
|
|
277
|
+
ar: params.legalName,
|
|
278
|
+
en: params.legalName
|
|
279
|
+
}
|
|
280
|
+
: undefined,
|
|
281
|
+
encryption_contract: [
|
|
282
|
+
'license.number',
|
|
283
|
+
'legal_name.ar',
|
|
284
|
+
'legal_name.en',
|
|
285
|
+
'license.type',
|
|
286
|
+
'license.issuing_date',
|
|
287
|
+
'license.expiry_date',
|
|
288
|
+
'license.additional_info.unified_number',
|
|
289
|
+
'type'
|
|
290
|
+
]
|
|
278
291
|
};
|
|
279
292
|
return [4, API.entityService.updateEntity(payload)];
|
|
293
|
+
case 1:
|
|
294
|
+
data = _l.sent();
|
|
295
|
+
if (!((params.certificateId || []).length > 0)) return [3, 3];
|
|
296
|
+
documentBody = {
|
|
297
|
+
entity_id: id || '',
|
|
298
|
+
documents: [
|
|
299
|
+
{
|
|
300
|
+
images: params.certificateId
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
};
|
|
304
|
+
_c = data;
|
|
305
|
+
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
280
306
|
case 2:
|
|
281
|
-
|
|
282
|
-
|
|
307
|
+
_c.documentData = _l.sent();
|
|
308
|
+
_l.label = 3;
|
|
309
|
+
case 3: return [4, API.dataService.getActivities()];
|
|
310
|
+
case 4:
|
|
311
|
+
list = (_l.sent()).list;
|
|
312
|
+
data.activityList = list;
|
|
283
313
|
thunkApi.dispatch(handleNextScreenStep());
|
|
284
|
-
(
|
|
285
|
-
return [2, { data:
|
|
314
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, id);
|
|
315
|
+
return [2, { data: data, formData: params }];
|
|
286
316
|
}
|
|
287
317
|
});
|
|
288
318
|
}); });
|
|
@@ -299,7 +329,7 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
|
|
|
299
329
|
uploadPayload = {
|
|
300
330
|
file_link_create: true,
|
|
301
331
|
title: file === null || file === void 0 ? void 0 : file.name,
|
|
302
|
-
purpose: '
|
|
332
|
+
purpose: 'article_of_association',
|
|
303
333
|
type: type,
|
|
304
334
|
file: file
|
|
305
335
|
};
|
|
@@ -307,7 +337,7 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
|
|
|
307
337
|
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
308
338
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
309
339
|
};
|
|
310
|
-
return [4, API.
|
|
340
|
+
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
311
341
|
case 1:
|
|
312
342
|
data = _c.sent();
|
|
313
343
|
return [2, { data: data }];
|
|
@@ -315,68 +345,45 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
|
|
|
315
345
|
});
|
|
316
346
|
});
|
|
317
347
|
});
|
|
318
|
-
export var
|
|
319
|
-
var _a, settings, entity, id,
|
|
320
|
-
var
|
|
348
|
+
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
349
|
+
var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
|
|
350
|
+
var _c, _d, _e, _f, _g;
|
|
321
351
|
return __generator(this, function (_h) {
|
|
322
352
|
switch (_h.label) {
|
|
323
353
|
case 0:
|
|
324
354
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
sales: sales,
|
|
335
|
-
start_date: entity.data.entityData.operationStartDate
|
|
336
|
-
},
|
|
337
|
-
term: ['refund', 'chargeback'],
|
|
355
|
+
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
356
|
+
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
357
|
+
isCapitalPaidEditable = ((_c = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _c === void 0 ? void 0 : _c.paid) === FieldType.EDITABLE;
|
|
358
|
+
isCapitalShareEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _d === void 0 ? void 0 : _d.shares) === FieldType.EDITABLE;
|
|
359
|
+
activities = (_e = (params.activities || [])) === null || _e === void 0 ? void 0 : _e.map(function (_a) {
|
|
360
|
+
var id = _a.id;
|
|
361
|
+
return ({ id: id, action: 'add' });
|
|
362
|
+
});
|
|
363
|
+
payload = {
|
|
338
364
|
id: id,
|
|
339
|
-
|
|
365
|
+
activities: (activities === null || activities === void 0 ? void 0 : activities.length) > 0 ? activities : undefined,
|
|
366
|
+
capital: {
|
|
367
|
+
paid: isCapitalPaidEditable ? params.capitalPaid : undefined,
|
|
368
|
+
shares: isCapitalShareEditable
|
|
369
|
+
? {
|
|
370
|
+
count: params.capitalShareCount,
|
|
371
|
+
value: params.capitalShareValue
|
|
372
|
+
}
|
|
373
|
+
: undefined
|
|
374
|
+
}
|
|
340
375
|
};
|
|
341
|
-
return [4, API.
|
|
376
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
342
377
|
case 1:
|
|
343
378
|
data = _h.sent();
|
|
344
379
|
thunkApi.dispatch(handleNextScreenStep());
|
|
345
|
-
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name,
|
|
346
|
-
return [2, { data: data
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
}); });
|
|
350
|
-
export var retrieveDataList = createAsyncThunk('entityRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
351
|
-
var settings, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
|
|
352
|
-
return __generator(this, function (_b) {
|
|
353
|
-
switch (_b.label) {
|
|
354
|
-
case 0:
|
|
355
|
-
settings = thunkApi.getState().settings;
|
|
356
|
-
dataBody = {
|
|
357
|
-
page: 0
|
|
358
|
-
};
|
|
359
|
-
salesDataBody = {
|
|
360
|
-
page: 0,
|
|
361
|
-
country_code: [settings.data.businessCountry.iso2]
|
|
362
|
-
};
|
|
363
|
-
return [4, Promise.all([
|
|
364
|
-
API.dataService.getCustomerBases(dataBody),
|
|
365
|
-
API.dataService.getExpectedSales(salesDataBody),
|
|
366
|
-
API.dataService.getExpectedCustomerSales(dataBody)
|
|
367
|
-
])];
|
|
368
|
-
case 1:
|
|
369
|
-
_a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
|
|
370
|
-
return [2, {
|
|
371
|
-
customerBases: customerBases,
|
|
372
|
-
expectedSales: expectedSales,
|
|
373
|
-
expectedCustomerSales: expectedCustomerSales
|
|
374
|
-
}];
|
|
380
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, id);
|
|
381
|
+
return [2, { data: data, formData: params }];
|
|
375
382
|
}
|
|
376
383
|
});
|
|
377
384
|
}); });
|
|
378
385
|
export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
379
|
-
var _a, settings, entity, _b, id, infoId, payload, data;
|
|
386
|
+
var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
|
|
380
387
|
var _c, _d, _e, _f;
|
|
381
388
|
return __generator(this, function (_g) {
|
|
382
389
|
switch (_g.label) {
|
|
@@ -393,13 +400,16 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
|
|
|
393
400
|
return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
|
|
394
401
|
case 1:
|
|
395
402
|
data = _g.sent();
|
|
396
|
-
return [4,
|
|
403
|
+
return [4, API.boardService.retrieveBoardInfoStatus(id)];
|
|
397
404
|
case 2:
|
|
405
|
+
boardInfoData = _g.sent();
|
|
406
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
|
|
407
|
+
case 3:
|
|
398
408
|
_g.sent();
|
|
399
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name,
|
|
409
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
400
410
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
401
411
|
thunkApi.dispatch(handleNextScreenStep());
|
|
402
|
-
return [2, { response: __assign(__assign({}, data), { flows:
|
|
412
|
+
return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
|
|
403
413
|
}
|
|
404
414
|
});
|
|
405
415
|
}); });
|
|
@@ -408,6 +418,8 @@ var initialState = {
|
|
|
408
418
|
loading: false,
|
|
409
419
|
customLoading: false,
|
|
410
420
|
uploading: false,
|
|
421
|
+
uploadingArticle: false,
|
|
422
|
+
uploadingArticleError: null,
|
|
411
423
|
data: {
|
|
412
424
|
flowName: FlowsTypes.ENTITY,
|
|
413
425
|
verify: {
|
|
@@ -416,20 +428,20 @@ var initialState = {
|
|
|
416
428
|
otpData: {
|
|
417
429
|
otp: ''
|
|
418
430
|
},
|
|
419
|
-
|
|
420
|
-
|
|
431
|
+
entityNameData: {
|
|
432
|
+
legalName: '',
|
|
421
433
|
licenseNumber: '',
|
|
422
|
-
licenseType:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
434
|
+
licenseType: '',
|
|
435
|
+
entityType: '',
|
|
436
|
+
issuingDate: '',
|
|
437
|
+
expiryDate: '',
|
|
438
|
+
unifiedNumber: ''
|
|
426
439
|
},
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
transactionPolicy: false
|
|
440
|
+
entityCapitalData: {
|
|
441
|
+
activities: [],
|
|
442
|
+
capitalPaid: '',
|
|
443
|
+
capitalShareCount: '',
|
|
444
|
+
capitalShareValue: ''
|
|
433
445
|
}
|
|
434
446
|
}
|
|
435
447
|
};
|
|
@@ -445,6 +457,12 @@ export var entitySlice = createSlice({
|
|
|
445
457
|
},
|
|
446
458
|
resetOTPScreen: function (state) {
|
|
447
459
|
state.data.otpData.otp = '';
|
|
460
|
+
},
|
|
461
|
+
uploadingStatus: function (state, action) {
|
|
462
|
+
state.uploading = action.payload;
|
|
463
|
+
},
|
|
464
|
+
clearArticleId: function (state) {
|
|
465
|
+
state.data.entityNameData.articleId = '';
|
|
448
466
|
}
|
|
449
467
|
},
|
|
450
468
|
extraReducers: function (builder) {
|
|
@@ -454,10 +472,10 @@ export var entitySlice = createSlice({
|
|
|
454
472
|
state.customLoading = true;
|
|
455
473
|
})
|
|
456
474
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
457
|
-
var _a, _b, _c, _d
|
|
475
|
+
var _a, _b, _c, _d;
|
|
458
476
|
state.error = null;
|
|
459
477
|
state.customLoading = false;
|
|
460
|
-
var
|
|
478
|
+
var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
|
|
461
479
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
462
480
|
if (description) {
|
|
463
481
|
state.error = description;
|
|
@@ -465,29 +483,49 @@ export var entitySlice = createSlice({
|
|
|
465
483
|
}
|
|
466
484
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
|
|
467
485
|
state.data.verify.token = token;
|
|
468
|
-
var
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
var
|
|
476
|
-
var
|
|
477
|
-
|
|
486
|
+
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
487
|
+
if (entity) {
|
|
488
|
+
var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
|
|
489
|
+
var legalName = legal_name;
|
|
490
|
+
var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
|
|
491
|
+
var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
|
|
492
|
+
var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
|
|
493
|
+
var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
|
|
494
|
+
var _h = capital || {}, paid = _h.paid, shares = _h.shares;
|
|
495
|
+
var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
|
|
496
|
+
var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
|
|
497
|
+
var issuingDate = void 0, expiryDate = undefined;
|
|
498
|
+
if (entityIssueDate) {
|
|
499
|
+
var date = new Date(entityIssueDate);
|
|
500
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
501
|
+
issuingDate = convertNumbers2English(formattedDate);
|
|
502
|
+
}
|
|
503
|
+
if (entityExpiredDate) {
|
|
504
|
+
var date = new Date(entityExpiredDate);
|
|
505
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
506
|
+
expiryDate = convertNumbers2English(formattedDate);
|
|
507
|
+
}
|
|
508
|
+
if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
|
|
509
|
+
state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
|
|
510
|
+
if (licenseNumber)
|
|
511
|
+
state.data.entityNameData.licenseNumber = licenseNumber;
|
|
512
|
+
if (unifiedNumber)
|
|
513
|
+
state.data.entityNameData.unifiedNumber = unifiedNumber;
|
|
514
|
+
state.data.entityNameData.licenseType = licenseType;
|
|
515
|
+
if (entityType)
|
|
516
|
+
state.data.entityNameData.entityType = entityType;
|
|
517
|
+
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
518
|
+
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
519
|
+
if (activities)
|
|
520
|
+
state.data.entityCapitalData.activities = activities;
|
|
521
|
+
if (paid)
|
|
522
|
+
state.data.entityCapitalData.capitalPaid = paid;
|
|
523
|
+
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
524
|
+
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
525
|
+
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
526
|
+
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
527
|
+
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id });
|
|
478
528
|
}
|
|
479
|
-
if (licenseNumber)
|
|
480
|
-
state.data.entityData.licenseNumber = licenseNumber;
|
|
481
|
-
if (licenseType)
|
|
482
|
-
state.data.entityData.licenseType = licenseType;
|
|
483
|
-
var activities = (entity === null || entity === void 0 ? void 0 : entity.activities) || entity_activities || [];
|
|
484
|
-
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
485
|
-
var _a;
|
|
486
|
-
return (_a = brand === null || brand === void 0 ? void 0 : brand.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === activity.id; });
|
|
487
|
-
});
|
|
488
|
-
var defaultActivities = (activities === null || activities === void 0 ? void 0 : activities.length) ? [activities[0]] : [];
|
|
489
|
-
state.data.entityData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
|
|
490
|
-
state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities, operationStartDate: startDate || issuingDate, selectedActivities: (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities });
|
|
491
529
|
})
|
|
492
530
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
493
531
|
state.error = action.error.message;
|
|
@@ -515,10 +553,10 @@ export var entitySlice = createSlice({
|
|
|
515
553
|
state.error = null;
|
|
516
554
|
})
|
|
517
555
|
.addCase(verifyEntityLeadOTP.fulfilled, function (state, action) {
|
|
518
|
-
var _a, _b, _c, _d
|
|
556
|
+
var _a, _b, _c, _d;
|
|
519
557
|
state.loading = false;
|
|
520
558
|
state.error = null;
|
|
521
|
-
var
|
|
559
|
+
var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData;
|
|
522
560
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
523
561
|
if (description) {
|
|
524
562
|
state.error = description;
|
|
@@ -527,133 +565,113 @@ export var entitySlice = createSlice({
|
|
|
527
565
|
state.data.otpData = formData;
|
|
528
566
|
state.data.otpData.responseBody = data;
|
|
529
567
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
|
|
530
|
-
var
|
|
531
|
-
var
|
|
532
|
-
var
|
|
533
|
-
var
|
|
534
|
-
var
|
|
535
|
-
var
|
|
536
|
-
|
|
537
|
-
|
|
568
|
+
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
569
|
+
var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
|
|
570
|
+
var legalName = legal_name;
|
|
571
|
+
var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
|
|
572
|
+
var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
|
|
573
|
+
var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
|
|
574
|
+
var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
|
|
575
|
+
var _h = capital || {}, paid = _h.paid, shares = _h.shares;
|
|
576
|
+
var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
|
|
577
|
+
var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
|
|
578
|
+
var issuingDate, expiryDate = undefined;
|
|
579
|
+
if (entityIssueDate) {
|
|
580
|
+
var date = new Date(entityIssueDate);
|
|
538
581
|
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
539
582
|
issuingDate = convertNumbers2English(formattedDate);
|
|
540
583
|
}
|
|
584
|
+
if (entityExpiredDate) {
|
|
585
|
+
var date = new Date(entityExpiredDate);
|
|
586
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
587
|
+
expiryDate = convertNumbers2English(formattedDate);
|
|
588
|
+
}
|
|
589
|
+
if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
|
|
590
|
+
state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
|
|
541
591
|
if (licenseNumber)
|
|
542
|
-
state.data.
|
|
543
|
-
if (
|
|
544
|
-
state.data.
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
592
|
+
state.data.entityNameData.licenseNumber = licenseNumber;
|
|
593
|
+
if (unifiedNumber)
|
|
594
|
+
state.data.entityNameData.unifiedNumber = unifiedNumber;
|
|
595
|
+
state.data.entityNameData.licenseType = licenseType;
|
|
596
|
+
if (entityType)
|
|
597
|
+
state.data.entityNameData.entityType = entityType;
|
|
598
|
+
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
599
|
+
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
600
|
+
if (activities)
|
|
601
|
+
state.data.entityCapitalData.activities = activities;
|
|
602
|
+
if (paid)
|
|
603
|
+
state.data.entityCapitalData.capitalPaid = paid;
|
|
604
|
+
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
605
|
+
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
606
|
+
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
607
|
+
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
608
|
+
state.data.entityNameData = __assign(__assign({}, state.data.entityNameData), { responseBody: __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id }) });
|
|
552
609
|
})
|
|
553
610
|
.addCase(verifyEntityLeadOTP.rejected, function (state, action) {
|
|
554
611
|
state.loading = false;
|
|
555
612
|
state.error = action.error.message;
|
|
556
613
|
})
|
|
557
|
-
.addCase(
|
|
614
|
+
.addCase(updateEntityName.pending, function (state) {
|
|
558
615
|
state.loading = true;
|
|
559
616
|
state.error = null;
|
|
560
617
|
})
|
|
561
|
-
.addCase(
|
|
562
|
-
var _a;
|
|
618
|
+
.addCase(updateEntityName.fulfilled, function (state, action) {
|
|
563
619
|
state.loading = false;
|
|
564
620
|
state.error = null;
|
|
565
|
-
var
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { data: data });
|
|
621
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
622
|
+
var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
|
|
623
|
+
state.data.entityNameData = formData;
|
|
624
|
+
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
|
|
625
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activityList: activityList });
|
|
626
|
+
if (rest === null || rest === void 0 ? void 0 : rest.activities)
|
|
627
|
+
state.data.entityCapitalData = __assign(__assign({}, state.data.entityCapitalData), { activities: rest === null || rest === void 0 ? void 0 : rest.activities });
|
|
573
628
|
})
|
|
574
|
-
.addCase(
|
|
629
|
+
.addCase(updateEntityName.rejected, function (state, action) {
|
|
575
630
|
state.loading = false;
|
|
576
631
|
state.error = action.error.message;
|
|
577
632
|
})
|
|
578
|
-
.addCase(
|
|
579
|
-
state.
|
|
580
|
-
state.
|
|
633
|
+
.addCase(uploadArticle.pending, function (state) {
|
|
634
|
+
state.uploadingArticleError = null;
|
|
635
|
+
state.uploadingArticle = true;
|
|
581
636
|
})
|
|
582
|
-
.addCase(
|
|
583
|
-
state.
|
|
584
|
-
state.
|
|
585
|
-
var data =
|
|
586
|
-
state.data.
|
|
637
|
+
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
638
|
+
state.uploadingArticleError = null;
|
|
639
|
+
state.uploadingArticle = false;
|
|
640
|
+
var data = action.payload.data;
|
|
641
|
+
state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
587
642
|
})
|
|
588
|
-
.addCase(
|
|
589
|
-
state.
|
|
590
|
-
state.
|
|
643
|
+
.addCase(uploadArticle.rejected, function (state) {
|
|
644
|
+
state.uploadingArticle = false;
|
|
645
|
+
state.uploadingArticleError = 'file_upload_article_error';
|
|
591
646
|
})
|
|
592
|
-
.addCase(
|
|
647
|
+
.addCase(updateEntityCapital.pending, function (state) {
|
|
593
648
|
state.loading = true;
|
|
594
649
|
state.error = null;
|
|
595
650
|
})
|
|
596
|
-
.addCase(
|
|
597
|
-
var _a, _b, _c, _d, _e, _f;
|
|
651
|
+
.addCase(updateEntityCapital.fulfilled, function (state, action) {
|
|
598
652
|
state.loading = false;
|
|
599
653
|
state.error = null;
|
|
600
|
-
var
|
|
601
|
-
state.data.
|
|
602
|
-
|
|
603
|
-
var _g = (brand === null || brand === void 0 ? void 0 : brand.operations) || {}, customer_base = _g.customer_base, sales = _g.sales;
|
|
604
|
-
var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
|
|
605
|
-
var customerBase = undefined;
|
|
606
|
-
if ((customerBases === null || customerBases === void 0 ? void 0 : customerBases.length) > 1)
|
|
607
|
-
customerBase = [customerBases === null || customerBases === void 0 ? void 0 : customerBases[1], customerBases[0]];
|
|
608
|
-
else if ((customerBases === null || customerBases === void 0 ? void 0 : customerBases.length) === 1)
|
|
609
|
-
customerBase = [customerBases[0]];
|
|
610
|
-
if (((_b = customer_base === null || customer_base === void 0 ? void 0 : customer_base.locations) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
611
|
-
customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases.filter(function (base) {
|
|
612
|
-
var _a;
|
|
613
|
-
return (_a = customer_base === null || customer_base === void 0 ? void 0 : customer_base.locations) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === base.id; });
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
var expectedSales = ((_c = payload.expectedSales) === null || _c === void 0 ? void 0 : _c.list) || [];
|
|
617
|
-
var expectedSale = (_e = (_d = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _d === void 0 ? void 0 : _d.sub) === null || _e === void 0 ? void 0 : _e[4];
|
|
618
|
-
if ((sales === null || sales === void 0 ? void 0 : sales.length) > 0) {
|
|
619
|
-
expectedSale = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.find(function (sale) {
|
|
620
|
-
var _a;
|
|
621
|
-
return (_a = sales === null || sales === void 0 ? void 0 : sales.sub) === null || _a === void 0 ? void 0 : _a.find(function (s) { return s.id === sale.id; });
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
var expectedCustomerSales = ((_f = payload.expectedCustomerSales) === null || _f === void 0 ? void 0 : _f.list) || [];
|
|
625
|
-
var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
|
|
626
|
-
if ((customer_base === null || customer_base === void 0 ? void 0 : customer_base.length) > 0) {
|
|
627
|
-
expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales.find(function (base) {
|
|
628
|
-
return customer_base.id === base.id;
|
|
629
|
-
});
|
|
630
|
-
}
|
|
631
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
632
|
-
if (!!customerBase)
|
|
633
|
-
state.data.customersData.customerLocations = customerBase;
|
|
634
|
-
if (!!expectedSale)
|
|
635
|
-
state.data.customersData.expectedSale = expectedSale;
|
|
636
|
-
if (!!expectedCustomerSale)
|
|
637
|
-
state.data.customersData.expectedCustomer = expectedCustomerSale;
|
|
654
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
655
|
+
state.data.entityCapitalData = formData;
|
|
656
|
+
state.data.entityCapitalData.responseBody = __assign(__assign({}, state.data.entityCapitalData.responseBody), { data: data });
|
|
638
657
|
})
|
|
639
|
-
.addCase(
|
|
658
|
+
.addCase(updateEntityCapital.rejected, function (state, action) {
|
|
640
659
|
state.loading = false;
|
|
641
660
|
state.error = action.error.message;
|
|
642
661
|
})
|
|
643
|
-
.addCase(
|
|
644
|
-
state.loading = true;
|
|
662
|
+
.addCase(retrieveBoardDetails.pending, function (state) {
|
|
645
663
|
state.error = null;
|
|
664
|
+
state.loading = true;
|
|
646
665
|
})
|
|
647
|
-
.addCase(
|
|
648
|
-
state.loading = false;
|
|
666
|
+
.addCase(retrieveBoardDetails.fulfilled, function (state, action) {
|
|
649
667
|
state.error = null;
|
|
650
|
-
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
651
|
-
state.data.customersData = formData;
|
|
652
|
-
state.data.customersData.responseBody = data;
|
|
653
|
-
})
|
|
654
|
-
.addCase(updateCustomersInfo.rejected, function (state, action) {
|
|
655
668
|
state.loading = false;
|
|
669
|
+
var data = (action.payload || {}).data;
|
|
670
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
671
|
+
})
|
|
672
|
+
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
656
673
|
state.error = action.error.message;
|
|
674
|
+
state.loading = false;
|
|
657
675
|
})
|
|
658
676
|
.addCase(updateBoardSuccess.fulfilled, function (state, action) {
|
|
659
677
|
var _a;
|
|
@@ -675,23 +693,9 @@ export var entitySlice = createSlice({
|
|
|
675
693
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
676
694
|
state.loading = false;
|
|
677
695
|
state.error = action.error.message;
|
|
678
|
-
})
|
|
679
|
-
.addCase(uploadArticle.pending, function (state) {
|
|
680
|
-
state.error = null;
|
|
681
|
-
state.uploading = true;
|
|
682
|
-
})
|
|
683
|
-
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
684
|
-
state.error = null;
|
|
685
|
-
state.uploading = false;
|
|
686
|
-
var data = action.payload.data;
|
|
687
|
-
state.data.entityData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
688
|
-
})
|
|
689
|
-
.addCase(uploadArticle.rejected, function (state) {
|
|
690
|
-
state.uploading = false;
|
|
691
|
-
state.error = 'file_upload_error';
|
|
692
696
|
});
|
|
693
697
|
}
|
|
694
698
|
});
|
|
695
|
-
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
|
|
699
|
+
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, clearArticleId = _a.clearArticleId;
|
|
696
700
|
export default entitySlice.reducer;
|
|
697
701
|
export var entitySelector = function (state) { return state.entity; };
|