@tap-payments/auth-jsconnect 2.3.7-test → 2.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +303 -1
- package/build/@types/app.js +17 -0
- package/build/@types/form.d.ts +10 -7
- package/build/@types/redux.d.ts +4 -0
- package/build/@types/user.d.ts +39 -3
- package/build/api/brand.d.ts +7 -0
- package/build/api/brand.js +10 -1
- package/build/api/data.d.ts +8 -0
- package/build/api/data.js +34 -2
- package/build/api/entity.d.ts +20 -5
- package/build/api/entity.js +26 -1
- package/build/api/index.d.ts +29 -5
- package/build/api/index.js +3 -1
- package/build/api/individual.d.ts +24 -6
- package/build/api/individual.js +9 -1
- package/build/api/init.d.ts +17 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +8 -1
- package/build/api/lead.js +9 -1
- package/build/app/settings.d.ts +12 -9
- package/build/app/settings.js +77 -34
- package/build/assets/locales/ar.json +28 -1
- package/build/assets/locales/en.json +28 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +43 -19
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +45 -23
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/components/ArabicDatePicker/style.css +45 -5
- package/build/components/DatePicker/DatePicker.d.ts +4 -1
- package/build/components/DatePicker/DatePicker.js +27 -17
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
- package/build/components/RadioGroup/RadioGroup.js +5 -9
- package/build/components/RadioGroup/index.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.d.ts +5 -2
- package/build/components/SimpleList/SimpleList.js +31 -11
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +7 -0
- package/build/constants/api.js +14 -1
- package/build/constants/app.d.ts +18 -0
- package/build/constants/app.js +80 -52
- package/build/constants/assets.d.ts +9 -0
- package/build/constants/assets.js +9 -0
- package/build/constants/validation.d.ts +3 -2
- package/build/constants/validation.js +3 -2
- package/build/features/app/bank/bankStore.d.ts +7 -3
- package/build/features/app/bank/bankStore.js +155 -115
- package/build/features/app/brand/brandStore.d.ts +32 -12
- package/build/features/app/brand/brandStore.js +384 -203
- package/build/features/app/business/businessStore.d.ts +16 -13
- package/build/features/app/business/businessStore.js +366 -297
- package/build/features/app/connect/connectStore.d.ts +15 -1
- package/build/features/app/connect/connectStore.js +292 -95
- package/build/features/app/connectExpress/connectExpressStore.d.ts +17 -3
- package/build/features/app/connectExpress/connectExpressStore.js +232 -100
- package/build/features/app/entity/entityStore.d.ts +15 -17
- package/build/features/app/entity/entityStore.js +279 -248
- package/build/features/app/individual/individualStore.d.ts +22 -10
- package/build/features/app/individual/individualStore.js +531 -418
- package/build/features/app/password/passwordStore.d.ts +4 -0
- package/build/features/app/password/passwordStore.js +99 -43
- package/build/features/app/tax/taxStore.d.ts +6 -2
- package/build/features/app/tax/taxStore.js +143 -101
- package/build/features/bank/Bank.js +10 -6
- package/build/features/bank/screens/BankDetails/BankDetails.js +43 -17
- package/build/features/bank/screens/BankDetails/BankName.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankName.js +9 -9
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +6 -10
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +6 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -5
- package/build/features/bank/screens/BankDetails/validation.d.ts +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +6 -17
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/bank/screens/Verify/OTPInput.js +7 -3
- package/build/features/bank/screens/Verify/Verify.js +3 -7
- package/build/features/brand/Brand.js +10 -6
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +10 -27
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +45 -28
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +42 -9
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +11 -38
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +22 -31
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +24 -20
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +31 -19
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +13 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +23 -12
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +14 -2
- package/build/features/brand/screens/BrandActivities/TAC.js +21 -12
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +4 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +18 -4
- package/build/features/brand/screens/BrandActivities/validation.d.ts +43 -43
- package/build/features/brand/screens/BrandActivities/validation.js +11 -25
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +40 -33
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +41 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +3 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +4 -7
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +19 -25
- package/build/features/brand/screens/BrandInfo/validation.d.ts +7 -13
- package/build/features/brand/screens/BrandInfo/validation.js +43 -53
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +103 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +69 -0
- package/build/features/{connect/screens/Merchant → brand/screens/BrandSegmentInfo}/TeamSize.d.ts +3 -1
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +20 -25
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/brand/screens/Verify/OTPInput.js +7 -3
- package/build/features/brand/screens/Verify/Verify.js +9 -22
- package/build/features/business/Business.js +7 -5
- package/build/features/business/screens/Activities/Activities.js +2 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +15 -68
- package/build/features/business/screens/Activities/ActivitiesList.js +226 -98
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
- package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/Header.js +49 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
- package/build/features/{brand/screens/BrandActivities/OperationStartDate.d.ts → business/screens/BrandDetails/SalesChannel.d.ts} +5 -7
- package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
- package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
- package/build/features/business/screens/BrandDetails/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.d.ts +3 -1
- package/build/features/business/screens/BusinessType/Article.js +19 -54
- package/build/features/business/screens/BusinessType/BusinessType.js +36 -12
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +129 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -7
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +7 -22
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +7 -5
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/CivilID/CivilID.js +2 -1
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +44 -37
- package/build/features/business/screens/Customers/CustomerLocations.js +35 -19
- package/build/features/business/screens/Customers/Customers.js +29 -17
- package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +15 -4
- package/build/features/business/screens/Customers/TransactionPolicy.js +19 -9
- package/build/features/business/screens/IDBOD/DOB.js +3 -3
- package/build/features/business/screens/IDBOD/ID.js +2 -3
- package/build/features/business/screens/IDBOD/IDBOD.js +2 -1
- package/build/features/business/screens/OTP/OTP.js +2 -2
- package/build/features/business/screens/OTP/OTPInput.js +5 -2
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/business/screens/Verify/OTPInput.js +7 -3
- package/build/features/business/screens/Verify/Verify.js +2 -2
- package/build/features/connect/Connect.d.ts +2 -0
- package/build/features/connect/Connect.js +86 -11
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +8 -0
- package/build/features/connect/screens/{Merchant/Segments.js → BrandSegment/SegmentLocations.js} +17 -25
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +8 -0
- package/build/features/{brand/screens/BrandInfo/Segments.js → connect/screens/BrandSegment/SegmentProfits.js} +18 -26
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +66 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +12 -20
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
- package/build/features/connect/screens/BrandSegment/validation.js +9 -0
- package/build/features/connect/screens/CivilID/CivilID.js +7 -14
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +17 -27
- package/build/features/connect/screens/Individual/Individual.js +9 -2
- package/build/features/connect/screens/Individual/MobileNumber.js +16 -15
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.js +4 -7
- package/build/features/connect/screens/Merchant/Merchant.js +14 -16
- package/build/features/connect/screens/Merchant/SalesChannels.js +6 -6
- package/build/features/connect/screens/Merchant/validation.d.ts +3 -6
- package/build/features/connect/screens/Merchant/validation.js +14 -17
- package/build/features/connect/screens/Mobile/Mobile.js +14 -17
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -10
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +12 -2
- package/build/features/connect/screens/OTP/OTP.js +14 -16
- package/build/features/connect/screens/OTP/OTPInput.js +14 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -0
- package/build/features/connectExpress/ConnectExpress.js +72 -12
- package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +2 -1
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -1
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +9 -14
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +4 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -10
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +4 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +12 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -14
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +3 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +3 -3
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +5 -3
- package/build/features/connectExpress/screens/Mobile/Mobile.js +6 -4
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +2 -1
- package/build/features/connectExpress/screens/Mobile/TAC.js +3 -1
- package/build/features/connectExpress/screens/NID/DOB.d.ts +2 -1
- package/build/features/connectExpress/screens/NID/DOB.js +3 -3
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +3 -4
- package/build/features/connectExpress/screens/NID/NID.js +6 -3
- package/build/features/connectExpress/screens/NID/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/NID/TAC.js +9 -10
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +2 -3
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +3 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.js +6 -4
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +10 -6
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +16 -68
- package/build/features/entity/screens/EntityCapital/ActivityList.js +221 -106
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +14 -15
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +10 -11
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +15 -16
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +31 -20
- package/build/features/entity/screens/EntityCapital/validation.d.ts +175 -40
- package/build/features/entity/screens/EntityCapital/validation.js +9 -12
- package/build/features/entity/screens/EntityName/Article.d.ts +5 -1
- package/build/features/entity/screens/EntityName/Article.js +20 -54
- package/build/features/entity/screens/EntityName/EntityName.js +60 -16
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +11 -27
- package/build/features/entity/screens/EntityName/EntityTypeList.js +32 -43
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -5
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -3
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LegalName.js +9 -6
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +4 -1
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +12 -7
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +13 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +9 -7
- package/build/features/entity/screens/EntityName/validation.d.ts +35 -35
- package/build/features/entity/screens/EntityName/validation.js +68 -93
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/entity/screens/Verify/OTPInput.js +7 -3
- package/build/features/entity/screens/Verify/Verify.js +9 -22
- package/build/features/featuresScreens.js +13 -1
- package/build/features/individual/Individual.js +10 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +28 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +3 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +17 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +30 -41
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +94 -55
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +17 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +9 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +13 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +13 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +32 -42
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +8 -12
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/MobileNumber.js +0 -1
- package/build/features/individual/screens/IndividualList/UserList.js +10 -6
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +14 -20
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +8 -14
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +5 -7
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +5 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -36
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +14 -16
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -21
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +7 -3
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/individual/screens/Verify/OTPInput.js +7 -3
- package/build/features/individual/screens/Verify/Verify.js +3 -7
- package/build/features/password/Password.js +7 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +12 -18
- package/build/features/password/screens/OTP/OTP.js +2 -2
- package/build/features/password/screens/OTP/OTPInput.js +5 -2
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/password/screens/Verify/OTPInput.js +7 -3
- package/build/features/password/screens/Verify/Verify.js +9 -22
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/CountryList.js +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/Button/Button.d.ts +3 -1
- package/build/features/shared/Button/Button.js +2 -2
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.js +22 -20
- package/build/features/shared/Button/IndividualActionButtons.d.ts +3 -1
- package/build/features/shared/Button/IndividualActionButtons.js +28 -4
- package/build/features/shared/Calender/Calender.d.ts +13 -0
- package/build/features/shared/Calender/Calender.js +56 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Chip/Chip.d.ts +3 -0
- package/build/features/shared/Chip/Chip.js +21 -0
- package/build/features/shared/Chip/index.d.ts +2 -0
- package/build/features/shared/Chip/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +8 -0
- package/build/features/shared/Dot/Dot.js +29 -0
- package/build/features/shared/Dot/index.d.ts +2 -0
- package/build/features/shared/Dot/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
- package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
- package/build/features/shared/EndAdornment/index.d.ts +3 -0
- package/build/features/shared/EndAdornment/index.js +3 -0
- package/build/features/shared/Footer/Footer.js +8 -0
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/GenericError/GenericError.js +1 -1
- package/build/features/shared/Input/Input.d.ts +5 -6
- package/build/features/shared/Input/Input.js +2 -3
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +3 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +8 -6
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +3 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +9 -4
- package/build/features/shared/Search/Search.d.ts +2 -1
- package/build/features/shared/Search/Search.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +19 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/FileUpload.d.ts +32 -0
- package/build/features/shared/UploadFile/FileUpload.js +267 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.js +7 -7
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +36 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +4 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.js +15 -12
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +4 -2
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +4 -4
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/signIn/screens/Email/Email.js +2 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +2 -1
- package/build/features/signIn/screens/OTP/OTP.js +2 -2
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -2
- package/build/features/signIn/screens/Password/Password.js +2 -1
- package/build/features/tax/Tax.js +10 -6
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +23 -10
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +6 -5
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +5 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +6 -10
- package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
- package/build/features/tax/screens/TaxDetails/validation.js +2 -5
- package/build/features/tax/screens/Verify/OTPInput.js +7 -3
- package/build/features/tax/screens/Verify/Verify.js +8 -24
- package/build/hooks/index.d.ts +5 -0
- package/build/hooks/index.js +5 -0
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +18 -16
- package/build/hooks/useDataNoneEditable.d.ts +2 -0
- package/build/hooks/useDataNoneEditable.js +19 -0
- package/build/hooks/useDataVerified.d.ts +6 -0
- package/build/hooks/useDataVerified.js +19 -0
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
- package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
- package/build/hooks/useFormReadOnly.d.ts +6 -0
- package/build/hooks/useFormReadOnly.js +40 -0
- package/build/hooks/useVerifyToken.js +1 -1
- package/build/theme/shadows.js +1 -1
- package/build/utils/array.d.ts +14 -2
- package/build/utils/array.js +187 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +5 -0
- package/build/utils/object.js +31 -0
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +28 -7
- package/package.json +4 -2
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +0 -45
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -8
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
- /package/build/features/{brand/screens/BrandInfo → connect/screens/BrandSegment}/TeamSize.d.ts +0 -0
|
@@ -59,18 +59,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
59
59
|
var _a;
|
|
60
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { BusinessType, DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
63
|
-
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
62
|
+
import { BusinessType, DocumentPurpose, FlowsTypes, LicenseType } from '../../../@types';
|
|
63
|
+
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
64
|
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
65
65
|
import moment from 'moment';
|
|
66
|
-
import { convertNumbers2English, getRecentDocumentBasedOnPurpose } from '../../../utils';
|
|
66
|
+
import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep, formatNumberAsCurrency, removeAllCharsFromNumber, retrieveIndividualData } from '../../../utils';
|
|
67
67
|
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
|
|
68
68
|
var token = _a.token, isInternally = _a.isInternally;
|
|
69
69
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
70
|
-
var payload, data, boardData,
|
|
71
|
-
var
|
|
72
|
-
return __generator(this, function (
|
|
73
|
-
switch (
|
|
70
|
+
var payload, data, boardData, boardInfoData, entityData, entityTypes, individualData, countryIso2, publicKey, _b, board_id, board_info_id, _c, id_1, type_1, serviceCallBack, _d, boardRes, individualRes, entityId;
|
|
71
|
+
var _e, _f, _g, _h, _j;
|
|
72
|
+
return __generator(this, function (_k) {
|
|
73
|
+
switch (_k.label) {
|
|
74
74
|
case 0:
|
|
75
75
|
payload = {
|
|
76
76
|
service_name: 'tap_email',
|
|
@@ -78,9 +78,9 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
78
78
|
};
|
|
79
79
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
80
80
|
case 1:
|
|
81
|
-
data = (
|
|
81
|
+
data = (_k.sent()).data;
|
|
82
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,
|
|
83
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 10];
|
|
84
84
|
if (isInternally)
|
|
85
85
|
data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
|
|
86
86
|
if (data === null || data === void 0 ? void 0 : data.country_code) {
|
|
@@ -88,52 +88,63 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
88
88
|
if (countryIso2)
|
|
89
89
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
92
|
+
if (publicKey) {
|
|
93
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
94
|
+
}
|
|
95
|
+
if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 10];
|
|
96
|
+
_b = data || {}, board_id = _b.id, board_info_id = _b.board_info_id;
|
|
97
|
+
if (!board_id) return [3, 6];
|
|
97
98
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
99
|
+
case 2:
|
|
100
|
+
boardData = _k.sent();
|
|
101
|
+
if (!board_info_id) return [3, 4];
|
|
102
|
+
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
98
103
|
case 3:
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
boardInfoData = _k.sent();
|
|
105
|
+
_k.label = 4;
|
|
101
106
|
case 4:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return [4,
|
|
107
|
+
_c = ((_f = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _f === void 0 ? void 0 : _f.recipient) || {}, id_1 = _c.id, type_1 = _c.type;
|
|
108
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
|
|
109
|
+
return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
|
|
105
110
|
case 5:
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
_d = _k.sent(), boardRes = _d.boardRes, individualRes = _d.individualRes;
|
|
112
|
+
boardData = boardRes;
|
|
113
|
+
individualData = individualRes;
|
|
114
|
+
_k.label = 6;
|
|
108
115
|
case 6:
|
|
116
|
+
entityId = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.id;
|
|
117
|
+
if (!entityId) return [3, 8];
|
|
118
|
+
return [4, API.entityService.retrieveEntity(entityId)];
|
|
119
|
+
case 7:
|
|
120
|
+
entityData = _k.sent();
|
|
121
|
+
_k.label = 8;
|
|
122
|
+
case 8:
|
|
109
123
|
if (!countryIso2) {
|
|
110
124
|
countryIso2 = entityData.country;
|
|
111
125
|
if (countryIso2)
|
|
112
126
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
113
127
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
118
|
-
return [3, 9];
|
|
119
|
-
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
120
|
-
case 8:
|
|
121
|
-
entityTypes = _f.sent();
|
|
128
|
+
return [4, API.entityService.retrieveEntityType()];
|
|
129
|
+
case 9:
|
|
130
|
+
entityTypes = _k.sent();
|
|
122
131
|
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
123
|
-
|
|
124
|
-
case
|
|
132
|
+
_k.label = 10;
|
|
133
|
+
case 10: return [2, {
|
|
125
134
|
data: data,
|
|
135
|
+
individualData: individualData,
|
|
126
136
|
boardResponse: {
|
|
127
137
|
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
128
138
|
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
129
139
|
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
130
140
|
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
131
141
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
132
|
-
name: (
|
|
133
|
-
contact: (
|
|
142
|
+
name: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.names,
|
|
143
|
+
contact: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.contact,
|
|
134
144
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
135
|
-
|
|
136
|
-
entityTypes: entityTypes
|
|
145
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
146
|
+
entityTypes: entityTypes,
|
|
147
|
+
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification
|
|
137
148
|
},
|
|
138
149
|
token: token
|
|
139
150
|
}];
|
|
@@ -159,72 +170,98 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
|
|
|
159
170
|
});
|
|
160
171
|
}); });
|
|
161
172
|
export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
|
-
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, board_id,
|
|
163
|
-
var
|
|
164
|
-
return __generator(this, function (
|
|
165
|
-
switch (
|
|
173
|
+
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, individualData, _b, board_id, board_info_id, config, publicKey, _c, id_2, type_2, serviceCallBack, _d, boardRes, individualRes, entityId;
|
|
174
|
+
var _e, _f, _g, _h, _j, _k, _l;
|
|
175
|
+
return __generator(this, function (_m) {
|
|
176
|
+
switch (_m.label) {
|
|
166
177
|
case 0:
|
|
167
178
|
_a = thunkApi.getState(), entity = _a.entity, settings = _a.settings;
|
|
168
179
|
responseBody = entity.data.verify.responseBody;
|
|
169
180
|
payload = {
|
|
170
181
|
data: params.otp,
|
|
171
|
-
service_name: (
|
|
182
|
+
service_name: (_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _e === void 0 ? void 0 : _e.service_name,
|
|
172
183
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
173
184
|
step_name: ENTITY_STEP_NAMES.PHONE_AUTH,
|
|
174
185
|
encryption_contract: ['data']
|
|
175
186
|
};
|
|
176
187
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
177
188
|
case 1:
|
|
178
|
-
data = (
|
|
179
|
-
|
|
180
|
-
if (!!data.errors) return [3,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
189
|
+
data = (_m.sent()).data;
|
|
190
|
+
individualData = undefined;
|
|
191
|
+
if (!!data.errors) return [3, 10];
|
|
192
|
+
_b = data || {}, board_id = _b.id, board_info_id = _b.board_info_id, config = _b.config;
|
|
193
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
194
|
+
if (publicKey) {
|
|
195
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
196
|
+
}
|
|
197
|
+
if (!board_id) return [3, 6];
|
|
186
198
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
199
|
+
case 2:
|
|
200
|
+
boardData = _m.sent();
|
|
201
|
+
if (!board_info_id) return [3, 4];
|
|
202
|
+
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
187
203
|
case 3:
|
|
188
|
-
|
|
189
|
-
|
|
204
|
+
boardInfoData = _m.sent();
|
|
205
|
+
_m.label = 4;
|
|
190
206
|
case 4:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return [4,
|
|
207
|
+
_c = ((_f = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _f === void 0 ? void 0 : _f.recipient) || {}, id_2 = _c.id, type_2 = _c.type;
|
|
208
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_2, type_2); };
|
|
209
|
+
return [4, retrieveIndividualData(type_2, boardData, serviceCallBack)];
|
|
194
210
|
case 5:
|
|
195
|
-
|
|
196
|
-
|
|
211
|
+
_d = _m.sent(), boardRes = _d.boardRes, individualRes = _d.individualRes;
|
|
212
|
+
boardData = boardRes;
|
|
213
|
+
individualData = individualRes;
|
|
214
|
+
_m.label = 6;
|
|
197
215
|
case 6:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
216
|
+
entityId = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.id;
|
|
217
|
+
if (!entityId) return [3, 8];
|
|
218
|
+
return [4, API.entityService.retrieveEntity(entityId)];
|
|
219
|
+
case 7:
|
|
220
|
+
entityData = _m.sent();
|
|
221
|
+
_m.label = 8;
|
|
205
222
|
case 8:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
223
|
+
(_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
|
|
224
|
+
return [4, API.entityService.retrieveEntityType()];
|
|
225
|
+
case 9:
|
|
226
|
+
entityTypes = _m.sent();
|
|
227
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP')); });
|
|
228
|
+
_m.label = 10;
|
|
229
|
+
case 10: return [2, {
|
|
210
230
|
data: data,
|
|
231
|
+
individualData: individualData,
|
|
211
232
|
boardResponse: {
|
|
212
233
|
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
213
234
|
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
214
235
|
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
215
236
|
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
216
237
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
217
|
-
name: (
|
|
218
|
-
contact: (
|
|
238
|
+
name: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.names,
|
|
239
|
+
contact: (_l = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _l === void 0 ? void 0 : _l.contact,
|
|
219
240
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
220
|
-
|
|
221
|
-
entityTypes: entityTypes
|
|
241
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
242
|
+
entityTypes: entityTypes,
|
|
243
|
+
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification
|
|
222
244
|
},
|
|
223
245
|
formData: params
|
|
224
246
|
}];
|
|
225
247
|
}
|
|
226
248
|
});
|
|
227
249
|
}); });
|
|
250
|
+
export var retrieveBoardStatus = createAsyncThunk('entity/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
251
|
+
var entity, board_id, data;
|
|
252
|
+
return __generator(this, function (_a) {
|
|
253
|
+
switch (_a.label) {
|
|
254
|
+
case 0:
|
|
255
|
+
entity = thunkApi.getState().entity;
|
|
256
|
+
board_id = (entity.data.verify.responseBody || {}).board_id;
|
|
257
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
258
|
+
case 1:
|
|
259
|
+
data = _a.sent();
|
|
260
|
+
thunkApi.dispatch(handlePrevScreenStep());
|
|
261
|
+
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}); });
|
|
228
265
|
export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
229
266
|
var data;
|
|
230
267
|
var _a, _b;
|
|
@@ -239,164 +276,151 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
239
276
|
}
|
|
240
277
|
});
|
|
241
278
|
}); });
|
|
242
|
-
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
case 2:
|
|
275
|
-
documentBody = {
|
|
276
|
-
entity_id: id || '',
|
|
277
|
-
documents: [
|
|
278
|
-
{
|
|
279
|
-
images: params.certificateId
|
|
280
|
-
}
|
|
281
|
-
]
|
|
282
|
-
};
|
|
283
|
-
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
284
|
-
case 3:
|
|
285
|
-
documentResponse = _e.sent();
|
|
286
|
-
_e.label = 4;
|
|
287
|
-
case 4:
|
|
288
|
-
payload = {
|
|
289
|
-
id: id,
|
|
290
|
-
AOA_file_id: articleId,
|
|
291
|
-
license: {
|
|
292
|
-
number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
|
|
293
|
-
type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
|
|
294
|
-
issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
|
|
295
|
-
expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
|
|
296
|
-
additional_info: isUnifiedNumberEditable && params.unifiedNumber
|
|
297
|
-
? {
|
|
298
|
-
unified_number: params.unifiedNumber
|
|
279
|
+
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (_a, thunkApi) {
|
|
280
|
+
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
281
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
+
var _b, settings, entity, _c, id, data_status, data_verification, documents, issuingDate, expiryDate, licenseType, licenseNumber, articleId, unifiedNumber, legalName, certificateId, entityType, issueDate, expDate, isFL, isLegalNameENNonEditable, isLegalNameARNonEditable, isLicenseTypeNonEditable, isEntityTypeNonEditable, isLicenseNumberNonEditable, isUnifiedNumberNonEditable, isIssuingDateNonEditable, isExpiryDateNonEditable, isDocumentsNonEditable, isAOAFileNonEditable, isEntityTypeVerified, isLicenseNonEditable, isLicenseAvailable, payload, data, documentResponse, document, documentBody, documentBody, list;
|
|
283
|
+
var _d, _e, _f;
|
|
284
|
+
return __generator(this, function (_g) {
|
|
285
|
+
switch (_g.label) {
|
|
286
|
+
case 0:
|
|
287
|
+
_b = thunkApi.getState(), settings = _b.settings, entity = _b.entity;
|
|
288
|
+
_c = ((_d = entity.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.entity) || {}, id = _c.id, data_status = _c.data_status, data_verification = _c.data_verification, documents = _c.documents;
|
|
289
|
+
issuingDate = formData.issuingDate, expiryDate = formData.expiryDate, licenseType = formData.licenseType, licenseNumber = formData.licenseNumber, articleId = formData.articleId, unifiedNumber = formData.unifiedNumber, legalName = formData.legalName, certificateId = formData.certificateId, entityType = formData.entityType;
|
|
290
|
+
issueDate = issuingDate && new Date(issuingDate).getTime();
|
|
291
|
+
expDate = expiryDate && new Date(expiryDate).getTime();
|
|
292
|
+
isFL = licenseType === BusinessType.FL;
|
|
293
|
+
isLegalNameENNonEditable = hasNoneEditableValue(data_status, 'legal_name.en');
|
|
294
|
+
isLegalNameARNonEditable = hasNoneEditableValue(data_status, 'legal_name.ar');
|
|
295
|
+
isLicenseTypeNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'type');
|
|
296
|
+
isEntityTypeNonEditable = hasNoneEditableValue(data_status, 'type');
|
|
297
|
+
isLicenseNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'number');
|
|
298
|
+
isUnifiedNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'additional_info');
|
|
299
|
+
isIssuingDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'issuing_date');
|
|
300
|
+
isExpiryDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'expiry_date');
|
|
301
|
+
isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
|
|
302
|
+
isAOAFileNonEditable = hasNoneEditableValue(data_status, 'AOA_file_id');
|
|
303
|
+
isEntityTypeVerified = hasVerifiedValue(data_verification, 'type');
|
|
304
|
+
isLicenseNonEditable = isLicenseNumberNonEditable && isLicenseTypeNonEditable && isIssuingDateNonEditable && isExpiryDateNonEditable && isUnifiedNumberNonEditable;
|
|
305
|
+
isLicenseAvailable = licenseNumber || licenseType || issueDate || expDate || unifiedNumber;
|
|
306
|
+
payload = __assign(__assign(__assign(__assign({ id: id, AOA_file_id: isAOAFileNonEditable ? undefined : articleId }, (!isLicenseNonEditable &&
|
|
307
|
+
isLicenseAvailable && {
|
|
308
|
+
license: __assign({ number: isLicenseNumberNonEditable || !licenseNumber ? undefined : licenseNumber, type: isLicenseTypeNonEditable || !licenseType ? undefined : isFL ? LicenseType.FL : LicenseType.CR, issuing_date: isIssuingDateNonEditable || !issueDate ? undefined : issueDate === null || issueDate === void 0 ? void 0 : issueDate.toString(), expiry_date: isExpiryDateNonEditable || !expDate ? undefined : expDate === null || expDate === void 0 ? void 0 : expDate.toString() }, (!(isUnifiedNumberNonEditable || !unifiedNumber) && {
|
|
309
|
+
additional_info: {
|
|
310
|
+
unified_number: unifiedNumber
|
|
299
311
|
}
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
ar: params.legalName,
|
|
306
|
-
en: params.legalName
|
|
312
|
+
}))
|
|
313
|
+
})), (!(isEntityTypeVerified || isEntityTypeNonEditable) && { type: entityType })), (!((isLegalNameENNonEditable && isLegalNameARNonEditable) || !legalName) && {
|
|
314
|
+
legal_name: {
|
|
315
|
+
en: isLegalNameENNonEditable ? undefined : legalName,
|
|
316
|
+
ar: isLegalNameARNonEditable ? undefined : legalName
|
|
307
317
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
]
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
318
|
+
})), { encryption_contract: [
|
|
319
|
+
'license.number',
|
|
320
|
+
'legal_name.ar',
|
|
321
|
+
'legal_name.en',
|
|
322
|
+
'license.type',
|
|
323
|
+
'license.issuing_date',
|
|
324
|
+
'license.expiry_date',
|
|
325
|
+
'license.additional_info.unified_number',
|
|
326
|
+
'type'
|
|
327
|
+
] });
|
|
328
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
329
|
+
case 1:
|
|
330
|
+
data = _g.sent();
|
|
331
|
+
documentResponse = undefined;
|
|
332
|
+
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.CR);
|
|
333
|
+
if (!(!isDocumentsNonEditable && (certificateId || []).length > 0)) return [3, 7];
|
|
334
|
+
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
|
|
335
|
+
documentBody = {
|
|
336
|
+
id: document.id,
|
|
337
|
+
images: certificateId
|
|
338
|
+
};
|
|
339
|
+
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
340
|
+
case 2:
|
|
341
|
+
documentResponse = _g.sent();
|
|
342
|
+
return [3, 5];
|
|
343
|
+
case 3:
|
|
344
|
+
documentBody = {
|
|
345
|
+
entity_id: id || '',
|
|
346
|
+
documents: [
|
|
347
|
+
{
|
|
348
|
+
type: DocumentPurpose.CR,
|
|
349
|
+
images: certificateId
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
};
|
|
353
|
+
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
354
|
+
case 4:
|
|
355
|
+
documentResponse = _g.sent();
|
|
356
|
+
_g.label = 5;
|
|
357
|
+
case 5: return [4, API.entityService.retrieveEntity(id)];
|
|
358
|
+
case 6:
|
|
359
|
+
data = _g.sent();
|
|
360
|
+
data.documentData = documentResponse;
|
|
361
|
+
_g.label = 7;
|
|
362
|
+
case 7: return [4, API.dataService.getActivitiesIsIc()];
|
|
363
|
+
case 8:
|
|
364
|
+
list = (_g.sent()).list;
|
|
365
|
+
data.activityList = list;
|
|
366
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
367
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, id);
|
|
368
|
+
return [2, { data: data, formData: originalFormData }];
|
|
369
|
+
}
|
|
370
|
+
});
|
|
332
371
|
});
|
|
333
|
-
});
|
|
334
|
-
export var
|
|
335
|
-
var
|
|
372
|
+
});
|
|
373
|
+
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (_a, thunkApi) {
|
|
374
|
+
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
336
375
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
337
|
-
var
|
|
338
|
-
var
|
|
339
|
-
return __generator(this, function (
|
|
340
|
-
switch (
|
|
376
|
+
var _b, settings, entity, _c, id, data_status, entityActivities, isCapitalPaidNonEditable, isCapitalShareCountNonEditable, isCapitalShareValueNonEditable, isActivitiesNonEditable, capitalShareCount, capitalShareValue, activities, capitalPaid, hasCapitalShares, isCapitalNonEditable, removedActivities, payload_1, activityIds, payload, data;
|
|
377
|
+
var _d, _e, _f;
|
|
378
|
+
return __generator(this, function (_g) {
|
|
379
|
+
switch (_g.label) {
|
|
341
380
|
case 0:
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
381
|
+
_b = thunkApi.getState(), settings = _b.settings, entity = _b.entity;
|
|
382
|
+
_c = ((_d = entity.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.entity) || {}, id = _c.id, data_status = _c.data_status, entityActivities = _c.activities;
|
|
383
|
+
isCapitalPaidNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'paid');
|
|
384
|
+
isCapitalShareCountNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.count');
|
|
385
|
+
isCapitalShareValueNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.value');
|
|
386
|
+
isActivitiesNonEditable = hasNoneEditableValue(data_status, 'activities');
|
|
387
|
+
capitalShareCount = formData.capitalShareCount, capitalShareValue = formData.capitalShareValue, activities = formData.activities, capitalPaid = formData.capitalPaid;
|
|
388
|
+
hasCapitalShares = capitalShareCount || capitalShareValue;
|
|
389
|
+
isCapitalNonEditable = (isCapitalPaidNonEditable && isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || (!capitalPaid && !hasCapitalShares);
|
|
390
|
+
removedActivities = (activities === null || activities === void 0 ? void 0 : activities.length) > 0 &&
|
|
391
|
+
(entityActivities || []).filter(function (entityActivity) { return !(activities || []).some(function (activity) { return activity.id === entityActivity.id; }); });
|
|
392
|
+
if (!(!isActivitiesNonEditable && (removedActivities === null || removedActivities === void 0 ? void 0 : removedActivities.length) > 0)) return [3, 2];
|
|
393
|
+
payload_1 = {
|
|
394
|
+
id: id,
|
|
395
|
+
activities: removedActivities
|
|
350
396
|
};
|
|
351
|
-
|
|
352
|
-
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
353
|
-
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
354
|
-
};
|
|
355
|
-
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
397
|
+
return [4, API.entityService.removeEntityActivities(payload_1)];
|
|
356
398
|
case 1:
|
|
357
|
-
|
|
358
|
-
|
|
399
|
+
_g.sent();
|
|
400
|
+
_g.label = 2;
|
|
401
|
+
case 2:
|
|
402
|
+
activityIds = (activities || []).map(function (_a) {
|
|
403
|
+
var id = _a.id;
|
|
404
|
+
return ({ id: id, action: 'add' });
|
|
405
|
+
});
|
|
406
|
+
payload = __assign({ id: id, activities: isActivitiesNonEditable || (activityIds === null || activityIds === void 0 ? void 0 : activityIds.length) === 0 ? undefined : activityIds }, (!isCapitalNonEditable && {
|
|
407
|
+
capital: __assign({ paid: isCapitalPaidNonEditable || !capitalPaid ? undefined : removeAllCharsFromNumber(capitalPaid) }, (!((isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || !hasCapitalShares) && {
|
|
408
|
+
shares: {
|
|
409
|
+
count: isCapitalShareCountNonEditable ? undefined : capitalShareCount,
|
|
410
|
+
value: isCapitalShareValueNonEditable ? undefined : removeAllCharsFromNumber(capitalShareValue)
|
|
411
|
+
}
|
|
412
|
+
}))
|
|
413
|
+
}));
|
|
414
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
415
|
+
case 3:
|
|
416
|
+
data = _g.sent();
|
|
417
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
418
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, id);
|
|
419
|
+
return [2, { data: data, formData: originalFormData }];
|
|
359
420
|
}
|
|
360
421
|
});
|
|
361
422
|
});
|
|
362
423
|
});
|
|
363
|
-
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
364
|
-
var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
|
|
365
|
-
var _c, _d, _e;
|
|
366
|
-
return __generator(this, function (_f) {
|
|
367
|
-
switch (_f.label) {
|
|
368
|
-
case 0:
|
|
369
|
-
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
370
|
-
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
371
|
-
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
372
|
-
isCapitalPaidEditable = true;
|
|
373
|
-
isCapitalShareEditable = true;
|
|
374
|
-
activities = (_c = (params.activities || [])) === null || _c === void 0 ? void 0 : _c.map(function (_a) {
|
|
375
|
-
var id = _a.id;
|
|
376
|
-
return ({ id: id, action: 'add' });
|
|
377
|
-
});
|
|
378
|
-
payload = {
|
|
379
|
-
id: id,
|
|
380
|
-
activities: (activities === null || activities === void 0 ? void 0 : activities.length) > 0 ? activities : undefined,
|
|
381
|
-
capital: {
|
|
382
|
-
paid: isCapitalPaidEditable ? params.capitalPaid : undefined,
|
|
383
|
-
shares: isCapitalShareEditable
|
|
384
|
-
? {
|
|
385
|
-
count: params.capitalShareCount,
|
|
386
|
-
value: params.capitalShareValue
|
|
387
|
-
}
|
|
388
|
-
: undefined
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
return [4, API.entityService.updateEntity(payload)];
|
|
392
|
-
case 1:
|
|
393
|
-
data = _f.sent();
|
|
394
|
-
thunkApi.dispatch(handleNextScreenStep());
|
|
395
|
-
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, id);
|
|
396
|
-
return [2, { data: data, formData: params }];
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
}); });
|
|
400
424
|
export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
401
425
|
var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
|
|
402
426
|
var _c, _d, _e, _f;
|
|
@@ -434,7 +458,6 @@ var initialState = {
|
|
|
434
458
|
customLoading: false,
|
|
435
459
|
uploading: false,
|
|
436
460
|
uploadingArticle: false,
|
|
437
|
-
uploadingArticleError: null,
|
|
438
461
|
data: {
|
|
439
462
|
flowName: FlowsTypes.ENTITY,
|
|
440
463
|
verify: {
|
|
@@ -476,8 +499,12 @@ export var entitySlice = createSlice({
|
|
|
476
499
|
uploadingStatus: function (state, action) {
|
|
477
500
|
state.uploading = action.payload;
|
|
478
501
|
},
|
|
479
|
-
|
|
480
|
-
state.
|
|
502
|
+
uploadingArticleStatus: function (state, action) {
|
|
503
|
+
state.uploadingArticle = action.payload;
|
|
504
|
+
},
|
|
505
|
+
clearAOAFile: function (state) {
|
|
506
|
+
var entity = (state.data.verify.responseBody || {}).entity;
|
|
507
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: __assign(__assign({}, entity), { AOA_file: undefined, AOA_file_id: undefined }) });
|
|
481
508
|
}
|
|
482
509
|
},
|
|
483
510
|
extraReducers: function (builder) {
|
|
@@ -490,13 +517,13 @@ export var entitySlice = createSlice({
|
|
|
490
517
|
var _a, _b, _c, _d;
|
|
491
518
|
state.error = null;
|
|
492
519
|
state.customLoading = false;
|
|
493
|
-
var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
|
|
520
|
+
var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse, individualData = _e.individualData;
|
|
494
521
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
495
522
|
if (description) {
|
|
496
523
|
state.error = description;
|
|
497
524
|
return;
|
|
498
525
|
}
|
|
499
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
|
|
526
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id, individualData: individualData });
|
|
500
527
|
state.data.verify.token = token;
|
|
501
528
|
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
502
529
|
if (entity) {
|
|
@@ -531,14 +558,14 @@ export var entitySlice = createSlice({
|
|
|
531
558
|
state.data.entityNameData.entityType = entityType;
|
|
532
559
|
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
533
560
|
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
534
|
-
if (activities)
|
|
561
|
+
if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0)
|
|
535
562
|
state.data.entityCapitalData.activities = activities;
|
|
536
563
|
if (paid)
|
|
537
|
-
state.data.entityCapitalData.capitalPaid = paid;
|
|
564
|
+
state.data.entityCapitalData.capitalPaid = formatNumberAsCurrency(paid);
|
|
538
565
|
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
539
566
|
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
540
567
|
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
541
|
-
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
568
|
+
state.data.entityCapitalData.capitalShareValue = formatNumberAsCurrency(shares === null || shares === void 0 ? void 0 : shares.value);
|
|
542
569
|
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id });
|
|
543
570
|
}
|
|
544
571
|
})
|
|
@@ -571,7 +598,7 @@ export var entitySlice = createSlice({
|
|
|
571
598
|
var _a, _b, _c, _d;
|
|
572
599
|
state.loading = false;
|
|
573
600
|
state.error = null;
|
|
574
|
-
var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData;
|
|
601
|
+
var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData, individualData = _e.individualData;
|
|
575
602
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
576
603
|
if (description) {
|
|
577
604
|
state.error = description;
|
|
@@ -579,7 +606,7 @@ export var entitySlice = createSlice({
|
|
|
579
606
|
}
|
|
580
607
|
state.data.otpData = formData;
|
|
581
608
|
state.data.otpData.responseBody = data;
|
|
582
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
|
|
609
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), boardResponse), { individualData: individualData });
|
|
583
610
|
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
584
611
|
var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
|
|
585
612
|
var legalName = legal_name;
|
|
@@ -612,14 +639,14 @@ export var entitySlice = createSlice({
|
|
|
612
639
|
state.data.entityNameData.entityType = entityType;
|
|
613
640
|
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
614
641
|
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
615
|
-
if (activities)
|
|
642
|
+
if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0)
|
|
616
643
|
state.data.entityCapitalData.activities = activities;
|
|
617
644
|
if (paid)
|
|
618
|
-
state.data.entityCapitalData.capitalPaid = paid;
|
|
645
|
+
state.data.entityCapitalData.capitalPaid = formatNumberAsCurrency(paid);
|
|
619
646
|
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
620
647
|
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
621
648
|
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
622
|
-
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
649
|
+
state.data.entityCapitalData.capitalShareValue = formatNumberAsCurrency(shares === null || shares === void 0 ? void 0 : shares.value);
|
|
623
650
|
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 }) });
|
|
624
651
|
})
|
|
625
652
|
.addCase(verifyEntityLeadOTP.rejected, function (state, action) {
|
|
@@ -635,7 +662,7 @@ export var entitySlice = createSlice({
|
|
|
635
662
|
state.error = null;
|
|
636
663
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
637
664
|
var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
|
|
638
|
-
state.data.entityNameData = formData;
|
|
665
|
+
state.data.entityNameData = __assign(__assign({}, formData), { certificateId: undefined });
|
|
639
666
|
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
|
|
640
667
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: data === null || data === void 0 ? void 0 : data.entity, activityList: activityList });
|
|
641
668
|
if (rest === null || rest === void 0 ? void 0 : rest.activities)
|
|
@@ -644,20 +671,6 @@ export var entitySlice = createSlice({
|
|
|
644
671
|
.addCase(updateEntityName.rejected, function (state, action) {
|
|
645
672
|
state.loading = false;
|
|
646
673
|
state.error = action.error.message;
|
|
647
|
-
})
|
|
648
|
-
.addCase(uploadArticle.pending, function (state) {
|
|
649
|
-
state.uploadingArticleError = null;
|
|
650
|
-
state.uploadingArticle = true;
|
|
651
|
-
})
|
|
652
|
-
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
653
|
-
state.uploadingArticleError = null;
|
|
654
|
-
state.uploadingArticle = false;
|
|
655
|
-
var data = action.payload.data;
|
|
656
|
-
state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
657
|
-
})
|
|
658
|
-
.addCase(uploadArticle.rejected, function (state) {
|
|
659
|
-
state.uploadingArticle = false;
|
|
660
|
-
state.uploadingArticleError = 'file_upload_article_error';
|
|
661
674
|
})
|
|
662
675
|
.addCase(updateEntityCapital.pending, function (state) {
|
|
663
676
|
state.loading = true;
|
|
@@ -687,6 +700,20 @@ export var entitySlice = createSlice({
|
|
|
687
700
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
688
701
|
state.error = action.error.message;
|
|
689
702
|
state.loading = false;
|
|
703
|
+
})
|
|
704
|
+
.addCase(retrieveBoardStatus.pending, function (state) {
|
|
705
|
+
state.error = null;
|
|
706
|
+
state.loading = true;
|
|
707
|
+
})
|
|
708
|
+
.addCase(retrieveBoardStatus.fulfilled, function (state, action) {
|
|
709
|
+
state.error = null;
|
|
710
|
+
state.loading = false;
|
|
711
|
+
var flows = action.payload.flows;
|
|
712
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
713
|
+
})
|
|
714
|
+
.addCase(retrieveBoardStatus.rejected, function (state, action) {
|
|
715
|
+
state.error = action.error.message;
|
|
716
|
+
state.loading = false;
|
|
690
717
|
})
|
|
691
718
|
.addCase(updateBoardSuccess.fulfilled, function (state, action) {
|
|
692
719
|
var _a;
|
|
@@ -699,7 +726,11 @@ export var entitySlice = createSlice({
|
|
|
699
726
|
return;
|
|
700
727
|
}
|
|
701
728
|
var flows = response.flows;
|
|
702
|
-
state.data.verify.responseBody
|
|
729
|
+
var _b = state.data.verify.responseBody || {}, individuals = _b.individuals, individualData = _b.individualData;
|
|
730
|
+
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
731
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { user: individualData })), (data_state && {
|
|
732
|
+
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
733
|
+
}));
|
|
703
734
|
})
|
|
704
735
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
705
736
|
state.loading = true;
|
|
@@ -711,6 +742,6 @@ export var entitySlice = createSlice({
|
|
|
711
742
|
});
|
|
712
743
|
}
|
|
713
744
|
});
|
|
714
|
-
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus,
|
|
745
|
+
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, uploadingArticleStatus = _a.uploadingArticleStatus, clearAOAFile = _a.clearAOAFile;
|
|
715
746
|
export default entitySlice.reducer;
|
|
716
747
|
export var entitySelector = function (state) { return state.entity; };
|