@tap-payments/auth-jsconnect 1.0.13 → 1.0.14
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 +190 -88
- package/build/assets/locales/en.json +206 -90
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/Loader/Loader.js +2 -2
- package/build/constants/app.js +28 -4
- package/build/features/bank/screens/BankDetails/BankName.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.js +8 -3
- package/build/features/bank/screens/Success/Success.d.ts +5 -0
- package/build/features/bank/screens/Success/Success.js +14 -0
- package/build/features/bank/screens/Success/index.d.ts +3 -0
- package/build/features/bank/screens/Success/index.js +2 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/Activities/validation.js +3 -3
- package/build/features/business/screens/BusinessType/CRNumber.js +1 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
- package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
- package/build/features/business/screens/BusinessType/SelectType.js +1 -1
- package/build/features/business/screens/Confirm/Confirm.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +5 -41
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
- package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
- package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +10 -5
- package/build/features/business/screens/IDBOD/ID.js +1 -1
- package/build/features/business/screens/IDBOD/validation.js +6 -2
- package/build/features/business/screens/OTP/OTP.js +18 -58
- package/build/features/business/screens/OTP/OTPInput.js +8 -21
- package/build/features/business/screens/Success/Success.js +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.js +12 -42
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
- package/build/features/connect/screens/Individual/Email.js +7 -1
- package/build/features/connect/screens/Individual/Individual.js +0 -28
- package/build/features/connect/screens/Individual/Name.js +9 -3
- package/build/features/connect/screens/Individual/validation.js +5 -2
- package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
- package/build/features/connect/screens/MID/IDNumber.js +2 -2
- package/build/features/connect/screens/MID/MID.js +1 -1
- package/build/features/connect/screens/MID/MobileNumber.js +7 -1
- package/build/features/connect/screens/MID/validation.js +7 -3
- package/build/features/connect/screens/Merchant/BrandName.js +3 -1
- package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
- package/build/features/connect/screens/Merchant/TAC.js +1 -1
- package/build/features/connect/screens/Merchant/validation.d.ts +9 -9
- package/build/features/connect/screens/Merchant/validation.js +42 -11
- package/build/features/connect/screens/OTP/OTP.js +4 -3
- package/build/features/connect/screens/OTP/OTPInput.js +1 -1
- package/build/features/connect/screens/OTP/validation.js +1 -1
- package/build/features/connect/screens/Password/PasswordInput.js +2 -1
- package/build/features/connect/screens/Password/validation.js +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
- package/build/features/featuresScreens.js +20 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +7 -2
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +6 -3
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
- package/build/features/owner/screens/Success/Success.d.ts +5 -0
- package/build/features/owner/screens/Success/Success.js +14 -0
- package/build/features/owner/screens/Success/index.d.ts +3 -0
- package/build/features/owner/screens/Success/index.js +2 -0
- package/build/features/password/Password.js +2 -2
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -1
- package/build/features/password/screens/CreatePassword/Password.js +2 -1
- package/build/features/password/screens/CreatePassword/validation.js +3 -3
- package/build/features/password/screens/Success/Success.d.ts +5 -0
- package/build/features/password/screens/Success/Success.js +14 -0
- package/build/features/password/screens/Success/index.d.ts +3 -0
- package/build/features/password/screens/Success/index.js +2 -0
- package/build/features/shared/Button/Button.js +7 -1
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +5 -0
- package/build/features/tax/screens/Success/Success.js +14 -0
- package/build/features/tax/screens/Success/index.d.ts +3 -0
- package/build/features/tax/screens/Success/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/features/tax/screens/TaxDetails/validation.js +1 -1
- package/build/utils/string.js +2 -2
- package/package.json +1 -1
- package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPTimer.js +0 -20
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/VerifyNumber/OTPTimer.js +0 -20
|
@@ -37,15 +37,15 @@ import Text from '../Text';
|
|
|
37
37
|
import './customStyle.css';
|
|
38
38
|
var ContainerIcon = styled(CalendarTodayOutlined)(function (_a) {
|
|
39
39
|
var theme = _a.theme;
|
|
40
|
-
return (__assign(__assign({
|
|
40
|
+
return (__assign(__assign({ marginInlineStart: theme.spacing(2.5) }, theme.typography.h6), { cursor: 'pointer', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
41
41
|
});
|
|
42
42
|
var ExpandMore = styled(ExpandMoreIcon)(function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
|
-
return (__assign(__assign({
|
|
44
|
+
return (__assign(__assign({ marginInlineEnd: theme.spacing(2) }, theme.typography.h6), { display: 'flex', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
45
45
|
});
|
|
46
46
|
var ExpandLess = styled(ExpandLessIcon)(function (_a) {
|
|
47
47
|
var theme = _a.theme;
|
|
48
|
-
return (__assign(__assign({
|
|
48
|
+
return (__assign(__assign({ marginInlineEnd: theme.spacing(2) }, theme.typography.h6), { display: 'flex', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
49
49
|
});
|
|
50
50
|
var Container = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
|
|
51
51
|
var theme = _a.theme, disabled = _a.disabled;
|
|
@@ -20,8 +20,8 @@ var RootStyled = styled('div')(function () { return ({
|
|
|
20
20
|
},
|
|
21
21
|
position: 'relative',
|
|
22
22
|
margin: '0px auto',
|
|
23
|
-
width: '
|
|
24
|
-
height: '
|
|
23
|
+
width: '38px',
|
|
24
|
+
height: '38px'
|
|
25
25
|
}); });
|
|
26
26
|
var LoaderBoxStyled = styled('svg')(function (_a) {
|
|
27
27
|
var size = _a.size;
|
package/build/constants/app.js
CHANGED
|
@@ -107,32 +107,56 @@ export var OWNER_SCREENS_NAVIGATION = [
|
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
name: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
|
|
110
|
-
next: '',
|
|
110
|
+
next: 'OWNER_SUCCESS_STEP',
|
|
111
111
|
prev: 'OWNER_SHOW_OWNER_INFO_STEP',
|
|
112
112
|
order: 2
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'OWNER_SUCCESS_STEP',
|
|
116
|
+
next: '',
|
|
117
|
+
prev: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
|
|
118
|
+
order: 2
|
|
113
119
|
}
|
|
114
120
|
];
|
|
115
121
|
export var PASSWORD_SCREENS_NAVIGATION = [
|
|
116
122
|
{
|
|
117
123
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
118
|
-
next: '',
|
|
124
|
+
next: 'PASSWORD_SUCCESS_STEP',
|
|
119
125
|
prev: '',
|
|
120
126
|
order: 1
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'PASSWORD_SUCCESS_STEP',
|
|
130
|
+
next: '',
|
|
131
|
+
prev: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
132
|
+
order: 2
|
|
121
133
|
}
|
|
122
134
|
];
|
|
123
135
|
export var BANK_SCREENS_NAVIGATION = [
|
|
124
136
|
{
|
|
125
137
|
name: 'BANK_BANK_DETAILS_STEP',
|
|
126
|
-
next: '',
|
|
138
|
+
next: 'BANK_DETAILS_SUCCESS_STEP',
|
|
127
139
|
prev: '',
|
|
128
140
|
order: 1
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'BANK_DETAILS_SUCCESS_STEP',
|
|
144
|
+
next: '',
|
|
145
|
+
prev: 'BANK_BANK_DETAILS_STEP',
|
|
146
|
+
order: 2
|
|
129
147
|
}
|
|
130
148
|
];
|
|
131
149
|
export var TAX_SCREENS_NAVIGATION = [
|
|
132
150
|
{
|
|
133
151
|
name: 'TAX_TAX_DETAILS_STEP',
|
|
134
|
-
next: '',
|
|
152
|
+
next: 'TAX_DETAILS_SUCCESS_STEP',
|
|
135
153
|
prev: '',
|
|
136
154
|
order: 1
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'TAX_DETAILS_SUCCESS_STEP',
|
|
158
|
+
next: '',
|
|
159
|
+
prev: 'TAX_TAX_DETAILS_STEP',
|
|
160
|
+
order: 2
|
|
137
161
|
}
|
|
138
162
|
];
|
|
@@ -22,6 +22,6 @@ var BankName = function () {
|
|
|
22
22
|
var clearValue = function () {
|
|
23
23
|
bankNameControl.field.onChange('');
|
|
24
24
|
};
|
|
25
|
-
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('
|
|
25
|
+
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('enter_bank_name'), placeholder: t('enter_bank_name_placeholder'), value: bankNameValue, required: true, endAdornment: !hasError && bankNameValue ? _jsx(CheckIcon, {}) : bankNameValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
|
|
26
26
|
};
|
|
27
27
|
export default BankName;
|
|
@@ -14,13 +14,13 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
16
|
var Beneficiary = function () {
|
|
17
|
-
var _a;
|
|
17
|
+
var _a, _b;
|
|
18
18
|
var t = useTranslation().t;
|
|
19
19
|
var control = useFormContext().control;
|
|
20
20
|
var beneficiaryControl = useController({ name: 'beneficiaryName', control: control });
|
|
21
21
|
var beneficiaryValue = beneficiaryControl.field.value;
|
|
22
22
|
var hasError = (_a = beneficiaryControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
23
|
-
var
|
|
23
|
+
var error = (_b = beneficiaryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
24
24
|
var handleBeneficiaryChange = function (_a) {
|
|
25
25
|
var target = _a.target;
|
|
26
26
|
var value = keepLettersAndSpace(target.value);
|
|
@@ -29,6 +29,6 @@ var Beneficiary = function () {
|
|
|
29
29
|
var clearValue = function () {
|
|
30
30
|
beneficiaryControl.field.onChange('');
|
|
31
31
|
};
|
|
32
|
-
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('
|
|
32
|
+
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('beneficiary_name'), onChange: handleBeneficiaryChange, value: beneficiaryValue, placeholder: t('beneficiary_name'), warningType: 'alert', warningMessage: error && t(error), required: true, endAdornment: !hasError && beneficiaryValue ? _jsx(CheckIcon, {}) : beneficiaryValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
|
|
33
33
|
};
|
|
34
34
|
export default Beneficiary;
|
|
@@ -15,13 +15,13 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
var IBAN = function () {
|
|
18
|
-
var _a;
|
|
18
|
+
var _a, _b;
|
|
19
19
|
var t = useTranslation().t;
|
|
20
20
|
var control = useFormContext().control;
|
|
21
21
|
var ibanControl = useController({ name: 'iban', control: control });
|
|
22
22
|
var ibanValue = ibanControl.field.value;
|
|
23
23
|
var hasError = !!((_a = ibanControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message);
|
|
24
|
-
var
|
|
24
|
+
var error = (_b = ibanControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
25
25
|
var handleIbanChange = function (_a) {
|
|
26
26
|
var target = _a.target;
|
|
27
27
|
var value = removeAllOtherThanCharsAndNumber(target.value);
|
|
@@ -30,6 +30,6 @@ var IBAN = function () {
|
|
|
30
30
|
var clearValue = function () {
|
|
31
31
|
ibanControl.field.onChange('');
|
|
32
32
|
};
|
|
33
|
-
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('
|
|
33
|
+
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('enter_iban'), inputProps: { maxLength: MAX_IBAN_VALUE }, onChange: handleIbanChange, value: ibanValue, placeholder: t('enter_iban_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true, endAdornment: !hasError && ibanValue ? _jsx(CheckIcon, {}) : ibanValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
|
|
34
34
|
};
|
|
35
35
|
export default IBAN;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var BankValidation = yup.object().shape({
|
|
3
|
-
iban: yup
|
|
4
|
-
|
|
3
|
+
iban: yup
|
|
4
|
+
.string()
|
|
5
|
+
.matches(/^[a-zA-Z]{2}\d{14,}$/g)
|
|
6
|
+
.min(16)
|
|
7
|
+
.max(34)
|
|
8
|
+
.required('alert_iban'),
|
|
9
|
+
bankName: yup.string().required('bank_name_required'),
|
|
5
10
|
beneficiaryName: yup
|
|
6
11
|
.string()
|
|
7
12
|
.matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g)
|
|
8
|
-
.required('')
|
|
13
|
+
.required('beneficiary_name_required')
|
|
9
14
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
var Success = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
var onSuccess = function () {
|
|
8
|
+
console.log('success');
|
|
9
|
+
alert('Account created successfully, please check your email');
|
|
10
|
+
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
+
};
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
|
|
13
|
+
};
|
|
14
|
+
export default React.memo(Success);
|
|
@@ -129,7 +129,7 @@ var ActivitiesList = function (_a) {
|
|
|
129
129
|
var getSelectedActivityFlag = function (item) {
|
|
130
130
|
return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === (item === null || item === void 0 ? void 0 : item.id); });
|
|
131
131
|
};
|
|
132
|
-
return (_jsxs(BoxStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
132
|
+
return (_jsxs(BoxStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
133
133
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.name : item === null || item === void 0 ? void 0 : item.nameEn })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
|
|
134
134
|
} }) }))] })] }));
|
|
135
135
|
};
|
|
@@ -26,6 +26,6 @@ var OperationStartDate = function (_a) {
|
|
|
26
26
|
oDateControl.field.onChange(data);
|
|
27
27
|
};
|
|
28
28
|
var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
29
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: [_jsxs(InputLabelStyled, { children: [t('
|
|
29
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: [_jsxs(InputLabelStyled, { children: [t('business_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] })));
|
|
30
30
|
};
|
|
31
31
|
export default OperationStartDate;
|
|
@@ -95,6 +95,6 @@ var SalesChannels = function () {
|
|
|
95
95
|
if (channelsChecked)
|
|
96
96
|
return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
|
|
97
97
|
};
|
|
98
|
-
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('
|
|
98
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id.toString(), disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name : channel.nameEn, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
|
|
99
99
|
};
|
|
100
100
|
export default SalesChannels;
|
|
@@ -7,12 +7,12 @@ export var ActivitiesValidationSchema = yup.object().shape({
|
|
|
7
7
|
})),
|
|
8
8
|
salesChannels: yup
|
|
9
9
|
.array()
|
|
10
|
-
.min(1, '
|
|
10
|
+
.min(1, 'choose_atleast_one_channel')
|
|
11
11
|
.of(yup.object().shape({
|
|
12
12
|
id: yup.number(),
|
|
13
13
|
name: yup.string(),
|
|
14
14
|
nameEn: yup.string()
|
|
15
15
|
}))
|
|
16
|
-
.required('
|
|
17
|
-
operationStartDate: yup.string().required('
|
|
16
|
+
.required('choose_atleast_one_channel'),
|
|
17
|
+
operationStartDate: yup.string().required('choose_any_business_date')
|
|
18
18
|
});
|
|
@@ -35,6 +35,6 @@ var CRNumber = function (_a) {
|
|
|
35
35
|
crNumberControl.field.onChange('');
|
|
36
36
|
};
|
|
37
37
|
var crNumberValue = crNumberControl.field.value;
|
|
38
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('
|
|
38
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('enter_commercial_register_no'), onChange: handleFLNumberChange, inputProps: { maxLength: CR_NUMBER_LENGTH }, value: crNumberValue, endAdornment: (crNumberValue === null || crNumberValue === void 0 ? void 0 : crNumberValue.length) === CR_NUMBER_LENGTH ? (_jsx(CheckIcon, {})) : (crNumberValue && _jsx(ClearIcon, { onClick: clearCRNumber })), placeholder: '0123456789', warningType: 'alert', warningMessage: (_b = crNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) }) })));
|
|
39
39
|
};
|
|
40
40
|
export default React.memo(CRNumber);
|
|
@@ -98,7 +98,7 @@ var CompanyLicense = function (_a) {
|
|
|
98
98
|
};
|
|
99
99
|
var hasList = (licenseList === null || licenseList === void 0 ? void 0 : licenseList.length) > 0;
|
|
100
100
|
var showCRNumber = !anchorEl;
|
|
101
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(Collapse, __assign({ in: hasList }, { children: [_jsx(InputStyled, { label: t('
|
|
101
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(Collapse, __assign({ in: hasList }, { children: [_jsx(InputStyled, { label: t('enter_commercial_register_no'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_cr'), value: t(getLicenseName(selectedLicense)) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'crNumber', list: licenseList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
102
102
|
return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selectedLicense) }, { children: isOtherLicense(item)
|
|
103
103
|
? t(getLicenseNumber(item))
|
|
104
104
|
: isAr
|
|
@@ -35,6 +35,6 @@ var FLNumber = function (_a) {
|
|
|
35
35
|
flNumberControl.field.onChange('');
|
|
36
36
|
};
|
|
37
37
|
var flNumberValue = flNumberControl.field.value;
|
|
38
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('
|
|
38
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('enter_license_no'), onChange: handleFLNumberChange, inputProps: { maxLength: FL_NUMBER_LENGTH }, value: flNumberValue, endAdornment: (flNumberValue === null || flNumberValue === void 0 ? void 0 : flNumberValue.length) === FL_NUMBER_LENGTH ? (_jsx(CheckIcon, {})) : (flNumberValue && _jsx(ClearIcon, { onClick: clearFLNumber })), placeholder: '12345678', warningType: 'alert', warningMessage: (_b = flNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) }) })));
|
|
39
39
|
};
|
|
40
40
|
export default React.memo(FLNumber);
|
|
@@ -101,7 +101,7 @@ var FreelanceLicense = function (_a) {
|
|
|
101
101
|
};
|
|
102
102
|
var hasList = (licenseList === null || licenseList === void 0 ? void 0 : licenseList.length) > 0;
|
|
103
103
|
var showFLNumber = !anchorEl;
|
|
104
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(Collapse, __assign({ in: hasList }, { children: [_jsx(InputStyled, { label: t('
|
|
104
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(Collapse, __assign({ in: hasList }, { children: [_jsx(InputStyled, { label: t('enter_freelance_license'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_fl'), value: t(getLicenseName(selectedLicense)) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'license_specialities[0].speciality.name_en', list: licenseList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
105
105
|
return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selectedLicense) }, { children: isOtherLicense(item)
|
|
106
106
|
? t(getLicenseNumber(item))
|
|
107
107
|
: isAr
|
|
@@ -101,6 +101,6 @@ var SelectType = function (_a) {
|
|
|
101
101
|
var FLActive = type === BusinessType.FL;
|
|
102
102
|
var CRActive = type === BusinessType.CR;
|
|
103
103
|
var isAnyTypeActive = FLActive || CRActive;
|
|
104
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !isAnyTypeActive }, { children: _jsx(TitleStyled, { children: t('
|
|
104
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !isAnyTypeActive }, { children: _jsx(TitleStyled, { children: t('signup_business_type_label') }) })), _jsxs(RadioGroupStyled, __assign({ "aria-labelledby": 'business-type', name: 'business-type' }, { children: [_jsx(BTypeSwitch, { value: BusinessType.FL, control: _jsx(RadioStyled, { color: 'primary', onClick: handleSwitchToFL }), label: _jsx(FLIconStyled, { src: FLActive ? ICONS_NAMES.FL_ACTIVE_ICON : ICONS_NAMES.FL_ICON }), active: FLActive }), _jsx(BTypeSwitch, { value: BusinessType.CR, control: _jsx(RadioStyled, { color: 'primary', onClick: handleSwitchToCR }), label: _jsx(CRIconStyled, { src: CRActive ? ICONS_NAMES.CR_ACTIVE_ICON : ICONS_NAMES.CR_ICON }), active: CRActive })] })), _jsx(Collapse, __assign({ in: !isAnyTypeActive }, { children: _jsxs(TextBoxStyled, { children: [_jsx(TextStyled, __assign({ onClick: handleSwitchToFL, active: FLActive }, { children: t('freelancer_reg') })), _jsx(TextStyled, __assign({ onClick: handleSwitchToCR, active: CRActive }, { children: t('commercial_reg') }))] }) }))] }) })));
|
|
105
105
|
};
|
|
106
106
|
export default React.memo(SelectType);
|
|
@@ -48,6 +48,6 @@ var Confirm = function () {
|
|
|
48
48
|
defaultValues: defaultValues,
|
|
49
49
|
mode: 'onChange'
|
|
50
50
|
});
|
|
51
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputStyled, { label: t(isCR ? '
|
|
51
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputStyled, { label: t(isCR ? 'signup_business_cr_info_title' : 'signup_business_fl_info_title'), value: defaultValues.licenseNumber, disabled: true }), _jsx(InputStyled, { label: t('signup_brand_name_label'), value: defaultValues.brandName, disabled: true }), _jsx(InputStyled, { label: t('signup_legal_name_label'), value: defaultValues.legalName, disabled: true }), _jsx(Button, __assign({ isAr: isAr }, { children: t('confirm') }))] })) })) }));
|
|
52
52
|
};
|
|
53
53
|
export default React.memo(Confirm);
|
|
@@ -115,7 +115,7 @@ var customerLocations = function (_a) {
|
|
|
115
115
|
};
|
|
116
116
|
var customerLocationsValue = customerLocationsControl.field.value;
|
|
117
117
|
var customerLocationSelected = customerLocationsValue[customerLocationsValue.length - 1];
|
|
118
|
-
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('
|
|
118
|
+
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.nameAR : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
|
|
119
119
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.nameAR : item.name })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
|
|
120
120
|
} }) }))] }));
|
|
121
121
|
};
|
|
@@ -10,20 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Box from '@mui/material/Box/Box';
|
|
14
13
|
import { styled } from '@mui/material/styles';
|
|
15
14
|
import * as React from 'react';
|
|
16
15
|
import { useTranslation } from 'react-i18next';
|
|
17
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
18
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
19
|
-
import Icon from '../../../../components/Icon';
|
|
20
18
|
import { useAppDispatch } from '../../../../hooks';
|
|
21
19
|
import { handleNextScreenStep } from '../../../../app/settings';
|
|
22
20
|
import { CustomerInfoValidation } from './validation';
|
|
23
21
|
import Form from '../../../../components/Form';
|
|
24
|
-
import Button from '
|
|
25
|
-
import { ICONS_NAMES } from '../../../../constants/assets';
|
|
26
|
-
import Loader from '../../../../components/Loader';
|
|
22
|
+
import Button from '../../../shared/Button';
|
|
27
23
|
import { useLanguage } from '../../../../hooks';
|
|
28
24
|
import CustomerLocations from './CustomerLocations';
|
|
29
25
|
import ExpectedCustomers from './ExpectedCustomers';
|
|
@@ -31,51 +27,19 @@ import ExpectedSales from './ExpectedSalesRange';
|
|
|
31
27
|
import { CUSTOMER_LOCATIONS, EXPECTED_CUSTOMERS, EXPECTED_SALES_RANGE } from '../../../../constants';
|
|
32
28
|
import RefundPolicy from './RefundPolicy';
|
|
33
29
|
import TransactionPolicy from './TransactionPolicy';
|
|
34
|
-
|
|
35
|
-
var theme = _a.theme;
|
|
36
|
-
return ({
|
|
37
|
-
padding: theme.spacing(2.5, 0, 2.5, 0),
|
|
38
|
-
overflow: 'hidden',
|
|
39
|
-
direction: theme.direction
|
|
40
|
-
});
|
|
41
|
-
});
|
|
30
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
42
31
|
var FormStyled = styled(Form)(function () { return ({
|
|
43
32
|
display: 'flex',
|
|
44
33
|
flexDirection: 'column'
|
|
45
34
|
}); });
|
|
46
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
47
|
-
var theme = _a.theme;
|
|
48
|
-
return ({
|
|
49
|
-
margin: theme.spacing(2.5, 2.5, 0, 2.5)
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
53
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
54
|
-
return ({
|
|
55
|
-
width: theme.spacing(3),
|
|
56
|
-
height: theme.spacing(3),
|
|
57
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
58
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
59
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
63
|
-
var theme = _a.theme;
|
|
64
|
-
return ({
|
|
65
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
66
|
-
'& .loader-box-container': {
|
|
67
|
-
marginInlineStart: theme.spacing(2.5)
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
35
|
var Customers = function (_a) {
|
|
72
36
|
var dispatch = useAppDispatch();
|
|
73
37
|
var methods = useForm({
|
|
74
38
|
resolver: yupResolver(CustomerInfoValidation),
|
|
75
39
|
defaultValues: {
|
|
76
40
|
customerLocations: CUSTOMER_LOCATIONS,
|
|
77
|
-
expectedCustomers: EXPECTED_CUSTOMERS,
|
|
78
|
-
expectedSalesRange: EXPECTED_SALES_RANGE,
|
|
41
|
+
expectedCustomers: EXPECTED_CUSTOMERS[EXPECTED_CUSTOMERS.length - 1],
|
|
42
|
+
expectedSalesRange: EXPECTED_SALES_RANGE[EXPECTED_SALES_RANGE.length - 1],
|
|
79
43
|
refundPolicy: false,
|
|
80
44
|
transactionPolicy: false
|
|
81
45
|
},
|
|
@@ -87,6 +51,6 @@ var Customers = function (_a) {
|
|
|
87
51
|
};
|
|
88
52
|
var t = useTranslation().t;
|
|
89
53
|
var isAr = useLanguage().isAr;
|
|
90
|
-
return (_jsx(
|
|
54
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(CustomerLocations, {}), _jsx(ExpectedCustomers, {}), _jsx(ExpectedSales, {}), _jsx(RefundPolicy, {}), _jsx(TransactionPolicy, {}), _jsx(Button, __assign({ sx: { mt: 2 }, disabled: !methods.formState.isValid, isAr: isAr }, { children: t('next') }))] })) })) }));
|
|
91
55
|
};
|
|
92
56
|
export default React.memo(Customers);
|
|
@@ -30,7 +30,7 @@ import { useLanguage } from '../../../../hooks';
|
|
|
30
30
|
import SimpleList from '../../../../components/SimpleList';
|
|
31
31
|
import { EXPECTED_CUSTOMERS } from '../../../../constants';
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
|
-
import { BoxStyled, CheckIconStyled, ExpandIcon, InputLabelStyled, InputStyled, NameContainer
|
|
33
|
+
import { BoxStyled, CheckIconStyled, ExpandIcon, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
|
|
34
34
|
var ListItemContainer = styled(Box)(function (_a) {
|
|
35
35
|
var theme = _a.theme;
|
|
36
36
|
return ({
|
|
@@ -59,20 +59,14 @@ var ExpectedCustomers = function (_a) {
|
|
|
59
59
|
setAnchorEl(null);
|
|
60
60
|
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
61
61
|
};
|
|
62
|
-
var checkRemainingCondition = function (item) {
|
|
63
|
-
return !!expectedCustomersValue.find(function (expectedCustomer) {
|
|
64
|
-
return expectedCustomer.id === item.id;
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
62
|
var onSelectItem = function (expectedCustomers) {
|
|
68
63
|
onCloseList();
|
|
69
|
-
|
|
70
|
-
expectedCustomersControl.field.onChange(remaining);
|
|
64
|
+
expectedCustomersControl.field.onChange(expectedCustomers);
|
|
71
65
|
};
|
|
72
66
|
var expectedCustomersValue = expectedCustomersControl.field.value;
|
|
73
|
-
var expectedCustomersSelected = expectedCustomersValue
|
|
67
|
+
var expectedCustomersSelected = expectedCustomersValue;
|
|
74
68
|
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.nameAR : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
75
|
-
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})
|
|
69
|
+
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
|
|
76
70
|
} }) }))] }));
|
|
77
71
|
};
|
|
78
72
|
export default ExpectedCustomers;
|
|
@@ -30,7 +30,7 @@ import { useLanguage } from '../../../../hooks';
|
|
|
30
30
|
import { EXPECTED_SALES_RANGE } from '../../../../constants';
|
|
31
31
|
import SimpleList from '../../../../components/SimpleList';
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
|
-
import { InputLabelStyled, BoxStyled, CheckIconStyled, ExpandIcon,
|
|
33
|
+
import { InputLabelStyled, BoxStyled, CheckIconStyled, ExpandIcon, InputStyled, NameContainer } from './CustomerLocations';
|
|
34
34
|
var ListItemContainer = styled(Box)(function () { return ({
|
|
35
35
|
display: 'flex'
|
|
36
36
|
}); });
|
|
@@ -62,13 +62,12 @@ var ExpectedSalesRange = function (_a) {
|
|
|
62
62
|
};
|
|
63
63
|
var onSelectItem = function (expectedSalesRange) {
|
|
64
64
|
onCloseList();
|
|
65
|
-
|
|
66
|
-
expectedSalesRangeControl.field.onChange(remaining);
|
|
65
|
+
expectedSalesRangeControl.field.onChange(expectedSalesRange);
|
|
67
66
|
};
|
|
68
67
|
var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
|
|
69
|
-
var expectedSalesRangeSelected = expectedSalesRangeValue
|
|
70
|
-
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('
|
|
71
|
-
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})
|
|
68
|
+
var expectedSalesRangeSelected = expectedSalesRangeValue;
|
|
69
|
+
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.nameAR : expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedSalesRangeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
70
|
+
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})] }));
|
|
72
71
|
} }) }))] }));
|
|
73
72
|
};
|
|
74
73
|
export default ExpectedSalesRange;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const BoxStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
component?: React.ElementType<any> | undefined;
|
|
5
|
-
ref?: React.Ref<unknown> | undefined;
|
|
6
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, 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") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
2
|
export declare const ContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
11
3
|
children?: React.ReactNode;
|
|
12
4
|
component?: React.ElementType<any> | undefined;
|
|
@@ -21,15 +21,7 @@ import Text from '../../../../components/Text';
|
|
|
21
21
|
import Link from '@mui/material/Link';
|
|
22
22
|
import Warning from '../../../../components/Warning';
|
|
23
23
|
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
24
|
-
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return ({
|
|
27
|
-
direction: theme.direction,
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
marginBlockStart: theme.spacing(2.75)
|
|
31
|
-
});
|
|
32
|
-
});
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
33
25
|
export var ContainerStyled = styled(Box)(function (_a) {
|
|
34
26
|
var theme = _a.theme;
|
|
35
27
|
return ({
|
|
@@ -81,6 +73,6 @@ var RefundPolicy = function () {
|
|
|
81
73
|
var handleRefundCheckedChange = function (event, checked) {
|
|
82
74
|
refundControl.field.onChange(checked);
|
|
83
75
|
};
|
|
84
|
-
return (_jsxs(
|
|
76
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.REFUND_AR : EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
|
|
85
77
|
};
|
|
86
78
|
export default RefundPolicy;
|
|
@@ -17,7 +17,8 @@ import { useLanguage } from '../../../../hooks';
|
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
18
|
import Warning from '../../../../components/Warning';
|
|
19
19
|
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
20
|
-
import {
|
|
20
|
+
import { ContainerStyled, CheckboxStyled, TextStyled, LinkStyled } from './RefundPolicy';
|
|
21
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
22
|
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
22
23
|
width: '100%'
|
|
23
24
|
}); });
|
|
@@ -32,6 +33,6 @@ var TransactionPolicy = function () {
|
|
|
32
33
|
var handleTransactionCheckedChange = function (event, checked) {
|
|
33
34
|
transactionControl.field.onChange(checked);
|
|
34
35
|
};
|
|
35
|
-
return (_jsxs(
|
|
36
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TRANSACTION_AR : EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
|
|
36
37
|
};
|
|
37
38
|
export default TransactionPolicy;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export declare const CustomerInfoValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
3
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
4
|
-
expectedCustomers:
|
|
5
|
-
expectedSalesRange:
|
|
4
|
+
expectedCustomers: any;
|
|
5
|
+
expectedSalesRange: any;
|
|
6
6
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
7
7
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
8
8
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
9
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
10
|
-
expectedCustomers:
|
|
11
|
-
expectedSalesRange:
|
|
10
|
+
expectedCustomers: any;
|
|
11
|
+
expectedSalesRange: any;
|
|
12
12
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
13
13
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
14
14
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
15
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
16
|
-
expectedCustomers:
|
|
17
|
-
expectedSalesRange:
|
|
16
|
+
expectedCustomers: any;
|
|
17
|
+
expectedSalesRange: any;
|
|
18
18
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
19
19
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
20
20
|
}>>>;
|