@tap-payments/auth-jsconnect 2.11.0-development → 2.11.0-sandbox
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 +0 -2
- package/build/api/entity.d.ts +0 -3
- package/build/api/lead.d.ts +0 -1
- package/build/assets/locales/ar.json +10 -9
- package/build/assets/locales/en.json +10 -9
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +1 -9
- package/build/constants/app.js +4 -6
- package/build/constants/validation.d.ts +0 -1
- package/build/constants/validation.js +0 -1
- package/build/features/app/business/businessStore.js +10 -15
- package/build/features/app/connectExpress/connectExpressStore.js +4 -19
- package/build/features/app/terminal/terminalStore.d.ts +1 -2
- package/build/features/app/terminal/terminalStore.js +2 -5
- 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 +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/shared/Button/FlowsButtons.d.ts +0 -1
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -3
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +2 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +3 -8
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +1 -3
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +5 -6
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +10 -19
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +2 -7
- 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/package.json +2 -2
- 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/@types/form.d.ts
CHANGED
|
@@ -61,7 +61,6 @@ export declare type BrandActivitiesFormValues = {
|
|
|
61
61
|
};
|
|
62
62
|
export declare type BusinessTypeFormValues = {
|
|
63
63
|
licenseNumber: string;
|
|
64
|
-
unifiedNumber: string;
|
|
65
64
|
entityLegalName?: string;
|
|
66
65
|
selectedEntityLicense?: EntityLicense;
|
|
67
66
|
selectedLicense?: License;
|
|
@@ -151,7 +150,6 @@ export declare type EntityCapitalFormValues = {
|
|
|
151
150
|
export declare type BusinessDataFormValues = {
|
|
152
151
|
brandName: string;
|
|
153
152
|
licenseNumber: string;
|
|
154
|
-
unifiedNumber: string;
|
|
155
153
|
selectedLicense?: License;
|
|
156
154
|
termAndConditionChecked?: boolean;
|
|
157
155
|
};
|
package/build/api/entity.d.ts
CHANGED
package/build/api/lead.d.ts
CHANGED
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"capital_paid_hint": "00000",
|
|
138
138
|
"capital_paid_input_label": "رأس المال المدفوع",
|
|
139
139
|
"capital_paid_label": "رأس المال المدفوع ({{currency}})",
|
|
140
|
+
"capital_paid_input_label": "رأس المال المدفوع",
|
|
140
141
|
"capital_paid_required": "Please Enter paid amount",
|
|
141
142
|
"capital_share_count_hint": "00000",
|
|
142
143
|
"capital_share_count_label": "عدد اسهم رأس المال",
|
|
@@ -144,6 +145,7 @@
|
|
|
144
145
|
"capital_share_value_hint": "00000",
|
|
145
146
|
"capital_share_value_input_label": "قيمة السهم",
|
|
146
147
|
"capital_share_value_label": "قيمة السهم ({{currency}})",
|
|
148
|
+
"capital_share_value_input_label": "قيمة السهم",
|
|
147
149
|
"capital_share_value_required": "Please Enter share value",
|
|
148
150
|
"category": "الفئة",
|
|
149
151
|
"category_name": "اسم الفئة",
|
|
@@ -284,6 +286,7 @@
|
|
|
284
286
|
"expected_customers_to_serve": "عدد العملاء شهريا",
|
|
285
287
|
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
286
288
|
"expected_sales_monthly": "البيع المتوقع في الشهر؟ ({{currency}})",
|
|
289
|
+
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
287
290
|
"expected_sales_yearly": "ما هي المبيعات المتوقعة لعملك شهريًا؟",
|
|
288
291
|
"expected_served_monthly": "عدد العملاء شهريا",
|
|
289
292
|
"expiry_date": "تاريخ الإنتهاء",
|
|
@@ -390,7 +393,6 @@
|
|
|
390
393
|
"loading": "تحميل...",
|
|
391
394
|
"loading_bank_statement": "تحميل.......",
|
|
392
395
|
"login_to_dashboard": "تسجيل الدخول لادارة الحساب",
|
|
393
|
-
"login_with_passcode": "تسجيل الدخول باستخدام رمز المرور",
|
|
394
396
|
"mail_btn_open_title": "افتح البريد الإلكتروني",
|
|
395
397
|
"marital_status": "الحالة الزوجية",
|
|
396
398
|
"masking_symbols": "•••",
|
|
@@ -457,8 +459,6 @@
|
|
|
457
459
|
"paci_verify_loading": "إحضار التفاصيل",
|
|
458
460
|
"paci_verify_loading_desc": "الرجاء التحلي بالصبر حتى التحقق من التفاصيل",
|
|
459
461
|
"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,6 +493,7 @@
|
|
|
493
493
|
"please_choose_is_authorized": "الرجاء التأكيد إذا كنت أنت المستخدم المصرح له",
|
|
494
494
|
"please_choose_relative_pep": "هل أنت أو أحد أقاربك شخص مكشوف علنًا (PEP)",
|
|
495
495
|
"please_enter_actual_income": "ما هو دخلك الشهري ({{currency}}) ؟ ",
|
|
496
|
+
"monthly_income": "ما هو دخلك الشهري؟ ",
|
|
496
497
|
"please_enter_employer_name": "يرجى إدخال اسم منشأه العمل الخاص بك",
|
|
497
498
|
"please_try_again_after_few_minutes": "يمكنك محاولة تسجيل الدخول مرة أخرى بعد {{minutes}} دقيقة",
|
|
498
499
|
"powered_by": "بواسطة",
|
|
@@ -534,7 +535,7 @@
|
|
|
534
535
|
"share_value_hint": "0000",
|
|
535
536
|
"share_value_input_label": "قيمة السهم",
|
|
536
537
|
"share_value_label": "قيمة السهم ({{currency}})",
|
|
537
|
-
"
|
|
538
|
+
"share_value_input_label": "قيمة السهم",
|
|
538
539
|
"sign_up": "Sign up",
|
|
539
540
|
"signed_up": "تسجيل الدخول",
|
|
540
541
|
"signin_email_label": "البريد الألكتروني",
|
|
@@ -658,10 +659,6 @@
|
|
|
658
659
|
"update_later": "سأقوم بالتحديث لاحقاً",
|
|
659
660
|
"update_mobile_number": "تحديث رقم الجوال",
|
|
660
661
|
"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": "الرقم الموحد للشركة",
|
|
665
662
|
"vat_id": "رقم الضريبي المميز",
|
|
666
663
|
"vat_id_placeholder": "00000000",
|
|
667
664
|
"verification_brand_name": "الاسم التجاري",
|
|
@@ -679,5 +676,9 @@
|
|
|
679
676
|
"year": "السنة",
|
|
680
677
|
"yes": "نعم",
|
|
681
678
|
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
682
|
-
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
679
|
+
"يرجى التحقق من اسم تطبيق ابل": "",
|
|
680
|
+
"passcode_title": "الرجاء إدخال رمز المرور الخاص بك",
|
|
681
|
+
"sign_in_with_otp": "تسجيل الدخول باستخدام رمز التحقق (OTP)",
|
|
682
|
+
"passcode_required": "الرجاء إدخال رمز المرور المطلوب",
|
|
683
|
+
"login_with_passcode": "تسجيل الدخول باستخدام رمز المرور"
|
|
683
684
|
}
|
|
@@ -136,6 +136,7 @@
|
|
|
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",
|
|
139
140
|
"capital_paid_required": "Please Enter paid amount",
|
|
140
141
|
"capital_share_count_hint": "00000",
|
|
141
142
|
"capital_share_count_label": "Capital Share Count",
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
"capital_share_value_hint": "00000",
|
|
144
145
|
"capital_share_value_input_label": "Capital Share Value",
|
|
145
146
|
"capital_share_value_label": "Capital Share Value ({{currency}})",
|
|
147
|
+
"capital_share_value_input_label": "Capital Share Value",
|
|
146
148
|
"capital_share_value_required": "Please Enter share value",
|
|
147
149
|
"category": "Category",
|
|
148
150
|
"category_name": "Category name",
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
"expected_customers_to_serve": "Customers served per month",
|
|
293
295
|
"expected_sale_per_month": "Expected sale per month?",
|
|
294
296
|
"expected_sales_monthly": "Expected sale per month? ({{currency}})",
|
|
297
|
+
"expected_sale_per_month": "Expected sale per month?",
|
|
295
298
|
"expected_sales_yearly": "What is the expected sales for your business per month?",
|
|
296
299
|
"expected_served_monthly": "Customers served per month",
|
|
297
300
|
"expiry_date": "Date of expiry",
|
|
@@ -405,7 +408,6 @@
|
|
|
405
408
|
"loading": "Loading...",
|
|
406
409
|
"loading_bank_statement": "loading....",
|
|
407
410
|
"login_to_dashboard": "Login to dashboard",
|
|
408
|
-
"login_with_passcode": "Login with Passcode",
|
|
409
411
|
"mail_btn_open_title": "Open Mail",
|
|
410
412
|
"marital_status": "Marital status",
|
|
411
413
|
"masking_symbols": "•••",
|
|
@@ -473,8 +475,6 @@
|
|
|
473
475
|
"paci_verify_loading": "Fetching Details",
|
|
474
476
|
"paci_verify_loading_desc": "Please be patient until verify details",
|
|
475
477
|
"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,6 +509,7 @@
|
|
|
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",
|
|
512
513
|
"please_enter_employer_name": "Please enter the name of your employer",
|
|
513
514
|
"please_try_again_after_few_minutes": "You can try to login again after {{minutes}} mins",
|
|
514
515
|
"powered_by": "Powered by",
|
|
@@ -556,7 +557,7 @@
|
|
|
556
557
|
"share_value_hint": "0000",
|
|
557
558
|
"share_value_input_label": "Share Value",
|
|
558
559
|
"share_value_label": "Share Value ({{currency}})",
|
|
559
|
-
"
|
|
560
|
+
"share_value_input_label": "Share Value",
|
|
560
561
|
"sign_up": "Sign up",
|
|
561
562
|
"signed_up": "Signed up",
|
|
562
563
|
"signin_email_label": "Email address",
|
|
@@ -686,10 +687,6 @@
|
|
|
686
687
|
"upload_bank_statement": "Please upload the bank statement",
|
|
687
688
|
"upload_file": "Select a file from your computer",
|
|
688
689
|
"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",
|
|
693
690
|
"vat_id": "Tax Identification Number (TIN)",
|
|
694
691
|
"vat_id_placeholder": "000000000",
|
|
695
692
|
"verification_brand_name": "Brand name",
|
|
@@ -706,5 +703,9 @@
|
|
|
706
703
|
"website_label": "Website",
|
|
707
704
|
"year": "Year",
|
|
708
705
|
"yes": "Yes",
|
|
709
|
-
"your_brand_details": "Your brand details"
|
|
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"
|
|
710
711
|
}
|
|
@@ -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)), zIndex: 2147483647 }),
|
|
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,5 +1,6 @@
|
|
|
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";
|
|
3
4
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
4
5
|
export declare const CLIENT_ORIGIN: string;
|
|
5
6
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
@@ -234,9 +235,6 @@ export declare const OTHER_FL_LICENSE: {
|
|
|
234
235
|
};
|
|
235
236
|
license: {
|
|
236
237
|
number: string;
|
|
237
|
-
additional_info: {
|
|
238
|
-
unified_number: string;
|
|
239
|
-
};
|
|
240
238
|
};
|
|
241
239
|
type: BusinessType;
|
|
242
240
|
};
|
|
@@ -248,9 +246,6 @@ export declare const OTHER_ENTITY_LICENSE: {
|
|
|
248
246
|
};
|
|
249
247
|
license: {
|
|
250
248
|
number: string;
|
|
251
|
-
additional_info: {
|
|
252
|
-
unified_number: string;
|
|
253
|
-
};
|
|
254
249
|
};
|
|
255
250
|
type: BusinessType;
|
|
256
251
|
};
|
|
@@ -261,9 +256,6 @@ export declare const OTHER_CR_LICENSE: {
|
|
|
261
256
|
};
|
|
262
257
|
license: {
|
|
263
258
|
number: string;
|
|
264
|
-
additional_info: {
|
|
265
|
-
unified_number: string;
|
|
266
|
-
};
|
|
267
259
|
};
|
|
268
260
|
type: BusinessType;
|
|
269
261
|
};
|
package/build/constants/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
5
6
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
6
7
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -1241,8 +1242,7 @@ export var OTHER_FL_LICENSE = {
|
|
|
1241
1242
|
en: 'add_other_fl'
|
|
1242
1243
|
},
|
|
1243
1244
|
license: {
|
|
1244
|
-
number: 'other_fl'
|
|
1245
|
-
additional_info: { unified_number: 'other_fl' }
|
|
1245
|
+
number: 'other_fl'
|
|
1246
1246
|
},
|
|
1247
1247
|
type: BusinessType.FL
|
|
1248
1248
|
};
|
|
@@ -1253,8 +1253,7 @@ export var OTHER_ENTITY_LICENSE = {
|
|
|
1253
1253
|
en: 'add_other'
|
|
1254
1254
|
},
|
|
1255
1255
|
license: {
|
|
1256
|
-
number: 'other_entity'
|
|
1257
|
-
additional_info: { unified_number: 'other_entity' }
|
|
1256
|
+
number: 'other_entity'
|
|
1258
1257
|
},
|
|
1259
1258
|
type: BusinessType.CR
|
|
1260
1259
|
};
|
|
@@ -1264,8 +1263,7 @@ export var OTHER_CR_LICENSE = {
|
|
|
1264
1263
|
en: 'add_other_cr'
|
|
1265
1264
|
},
|
|
1266
1265
|
license: {
|
|
1267
|
-
number: 'other_cr'
|
|
1268
|
-
additional_info: { unified_number: 'other_cr' }
|
|
1266
|
+
number: 'other_cr'
|
|
1269
1267
|
},
|
|
1270
1268
|
type: BusinessType.CR
|
|
1271
1269
|
};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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
|
})
|
|
@@ -102,9 +102,8 @@ 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;
|
|
106
105
|
}, "terminal/store">;
|
|
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
|
|
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>;
|
|
108
107
|
declare const _default: import("redux").Reducer<TerminalDataState, import("redux").AnyAction>;
|
|
109
108
|
export default _default;
|
|
110
109
|
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: null,
|
|
434
|
+
error: 'null',
|
|
435
435
|
loading: false,
|
|
436
436
|
customLoading: false,
|
|
437
437
|
terminalListLoading: false,
|
|
@@ -470,9 +470,6 @@ 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 });
|
|
476
473
|
}
|
|
477
474
|
},
|
|
478
475
|
extraReducers: function (builder) {
|
|
@@ -671,6 +668,6 @@ export var terminalSlice = createSlice({
|
|
|
671
668
|
});
|
|
672
669
|
}
|
|
673
670
|
});
|
|
674
|
-
export var clearError = (_a = terminalSlice.actions, _a.clearError), setError = _a.setError, stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, storeSelectedTerminalDevice = _a.storeSelectedTerminalDevice, storeSelectedTerminal = _a.storeSelectedTerminal
|
|
671
|
+
export var clearError = (_a = terminalSlice.actions, _a.clearError), setError = _a.setError, stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, storeSelectedTerminalDevice = _a.storeSelectedTerminalDevice, storeSelectedTerminal = _a.storeSelectedTerminal;
|
|
675
672
|
export default terminalSlice.reducer;
|
|
676
673
|
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' | 'region'> {
|
|
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,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);
|