@tap-payments/auth-jsconnect 2.3.95-test → 2.3.96-test
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/assets/locales/ar.json +12 -1
- package/build/assets/locales/en.json +12 -1
- package/build/constants/app.d.ts +1 -0
- package/build/constants/app.js +10 -2
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/features/app/business/businessStore.js +38 -17
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
- package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/Header.js +49 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +18 -0
- package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
- package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
- package/build/features/business/screens/BrandDetails/index.js +2 -0
- package/build/features/featuresScreens.js +3 -1
- package/build/features/shared/Button/Button.d.ts +3 -1
- package/build/features/shared/Button/Button.js +2 -2
- package/build/features/shared/Chip/Chip.d.ts +3 -0
- package/build/features/shared/Chip/Chip.js +21 -0
- package/build/features/shared/Chip/index.d.ts +2 -0
- package/build/features/shared/Chip/index.js +2 -0
- package/package.json +1 -1
|
@@ -396,5 +396,16 @@
|
|
|
396
396
|
"powered_by": "بواسطة",
|
|
397
397
|
"add_other": "أخرى",
|
|
398
398
|
"choose_entity_license": "اختر ترخيص المنشأة",
|
|
399
|
-
"choose_license_entity": "- الرجاء الاختيار -"
|
|
399
|
+
"choose_license_entity": "- الرجاء الاختيار -",
|
|
400
|
+
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
401
|
+
"signed_up": "تسجيل الدخول",
|
|
402
|
+
"login_to_dashboard": "تسجيل الدخول لادارة الحساب",
|
|
403
|
+
"review_account": "مراجعة الحساب",
|
|
404
|
+
"license_info": "معلومات الترخيص",
|
|
405
|
+
"sales_channels": "قنوات المبيعات",
|
|
406
|
+
"website_label": "موقع الويب",
|
|
407
|
+
"call_center_label": "مركز الاتصال",
|
|
408
|
+
"mobile_app_label": "تطبيقات هاتف",
|
|
409
|
+
"physical_store_label": "متجر",
|
|
410
|
+
"social_media_label": "وسائل التواصل الاجتماعي"
|
|
400
411
|
}
|
|
@@ -426,5 +426,16 @@
|
|
|
426
426
|
"powered_by": "Powered by",
|
|
427
427
|
"add_other": "Other",
|
|
428
428
|
"choose_entity_license": "Choose Entity License",
|
|
429
|
-
"choose_license_entity": "- Please select -"
|
|
429
|
+
"choose_license_entity": "- Please select -",
|
|
430
|
+
"your_brand_details": "Your brand details",
|
|
431
|
+
"signed_up": "Signed up",
|
|
432
|
+
"login_to_dashboard": "Login to dashboard",
|
|
433
|
+
"review_account": "Review account",
|
|
434
|
+
"license_info": "License information",
|
|
435
|
+
"sales_channels": "Sales channels",
|
|
436
|
+
"website_label": "Website",
|
|
437
|
+
"call_center_label": "Call Center",
|
|
438
|
+
"mobile_app_label": "Mobile App",
|
|
439
|
+
"physical_store_label": "Physical Store",
|
|
440
|
+
"social_media_label": "Social Media"
|
|
430
441
|
}
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CLIENT_ORIGIN: string;
|
|
3
3
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
4
|
+
export declare const BUSINESS_WEBSITE = "https://businesses.tap.company/";
|
|
4
5
|
export declare const LOCAL_STORAGE_KEYS: {
|
|
5
6
|
themeMode: string;
|
|
6
7
|
languageMode: string;
|
package/build/constants/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
3
3
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
4
|
+
export var BUSINESS_WEBSITE = 'https://businesses.tap.company/';
|
|
4
5
|
export var LOCAL_STORAGE_KEYS = {
|
|
5
6
|
themeMode: 'themeMode',
|
|
6
7
|
languageMode: 'languageMode'
|
|
@@ -166,7 +167,8 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
166
167
|
'BUSINESS_SUCCESS_STEP',
|
|
167
168
|
'BUSINESS_ACTIVITIES_STEP',
|
|
168
169
|
'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
169
|
-
'BUSINESS_CIVIL_ID_STEP'
|
|
170
|
+
'BUSINESS_CIVIL_ID_STEP',
|
|
171
|
+
'BUSINESS_VERIFY_BRAND_INFO'
|
|
170
172
|
],
|
|
171
173
|
prev: '',
|
|
172
174
|
order: 1
|
|
@@ -197,10 +199,16 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
197
199
|
},
|
|
198
200
|
{
|
|
199
201
|
name: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
200
|
-
next: 'BUSINESS_ACTIVITIES_STEP',
|
|
202
|
+
next: ['BUSINESS_ACTIVITIES_STEP', 'BUSINESS_VERIFY_BRAND_INFO'],
|
|
201
203
|
prev: 'BUSINESS_IDBOD_STEP',
|
|
202
204
|
order: 2
|
|
203
205
|
},
|
|
206
|
+
{
|
|
207
|
+
name: 'BUSINESS_VERIFY_BRAND_INFO',
|
|
208
|
+
next: '',
|
|
209
|
+
prev: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
210
|
+
order: 2
|
|
211
|
+
},
|
|
204
212
|
{
|
|
205
213
|
name: 'BUSINESS_CONFIRM_STEP',
|
|
206
214
|
next: 'BUSINESS_ACTIVITIES_STEP',
|
|
@@ -69,6 +69,7 @@ export var ICONS_NAMES = {
|
|
|
69
69
|
DROP_FILE_ICON: 'https://dash.b-cdn.net/icons/menu/upload-file-sample.svg',
|
|
70
70
|
CLOSE_ICON: 'https://dash.b-cdn.net/icons/menu/close-btn.svg',
|
|
71
71
|
PACI_ICON: 'https://dash.b-cdn.net/icons/menu/PACI-filled.svg',
|
|
72
|
+
SIGNED_UP_SUCCESS: 'https://dash.b-cdn.net/icons/menu/signed_up_success.svg',
|
|
72
73
|
GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
|
|
73
74
|
GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
|
|
74
75
|
outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
|
|
@@ -466,8 +466,8 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
466
466
|
});
|
|
467
467
|
}); });
|
|
468
468
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
469
|
-
var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, documentBody, payload_1;
|
|
470
|
-
var
|
|
469
|
+
var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, entity_activities, list, accountBody, accountData, brandData, _c, message, error, brandRes, documentData, entityData, entityId, documentBody, payload_1;
|
|
470
|
+
var _d, _e;
|
|
471
471
|
return __generator(this, function (_f) {
|
|
472
472
|
switch (_f.label) {
|
|
473
473
|
case 0:
|
|
@@ -475,7 +475,9 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
475
475
|
isNonSA = !isSA(settings.data.businessCountry.iso2);
|
|
476
476
|
selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
|
|
477
477
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
478
|
-
|
|
478
|
+
_b = business.data.verify.responseBody || {}, lead_id = _b.lead_id, brand = _b.brand;
|
|
479
|
+
stepName = 'BUSINESS_ACTIVITIES_STEP';
|
|
480
|
+
payload = __assign(__assign(__assign(__assign({ id: lead_id || '', entity: {
|
|
479
481
|
id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isNonSA ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
|
|
480
482
|
} }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
|
|
481
483
|
license_number: isNonSA && isFL ? '' : licenseNumber,
|
|
@@ -496,7 +498,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
496
498
|
_f.label = 3;
|
|
497
499
|
case 3:
|
|
498
500
|
accountBody = {
|
|
499
|
-
lead_id:
|
|
501
|
+
lead_id: lead_id,
|
|
500
502
|
notify: {
|
|
501
503
|
email: false,
|
|
502
504
|
phone: false
|
|
@@ -505,12 +507,31 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
505
507
|
is_acknowledged: true,
|
|
506
508
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
|
|
507
509
|
};
|
|
508
|
-
|
|
510
|
+
brandData = undefined;
|
|
511
|
+
_f.label = 4;
|
|
509
512
|
case 4:
|
|
513
|
+
_f.trys.push([4, 6, , 10]);
|
|
514
|
+
return [4, API.accountService.createAccount(accountBody)];
|
|
515
|
+
case 5:
|
|
510
516
|
accountData = _f.sent();
|
|
517
|
+
return [3, 10];
|
|
518
|
+
case 6:
|
|
519
|
+
_c = _f.sent();
|
|
520
|
+
message = _c.message;
|
|
521
|
+
error = message;
|
|
522
|
+
if (!((error === null || error === void 0 ? void 0 : error.toLowerCase()) === 'entity with license already exist')) return [3, 8];
|
|
523
|
+
return [4, API.brandService.retrieveBrand(brand === null || brand === void 0 ? void 0 : brand.id)];
|
|
524
|
+
case 7:
|
|
525
|
+
brandRes = (_f.sent()).brand;
|
|
526
|
+
brandData = brandRes;
|
|
527
|
+
stepName = 'BUSINESS_VERIFY_BRAND_INFO';
|
|
528
|
+
return [3, 9];
|
|
529
|
+
case 8: throw new Error(error);
|
|
530
|
+
case 9: return [3, 10];
|
|
531
|
+
case 10:
|
|
511
532
|
entityData = undefined;
|
|
512
533
|
entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
|
|
513
|
-
if (!((certificateId || []).length > 0)) return [3,
|
|
534
|
+
if (!((certificateId || []).length > 0)) return [3, 12];
|
|
514
535
|
documentBody = {
|
|
515
536
|
entity_id: entityId || '',
|
|
516
537
|
documents: [
|
|
@@ -521,23 +542,23 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
521
542
|
]
|
|
522
543
|
};
|
|
523
544
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
524
|
-
case
|
|
545
|
+
case 11:
|
|
525
546
|
documentData = _f.sent();
|
|
526
|
-
_f.label =
|
|
527
|
-
case
|
|
528
|
-
if (!(articleId && entityId)) return [3,
|
|
547
|
+
_f.label = 12;
|
|
548
|
+
case 12:
|
|
549
|
+
if (!(articleId && entityId)) return [3, 14];
|
|
529
550
|
payload_1 = {
|
|
530
551
|
id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
|
|
531
552
|
AOA_file_id: articleId
|
|
532
553
|
};
|
|
533
554
|
return [4, API.entityService.updateEntity(payload_1)];
|
|
534
|
-
case
|
|
555
|
+
case 13:
|
|
535
556
|
entityData = _f.sent();
|
|
536
|
-
_f.label =
|
|
537
|
-
case
|
|
538
|
-
thunkApi.dispatch(handleNextScreenStep());
|
|
557
|
+
_f.label = 14;
|
|
558
|
+
case 14:
|
|
559
|
+
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
539
560
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
540
|
-
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
|
|
561
|
+
return [2, { data: __assign(__assign({}, data), { brand: brandData }), formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
|
|
541
562
|
}
|
|
542
563
|
});
|
|
543
564
|
}); });
|
|
@@ -1025,7 +1046,7 @@ export var businessSlice = createSlice({
|
|
|
1025
1046
|
state.error = null;
|
|
1026
1047
|
var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
|
|
1027
1048
|
state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
|
|
1028
|
-
var entity = data.entity, entity_activities = data.entity_activities;
|
|
1049
|
+
var entity = data.entity, entity_activities = data.entity_activities, brand = data.brand;
|
|
1029
1050
|
var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
|
|
1030
1051
|
if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
|
|
1031
1052
|
state.error = 'signup_user_exists_error';
|
|
@@ -1036,7 +1057,7 @@ export var businessSlice = createSlice({
|
|
|
1036
1057
|
}
|
|
1037
1058
|
var activities = entity_activities || [];
|
|
1038
1059
|
state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
|
|
1039
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
|
|
1060
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { entity: entity }), (brand && { brand: brand }));
|
|
1040
1061
|
})
|
|
1041
1062
|
.addCase(updateLeadBusinessType.rejected, function (state, action) {
|
|
1042
1063
|
state.loading = false;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
16
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
+
import { BUSINESS_WEBSITE } from '../../../../constants';
|
|
18
|
+
import FlatButton from '../../../../components/Button';
|
|
19
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
20
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
21
|
+
import Button from '../../../shared/Button';
|
|
22
|
+
import Header from './Header';
|
|
23
|
+
import BrandName from './BrandName';
|
|
24
|
+
import LicenseInfo from './LicenseInfo';
|
|
25
|
+
import SalesChannel from './SalesChannel';
|
|
26
|
+
var BrandDetails = function (_a) {
|
|
27
|
+
var t = useTranslation().t;
|
|
28
|
+
var isAr = useLanguage().isAr;
|
|
29
|
+
var dispatch = useAppDispatch();
|
|
30
|
+
var _b = useAppSelector(businessSelector), loading = _b.loading, error = _b.error;
|
|
31
|
+
var onBack = function () {
|
|
32
|
+
dispatch(handlePrevScreenStep());
|
|
33
|
+
};
|
|
34
|
+
var loginToDashboard = function () {
|
|
35
|
+
window.open(BUSINESS_WEBSITE, '_blank');
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Header, {}), _jsx(BrandName, {}), _jsx(LicenseInfo, {}), _jsx(SalesChannel, {}), _jsx(FlatButton, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('review_account') })), _jsx(Button, __assign({ sx: { mt: 0 }, disableBack: true, onClick: function () { return loginToDashboard(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('login_to_dashboard') }))] }));
|
|
38
|
+
};
|
|
39
|
+
export default React.memo(BrandDetails);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
19
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
20
|
+
var InputStyled = styled(Input)(function (_a) {
|
|
21
|
+
var theme = _a.theme;
|
|
22
|
+
return ({
|
|
23
|
+
opacity: 1,
|
|
24
|
+
'& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
var BrandName = function (_a) {
|
|
28
|
+
var _b, _c, _d;
|
|
29
|
+
var t = useTranslation().t;
|
|
30
|
+
var isAr = useLanguage().isAr;
|
|
31
|
+
var data = useAppSelector(businessSelector).data;
|
|
32
|
+
var brand = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).brand;
|
|
33
|
+
var name = isAr ? (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = brand === null || brand === void 0 ? void 0 : brand.name) === null || _d === void 0 ? void 0 : _d.en;
|
|
34
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: _jsx(InputStyled, { label: t('signup_brand_name_label'), readOnly: true, value: name }) })));
|
|
35
|
+
};
|
|
36
|
+
export default React.memo(BrandName);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
16
|
+
import { useLanguage } from '../../../../hooks';
|
|
17
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
18
|
+
import Text from '../../../../components/Text';
|
|
19
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
+
import Chip from '../../../shared/Chip';
|
|
21
|
+
var ScreenContainerStyled = styled(ScreenContainer)(function () { return ({
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center'
|
|
24
|
+
}); });
|
|
25
|
+
var TitleStyled = styled(Text)(function (_a) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.primary, marginBlockEnd: theme.spacing(1), lineHeight: 1.75, padding: '0px 20px' }));
|
|
28
|
+
});
|
|
29
|
+
var ChipStyled = styled(Chip, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
30
|
+
var theme = _a.theme, isAr = _a.isAr;
|
|
31
|
+
return (__assign(__assign({ background: alpha(theme.palette.success.main, 0.1), color: theme.palette.success.main, height: theme.spacing(3.125) }, theme.typography.subtitle2), { '& .MuiChip-icon': {
|
|
32
|
+
marginLeft: isAr ? '-6px' : '5px',
|
|
33
|
+
marginRight: isAr ? '5px' : '-6px'
|
|
34
|
+
} }));
|
|
35
|
+
});
|
|
36
|
+
var Image = styled('img')(function (_a) {
|
|
37
|
+
var theme = _a.theme;
|
|
38
|
+
return ({
|
|
39
|
+
width: theme.spacing(1.6),
|
|
40
|
+
height: theme.spacing(1.6),
|
|
41
|
+
fontSize: theme.spacing(1.6)
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
var Header = function (_a) {
|
|
45
|
+
var t = useTranslation().t;
|
|
46
|
+
var isAr = useLanguage().isAr;
|
|
47
|
+
return (_jsxs(ScreenContainerStyled, { children: [_jsx(TitleStyled, { children: t('your_brand_details') }), _jsx(ChipStyled, { isAr: isAr, label: t('signed_up'), icon: _jsx(Image, { src: ICONS_NAMES.SIGNED_UP_SUCCESS }) })] }));
|
|
48
|
+
};
|
|
49
|
+
export default React.memo(Header);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
19
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
20
|
+
var InputStyled = styled(Input)(function (_a) {
|
|
21
|
+
var theme = _a.theme;
|
|
22
|
+
return ({
|
|
23
|
+
opacity: 1,
|
|
24
|
+
'& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
var LicenseInfo = function (_a) {
|
|
28
|
+
var _b;
|
|
29
|
+
var t = useTranslation().t;
|
|
30
|
+
var isAr = useLanguage().isAr;
|
|
31
|
+
var data = useAppSelector(businessSelector).data;
|
|
32
|
+
var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
|
|
33
|
+
var getLicenseNumber = React.useMemo(function () { var _a; return ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || ''; }, [entity]);
|
|
34
|
+
var getLicenseName = React.useMemo(function () { var _a, _b; return t((isAr ? (_a = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _b === void 0 ? void 0 : _b.en) || ''); }, [entity]);
|
|
35
|
+
var name = getLicenseNumber ? "".concat(getLicenseNumber, " - ").concat(getLicenseName) : getLicenseName;
|
|
36
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(InputStyled, { label: t('license_info'), readOnly: true, value: name }) })));
|
|
37
|
+
};
|
|
38
|
+
export default React.memo(LicenseInfo);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
+
gutterBottom?: boolean | undefined;
|
|
7
|
+
noWrap?: boolean | undefined;
|
|
8
|
+
paragraph?: boolean | undefined;
|
|
9
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
10
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
11
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
12
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
15
|
+
interface SalesChannelProps {
|
|
16
|
+
}
|
|
17
|
+
declare const _default: React.MemoExoticComponent<({}: SalesChannelProps) => JSX.Element>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
16
|
+
import Box from '@mui/material/Box';
|
|
17
|
+
import { useAppSelector } from '../../../../hooks';
|
|
18
|
+
import Text from '../../../../components/Text';
|
|
19
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
+
import Chip from '../../../shared/Chip';
|
|
21
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
22
|
+
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return ({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'flex-start',
|
|
27
|
+
padding: theme.spacing(0, 2.5, 0.25, 2.5)
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
33
|
+
});
|
|
34
|
+
var ChipContainerStyled = styled(Box)(function (_a) {
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
return ({
|
|
37
|
+
display: 'block',
|
|
38
|
+
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var SalesChannel = function (_a) {
|
|
42
|
+
var _b, _c;
|
|
43
|
+
var t = useTranslation().t;
|
|
44
|
+
var data = useAppSelector(businessSelector).data;
|
|
45
|
+
var channels = ((_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.channel_services) || [];
|
|
46
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('sales_channels') }) }), _jsx(ChipContainerStyled, { children: channels.map(function (channel, index) { return (_jsx(Chip, { label: t("".concat(channel.code, "_label")), sx: { marginInlineEnd: index !== channels.length - 1 ? '8px' : '0px', marginTop: '8px' } }, index)); }) })] })));
|
|
47
|
+
};
|
|
48
|
+
export default React.memo(SalesChannel);
|
|
@@ -31,6 +31,7 @@ import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButton
|
|
|
31
31
|
import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
32
32
|
import BusCivilIDscreen from './business/screens/CivilID';
|
|
33
33
|
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
34
|
+
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
34
35
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
35
36
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
36
37
|
import PasswordOTPPage from './password/screens/OTP';
|
|
@@ -203,7 +204,8 @@ export var businessFeatureScreens = [
|
|
|
203
204
|
},
|
|
204
205
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
205
206
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
206
|
-
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage }
|
|
207
|
+
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
208
|
+
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
207
209
|
];
|
|
208
210
|
export var passwordFeatureScreens = [
|
|
209
211
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '../../../components/Button';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
4
|
export interface CustomButtonProps extends ButtonProps {
|
|
4
5
|
isAr: boolean;
|
|
5
6
|
loading?: boolean;
|
|
@@ -8,5 +9,6 @@ export interface CustomButtonProps extends ButtonProps {
|
|
|
8
9
|
onBackClicked?: () => void;
|
|
9
10
|
error?: string;
|
|
10
11
|
hideError?: boolean;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
11
13
|
}
|
|
12
|
-
export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, hideError, disableNextIcon, ...props }: CustomButtonProps): JSX.Element;
|
|
14
|
+
export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, hideError, disableNextIcon, sx, ...props }: CustomButtonProps): JSX.Element;
|
|
@@ -84,7 +84,7 @@ var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { ret
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
export default function CustomButton(_a) {
|
|
87
|
-
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, hideError = _a.hideError, disableNextIcon = _a.disableNextIcon, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "hideError", "disableNextIcon"]);
|
|
87
|
+
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, hideError = _a.hideError, disableNextIcon = _a.disableNextIcon, sx = _a.sx, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "hideError", "disableNextIcon", "sx"]);
|
|
88
88
|
var _b = React.useState(false), btnLoading = _b[0], setBtnLoading = _b[1];
|
|
89
89
|
var isBackEnabled = !disableBack && !btnLoading;
|
|
90
90
|
React.useEffect(function () {
|
|
@@ -107,5 +107,5 @@ export default function CustomButton(_a) {
|
|
|
107
107
|
}, 500);
|
|
108
108
|
};
|
|
109
109
|
}, []);
|
|
110
|
-
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] })] }));
|
|
110
|
+
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
|
|
111
111
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import Chip from '@mui/material/Chip';
|
|
15
|
+
var ChipStyled = styled(Chip)(function (_a) {
|
|
16
|
+
var theme = _a.theme;
|
|
17
|
+
return (__assign(__assign({ borderRadius: theme.spacing(12.625), padding: theme.spacing(0.25, 0.5, 0.25, 0.5), background: theme.palette.common.white }, theme.typography.caption), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular }));
|
|
18
|
+
});
|
|
19
|
+
export default function CustomChip(props) {
|
|
20
|
+
return _jsx(ChipStyled, __assign({}, props));
|
|
21
|
+
}
|