@tap-payments/auth-jsconnect 2.11.2-sandbox → 2.12.1-beta
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 +1 -2
- package/build/@types/app.js +0 -1
- package/build/@types/form.d.ts +0 -2
- package/build/@types/index.d.ts +0 -1
- package/build/@types/index.js +0 -1
- package/build/api/auth.d.ts +1 -9
- package/build/api/entity.d.ts +0 -3
- package/build/api/index.d.ts +1 -7
- package/build/api/index.js +1 -3
- package/build/api/lead.d.ts +0 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/assets/locales/ar.json +12 -48
- package/build/assets/locales/en.json +41 -51
- package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
- package/build/components/OTPTimer/OTPTimer.js +4 -4
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -21
- package/build/constants/app.js +4 -122
- package/build/constants/flows.d.ts +0 -15
- package/build/constants/flows.js +0 -15
- package/build/constants/validation.d.ts +0 -2
- package/build/constants/validation.js +0 -2
- package/build/features/app/business/businessStore.js +10 -15
- package/build/features/app/connectExpress/connectExpressStore.js +4 -19
- package/build/features/app/individual/individualStore.js +1 -0
- package/build/features/app/tax/taxStore.js +1 -1
- package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -13
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +5 -11
- package/build/features/business/screens/BusinessType/LicenseList.js +7 -15
- package/build/features/business/screens/BusinessType/validation.d.ts +3 -6
- package/build/features/business/screens/BusinessType/validation.js +10 -31
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +0 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +7 -23
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +3 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +21 -57
- package/build/features/entity/screens/EntityName/EntityName.js +1 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
- package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
- package/build/features/entity/screens/EntityName/validation.js +3 -14
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -67
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +0 -1
- package/build/features/shared/Button/FlowsButtons.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +4 -5
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -4
- package/build/theme/palette.js +0 -12
- package/build/theme/typography.js +0 -4
- package/build/utils/common.js +3 -3
- package/build/utils/string.d.ts +1 -2
- package/build/utils/string.js +2 -11
- package/package.json +2 -2
- package/build/@types/terminal.d.ts +0 -116
- package/build/@types/terminal.js +0 -1
- package/build/api/terminal.d.ts +0 -28
- package/build/api/terminal.js +0 -45
- package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
- package/build/components/DeviceCard/DeviceCard.js +0 -103
- package/build/components/DeviceCard/index.d.ts +0 -3
- package/build/components/DeviceCard/index.js +0 -2
- package/build/features/app/terminal/terminalStore.d.ts +0 -110
- package/build/features/app/terminal/terminalStore.js +0 -676
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +0 -35
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +0 -84
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +0 -36
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +0 -81
- package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
- package/build/features/shared/PushNotification/PushNotification.js +0 -34
- package/build/features/shared/PushNotification/index.d.ts +0 -2
- package/build/features/shared/PushNotification/index.js +0 -2
- package/build/features/terminal/Terminal.d.ts +0 -14
- package/build/features/terminal/Terminal.js +0 -95
- package/build/features/terminal/index.d.ts +0 -1
- package/build/features/terminal/index.js +0 -1
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +0 -3
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -69
- package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
- package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -55
- package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
- package/build/features/terminal/screens/Loading/Loading.js +0 -10
- package/build/features/terminal/screens/Loading/index.d.ts +0 -2
- package/build/features/terminal/screens/Loading/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -58
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
- package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
- package/build/features/terminal/screens/OperatorError/index.js +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
- package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -32
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -153
- package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -47
- package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
- package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
- package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
- package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
- package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
- package/build/features/terminal/screens/Verify/Verify.js +0 -85
- package/build/features/terminal/screens/Verify/index.d.ts +0 -2
- package/build/features/terminal/screens/Verify/index.js +0 -2
- package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
- package/build/features/terminal/screens/Verify/validation.js +0 -4
- package/build/features/terminal/screens/shared/Header.d.ts +0 -10
- package/build/features/terminal/screens/shared/Header.js +0 -30
- package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
- package/build/features/terminal/screens/shared/TerminalList.js +0 -25
- package/build/features/terminal/screens/shared/index.d.ts +0 -5
- package/build/features/terminal/screens/shared/index.js +0 -5
- package/build/features/terminal/screens/shared/styles.d.ts +0 -196
- package/build/features/terminal/screens/shared/styles.js +0 -155
- package/build/features/terminal/screens/shared/utils.d.ts +0 -7
- package/build/features/terminal/screens/shared/utils.js +0 -24
package/build/constants/app.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ScreenStepNavigation, BusinessType
|
|
1
|
+
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
3
|
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
4
|
+
export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company";
|
|
4
5
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
5
6
|
export declare const CLIENT_ORIGIN: string;
|
|
6
7
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
@@ -14,7 +15,6 @@ export declare const SCOPE_MERCHANT = "merchant";
|
|
|
14
15
|
export declare const DEFAULT_COUNTRY_ISO2 = "KW";
|
|
15
16
|
export declare const NAFATH_VERIFICATION_FAILED = "nafath_verification_failed";
|
|
16
17
|
export declare const COLLECT_DOB_INFO_NAFATH = "collect_date_of_birth";
|
|
17
|
-
export declare const TERMINAL_PUSH_NOTIFICATION_FAILED = "terminal_push_notification_link_new_terminal_failed";
|
|
18
18
|
export declare const LANGUAGE_ABBREVIATIONS: {
|
|
19
19
|
ENGLISH: string;
|
|
20
20
|
ARABIC: string;
|
|
@@ -44,7 +44,6 @@ export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
|
44
44
|
export declare const SigIn_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
45
45
|
export declare const ENTITY_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
46
46
|
export declare const BRAND_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
47
|
-
export declare const TERMINAL_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
48
47
|
export declare const DefaultDeviceInfo: {
|
|
49
48
|
source: string;
|
|
50
49
|
device: {
|
|
@@ -216,13 +215,6 @@ export declare const KYC_STEP_NAMES: {
|
|
|
216
215
|
KYC_VERIFY_NAFATH: string;
|
|
217
216
|
KYC_COMPLETED: string;
|
|
218
217
|
};
|
|
219
|
-
export declare const TERMINAL_STEP_NAMES: {
|
|
220
|
-
PHONE_AUTH: string;
|
|
221
|
-
INFO: string;
|
|
222
|
-
SUCCESS: string;
|
|
223
|
-
CREATE_AUTH: string;
|
|
224
|
-
CREATE_TERMINAL_AUTH: string;
|
|
225
|
-
};
|
|
226
218
|
export declare const RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
227
219
|
export declare const ENCRYPTION_FLAG = "encryption_contract";
|
|
228
220
|
export declare const BACKEND_ENCRYPTION_FLAG = "backend_encryption_contract";
|
|
@@ -235,9 +227,6 @@ export declare const OTHER_FL_LICENSE: {
|
|
|
235
227
|
};
|
|
236
228
|
license: {
|
|
237
229
|
number: string;
|
|
238
|
-
additional_info: {
|
|
239
|
-
unified_number: string;
|
|
240
|
-
};
|
|
241
230
|
};
|
|
242
231
|
type: BusinessType;
|
|
243
232
|
};
|
|
@@ -249,9 +238,6 @@ export declare const OTHER_ENTITY_LICENSE: {
|
|
|
249
238
|
};
|
|
250
239
|
license: {
|
|
251
240
|
number: string;
|
|
252
|
-
additional_info: {
|
|
253
|
-
unified_number: string;
|
|
254
|
-
};
|
|
255
241
|
};
|
|
256
242
|
type: BusinessType;
|
|
257
243
|
};
|
|
@@ -262,9 +248,6 @@ export declare const OTHER_CR_LICENSE: {
|
|
|
262
248
|
};
|
|
263
249
|
license: {
|
|
264
250
|
number: string;
|
|
265
|
-
additional_info: {
|
|
266
|
-
unified_number: string;
|
|
267
|
-
};
|
|
268
251
|
};
|
|
269
252
|
type: BusinessType;
|
|
270
253
|
};
|
|
@@ -326,6 +309,4 @@ interface CountryToCurrencyMapping {
|
|
|
326
309
|
[countryCode: string]: string;
|
|
327
310
|
}
|
|
328
311
|
export declare const COUNTRY_TO_CURRENCY: CountryToCurrencyMapping;
|
|
329
|
-
export declare const SELECTED_TERMINAL_DEVICE_DEFAULT_INFO: TerminalDeviceInfo;
|
|
330
|
-
export declare const SELECTED_TERMINAL_DEFAULT_INFO: TerminalInfo;
|
|
331
312
|
export {};
|
package/build/constants/app.js
CHANGED
|
@@ -2,6 +2,7 @@ import { BusinessType } from '../@types';
|
|
|
2
2
|
import { CONNECT_FLOWS } from './flows';
|
|
3
3
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
4
4
|
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
5
|
+
export var CONNECT_BETA_URL = 'https://connect.beta.tap.company';
|
|
5
6
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
6
7
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
7
8
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -15,7 +16,6 @@ export var SCOPE_MERCHANT = 'merchant';
|
|
|
15
16
|
export var DEFAULT_COUNTRY_ISO2 = 'KW';
|
|
16
17
|
export var NAFATH_VERIFICATION_FAILED = 'nafath_verification_failed';
|
|
17
18
|
export var COLLECT_DOB_INFO_NAFATH = 'collect_date_of_birth';
|
|
18
|
-
export var TERMINAL_PUSH_NOTIFICATION_FAILED = 'terminal_push_notification_link_new_terminal_failed';
|
|
19
19
|
export var LANGUAGE_ABBREVIATIONS = {
|
|
20
20
|
ENGLISH: 'en',
|
|
21
21
|
ARABIC: 'ar'
|
|
@@ -973,86 +973,6 @@ export var BRAND_SCREENS_NAVIGATION = [
|
|
|
973
973
|
order: 6
|
|
974
974
|
}
|
|
975
975
|
];
|
|
976
|
-
export var TERMINAL_SCREENS_NAVIGATION = [
|
|
977
|
-
{
|
|
978
|
-
name: CONNECT_FLOWS.terminal.verify,
|
|
979
|
-
next: [CONNECT_FLOWS.terminal.terminalDeviceList, CONNECT_FLOWS.terminal.noTerminalLinked],
|
|
980
|
-
prev: CONNECT_FLOWS.terminal.board,
|
|
981
|
-
order: 1
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
name: CONNECT_FLOWS.terminal.loadingData,
|
|
985
|
-
next: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
986
|
-
prev: '',
|
|
987
|
-
order: 1
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
name: CONNECT_FLOWS.terminal.operatorError,
|
|
991
|
-
next: '',
|
|
992
|
-
prev: '',
|
|
993
|
-
order: 1
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
name: CONNECT_FLOWS.terminal.noTerminalLinked,
|
|
997
|
-
next: CONNECT_FLOWS.terminal.terminalLinkNew,
|
|
998
|
-
prev: CONNECT_FLOWS.terminal.board,
|
|
999
|
-
order: 2
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
name: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
1003
|
-
next: [CONNECT_FLOWS.terminal.terminalList, CONNECT_FLOWS.terminal.linkedTerminalInfo, CONNECT_FLOWS.terminal.unlinkedTerminalInfo],
|
|
1004
|
-
prev: CONNECT_FLOWS.terminal.board,
|
|
1005
|
-
order: 2
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
name: CONNECT_FLOWS.terminal.terminalList,
|
|
1009
|
-
next: CONNECT_FLOWS.terminal.terminalLinkNew,
|
|
1010
|
-
prev: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
1011
|
-
order: 3
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
name: CONNECT_FLOWS.terminal.terminalLinkNew,
|
|
1015
|
-
next: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
|
|
1016
|
-
prev: [CONNECT_FLOWS.terminal.noTerminalLinked, CONNECT_FLOWS.terminal.terminalList],
|
|
1017
|
-
order: 3
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
name: CONNECT_FLOWS.terminal.linkedTerminalInfo,
|
|
1021
|
-
next: CONNECT_FLOWS.terminal.terminalUnlinkedSuccess,
|
|
1022
|
-
prev: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
1023
|
-
order: 3
|
|
1024
|
-
},
|
|
1025
|
-
{
|
|
1026
|
-
name: CONNECT_FLOWS.terminal.unlinkedTerminalInfo,
|
|
1027
|
-
next: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
|
|
1028
|
-
prev: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
1029
|
-
order: 3
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
name: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
|
|
1033
|
-
next: CONNECT_FLOWS.terminal.board,
|
|
1034
|
-
prev: [CONNECT_FLOWS.terminal.terminalLinkNew, CONNECT_FLOWS.terminal.unlinkedTerminalInfo],
|
|
1035
|
-
order: 4
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
name: CONNECT_FLOWS.terminal.terminalUnlinkedSuccess,
|
|
1039
|
-
next: CONNECT_FLOWS.terminal.board,
|
|
1040
|
-
prev: CONNECT_FLOWS.terminal.linkedTerminalInfo,
|
|
1041
|
-
order: 4
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
name: CONNECT_FLOWS.terminal.board,
|
|
1045
|
-
next: CONNECT_FLOWS.terminal.resetPassword,
|
|
1046
|
-
prev: '',
|
|
1047
|
-
order: 5
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
name: CONNECT_FLOWS.terminal.resetPassword,
|
|
1051
|
-
next: CONNECT_FLOWS.terminal.board,
|
|
1052
|
-
prev: '',
|
|
1053
|
-
order: 6
|
|
1054
|
-
}
|
|
1055
|
-
];
|
|
1056
976
|
export var DefaultDeviceInfo = {
|
|
1057
977
|
source: 'browser',
|
|
1058
978
|
device: {
|
|
@@ -1224,13 +1144,6 @@ export var KYC_STEP_NAMES = {
|
|
|
1224
1144
|
KYC_VERIFY_NAFATH: 'kyc_verify_nafath',
|
|
1225
1145
|
KYC_COMPLETED: 'kyc_completed'
|
|
1226
1146
|
};
|
|
1227
|
-
export var TERMINAL_STEP_NAMES = {
|
|
1228
|
-
PHONE_AUTH: 'terminal_phone_auth',
|
|
1229
|
-
INFO: 'terminal_info',
|
|
1230
|
-
SUCCESS: 'terminal_completed',
|
|
1231
|
-
CREATE_AUTH: 'connect_create_auth_terminal',
|
|
1232
|
-
CREATE_TERMINAL_AUTH: 'connect_create_terminal_link'
|
|
1233
|
-
};
|
|
1234
1147
|
export var RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
1235
1148
|
export var ENCRYPTION_FLAG = 'encryption_contract';
|
|
1236
1149
|
export var BACKEND_ENCRYPTION_FLAG = 'backend_encryption_contract';
|
|
@@ -1242,8 +1155,7 @@ export var OTHER_FL_LICENSE = {
|
|
|
1242
1155
|
en: 'add_other_fl'
|
|
1243
1156
|
},
|
|
1244
1157
|
license: {
|
|
1245
|
-
number: 'other_fl'
|
|
1246
|
-
additional_info: { unified_number: 'other_fl' }
|
|
1158
|
+
number: 'other_fl'
|
|
1247
1159
|
},
|
|
1248
1160
|
type: BusinessType.FL
|
|
1249
1161
|
};
|
|
@@ -1254,8 +1166,7 @@ export var OTHER_ENTITY_LICENSE = {
|
|
|
1254
1166
|
en: 'add_other'
|
|
1255
1167
|
},
|
|
1256
1168
|
license: {
|
|
1257
|
-
number: 'other_entity'
|
|
1258
|
-
additional_info: { unified_number: 'other_entity' }
|
|
1169
|
+
number: 'other_entity'
|
|
1259
1170
|
},
|
|
1260
1171
|
type: BusinessType.CR
|
|
1261
1172
|
};
|
|
@@ -1265,8 +1176,7 @@ export var OTHER_CR_LICENSE = {
|
|
|
1265
1176
|
en: 'add_other_cr'
|
|
1266
1177
|
},
|
|
1267
1178
|
license: {
|
|
1268
|
-
number: 'other_cr'
|
|
1269
|
-
additional_info: { unified_number: 'other_cr' }
|
|
1179
|
+
number: 'other_cr'
|
|
1270
1180
|
},
|
|
1271
1181
|
type: BusinessType.CR
|
|
1272
1182
|
};
|
|
@@ -1338,31 +1248,3 @@ export var COUNTRY_TO_CURRENCY = {
|
|
|
1338
1248
|
HK: 'HKD',
|
|
1339
1249
|
SG: 'SGD'
|
|
1340
1250
|
};
|
|
1341
|
-
export var SELECTED_TERMINAL_DEVICE_DEFAULT_INFO = {
|
|
1342
|
-
id: '',
|
|
1343
|
-
status: '',
|
|
1344
|
-
live_mode: false,
|
|
1345
|
-
linked: false,
|
|
1346
|
-
serial_number: '',
|
|
1347
|
-
display_name: '',
|
|
1348
|
-
model: {
|
|
1349
|
-
live_mode: false,
|
|
1350
|
-
status: '',
|
|
1351
|
-
id: '',
|
|
1352
|
-
name: [],
|
|
1353
|
-
image: '',
|
|
1354
|
-
image_url: '',
|
|
1355
|
-
model: '',
|
|
1356
|
-
type: ''
|
|
1357
|
-
}
|
|
1358
|
-
};
|
|
1359
|
-
export var SELECTED_TERMINAL_DEFAULT_INFO = {
|
|
1360
|
-
id: '',
|
|
1361
|
-
legacy_id: '',
|
|
1362
|
-
merchant: {
|
|
1363
|
-
id: ''
|
|
1364
|
-
},
|
|
1365
|
-
name: {
|
|
1366
|
-
en: ''
|
|
1367
|
-
}
|
|
1368
|
-
};
|
|
@@ -23,19 +23,4 @@ export declare const CONNECT_FLOWS: {
|
|
|
23
23
|
verifyNafath: KYC_FLOWS;
|
|
24
24
|
success: KYC_FLOWS;
|
|
25
25
|
};
|
|
26
|
-
terminal: {
|
|
27
|
-
loadingData: string;
|
|
28
|
-
operatorError: string;
|
|
29
|
-
verify: string;
|
|
30
|
-
noTerminalLinked: string;
|
|
31
|
-
terminalDeviceList: string;
|
|
32
|
-
terminalLinkNew: string;
|
|
33
|
-
linkedTerminalInfo: string;
|
|
34
|
-
unlinkedTerminalInfo: string;
|
|
35
|
-
terminalLinkedSuccess: string;
|
|
36
|
-
terminalUnlinkedSuccess: string;
|
|
37
|
-
board: string;
|
|
38
|
-
resetPassword: string;
|
|
39
|
-
terminalList: string;
|
|
40
|
-
};
|
|
41
26
|
};
|
package/build/constants/flows.js
CHANGED
|
@@ -23,20 +23,5 @@ export var CONNECT_FLOWS = {
|
|
|
23
23
|
verifyPACI: KYC_FLOWS.verifyPACI,
|
|
24
24
|
verifyNafath: KYC_FLOWS.verifyNafath,
|
|
25
25
|
success: KYC_FLOWS.success
|
|
26
|
-
},
|
|
27
|
-
terminal: {
|
|
28
|
-
loadingData: 'TERMINAL_LOADING_DATA_STEP',
|
|
29
|
-
operatorError: 'TERMINAL_OPERATOR_ERROR_STEP',
|
|
30
|
-
verify: 'TERMINAL_VERIFY_OTP_STEP',
|
|
31
|
-
noTerminalLinked: 'TERMINAL_NO_TERMINAL_LINKED',
|
|
32
|
-
terminalDeviceList: 'TERMINAL_DEVICE_LIST_STEP',
|
|
33
|
-
terminalLinkNew: 'TERMINAL_LINK_NEW_STEP',
|
|
34
|
-
linkedTerminalInfo: 'TERMINAL_LINKED_INFO_STEP',
|
|
35
|
-
unlinkedTerminalInfo: 'TERMINAL_UNLINKED_INFO_STEP',
|
|
36
|
-
terminalLinkedSuccess: 'TERMINAL_LINKED_SUCCESS_STEP',
|
|
37
|
-
terminalUnlinkedSuccess: 'TERMINAL_UNLINKED_SUCCESS_STEP',
|
|
38
|
-
board: 'TERMINAL_BOARD_STEP',
|
|
39
|
-
resetPassword: 'TERMINAL_RESET_PASSWORD',
|
|
40
|
-
terminalList: 'TERMINAL_LIST_STEP'
|
|
41
26
|
}
|
|
42
27
|
};
|
|
@@ -10,7 +10,6 @@ export declare const LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export declare const FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export declare const FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export declare const CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
-
export declare const UNIFIED_NUMBER_MIN_LENGTH = 2;
|
|
14
13
|
export declare const MAX_EMAIL_LENGTH = 50;
|
|
15
14
|
export declare const BRAND_NAME_MAX_LENGTH = 99;
|
|
16
15
|
export declare const KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -33,4 +32,3 @@ export declare const DIGITS_ONLY: RegExp;
|
|
|
33
32
|
export declare const REGEX_PHONE_APP_NAME: RegExp;
|
|
34
33
|
export declare const REGEX_IBAN: RegExp;
|
|
35
34
|
export declare const NAFATH_PACI_TIMEOUT_DURATION = 30000;
|
|
36
|
-
export declare const TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
|
|
@@ -10,7 +10,6 @@ export var LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export var FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export var FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export var CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
-
export var UNIFIED_NUMBER_MIN_LENGTH = 2;
|
|
14
13
|
export var MAX_EMAIL_LENGTH = 50;
|
|
15
14
|
export var BRAND_NAME_MAX_LENGTH = 99;
|
|
16
15
|
export var KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -33,4 +32,3 @@ export var DIGITS_ONLY = /^\d+$/;
|
|
|
33
32
|
export var REGEX_PHONE_APP_NAME = /^[a-zA-Z0-9[._-]*$/;
|
|
34
33
|
export var REGEX_IBAN = /^[a-zA-Z]{2}[a-zA-Z0-9]{13,34}$/g;
|
|
35
34
|
export var NAFATH_PACI_TIMEOUT_DURATION = 30000;
|
|
36
|
-
export var TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
|
|
@@ -651,26 +651,26 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
651
651
|
});
|
|
652
652
|
}); });
|
|
653
653
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
654
|
-
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense,
|
|
654
|
+
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
|
|
655
655
|
var _d, _e, _f;
|
|
656
656
|
return __generator(this, function (_g) {
|
|
657
657
|
switch (_g.label) {
|
|
658
658
|
case 0:
|
|
659
659
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
660
660
|
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
661
|
-
selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense
|
|
661
|
+
selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
|
|
662
662
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
663
663
|
_b = business.data.verify.responseBody || {}, lead_id = _b.lead_id, brand = _b.brand;
|
|
664
664
|
stepName = 'BUSINESS_ACTIVITIES_STEP';
|
|
665
665
|
payload = __assign(__assign(__assign(__assign({ id: lead_id || '', entity: {
|
|
666
666
|
id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isKWCountry ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
|
|
667
|
-
}
|
|
667
|
+
} }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
|
|
668
668
|
license_number: isKWCountry && isFL ? '' : licenseNumber,
|
|
669
669
|
license_type: isFL ? LicenseType.FL : LicenseType.CR,
|
|
670
670
|
business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type
|
|
671
671
|
})), { step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO }), (isKWCountry && {
|
|
672
672
|
business_name: isFL ? undefined : { ar: entityLegalName, en: entityLegalName }
|
|
673
|
-
})), { encryption_contract: ['license_number', 'business_type', 'license_type'
|
|
673
|
+
})), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
|
|
674
674
|
return [4, API.leadService.updateLead(payload)];
|
|
675
675
|
case 1:
|
|
676
676
|
data = _g.sent();
|
|
@@ -988,7 +988,6 @@ var initialState = {
|
|
|
988
988
|
businessTypeData: {
|
|
989
989
|
licenseNumber: '',
|
|
990
990
|
entityLegalName: '',
|
|
991
|
-
unifiedNumber: '',
|
|
992
991
|
isPrevDob: false
|
|
993
992
|
},
|
|
994
993
|
activitiesData: {
|
|
@@ -1265,7 +1264,7 @@ export var businessSlice = createSlice({
|
|
|
1265
1264
|
state.loading = true;
|
|
1266
1265
|
})
|
|
1267
1266
|
.addCase(retrieveEntityList.fulfilled, function (state, action) {
|
|
1268
|
-
var _a, _b, _c, _d
|
|
1267
|
+
var _a, _b, _c, _d;
|
|
1269
1268
|
state.error = null;
|
|
1270
1269
|
state.loading = false;
|
|
1271
1270
|
var data = action.payload;
|
|
@@ -1286,7 +1285,7 @@ export var businessSlice = createSlice({
|
|
|
1286
1285
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
|
|
1287
1286
|
licenseList = licenseList.filter(function (_a) {
|
|
1288
1287
|
var license = _a.license;
|
|
1289
|
-
return !(entityLicenseList || []).some(function (e) {
|
|
1288
|
+
return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
|
|
1290
1289
|
});
|
|
1291
1290
|
}
|
|
1292
1291
|
}
|
|
@@ -1296,10 +1295,8 @@ export var businessSlice = createSlice({
|
|
|
1296
1295
|
var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
|
|
1297
1296
|
var isOtherLicense_1 = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
|
|
1298
1297
|
state.data.businessTypeData.selectedLicense = selectedLicense;
|
|
1299
|
-
if (!isOtherLicense_1)
|
|
1298
|
+
if (!isOtherLicense_1)
|
|
1300
1299
|
state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
|
|
1301
|
-
state.data.businessTypeData.unifiedNumber = ((_f = (_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.additional_info) === null || _f === void 0 ? void 0 : _f.unified_number) || '';
|
|
1302
|
-
}
|
|
1303
1300
|
}
|
|
1304
1301
|
})
|
|
1305
1302
|
.addCase(retrieveEntityList.rejected, function (state, action) {
|
|
@@ -1311,10 +1308,10 @@ export var businessSlice = createSlice({
|
|
|
1311
1308
|
state.loading = true;
|
|
1312
1309
|
})
|
|
1313
1310
|
.addCase(retrieveAllEntityList.fulfilled, function (state, action) {
|
|
1314
|
-
var _a
|
|
1311
|
+
var _a;
|
|
1315
1312
|
state.error = null;
|
|
1316
1313
|
state.loading = false;
|
|
1317
|
-
var
|
|
1314
|
+
var _b = action.payload, data = _b.data, businessCountryCode = _b.businessCountryCode, entityId = _b.entityId;
|
|
1318
1315
|
var isKWCountry = isKW(businessCountryCode);
|
|
1319
1316
|
var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
|
|
1320
1317
|
if (isKWCountry) {
|
|
@@ -1332,10 +1329,8 @@ export var businessSlice = createSlice({
|
|
|
1332
1329
|
var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
|
|
1333
1330
|
state.data.businessTypeData.selectedEntityLicense = selectedLicense;
|
|
1334
1331
|
state.data.businessTypeData.selectedLicense = selectedLicense;
|
|
1335
|
-
if (!isOtherLicense(selectedLicense))
|
|
1332
|
+
if (!isOtherLicense(selectedLicense))
|
|
1336
1333
|
state.data.businessTypeData.licenseNumber = ((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _a === void 0 ? void 0 : _a.number) || '';
|
|
1337
|
-
state.data.businessTypeData.unifiedNumber = ((_c = (_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) || '';
|
|
1338
|
-
}
|
|
1339
1334
|
}
|
|
1340
1335
|
})
|
|
1341
1336
|
.addCase(retrieveAllEntityList.rejected, function (state, action) {
|
|
@@ -1129,13 +1129,13 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
1129
1129
|
export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDataAsync ', function (_a, thunkApi) {
|
|
1130
1130
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
1131
1131
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1132
|
-
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked,
|
|
1132
|
+
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1133
1133
|
var _d, _e;
|
|
1134
1134
|
return __generator(this, function (_f) {
|
|
1135
1135
|
switch (_f.label) {
|
|
1136
1136
|
case 0:
|
|
1137
1137
|
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
1138
|
-
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked
|
|
1138
|
+
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked;
|
|
1139
1139
|
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
1140
1140
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
1141
1141
|
_c = connectExpress.data, responseData = _c.responseData, isLeadIdPassed = _c.isLeadIdPassed;
|
|
@@ -1153,7 +1153,6 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1153
1153
|
license_type: (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) ? (isFL ? LicenseType.FL : LicenseType.CR) : undefined,
|
|
1154
1154
|
business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
|
|
1155
1155
|
is_acknowledged: true,
|
|
1156
|
-
unified_number: unifiedNumber,
|
|
1157
1156
|
terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
|
|
1158
1157
|
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
|
|
1159
1158
|
encryption_contract: []
|
|
@@ -1481,7 +1480,6 @@ var initialState = {
|
|
|
1481
1480
|
businessData: {
|
|
1482
1481
|
brandName: '',
|
|
1483
1482
|
licenseNumber: '',
|
|
1484
|
-
unifiedNumber: '',
|
|
1485
1483
|
termAndConditionChecked: false
|
|
1486
1484
|
},
|
|
1487
1485
|
authenticationData: {
|
|
@@ -1778,7 +1776,7 @@ export var connectSlice = createSlice({
|
|
|
1778
1776
|
state.error = null;
|
|
1779
1777
|
})
|
|
1780
1778
|
.addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
|
|
1781
|
-
var _a, _b
|
|
1779
|
+
var _a, _b;
|
|
1782
1780
|
state.loading = false;
|
|
1783
1781
|
var data = action.payload;
|
|
1784
1782
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -1798,8 +1796,7 @@ export var connectSlice = createSlice({
|
|
|
1798
1796
|
}
|
|
1799
1797
|
}
|
|
1800
1798
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
|
|
1801
|
-
var
|
|
1802
|
-
var unified_number = (_d = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.additional_info) === null || _d === void 0 ? void 0 : _d.unified_number;
|
|
1799
|
+
var _c = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _c.license_number, license_type = _c.license_type;
|
|
1803
1800
|
var selectedLicense = undefined;
|
|
1804
1801
|
if (license_number) {
|
|
1805
1802
|
var findLicense = licenseList.find(function (_a) {
|
|
@@ -1815,18 +1812,6 @@ export var connectSlice = createSlice({
|
|
|
1815
1812
|
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
|
|
1816
1813
|
state.data.businessData.licenseNumber = license_number;
|
|
1817
1814
|
}
|
|
1818
|
-
if (unified_number) {
|
|
1819
|
-
var findLicense = licenseList.find(function (_a) {
|
|
1820
|
-
var _b;
|
|
1821
|
-
var license = _a.license;
|
|
1822
|
-
return ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === unified_number;
|
|
1823
|
-
});
|
|
1824
|
-
if (findLicense)
|
|
1825
|
-
selectedLicense = findLicense;
|
|
1826
|
-
else
|
|
1827
|
-
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: '', additional_info: { unified_number: unified_number } } });
|
|
1828
|
-
state.data.businessData.unifiedNumber = unified_number;
|
|
1829
|
-
}
|
|
1830
1815
|
state.data.businessData.selectedLicense = selectedLicense;
|
|
1831
1816
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
|
|
1832
1817
|
})
|
|
@@ -1181,6 +1181,7 @@ export var individualSlice = createSlice({
|
|
|
1181
1181
|
state.data.individualData.isAuthorized = is_authorized;
|
|
1182
1182
|
})
|
|
1183
1183
|
.addCase(retrieveIndividualInfo.rejected, function (state, action) {
|
|
1184
|
+
state.addOrRequestDetailLoading = false;
|
|
1184
1185
|
state.error = action.error.message;
|
|
1185
1186
|
})
|
|
1186
1187
|
.addCase(getIndividualList.pending, function (state) {
|
|
@@ -323,7 +323,7 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
325
|
}); });
|
|
326
|
-
export var onCloseCompleteTax = createAsyncThunk('
|
|
326
|
+
export var onCloseCompleteTax = createAsyncThunk('password/onCloseCompleteTax', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
327
327
|
var tax, _a, merchant, brand, entity;
|
|
328
328
|
return __generator(this, function (_b) {
|
|
329
329
|
switch (_b.label) {
|
|
@@ -76,8 +76,8 @@ var EntityList = function (_a) {
|
|
|
76
76
|
var selectedEntity = selectedEntityControl.field.value;
|
|
77
77
|
React.useEffect(function () {
|
|
78
78
|
if (entityList.length > 0) {
|
|
79
|
-
var filteredEntityList = entityList.filter(function (entity) { return (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) && entity.business_id === brandInfo.business_id; })
|
|
80
|
-
var list_1 = __spreadArray(__spreadArray([], filteredEntityList, true), [entityList[entityList.length - 1]], false);
|
|
79
|
+
var filteredEntityList = entityList.filter(function (entity) { return (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) && entity.business_id === brandInfo.business_id; });
|
|
80
|
+
var list_1 = __spreadArray(__spreadArray([], filteredEntityList, true), [entityList[entityList.length - 1]], false) || [];
|
|
81
81
|
setList(list_1);
|
|
82
82
|
if (filteredEntityList.length) {
|
|
83
83
|
setValue('entityInfo', filteredEntityList[0], { shouldValidate: true });
|
|
@@ -32,7 +32,6 @@ import Article from './Article';
|
|
|
32
32
|
import EntityLicenseList from './EntityLicenseList';
|
|
33
33
|
import LicenseNumber from './LicenseNumber';
|
|
34
34
|
import EntityName from './EntityName';
|
|
35
|
-
import UnifiedNumber from './UnifiedNumber';
|
|
36
35
|
var ListType;
|
|
37
36
|
(function (ListType) {
|
|
38
37
|
ListType["LicenseList"] = "LicenseList";
|
|
@@ -41,7 +40,7 @@ var ListType;
|
|
|
41
40
|
var BusinessType = function (_a) {
|
|
42
41
|
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading, uploadingArticle = _b.uploadingArticle;
|
|
43
42
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
44
|
-
var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody, isPrevDob = _c.isPrevDob
|
|
43
|
+
var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody, isPrevDob = _c.isPrevDob;
|
|
45
44
|
var entityLicenseList = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.entityLicenseList) || [];
|
|
46
45
|
var t = useTranslation().t;
|
|
47
46
|
var isAr = useLanguage().isAr;
|
|
@@ -74,7 +73,6 @@ var BusinessType = function (_a) {
|
|
|
74
73
|
selectedLicense: selectedLicense,
|
|
75
74
|
selectedEntityLicense: selectedEntityLicense,
|
|
76
75
|
licenseNumber: licenseNumber,
|
|
77
|
-
unifiedNumber: unifiedNumber,
|
|
78
76
|
entityLegalName: entityLegalName,
|
|
79
77
|
certificateId: certificateId,
|
|
80
78
|
articleId: articleId
|
|
@@ -91,7 +89,6 @@ var BusinessType = function (_a) {
|
|
|
91
89
|
selectedLicense: data.selectedLicense,
|
|
92
90
|
selectedEntityLicense: data.selectedEntityLicense,
|
|
93
91
|
licenseNumber: data.licenseNumber,
|
|
94
|
-
unifiedNumber: data.unifiedNumber,
|
|
95
92
|
entityLegalName: data.entityLegalName,
|
|
96
93
|
certificateId: data.certificateId,
|
|
97
94
|
articleId: data.articleId
|
|
@@ -101,25 +98,17 @@ var BusinessType = function (_a) {
|
|
|
101
98
|
var onBack = function () {
|
|
102
99
|
dispatch(handlePrevScreenStep(isPrevDob ? 'BUSINESS_DOB_STEP' : 'BUSINESS_IDBOD_STEP'));
|
|
103
100
|
};
|
|
104
|
-
var showLicenseNumber = function () {
|
|
105
|
-
if (isKWCountry)
|
|
106
|
-
return !isAnyListActive && isCR;
|
|
107
|
-
if (isSACountry)
|
|
108
|
-
return !isAnyListActive && isFL;
|
|
109
|
-
return !isAnyListActive;
|
|
110
|
-
};
|
|
111
101
|
var isLicenseListActive = listActive === ListType.LicenseList;
|
|
112
102
|
var isEntityLicenseListActive = listActive === ListType.EntityLicenseList;
|
|
113
103
|
var isAnyListActive = isLicenseListActive || isEntityLicenseListActive;
|
|
114
104
|
var selected = methods.getValues('selectedLicense');
|
|
115
105
|
var selectedLicenseEntity = methods.getValues('selectedEntityLicense');
|
|
116
106
|
var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === Type.CR;
|
|
117
|
-
var isFL = (selected === null || selected === void 0 ? void 0 : selected.type) === Type.FL;
|
|
118
107
|
var hasEntityList = !!(entityLicenseList === null || entityLicenseList === void 0 ? void 0 : entityLicenseList.length);
|
|
119
108
|
var showLicenseList = hasEntityList ? (isSACountry || isOtherCountry) && isOtherLicense(selectedLicenseEntity) : isSACountry || isOtherCountry;
|
|
120
109
|
var showEntityList = isKWCountry ? hasEntityList && !isLicenseListActive && isCR : hasEntityList && !isLicenseListActive;
|
|
121
110
|
var disabled = !methods.formState.isValid || uploading || uploadingArticle;
|
|
122
111
|
var disableBack = !data.otpData.isNID;
|
|
123
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseType, { show: !listActive && isKWCountry }), _jsx(EntityLicenseList, { show: showEntityList, onListOpen: function () { return handleMenuClick(ListType.EntityLicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(LicenseList, { show: showLicenseList && !isEntityLicenseListActive, onListOpen: function () { return handleMenuClick(ListType.LicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityName, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(LicenseNumber, { show:
|
|
112
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseType, { show: !listActive && isKWCountry }), _jsx(EntityLicenseList, { show: showEntityList, onListOpen: function () { return handleMenuClick(ListType.EntityLicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(LicenseList, { show: showLicenseList && !isEntityLicenseListActive, onListOpen: function () { return handleMenuClick(ListType.LicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityName, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(LicenseNumber, { show: isKWCountry ? !isAnyListActive && isCR : !isAnyListActive }), _jsx(LicenseCertificate, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Article, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Collapse, __assign({ in: !isAnyListActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
124
113
|
};
|
|
125
114
|
export default React.memo(BusinessType);
|
|
@@ -36,7 +36,7 @@ import { businessSelector, clearError } from '../../../app/business/businessStor
|
|
|
36
36
|
import Text from '../../../../components/Text';
|
|
37
37
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
38
38
|
import Collapse from '../../../../components/Collapse';
|
|
39
|
-
import { isKW, isOtherLicense
|
|
39
|
+
import { isKW, isOtherLicense } from '../../../../utils';
|
|
40
40
|
import { settingsSelector } from '../../../../app/settings';
|
|
41
41
|
import { OTHER_CR_LICENSE } from '../../../../constants';
|
|
42
42
|
var InputStyled = styled(InputSelect)(function (_a) {
|
|
@@ -67,7 +67,6 @@ var EntityLicenseList = function (_a) {
|
|
|
67
67
|
var entityLicenseList = (responseBody || {}).entityLicenseList;
|
|
68
68
|
var country_code = settingsData.businessCountry.iso2;
|
|
69
69
|
var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
|
|
70
|
-
var isSACountry = React.useMemo(function () { return isSA(country_code); }, [country_code]);
|
|
71
70
|
var onOpenLicenseList = function (event) {
|
|
72
71
|
var _a;
|
|
73
72
|
setAnchorEl(event.currentTarget);
|
|
@@ -91,10 +90,8 @@ var EntityLicenseList = function (_a) {
|
|
|
91
90
|
}
|
|
92
91
|
}, [entityLicenseList, selectedEntityLicense]);
|
|
93
92
|
var getLicenseNumber = function (item) {
|
|
94
|
-
var _a
|
|
95
|
-
|
|
96
|
-
return ((_b = (_a = item === null || item === void 0 ? void 0 : item.license) === null || _a === void 0 ? void 0 : _a.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) || '';
|
|
97
|
-
return ((_c = item === null || item === void 0 ? void 0 : item.license) === null || _c === void 0 ? void 0 : _c.number) || '';
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = item === null || item === void 0 ? void 0 : item.license) === null || _a === void 0 ? void 0 : _a.number) || '';
|
|
98
95
|
};
|
|
99
96
|
var getLicenseName = function (item) {
|
|
100
97
|
var _a, _b;
|
|
@@ -103,7 +100,6 @@ var EntityLicenseList = function (_a) {
|
|
|
103
100
|
return t((isAr ? (_a = item === null || item === void 0 ? void 0 : item.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.legal_name) === null || _b === void 0 ? void 0 : _b.en) || '');
|
|
104
101
|
};
|
|
105
102
|
var onSelectItem = function (license) {
|
|
106
|
-
var _a, _b, _c;
|
|
107
103
|
if (error)
|
|
108
104
|
dispatch(clearError());
|
|
109
105
|
selectedEntityLicenseControl.field.onChange(license);
|
|
@@ -111,12 +107,10 @@ var EntityLicenseList = function (_a) {
|
|
|
111
107
|
var license_1 = isKWCountry ? OTHER_CR_LICENSE : {};
|
|
112
108
|
setValue('selectedLicense', license_1, { shouldValidate: true });
|
|
113
109
|
setValue('licenseNumber', '', { shouldValidate: true });
|
|
114
|
-
setValue('unifiedNumber', '', { shouldValidate: true });
|
|
115
110
|
}
|
|
116
111
|
else {
|
|
117
112
|
setValue('selectedLicense', license, { shouldValidate: true });
|
|
118
|
-
setValue('licenseNumber', (
|
|
119
|
-
setValue('unifiedNumber', ((_c = (_b = license === null || license === void 0 ? void 0 : license.license) === null || _b === void 0 ? void 0 : _b.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) || '', { shouldValidate: true });
|
|
113
|
+
setValue('licenseNumber', getLicenseNumber(license), { shouldValidate: true });
|
|
120
114
|
}
|
|
121
115
|
onCloseLicenseList();
|
|
122
116
|
};
|
|
@@ -128,7 +122,7 @@ var EntityLicenseList = function (_a) {
|
|
|
128
122
|
var selected = selectedEntityLicenseControl.field.value;
|
|
129
123
|
var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === BusinessType.CR;
|
|
130
124
|
var flValue = isOtherLicense(selected) ? t(getLicenseName(selected)) : getLicenseNumber(selected);
|
|
131
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_entity_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_entity'), value:
|
|
125
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_entity_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_entity'), value: isCR ? t(getLicenseName(selected)) : flValue }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'legal_name?.en', list: entityLicenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
|
|
132
126
|
return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selected) }, { children: isOtherLicense(item) ? t(getLicenseName(item)) : getLicenseFullName(item) })) }), getLicenseNumber(item) === getLicenseNumber(selected) && _jsx(CheckIcon, {})] }));
|
|
133
127
|
} }) }))] }) })));
|
|
134
128
|
};
|