@tap-payments/auth-jsconnect 2.11.0-sandbox → 2.11.1-development
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/form.d.ts +2 -0
- package/build/api/entity.d.ts +3 -0
- package/build/api/lead.d.ts +1 -0
- package/build/assets/locales/ar.json +9 -10
- package/build/assets/locales/en.json +9 -10
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +9 -1
- package/build/constants/app.js +6 -4
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/business/businessStore.js +15 -10
- package/build/features/app/connectExpress/connectExpressStore.js +19 -4
- package/build/features/app/terminal/terminalStore.d.ts +2 -1
- package/build/features/app/terminal/terminalStore.js +5 -2
- package/build/features/auth/Auth.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +13 -2
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
- package/build/features/business/screens/BusinessType/LicenseList.js +15 -7
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
- package/build/features/business/screens/BusinessType/validation.js +31 -10
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +23 -7
- 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/UnifiedNumber.d.ts +36 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
- package/build/features/entity/screens/EntityName/EntityName.js +2 -1
- 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 +14 -3
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -2
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +2 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +8 -3
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +3 -1
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -5
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +19 -10
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +7 -2
- package/build/features/terminal/screens/shared/TerminalList.js +3 -3
- package/build/utils/common.js +3 -3
- package/build/utils/string.d.ts +1 -1
- package/build/utils/string.js +2 -2
- package/build/utils/validation.js +1 -1
- package/package.json +2 -2
package/build/@types/form.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare type BrandActivitiesFormValues = {
|
|
|
61
61
|
};
|
|
62
62
|
export declare type BusinessTypeFormValues = {
|
|
63
63
|
licenseNumber: string;
|
|
64
|
+
unifiedNumber: string;
|
|
64
65
|
entityLegalName?: string;
|
|
65
66
|
selectedEntityLicense?: EntityLicense;
|
|
66
67
|
selectedLicense?: License;
|
|
@@ -150,6 +151,7 @@ export declare type EntityCapitalFormValues = {
|
|
|
150
151
|
export declare type BusinessDataFormValues = {
|
|
151
152
|
brandName: string;
|
|
152
153
|
licenseNumber: string;
|
|
154
|
+
unifiedNumber: string;
|
|
153
155
|
selectedLicense?: License;
|
|
154
156
|
termAndConditionChecked?: boolean;
|
|
155
157
|
};
|
package/build/api/entity.d.ts
CHANGED
package/build/api/lead.d.ts
CHANGED
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"capital_paid_hint": "00000",
|
|
138
138
|
"capital_paid_input_label": "رأس المال المدفوع",
|
|
139
139
|
"capital_paid_label": "رأس المال المدفوع ({{currency}})",
|
|
140
|
-
"capital_paid_input_label": "رأس المال المدفوع",
|
|
141
140
|
"capital_paid_required": "Please Enter paid amount",
|
|
142
141
|
"capital_share_count_hint": "00000",
|
|
143
142
|
"capital_share_count_label": "عدد اسهم رأس المال",
|
|
@@ -145,7 +144,6 @@
|
|
|
145
144
|
"capital_share_value_hint": "00000",
|
|
146
145
|
"capital_share_value_input_label": "قيمة السهم",
|
|
147
146
|
"capital_share_value_label": "قيمة السهم ({{currency}})",
|
|
148
|
-
"capital_share_value_input_label": "قيمة السهم",
|
|
149
147
|
"capital_share_value_required": "Please Enter share value",
|
|
150
148
|
"category": "الفئة",
|
|
151
149
|
"category_name": "اسم الفئة",
|
|
@@ -286,7 +284,6 @@
|
|
|
286
284
|
"expected_customers_to_serve": "عدد العملاء شهريا",
|
|
287
285
|
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
288
286
|
"expected_sales_monthly": "البيع المتوقع في الشهر؟ ({{currency}})",
|
|
289
|
-
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
290
287
|
"expected_sales_yearly": "ما هي المبيعات المتوقعة لعملك شهريًا؟",
|
|
291
288
|
"expected_served_monthly": "عدد العملاء شهريا",
|
|
292
289
|
"expiry_date": "تاريخ الإنتهاء",
|
|
@@ -393,6 +390,7 @@
|
|
|
393
390
|
"loading": "تحميل...",
|
|
394
391
|
"loading_bank_statement": "تحميل.......",
|
|
395
392
|
"login_to_dashboard": "تسجيل الدخول لادارة الحساب",
|
|
393
|
+
"login_with_passcode": "تسجيل الدخول باستخدام رمز المرور",
|
|
396
394
|
"mail_btn_open_title": "افتح البريد الإلكتروني",
|
|
397
395
|
"marital_status": "الحالة الزوجية",
|
|
398
396
|
"masking_symbols": "•••",
|
|
@@ -459,6 +457,8 @@
|
|
|
459
457
|
"paci_verify_loading": "إحضار التفاصيل",
|
|
460
458
|
"paci_verify_loading_desc": "الرجاء التحلي بالصبر حتى التحقق من التفاصيل",
|
|
461
459
|
"paci_waiting_title": "Please wait we are verifying",
|
|
460
|
+
"passcode_required": "الرجاء إدخال رمز المرور المطلوب",
|
|
461
|
+
"passcode_title": "الرجاء إدخال رمز المرور الخاص بك",
|
|
462
462
|
"password_flow_completed": "إعادة تعيين كلمة المرور",
|
|
463
463
|
"password_flow_pending": "إعداد كلمة المرور",
|
|
464
464
|
"password_flow_title": "إعداد كلمة المرور",
|
|
@@ -493,7 +493,6 @@
|
|
|
493
493
|
"please_choose_is_authorized": "الرجاء التأكيد إذا كنت أنت المستخدم المصرح له",
|
|
494
494
|
"please_choose_relative_pep": "هل أنت أو أحد أقاربك شخص مكشوف علنًا (PEP)",
|
|
495
495
|
"please_enter_actual_income": "ما هو دخلك الشهري ({{currency}}) ؟ ",
|
|
496
|
-
"monthly_income": "ما هو دخلك الشهري؟ ",
|
|
497
496
|
"please_enter_employer_name": "يرجى إدخال اسم منشأه العمل الخاص بك",
|
|
498
497
|
"please_try_again_after_few_minutes": "يمكنك محاولة تسجيل الدخول مرة أخرى بعد {{minutes}} دقيقة",
|
|
499
498
|
"powered_by": "بواسطة",
|
|
@@ -535,7 +534,7 @@
|
|
|
535
534
|
"share_value_hint": "0000",
|
|
536
535
|
"share_value_input_label": "قيمة السهم",
|
|
537
536
|
"share_value_label": "قيمة السهم ({{currency}})",
|
|
538
|
-
"
|
|
537
|
+
"sign_in_with_otp": "تسجيل الدخول باستخدام رمز التحقق (OTP)",
|
|
539
538
|
"sign_up": "Sign up",
|
|
540
539
|
"signed_up": "تسجيل الدخول",
|
|
541
540
|
"signin_email_label": "البريد الألكتروني",
|
|
@@ -659,6 +658,10 @@
|
|
|
659
658
|
"update_later": "سأقوم بالتحديث لاحقاً",
|
|
660
659
|
"update_mobile_number": "تحديث رقم الجوال",
|
|
661
660
|
"uploaded_file": "file",
|
|
661
|
+
"v1_add_unified_number": "أضف الرقم الموحد",
|
|
662
|
+
"v1_company_unified_number_description": "يمكنك العثور على الرقم الموحد لشركتك في الزاوية العلوية اليسرى من شهادة تسجيل الشركة.",
|
|
663
|
+
"v1_company_unified_number_hint": "700xxxxxxx",
|
|
664
|
+
"v1_company_unified_number_label": "الرقم الموحد للشركة",
|
|
662
665
|
"vat_id": "رقم الضريبي المميز",
|
|
663
666
|
"vat_id_placeholder": "00000000",
|
|
664
667
|
"verification_brand_name": "الاسم التجاري",
|
|
@@ -676,9 +679,5 @@
|
|
|
676
679
|
"year": "السنة",
|
|
677
680
|
"yes": "نعم",
|
|
678
681
|
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
679
|
-
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
680
|
-
"passcode_title": "الرجاء إدخال رمز المرور الخاص بك",
|
|
681
|
-
"sign_in_with_otp": "تسجيل الدخول باستخدام رمز التحقق (OTP)",
|
|
682
|
-
"passcode_required": "الرجاء إدخال رمز المرور المطلوب",
|
|
683
|
-
"login_with_passcode": "تسجيل الدخول باستخدام رمز المرور"
|
|
682
|
+
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
684
683
|
}
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"capital_paid_hint": "00000",
|
|
137
137
|
"capital_paid_input_label": "Capital Paid",
|
|
138
138
|
"capital_paid_label": "Capital Paid ({{currency}})",
|
|
139
|
-
"capital_paid_input_label": "Capital Paid",
|
|
140
139
|
"capital_paid_required": "Please Enter paid amount",
|
|
141
140
|
"capital_share_count_hint": "00000",
|
|
142
141
|
"capital_share_count_label": "Capital Share Count",
|
|
@@ -144,7 +143,6 @@
|
|
|
144
143
|
"capital_share_value_hint": "00000",
|
|
145
144
|
"capital_share_value_input_label": "Capital Share Value",
|
|
146
145
|
"capital_share_value_label": "Capital Share Value ({{currency}})",
|
|
147
|
-
"capital_share_value_input_label": "Capital Share Value",
|
|
148
146
|
"capital_share_value_required": "Please Enter share value",
|
|
149
147
|
"category": "Category",
|
|
150
148
|
"category_name": "Category name",
|
|
@@ -294,7 +292,6 @@
|
|
|
294
292
|
"expected_customers_to_serve": "Customers served per month",
|
|
295
293
|
"expected_sale_per_month": "Expected sale per month?",
|
|
296
294
|
"expected_sales_monthly": "Expected sale per month? ({{currency}})",
|
|
297
|
-
"expected_sale_per_month": "Expected sale per month?",
|
|
298
295
|
"expected_sales_yearly": "What is the expected sales for your business per month?",
|
|
299
296
|
"expected_served_monthly": "Customers served per month",
|
|
300
297
|
"expiry_date": "Date of expiry",
|
|
@@ -408,6 +405,7 @@
|
|
|
408
405
|
"loading": "Loading...",
|
|
409
406
|
"loading_bank_statement": "loading....",
|
|
410
407
|
"login_to_dashboard": "Login to dashboard",
|
|
408
|
+
"login_with_passcode": "Login with Passcode",
|
|
411
409
|
"mail_btn_open_title": "Open Mail",
|
|
412
410
|
"marital_status": "Marital status",
|
|
413
411
|
"masking_symbols": "•••",
|
|
@@ -475,6 +473,8 @@
|
|
|
475
473
|
"paci_verify_loading": "Fetching Details",
|
|
476
474
|
"paci_verify_loading_desc": "Please be patient until verify details",
|
|
477
475
|
"paci_waiting_title": "Please wait we are verifying",
|
|
476
|
+
"passcode_required": "Please enter the required Passcode",
|
|
477
|
+
"passcode_title": "Please enter your passcode",
|
|
478
478
|
"password_flow_completed": "Reset my password",
|
|
479
479
|
"password_flow_pending": "Setup my password",
|
|
480
480
|
"password_flow_title": "Setup your password",
|
|
@@ -509,7 +509,6 @@
|
|
|
509
509
|
"please_choose_is_authorized": "Please tell us if you are the authorized user",
|
|
510
510
|
"please_choose_relative_pep": "Are you or one of your relatives a Publicly Exposed Person (PEP)",
|
|
511
511
|
"please_enter_actual_income": "Monthly income ({{currency}})",
|
|
512
|
-
"monthly_income": "Monthly income",
|
|
513
512
|
"please_enter_employer_name": "Please enter the name of your employer",
|
|
514
513
|
"please_try_again_after_few_minutes": "You can try to login again after {{minutes}} mins",
|
|
515
514
|
"powered_by": "Powered by",
|
|
@@ -557,7 +556,7 @@
|
|
|
557
556
|
"share_value_hint": "0000",
|
|
558
557
|
"share_value_input_label": "Share Value",
|
|
559
558
|
"share_value_label": "Share Value ({{currency}})",
|
|
560
|
-
"
|
|
559
|
+
"sign_in_with_otp": "Sign in with OTP",
|
|
561
560
|
"sign_up": "Sign up",
|
|
562
561
|
"signed_up": "Signed up",
|
|
563
562
|
"signin_email_label": "Email address",
|
|
@@ -687,6 +686,10 @@
|
|
|
687
686
|
"upload_bank_statement": "Please upload the bank statement",
|
|
688
687
|
"upload_file": "Select a file from your computer",
|
|
689
688
|
"uploaded_file": "file",
|
|
689
|
+
"v1_add_unified_number": "Add a Unified Number",
|
|
690
|
+
"v1_company_unified_number_description": "You can find your Company Unified Number in the top-left corner of your Company Registration Certificate.",
|
|
691
|
+
"v1_company_unified_number_hint": "700xxxxxxx",
|
|
692
|
+
"v1_company_unified_number_label": "Company unified number",
|
|
690
693
|
"vat_id": "Tax Identification Number (TIN)",
|
|
691
694
|
"vat_id_placeholder": "000000000",
|
|
692
695
|
"verification_brand_name": "Brand name",
|
|
@@ -703,9 +706,5 @@
|
|
|
703
706
|
"website_label": "Website",
|
|
704
707
|
"year": "Year",
|
|
705
708
|
"yes": "Yes",
|
|
706
|
-
"your_brand_details": "Your brand details"
|
|
707
|
-
"passcode_title": "Please enter your passcode",
|
|
708
|
-
"sign_in_with_otp": "Sign in with OTP",
|
|
709
|
-
"passcode_required": "Please enter the required Passcode",
|
|
710
|
-
"login_with_passcode": "Login with Passcode"
|
|
709
|
+
"your_brand_details": "Your brand details"
|
|
711
710
|
}
|
|
@@ -33,7 +33,7 @@ var StyledTooltip = styled(function (_a) {
|
|
|
33
33
|
var _b;
|
|
34
34
|
var theme = _a.theme;
|
|
35
35
|
return (_b = {},
|
|
36
|
-
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8))
|
|
36
|
+
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) }),
|
|
37
37
|
_b);
|
|
38
38
|
});
|
|
39
39
|
var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType, TerminalInfo, TerminalDeviceInfo } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
|
-
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
4
3
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
5
4
|
export declare const CLIENT_ORIGIN: string;
|
|
6
5
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
@@ -235,6 +234,9 @@ export declare const OTHER_FL_LICENSE: {
|
|
|
235
234
|
};
|
|
236
235
|
license: {
|
|
237
236
|
number: string;
|
|
237
|
+
additional_info: {
|
|
238
|
+
unified_number: string;
|
|
239
|
+
};
|
|
238
240
|
};
|
|
239
241
|
type: BusinessType;
|
|
240
242
|
};
|
|
@@ -246,6 +248,9 @@ export declare const OTHER_ENTITY_LICENSE: {
|
|
|
246
248
|
};
|
|
247
249
|
license: {
|
|
248
250
|
number: string;
|
|
251
|
+
additional_info: {
|
|
252
|
+
unified_number: string;
|
|
253
|
+
};
|
|
249
254
|
};
|
|
250
255
|
type: BusinessType;
|
|
251
256
|
};
|
|
@@ -256,6 +261,9 @@ export declare const OTHER_CR_LICENSE: {
|
|
|
256
261
|
};
|
|
257
262
|
license: {
|
|
258
263
|
number: string;
|
|
264
|
+
additional_info: {
|
|
265
|
+
unified_number: string;
|
|
266
|
+
};
|
|
259
267
|
};
|
|
260
268
|
type: BusinessType;
|
|
261
269
|
};
|
package/build/constants/app.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
import { CONNECT_FLOWS } from './flows';
|
|
3
3
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
4
|
-
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
5
4
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
6
5
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
7
6
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -1242,7 +1241,8 @@ export var OTHER_FL_LICENSE = {
|
|
|
1242
1241
|
en: 'add_other_fl'
|
|
1243
1242
|
},
|
|
1244
1243
|
license: {
|
|
1245
|
-
number: 'other_fl'
|
|
1244
|
+
number: 'other_fl',
|
|
1245
|
+
additional_info: { unified_number: 'other_fl' }
|
|
1246
1246
|
},
|
|
1247
1247
|
type: BusinessType.FL
|
|
1248
1248
|
};
|
|
@@ -1253,7 +1253,8 @@ export var OTHER_ENTITY_LICENSE = {
|
|
|
1253
1253
|
en: 'add_other'
|
|
1254
1254
|
},
|
|
1255
1255
|
license: {
|
|
1256
|
-
number: 'other_entity'
|
|
1256
|
+
number: 'other_entity',
|
|
1257
|
+
additional_info: { unified_number: 'other_entity' }
|
|
1257
1258
|
},
|
|
1258
1259
|
type: BusinessType.CR
|
|
1259
1260
|
};
|
|
@@ -1263,7 +1264,8 @@ export var OTHER_CR_LICENSE = {
|
|
|
1263
1264
|
en: 'add_other_cr'
|
|
1264
1265
|
},
|
|
1265
1266
|
license: {
|
|
1266
|
-
number: 'other_cr'
|
|
1267
|
+
number: 'other_cr',
|
|
1268
|
+
additional_info: { unified_number: 'other_cr' }
|
|
1267
1269
|
},
|
|
1268
1270
|
type: BusinessType.CR
|
|
1269
1271
|
};
|
|
@@ -10,6 +10,7 @@ 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;
|
|
13
14
|
export declare const MAX_EMAIL_LENGTH = 50;
|
|
14
15
|
export declare const BRAND_NAME_MAX_LENGTH = 99;
|
|
15
16
|
export declare const KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -10,6 +10,7 @@ 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;
|
|
13
14
|
export var MAX_EMAIL_LENGTH = 50;
|
|
14
15
|
export var BRAND_NAME_MAX_LENGTH = 99;
|
|
15
16
|
export var KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -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, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
|
|
654
|
+
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, unifiedNumber, 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, unifiedNumber = params.unifiedNumber;
|
|
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
|
-
} }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
|
|
667
|
+
}, unified_number: unifiedNumber }, (!(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', 'entity.unified_number'] });
|
|
674
674
|
return [4, API.leadService.updateLead(payload)];
|
|
675
675
|
case 1:
|
|
676
676
|
data = _g.sent();
|
|
@@ -988,6 +988,7 @@ var initialState = {
|
|
|
988
988
|
businessTypeData: {
|
|
989
989
|
licenseNumber: '',
|
|
990
990
|
entityLegalName: '',
|
|
991
|
+
unifiedNumber: '',
|
|
991
992
|
isPrevDob: false
|
|
992
993
|
},
|
|
993
994
|
activitiesData: {
|
|
@@ -1264,7 +1265,7 @@ export var businessSlice = createSlice({
|
|
|
1264
1265
|
state.loading = true;
|
|
1265
1266
|
})
|
|
1266
1267
|
.addCase(retrieveEntityList.fulfilled, function (state, action) {
|
|
1267
|
-
var _a, _b, _c, _d;
|
|
1268
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1268
1269
|
state.error = null;
|
|
1269
1270
|
state.loading = false;
|
|
1270
1271
|
var data = action.payload;
|
|
@@ -1285,7 +1286,7 @@ export var businessSlice = createSlice({
|
|
|
1285
1286
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
|
|
1286
1287
|
licenseList = licenseList.filter(function (_a) {
|
|
1287
1288
|
var license = _a.license;
|
|
1288
|
-
return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
|
|
1289
|
+
return !(entityLicenseList || []).some(function (e) { var _a, _b; return e.license.number === license.number || ((_a = e.license.additional_info) === null || _a === void 0 ? void 0 : _a.unified_number) === ((_b = license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number); });
|
|
1289
1290
|
});
|
|
1290
1291
|
}
|
|
1291
1292
|
}
|
|
@@ -1295,8 +1296,10 @@ export var businessSlice = createSlice({
|
|
|
1295
1296
|
var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
|
|
1296
1297
|
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';
|
|
1297
1298
|
state.data.businessTypeData.selectedLicense = selectedLicense;
|
|
1298
|
-
if (!isOtherLicense_1)
|
|
1299
|
+
if (!isOtherLicense_1) {
|
|
1299
1300
|
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
|
+
}
|
|
1300
1303
|
}
|
|
1301
1304
|
})
|
|
1302
1305
|
.addCase(retrieveEntityList.rejected, function (state, action) {
|
|
@@ -1308,10 +1311,10 @@ export var businessSlice = createSlice({
|
|
|
1308
1311
|
state.loading = true;
|
|
1309
1312
|
})
|
|
1310
1313
|
.addCase(retrieveAllEntityList.fulfilled, function (state, action) {
|
|
1311
|
-
var _a;
|
|
1314
|
+
var _a, _b, _c;
|
|
1312
1315
|
state.error = null;
|
|
1313
1316
|
state.loading = false;
|
|
1314
|
-
var
|
|
1317
|
+
var _d = action.payload, data = _d.data, businessCountryCode = _d.businessCountryCode, entityId = _d.entityId;
|
|
1315
1318
|
var isKWCountry = isKW(businessCountryCode);
|
|
1316
1319
|
var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
|
|
1317
1320
|
if (isKWCountry) {
|
|
@@ -1329,8 +1332,10 @@ export var businessSlice = createSlice({
|
|
|
1329
1332
|
var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
|
|
1330
1333
|
state.data.businessTypeData.selectedEntityLicense = selectedLicense;
|
|
1331
1334
|
state.data.businessTypeData.selectedLicense = selectedLicense;
|
|
1332
|
-
if (!isOtherLicense(selectedLicense))
|
|
1335
|
+
if (!isOtherLicense(selectedLicense)) {
|
|
1333
1336
|
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
|
+
}
|
|
1334
1339
|
}
|
|
1335
1340
|
})
|
|
1336
1341
|
.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, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1132
|
+
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, unifiedNumber, 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, unifiedNumber = formData.unifiedNumber;
|
|
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,6 +1153,7 @@ 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,
|
|
1156
1157
|
terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
|
|
1157
1158
|
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
|
|
1158
1159
|
encryption_contract: []
|
|
@@ -1480,6 +1481,7 @@ var initialState = {
|
|
|
1480
1481
|
businessData: {
|
|
1481
1482
|
brandName: '',
|
|
1482
1483
|
licenseNumber: '',
|
|
1484
|
+
unifiedNumber: '',
|
|
1483
1485
|
termAndConditionChecked: false
|
|
1484
1486
|
},
|
|
1485
1487
|
authenticationData: {
|
|
@@ -1776,7 +1778,7 @@ export var connectSlice = createSlice({
|
|
|
1776
1778
|
state.error = null;
|
|
1777
1779
|
})
|
|
1778
1780
|
.addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
|
|
1779
|
-
var _a, _b;
|
|
1781
|
+
var _a, _b, _c, _d;
|
|
1780
1782
|
state.loading = false;
|
|
1781
1783
|
var data = action.payload;
|
|
1782
1784
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -1796,7 +1798,8 @@ export var connectSlice = createSlice({
|
|
|
1796
1798
|
}
|
|
1797
1799
|
}
|
|
1798
1800
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
|
|
1799
|
-
var
|
|
1801
|
+
var _e = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _e.license_number, license_type = _e.license_type, entity = _e.entity;
|
|
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;
|
|
1800
1803
|
var selectedLicense = undefined;
|
|
1801
1804
|
if (license_number) {
|
|
1802
1805
|
var findLicense = licenseList.find(function (_a) {
|
|
@@ -1812,6 +1815,18 @@ export var connectSlice = createSlice({
|
|
|
1812
1815
|
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
|
|
1813
1816
|
state.data.businessData.licenseNumber = license_number;
|
|
1814
1817
|
}
|
|
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
|
+
}
|
|
1815
1830
|
state.data.businessData.selectedLicense = selectedLicense;
|
|
1816
1831
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
|
|
1817
1832
|
})
|
|
@@ -102,8 +102,9 @@ export declare const terminalSlice: import("@reduxjs/toolkit").Slice<TerminalDat
|
|
|
102
102
|
resetOTPScreen: (state: TerminalDataState) => void;
|
|
103
103
|
storeSelectedTerminalDevice: (state: TerminalDataState, action: ActionState<TerminalDeviceInfo>) => void;
|
|
104
104
|
storeSelectedTerminal: (state: TerminalDataState, action: ActionState<TerminalInfo>) => void;
|
|
105
|
+
resetTerminalLinkResponse: (state: TerminalDataState) => void;
|
|
105
106
|
}, "terminal/store">;
|
|
106
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, storeSelectedTerminalDevice: import("@reduxjs/toolkit").ActionCreatorWithPayload<TerminalDeviceInfo, string>, storeSelectedTerminal: import("@reduxjs/toolkit").ActionCreatorWithPayload<TerminalInfo, string>;
|
|
107
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, storeSelectedTerminalDevice: import("@reduxjs/toolkit").ActionCreatorWithPayload<TerminalDeviceInfo, string>, storeSelectedTerminal: import("@reduxjs/toolkit").ActionCreatorWithPayload<TerminalInfo, string>, resetTerminalLinkResponse: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
107
108
|
declare const _default: import("redux").Reducer<TerminalDataState, import("redux").AnyAction>;
|
|
108
109
|
export default _default;
|
|
109
110
|
export declare const terminalSelector: (state: RootState) => TerminalDataState;
|
|
@@ -431,7 +431,7 @@ export var onCloseCompleteTerminal = createAsyncThunk('terminal/onCloseCompleteT
|
|
|
431
431
|
});
|
|
432
432
|
}); });
|
|
433
433
|
var initialState = {
|
|
434
|
-
error:
|
|
434
|
+
error: null,
|
|
435
435
|
loading: false,
|
|
436
436
|
customLoading: false,
|
|
437
437
|
terminalListLoading: false,
|
|
@@ -470,6 +470,9 @@ export var terminalSlice = createSlice({
|
|
|
470
470
|
},
|
|
471
471
|
storeSelectedTerminal: function (state, action) {
|
|
472
472
|
state.data.terminalInfo.selectedTerminal = action.payload;
|
|
473
|
+
},
|
|
474
|
+
resetTerminalLinkResponse: function (state) {
|
|
475
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { linkTerminalDeviceData: undefined, pushNotificationLinkedNewTerminalData: undefined, linkNewTerminalData: undefined });
|
|
473
476
|
}
|
|
474
477
|
},
|
|
475
478
|
extraReducers: function (builder) {
|
|
@@ -668,6 +671,6 @@ export var terminalSlice = createSlice({
|
|
|
668
671
|
});
|
|
669
672
|
}
|
|
670
673
|
});
|
|
671
|
-
export var clearError = (_a = terminalSlice.actions, _a.clearError), setError = _a.setError, stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, storeSelectedTerminalDevice = _a.storeSelectedTerminalDevice, storeSelectedTerminal = _a.storeSelectedTerminal;
|
|
674
|
+
export var clearError = (_a = terminalSlice.actions, _a.clearError), setError = _a.setError, stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, storeSelectedTerminalDevice = _a.storeSelectedTerminalDevice, storeSelectedTerminal = _a.storeSelectedTerminal, resetTerminalLinkResponse = _a.resetTerminalLinkResponse;
|
|
672
675
|
export default terminalSlice.reducer;
|
|
673
676
|
export var terminalSelector = function (state) { return state.terminal; };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
|
-
export interface AuthLibProps extends Pick<LibConfig, 'open' | 'mode' | 'scope' | 'merchantDomain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'appInfo' | 'businessCountryCode' | 'language' | 'onFlowCompleted' | 'onError' | 'onStepCompleted' | 'onReady' | 'onClose' | 'onStepStarted'
|
|
3
|
+
export interface AuthLibProps extends Pick<LibConfig, 'open' | 'mode' | 'scope' | 'merchantDomain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'appInfo' | 'businessCountryCode' | 'language' | 'onFlowCompleted' | 'onError' | 'onStepCompleted' | 'onReady' | 'onClose' | 'onStepStarted'> {
|
|
4
4
|
leadId?: string;
|
|
5
5
|
configToken?: string;
|
|
6
6
|
}
|
|
@@ -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,6 +32,7 @@ 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';
|
|
35
36
|
var ListType;
|
|
36
37
|
(function (ListType) {
|
|
37
38
|
ListType["LicenseList"] = "LicenseList";
|
|
@@ -40,7 +41,7 @@ var ListType;
|
|
|
40
41
|
var BusinessType = function (_a) {
|
|
41
42
|
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading, uploadingArticle = _b.uploadingArticle;
|
|
42
43
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
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;
|
|
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, unifiedNumber = _c.unifiedNumber;
|
|
44
45
|
var entityLicenseList = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.entityLicenseList) || [];
|
|
45
46
|
var t = useTranslation().t;
|
|
46
47
|
var isAr = useLanguage().isAr;
|
|
@@ -73,6 +74,7 @@ var BusinessType = function (_a) {
|
|
|
73
74
|
selectedLicense: selectedLicense,
|
|
74
75
|
selectedEntityLicense: selectedEntityLicense,
|
|
75
76
|
licenseNumber: licenseNumber,
|
|
77
|
+
unifiedNumber: unifiedNumber,
|
|
76
78
|
entityLegalName: entityLegalName,
|
|
77
79
|
certificateId: certificateId,
|
|
78
80
|
articleId: articleId
|
|
@@ -89,6 +91,7 @@ var BusinessType = function (_a) {
|
|
|
89
91
|
selectedLicense: data.selectedLicense,
|
|
90
92
|
selectedEntityLicense: data.selectedEntityLicense,
|
|
91
93
|
licenseNumber: data.licenseNumber,
|
|
94
|
+
unifiedNumber: data.unifiedNumber,
|
|
92
95
|
entityLegalName: data.entityLegalName,
|
|
93
96
|
certificateId: data.certificateId,
|
|
94
97
|
articleId: data.articleId
|
|
@@ -98,17 +101,25 @@ var BusinessType = function (_a) {
|
|
|
98
101
|
var onBack = function () {
|
|
99
102
|
dispatch(handlePrevScreenStep(isPrevDob ? 'BUSINESS_DOB_STEP' : 'BUSINESS_IDBOD_STEP'));
|
|
100
103
|
};
|
|
104
|
+
var showLicenseNumber = function () {
|
|
105
|
+
if (isKWCountry)
|
|
106
|
+
return !isAnyListActive && isCR;
|
|
107
|
+
if (isSACountry)
|
|
108
|
+
return !isAnyListActive && isFL;
|
|
109
|
+
return !isAnyListActive;
|
|
110
|
+
};
|
|
101
111
|
var isLicenseListActive = listActive === ListType.LicenseList;
|
|
102
112
|
var isEntityLicenseListActive = listActive === ListType.EntityLicenseList;
|
|
103
113
|
var isAnyListActive = isLicenseListActive || isEntityLicenseListActive;
|
|
104
114
|
var selected = methods.getValues('selectedLicense');
|
|
105
115
|
var selectedLicenseEntity = methods.getValues('selectedEntityLicense');
|
|
106
116
|
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;
|
|
107
118
|
var hasEntityList = !!(entityLicenseList === null || entityLicenseList === void 0 ? void 0 : entityLicenseList.length);
|
|
108
119
|
var showLicenseList = hasEntityList ? (isSACountry || isOtherCountry) && isOtherLicense(selectedLicenseEntity) : isSACountry || isOtherCountry;
|
|
109
120
|
var showEntityList = isKWCountry ? hasEntityList && !isLicenseListActive && isCR : hasEntityList && !isLicenseListActive;
|
|
110
121
|
var disabled = !methods.formState.isValid || uploading || uploadingArticle;
|
|
111
122
|
var disableBack = !data.otpData.isNID;
|
|
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:
|
|
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: showLicenseNumber() }), _jsx(UnifiedNumber, { show: isSACountry && 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') })) }))] })) })) }));
|
|
113
124
|
};
|
|
114
125
|
export default React.memo(BusinessType);
|