@tap-payments/auth-jsconnect 2.0.51 → 2.0.52
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 +90 -7
- package/build/@types/app.js +7 -0
- package/build/@types/form.d.ts +21 -20
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +11 -11
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/country.d.ts +1 -1
- package/build/api/data.d.ts +10 -10
- package/build/api/document.d.ts +2 -2
- package/build/api/entity.d.ts +12 -12
- package/build/api/file.d.ts +1 -1
- package/build/api/individual.d.ts +5 -5
- package/build/api/lead.d.ts +10 -10
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +2 -2
- package/build/app/settings.d.ts +4 -11
- package/build/app/settings.js +13 -5
- package/build/app/store.d.ts +4 -4
- package/build/assets/locales/ar.json +3 -1
- package/build/assets/locales/en.json +3 -1
- package/build/components/DatePicker/DatePicker.js +1 -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/Slide/Slide.d.ts +1 -1
- package/build/constants/app.d.ts +3 -2
- package/build/constants/app.js +1 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/bank/bankStore.d.ts +9 -73
- package/build/features/app/bank/bankStore.js +68 -91
- package/build/features/app/brand/brandStore.d.ts +16 -103
- package/build/features/app/brand/brandStore.js +62 -49
- package/build/features/app/business/businessStore.d.ts +18 -162
- package/build/features/app/business/businessStore.js +4 -3
- package/build/features/app/connect/connectStore.d.ts +13 -121
- package/build/features/app/connect/connectStore.js +5 -4
- package/build/features/app/connectExpress/connectExpressStore.d.ts +22 -211
- package/build/features/app/connectExpress/connectExpressStore.js +9 -10
- package/build/features/app/entity/entityStore.d.ts +9 -74
- package/build/features/app/entity/entityStore.js +129 -152
- package/build/features/app/individual/individualStore.d.ts +21 -167
- package/build/features/app/individual/individualStore.js +176 -202
- package/build/features/app/password/passwordStore.d.ts +12 -102
- package/build/features/app/password/passwordStore.js +1 -1
- package/build/features/app/signIn/signInStore.d.ts +7 -61
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +8 -62
- package/build/features/app/tax/taxStore.js +48 -62
- package/build/features/bank/screens/BankDetails/BankDetails.js +20 -5
- package/build/features/bank/screens/BankDetails/BankName.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/BankName.js +8 -7
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +5 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +3 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -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 +2 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.d.ts +14 -14
- package/build/features/bank/screens/BankDetails/validation.js +16 -21
- package/build/features/bank/screens/Verify/OTPInput.js +5 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +15 -18
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -9
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +14 -5
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +12 -16
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +16 -13
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +22 -9
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +20 -7
- 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 -1
- 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 +7 -7
- package/build/features/brand/screens/BrandActivities/validation.js +10 -19
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +20 -12
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +52 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +3 -3
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +2 -1
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/Segments.js +12 -2
- package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/TeamSize.js +12 -2
- package/build/features/brand/screens/BrandInfo/validation.d.ts +6 -6
- package/build/features/brand/screens/BrandInfo/validation.js +36 -42
- package/build/features/brand/screens/Verify/OTPInput.js +5 -3
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +12 -17
- package/build/features/business/screens/Activities/ActivitiesList.js +5 -5
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +1 -1
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -5
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -15
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -5
- package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +12 -2
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +1 -1
- package/build/features/business/screens/Verify/OTPInput.js +5 -3
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connect/screens/Merchant/Segments.js +6 -1
- package/build/features/connect/screens/Merchant/TeamSize.js +6 -1
- package/build/features/connect/screens/Merchant/validation.js +5 -5
- package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +5 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +7 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +7 -6
- 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/CollectIndividualInfo/CollectIndividualInfo.js +9 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -3
- 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 +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +4 -2
- 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 +2 -2
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +4 -2
- package/build/features/connectExpress/screens/NID/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/NID/TAC.js +9 -10
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +14 -18
- package/build/features/entity/screens/EntityCapital/ActivityList.js +20 -27
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +19 -17
- package/build/features/entity/screens/EntityCapital/validation.d.ts +10 -10
- package/build/features/entity/screens/EntityCapital/validation.js +4 -10
- package/build/features/entity/screens/EntityName/Article.d.ts +5 -2
- package/build/features/entity/screens/EntityName/Article.js +9 -6
- package/build/features/entity/screens/EntityName/EntityName.js +20 -5
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +14 -18
- package/build/features/entity/screens/EntityName/EntityTypeList.js +24 -27
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +4 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +4 -3
- package/build/features/entity/screens/EntityName/IssuingDate.js +2 -2
- package/build/features/entity/screens/EntityName/LegalName.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LegalName.js +8 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +4 -1
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +8 -9
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +8 -5
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +8 -5
- 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/Verify/OTPInput.js +5 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +25 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +21 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +8 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +25 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +25 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +8 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +8 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +8 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +25 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +6 -11
- package/build/features/individual/screens/IndividualList/Email.js +1 -1
- 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/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +12 -2
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +12 -2
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -5
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +7 -6
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +4 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +2 -7
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +13 -7
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +11 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +13 -7
- 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 +4 -2
- package/build/features/individual/screens/Verify/OTPInput.js +5 -3
- package/build/features/password/screens/Verify/OTPInput.js +5 -3
- package/build/features/shared/Address/CountryList.d.ts +9 -9
- package/build/features/shared/Address/CountryList.js +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +9 -9
- package/build/features/shared/Address/InputSelect.js +2 -2
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +15 -20
- package/build/features/shared/Button/IndividualActionButtons.d.ts +1 -1
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/GenericError/GenericError.js +1 -1
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/Input/Input.js +2 -3
- 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 +2 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +5 -4
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +5 -4
- package/build/features/shared/UploadFile/FileUpload.d.ts +6 -4
- package/build/features/shared/UploadFile/FileUpload.js +19 -15
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadFile.js +7 -7
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +5 -3
- package/build/features/shared/UploadFile/UploadWrapper.js +3 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +5 -4
- package/build/features/shared/UploadMultipleFile/UploadFile.js +14 -10
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +4 -3
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +3 -3
- 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 +9 -4
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +3 -8
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +5 -7
- 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 +5 -3
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +4 -2
- package/build/hooks/useDataNoneEditable.d.ts +2 -0
- package/build/hooks/useDataNoneEditable.js +19 -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/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/object.d.ts +4 -0
- package/build/utils/object.js +17 -0
- package/build/utils/string.d.ts +1 -1
- package/build/utils/string.js +13 -7
- package/package.json +2 -2
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +0 -20
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +0 -45
|
@@ -16,32 +16,13 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
16
16
|
contact: any;
|
|
17
17
|
individuals: any;
|
|
18
18
|
business: any;
|
|
19
|
-
flows: any;
|
|
20
19
|
entityTypes: any;
|
|
21
20
|
};
|
|
22
21
|
token: string;
|
|
23
|
-
}, VerifyLeadTokenProps, {
|
|
24
|
-
state?: unknown;
|
|
25
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
26
|
-
extra?: unknown;
|
|
27
|
-
rejectValue?: unknown;
|
|
28
|
-
serializedErrorType?: unknown;
|
|
29
|
-
pendingMeta?: unknown;
|
|
30
|
-
fulfilledMeta?: unknown;
|
|
31
|
-
rejectedMeta?: unknown;
|
|
32
|
-
}>;
|
|
22
|
+
}, VerifyLeadTokenProps, {}>;
|
|
33
23
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
34
24
|
data: any;
|
|
35
|
-
}, void, {
|
|
36
|
-
state?: unknown;
|
|
37
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
38
|
-
extra?: unknown;
|
|
39
|
-
rejectValue?: unknown;
|
|
40
|
-
serializedErrorType?: unknown;
|
|
41
|
-
pendingMeta?: unknown;
|
|
42
|
-
fulfilledMeta?: unknown;
|
|
43
|
-
rejectedMeta?: unknown;
|
|
44
|
-
}>;
|
|
25
|
+
}, void, {}>;
|
|
45
26
|
export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
46
27
|
data: any;
|
|
47
28
|
boardResponse: {
|
|
@@ -54,72 +35,26 @@ export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
54
35
|
contact: any;
|
|
55
36
|
individuals: any;
|
|
56
37
|
business: any;
|
|
57
|
-
flows: any;
|
|
58
38
|
entityTypes: any;
|
|
59
39
|
};
|
|
60
40
|
formData: OTPFormValues;
|
|
61
|
-
}, OTPFormValues, {
|
|
62
|
-
state?: unknown;
|
|
63
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
64
|
-
extra?: unknown;
|
|
65
|
-
rejectValue?: unknown;
|
|
66
|
-
serializedErrorType?: unknown;
|
|
67
|
-
pendingMeta?: unknown;
|
|
68
|
-
fulfilledMeta?: unknown;
|
|
69
|
-
rejectedMeta?: unknown;
|
|
70
|
-
}>;
|
|
41
|
+
}, OTPFormValues, {}>;
|
|
71
42
|
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
72
43
|
data: any;
|
|
73
|
-
}, string, {
|
|
74
|
-
state?: unknown;
|
|
75
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
76
|
-
extra?: unknown;
|
|
77
|
-
rejectValue?: unknown;
|
|
78
|
-
serializedErrorType?: unknown;
|
|
79
|
-
pendingMeta?: unknown;
|
|
80
|
-
fulfilledMeta?: unknown;
|
|
81
|
-
rejectedMeta?: unknown;
|
|
82
|
-
}>;
|
|
44
|
+
}, string, {}>;
|
|
83
45
|
export declare const updateEntityName: import("@reduxjs/toolkit").AsyncThunk<{
|
|
84
46
|
data: any;
|
|
85
47
|
formData: EntityNameFormValues;
|
|
86
|
-
}, EntityNameFormValues, {
|
|
87
|
-
state?: unknown;
|
|
88
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
89
|
-
extra?: unknown;
|
|
90
|
-
rejectValue?: unknown;
|
|
91
|
-
serializedErrorType?: unknown;
|
|
92
|
-
pendingMeta?: unknown;
|
|
93
|
-
fulfilledMeta?: unknown;
|
|
94
|
-
rejectedMeta?: unknown;
|
|
95
|
-
}>;
|
|
48
|
+
}, EntityNameFormValues, {}>;
|
|
96
49
|
export declare const updateEntityCapital: import("@reduxjs/toolkit").AsyncThunk<{
|
|
97
50
|
data: any;
|
|
98
51
|
formData: EntityCapitalFormValues;
|
|
99
|
-
}, EntityCapitalFormValues, {
|
|
100
|
-
state?: unknown;
|
|
101
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
102
|
-
extra?: unknown;
|
|
103
|
-
rejectValue?: unknown;
|
|
104
|
-
serializedErrorType?: unknown;
|
|
105
|
-
pendingMeta?: unknown;
|
|
106
|
-
fulfilledMeta?: unknown;
|
|
107
|
-
rejectedMeta?: unknown;
|
|
108
|
-
}>;
|
|
52
|
+
}, EntityCapitalFormValues, {}>;
|
|
109
53
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
110
54
|
response: any;
|
|
111
55
|
formData: void;
|
|
112
|
-
} | undefined, void, {
|
|
113
|
-
|
|
114
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
115
|
-
extra?: unknown;
|
|
116
|
-
rejectValue?: unknown;
|
|
117
|
-
serializedErrorType?: unknown;
|
|
118
|
-
pendingMeta?: unknown;
|
|
119
|
-
fulfilledMeta?: unknown;
|
|
120
|
-
rejectedMeta?: unknown;
|
|
121
|
-
}>;
|
|
122
|
-
type VerifyData = {
|
|
56
|
+
} | undefined, void, {}>;
|
|
57
|
+
declare type VerifyData = {
|
|
123
58
|
token: string;
|
|
124
59
|
};
|
|
125
60
|
export interface EntityData {
|
|
@@ -142,7 +77,7 @@ export declare const entitySlice: import("@reduxjs/toolkit").Slice<EntityState,
|
|
|
142
77
|
uploadingArticleStatus: (state: EntityState, action: ActionState<boolean>) => void;
|
|
143
78
|
clearAOAFile: (state: EntityState) => void;
|
|
144
79
|
}, "entity/store">;
|
|
145
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
80
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, uploadingArticleStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, clearAOAFile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
146
81
|
declare const _default: import("redux").Reducer<EntityState, import("redux").AnyAction>;
|
|
147
82
|
export default _default;
|
|
148
83
|
export declare const entitySelector: (state: RootState) => EntityState;
|
|
@@ -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 (
|
|
27
|
+
while (_) 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]) {
|
|
@@ -63,14 +63,14 @@ import { BusinessType, DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
|
63
63
|
import { handleNextScreenStep, 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 } 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, entityData,
|
|
71
|
-
var _b, _c, _d
|
|
72
|
-
return __generator(this, function (
|
|
73
|
-
switch (
|
|
70
|
+
var payload, data, boardData, entityData, entityTypes, countryIso2, board_id, entityId;
|
|
71
|
+
var _b, _c, _d;
|
|
72
|
+
return __generator(this, function (_e) {
|
|
73
|
+
switch (_e.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 = (_e.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, 7];
|
|
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,40 +88,32 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
88
88
|
if (countryIso2)
|
|
89
89
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
90
90
|
}
|
|
91
|
-
if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
91
|
+
if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 7];
|
|
92
92
|
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
93
|
-
if (!board_id) return [3,
|
|
94
|
-
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
95
|
-
case 2:
|
|
96
|
-
boardInfoData = _f.sent();
|
|
93
|
+
if (!board_id) return [3, 3];
|
|
97
94
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
95
|
+
case 2:
|
|
96
|
+
boardData = _e.sent();
|
|
97
|
+
_e.label = 3;
|
|
98
98
|
case 3:
|
|
99
|
-
boardData = _f.sent();
|
|
100
|
-
_f.label = 4;
|
|
101
|
-
case 4:
|
|
102
99
|
entityId = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.id;
|
|
103
|
-
if (!entityId) return [3,
|
|
100
|
+
if (!entityId) return [3, 5];
|
|
104
101
|
return [4, API.entityService.retrieveEntity(entityId)];
|
|
102
|
+
case 4:
|
|
103
|
+
entityData = _e.sent();
|
|
104
|
+
_e.label = 5;
|
|
105
105
|
case 5:
|
|
106
|
-
entityData = _f.sent();
|
|
107
|
-
_f.label = 6;
|
|
108
|
-
case 6:
|
|
109
106
|
if (!countryIso2) {
|
|
110
107
|
countryIso2 = entityData.country;
|
|
111
108
|
if (countryIso2)
|
|
112
109
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
113
110
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
thunkApi.dispatch(handleNextScreenStep('
|
|
118
|
-
|
|
119
|
-
case 7: return [
|
|
120
|
-
case 8:
|
|
121
|
-
entityTypes = _f.sent();
|
|
122
|
-
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
123
|
-
_f.label = 9;
|
|
124
|
-
case 9: return [2, {
|
|
111
|
+
return [4, API.entityService.retrieveEntityType()];
|
|
112
|
+
case 6:
|
|
113
|
+
entityTypes = _e.sent();
|
|
114
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP')); });
|
|
115
|
+
_e.label = 7;
|
|
116
|
+
case 7: return [2, {
|
|
125
117
|
data: data,
|
|
126
118
|
boardResponse: {
|
|
127
119
|
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
@@ -129,11 +121,10 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
129
121
|
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
130
122
|
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
131
123
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
132
|
-
name: (
|
|
133
|
-
contact: (
|
|
124
|
+
name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
|
|
125
|
+
contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
|
|
134
126
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
135
127
|
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
136
|
-
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
137
128
|
entityTypes: entityTypes
|
|
138
129
|
},
|
|
139
130
|
token: token
|
|
@@ -160,10 +151,10 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
|
|
|
160
151
|
});
|
|
161
152
|
}); });
|
|
162
153
|
export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
-
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes,
|
|
164
|
-
var _b, _c, _d, _e, _f, _g
|
|
165
|
-
return __generator(this, function (
|
|
166
|
-
switch (
|
|
154
|
+
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, board_id, entityId;
|
|
155
|
+
var _b, _c, _d, _e, _f, _g;
|
|
156
|
+
return __generator(this, function (_h) {
|
|
157
|
+
switch (_h.label) {
|
|
167
158
|
case 0:
|
|
168
159
|
_a = thunkApi.getState(), entity = _a.entity, settings = _a.settings;
|
|
169
160
|
responseBody = entity.data.verify.responseBody;
|
|
@@ -176,38 +167,30 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
176
167
|
};
|
|
177
168
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
178
169
|
case 1:
|
|
179
|
-
data = (
|
|
180
|
-
|
|
181
|
-
if (!!data.errors) return [3,
|
|
170
|
+
data = (_h.sent()).data;
|
|
171
|
+
entityTypes = undefined;
|
|
172
|
+
if (!!data.errors) return [3, 7];
|
|
182
173
|
board_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.id;
|
|
183
|
-
if (!board_id) return [3,
|
|
184
|
-
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
185
|
-
case 2:
|
|
186
|
-
boardInfoData = _j.sent();
|
|
174
|
+
if (!board_id) return [3, 3];
|
|
187
175
|
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
176
|
+
case 2:
|
|
177
|
+
boardData = _h.sent();
|
|
178
|
+
_h.label = 3;
|
|
188
179
|
case 3:
|
|
189
|
-
boardData = _j.sent();
|
|
190
|
-
_j.label = 4;
|
|
191
|
-
case 4:
|
|
192
180
|
entityId = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.id;
|
|
193
|
-
if (!entityId) return [3,
|
|
181
|
+
if (!entityId) return [3, 5];
|
|
194
182
|
return [4, API.entityService.retrieveEntity(entityId)];
|
|
183
|
+
case 4:
|
|
184
|
+
entityData = _h.sent();
|
|
185
|
+
_h.label = 5;
|
|
195
186
|
case 5:
|
|
196
|
-
entityData = _j.sent();
|
|
197
|
-
_j.label = 6;
|
|
198
|
-
case 6:
|
|
199
187
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
thunkApi.dispatch(handleNextScreenStep('
|
|
204
|
-
|
|
205
|
-
case 7: return [
|
|
206
|
-
case 8:
|
|
207
|
-
entityTypes = _j.sent();
|
|
208
|
-
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
209
|
-
_j.label = 9;
|
|
210
|
-
case 9: return [2, {
|
|
188
|
+
return [4, API.entityService.retrieveEntityType()];
|
|
189
|
+
case 6:
|
|
190
|
+
entityTypes = _h.sent();
|
|
191
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP')); });
|
|
192
|
+
_h.label = 7;
|
|
193
|
+
case 7: return [2, {
|
|
211
194
|
data: data,
|
|
212
195
|
boardResponse: {
|
|
213
196
|
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
@@ -215,11 +198,10 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
215
198
|
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
216
199
|
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
217
200
|
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
218
|
-
name: (
|
|
219
|
-
contact: (
|
|
201
|
+
name: (_f = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _f === void 0 ? void 0 : _f.names,
|
|
202
|
+
contact: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.contact,
|
|
220
203
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
221
204
|
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
222
|
-
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
223
205
|
entityTypes: entityTypes
|
|
224
206
|
},
|
|
225
207
|
formData: params
|
|
@@ -242,129 +224,124 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
242
224
|
});
|
|
243
225
|
}); });
|
|
244
226
|
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
245
|
-
var _a, settings, entity,
|
|
246
|
-
var _c, _d;
|
|
247
|
-
return __generator(this, function (
|
|
248
|
-
switch (
|
|
227
|
+
var _a, settings, entity, _b, id, data_status, data_verification, documents, issuingDate, expiryDate, isFL, isLegalNameENNonEditable, isLegalNameARNonEditable, isLicenseTypeNonEditable, isEntityTypeNonEditable, isLicenseNumberNonEditable, isUnifiedNumberNonEditable, isIssuingDateNonEditable, isExpiryDateNonEditable, isDocumentsNonEditable, isAOAFileNonEditable, isEntityTypeVerified, isLicenseNonEditable, payload, data, documentResponse, document, documentBody, documentBody, list;
|
|
228
|
+
var _c, _d, _e;
|
|
229
|
+
return __generator(this, function (_f) {
|
|
230
|
+
switch (_f.label) {
|
|
249
231
|
case 0:
|
|
250
232
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
251
|
-
|
|
252
|
-
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
233
|
+
_b = ((_c = entity.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) || {}, id = _b.id, data_status = _b.data_status, data_verification = _b.data_verification, documents = _b.documents;
|
|
253
234
|
issuingDate = new Date(params.issuingDate).getTime();
|
|
254
235
|
expiryDate = new Date(params.expiryDate).getTime();
|
|
255
236
|
isFL = params.licenseType === BusinessType.FL;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
237
|
+
isLegalNameENNonEditable = hasNoneEditableValue(data_status, 'legal_name.en');
|
|
238
|
+
isLegalNameARNonEditable = hasNoneEditableValue(data_status, 'legal_name.ar');
|
|
239
|
+
isLicenseTypeNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'type');
|
|
240
|
+
isEntityTypeNonEditable = hasNoneEditableValue(data_status, 'type');
|
|
241
|
+
isLicenseNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'number');
|
|
242
|
+
isUnifiedNumberNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'additional_info');
|
|
243
|
+
isIssuingDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'issuing_date');
|
|
244
|
+
isExpiryDateNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.license, 'expiry_date');
|
|
245
|
+
isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
|
|
246
|
+
isAOAFileNonEditable = hasNoneEditableValue(data_status, 'AOA_file_id');
|
|
247
|
+
isEntityTypeVerified = hasVerifiedValue(data_verification, 'type');
|
|
248
|
+
isLicenseNonEditable = isLicenseNumberNonEditable && isLicenseTypeNonEditable && isIssuingDateNonEditable && isExpiryDateNonEditable && isUnifiedNumberNonEditable;
|
|
249
|
+
payload = __assign(__assign(__assign(__assign({ id: id, AOA_file_id: isAOAFileNonEditable ? undefined : params.articleId }, (!isLicenseNonEditable && {
|
|
250
|
+
license: __assign({ number: isLicenseNumberNonEditable || !params.licenseNumber ? undefined : params.licenseNumber, type: isLicenseTypeNonEditable ? undefined : isFL ? 'freelance' : 'commercial_registration', issuing_date: isIssuingDateNonEditable ? undefined : issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString(), expiry_date: isExpiryDateNonEditable ? undefined : expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() }, (!(isUnifiedNumberNonEditable || !params.unifiedNumber) && {
|
|
251
|
+
additional_info: {
|
|
252
|
+
unified_number: params.unifiedNumber
|
|
253
|
+
}
|
|
254
|
+
}))
|
|
255
|
+
})), (!(isEntityTypeVerified || isEntityTypeNonEditable) && { type: params.entityType })), (!((isLegalNameENNonEditable && isLegalNameARNonEditable) || !params.legalName) && {
|
|
256
|
+
legal_name: {
|
|
257
|
+
en: isLegalNameENNonEditable ? undefined : params.legalName,
|
|
258
|
+
ar: isLegalNameARNonEditable ? undefined : params.legalName
|
|
259
|
+
}
|
|
260
|
+
})), { encryption_contract: [
|
|
261
|
+
'license.number',
|
|
262
|
+
'legal_name.ar',
|
|
263
|
+
'legal_name.en',
|
|
264
|
+
'license.type',
|
|
265
|
+
'license.issuing_date',
|
|
266
|
+
'license.expiry_date',
|
|
267
|
+
'license.additional_info.unified_number',
|
|
268
|
+
'type'
|
|
269
|
+
] });
|
|
270
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
271
|
+
case 1:
|
|
272
|
+
data = _f.sent();
|
|
263
273
|
documentResponse = undefined;
|
|
264
|
-
document = getRecentDocumentBasedOnPurpose(
|
|
265
|
-
if (!((params.certificateId || []).length > 0)) return [3,
|
|
266
|
-
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3,
|
|
274
|
+
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.CR);
|
|
275
|
+
if (!(!isDocumentsNonEditable && (params.certificateId || []).length > 0)) return [3, 7];
|
|
276
|
+
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
|
|
267
277
|
documentBody = {
|
|
268
278
|
id: document.id,
|
|
269
279
|
images: params.certificateId
|
|
270
280
|
};
|
|
271
281
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
272
|
-
case 1:
|
|
273
|
-
documentResponse = _e.sent();
|
|
274
|
-
return [3, 4];
|
|
275
282
|
case 2:
|
|
283
|
+
documentResponse = _f.sent();
|
|
284
|
+
return [3, 5];
|
|
285
|
+
case 3:
|
|
276
286
|
documentBody = {
|
|
277
287
|
entity_id: id || '',
|
|
278
288
|
documents: [
|
|
279
289
|
{
|
|
290
|
+
type: DocumentPurpose.CR,
|
|
280
291
|
images: params.certificateId
|
|
281
292
|
}
|
|
282
293
|
]
|
|
283
294
|
};
|
|
284
295
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
285
|
-
case 3:
|
|
286
|
-
documentResponse = _e.sent();
|
|
287
|
-
_e.label = 4;
|
|
288
296
|
case 4:
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
license: {
|
|
293
|
-
number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
|
|
294
|
-
type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
|
|
295
|
-
issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
|
|
296
|
-
expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
|
|
297
|
-
additional_info: isUnifiedNumberEditable && params.unifiedNumber
|
|
298
|
-
? {
|
|
299
|
-
unified_number: params.unifiedNumber
|
|
300
|
-
}
|
|
301
|
-
: undefined
|
|
302
|
-
},
|
|
303
|
-
type: isEntityTypeEditable && params.entityType ? params.entityType : undefined,
|
|
304
|
-
legal_name: isLegalNameEditable && params.legalName
|
|
305
|
-
? {
|
|
306
|
-
ar: params.legalName,
|
|
307
|
-
en: params.legalName
|
|
308
|
-
}
|
|
309
|
-
: undefined,
|
|
310
|
-
encryption_contract: [
|
|
311
|
-
'license.number',
|
|
312
|
-
'legal_name.ar',
|
|
313
|
-
'legal_name.en',
|
|
314
|
-
'license.type',
|
|
315
|
-
'license.issuing_date',
|
|
316
|
-
'license.expiry_date',
|
|
317
|
-
'license.additional_info.unified_number',
|
|
318
|
-
'type'
|
|
319
|
-
]
|
|
320
|
-
};
|
|
321
|
-
return [4, API.entityService.updateEntity(payload)];
|
|
322
|
-
case 5:
|
|
323
|
-
data = _e.sent();
|
|
324
|
-
data.documentData = documentResponse;
|
|
325
|
-
return [4, API.dataService.getActivities()];
|
|
297
|
+
documentResponse = _f.sent();
|
|
298
|
+
_f.label = 5;
|
|
299
|
+
case 5: return [4, API.entityService.retrieveEntity(id)];
|
|
326
300
|
case 6:
|
|
327
|
-
|
|
301
|
+
data = _f.sent();
|
|
302
|
+
data.documentData = documentResponse;
|
|
303
|
+
_f.label = 7;
|
|
304
|
+
case 7: return [4, API.dataService.getActivities()];
|
|
305
|
+
case 8:
|
|
306
|
+
list = (_f.sent()).list;
|
|
328
307
|
data.activityList = list;
|
|
329
|
-
thunkApi.dispatch(handleNextScreenStep());
|
|
330
|
-
(
|
|
308
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
309
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, id);
|
|
331
310
|
return [2, { data: data, formData: params }];
|
|
332
311
|
}
|
|
333
312
|
});
|
|
334
313
|
}); });
|
|
335
314
|
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
336
|
-
var _a, settings, entity,
|
|
337
|
-
var _c, _d, _e;
|
|
338
|
-
return __generator(this, function (
|
|
339
|
-
switch (
|
|
315
|
+
var _a, settings, entity, _b, id, data_status, isCapitalPaidNonEditable, isCapitalShareCountNonEditable, isCapitalShareValueNonEditable, isActivitiesNonEditable, hasCapitalShares, isCapitalNonEditable, activities, payload, data;
|
|
316
|
+
var _c, _d, _e, _f;
|
|
317
|
+
return __generator(this, function (_g) {
|
|
318
|
+
switch (_g.label) {
|
|
340
319
|
case 0:
|
|
341
320
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
321
|
+
_b = ((_c = entity.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) || {}, id = _b.id, data_status = _b.data_status;
|
|
322
|
+
isCapitalPaidNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'paid');
|
|
323
|
+
isCapitalShareCountNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.count');
|
|
324
|
+
isCapitalShareValueNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.capital, 'shares.value');
|
|
325
|
+
isActivitiesNonEditable = hasNoneEditableValue(data_status, 'activities');
|
|
326
|
+
hasCapitalShares = params.capitalShareCount || params.capitalShareValue;
|
|
327
|
+
isCapitalNonEditable = (isCapitalPaidNonEditable && isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || (!params.capitalPaid && !hasCapitalShares);
|
|
328
|
+
activities = (_d = (params.activities || [])) === null || _d === void 0 ? void 0 : _d.map(function (_a) {
|
|
347
329
|
var id = _a.id;
|
|
348
330
|
return ({ id: id, action: 'add' });
|
|
349
331
|
});
|
|
350
|
-
payload = {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
value: params.capitalShareValue
|
|
359
|
-
}
|
|
360
|
-
: undefined
|
|
361
|
-
}
|
|
362
|
-
};
|
|
332
|
+
payload = __assign({ id: id, activities: isActivitiesNonEditable || (activities === null || activities === void 0 ? void 0 : activities.length) === 0 ? undefined : activities }, (!isCapitalNonEditable && {
|
|
333
|
+
capital: __assign({ paid: isCapitalPaidNonEditable ? undefined : params.capitalPaid }, (!((isCapitalShareCountNonEditable && isCapitalShareValueNonEditable) || !hasCapitalShares) && {
|
|
334
|
+
shares: {
|
|
335
|
+
count: isCapitalShareCountNonEditable ? undefined : params.capitalShareCount,
|
|
336
|
+
value: isCapitalShareValueNonEditable ? undefined : params.capitalShareValue
|
|
337
|
+
}
|
|
338
|
+
}))
|
|
339
|
+
}));
|
|
363
340
|
return [4, API.entityService.updateEntity(payload)];
|
|
364
341
|
case 1:
|
|
365
|
-
data =
|
|
342
|
+
data = _g.sent();
|
|
366
343
|
thunkApi.dispatch(handleNextScreenStep());
|
|
367
|
-
(
|
|
344
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, id);
|
|
368
345
|
return [2, { data: data, formData: params }];
|
|
369
346
|
}
|
|
370
347
|
});
|