@tap-payments/auth-jsconnect 2.3.1 → 2.3.2
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 +2 -1
- package/build/assets/locales/en.json +2 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +6 -3
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/constants/validation.d.ts +2 -2
- package/build/constants/validation.js +2 -2
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +2 -2
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +3 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +4 -3
- package/build/features/brand/screens/BrandActivities/validation.d.ts +6 -6
- package/build/features/brand/screens/BrandActivities/validation.js +3 -8
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +4 -4
- package/build/features/entity/screens/EntityName/LicenseNumber.js +3 -3
- package/build/features/entity/screens/EntityName/validation.js +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -1
- package/build/features/shared/Button/IndividualActionButtons.js +1 -1
- package/build/features/shared/Calender/Calender.js +1 -1
- package/package.json +1 -1
|
@@ -416,5 +416,6 @@
|
|
|
416
416
|
"alert_choose_segment_profit": "يُرجى تحديد الربح",
|
|
417
417
|
"alert_choose_segment_tech": "الرجاء تحديد التقنية",
|
|
418
418
|
"switch_to_islamic_calendar": "التبديل إلى التقويم الهجرى",
|
|
419
|
-
"switch_to_gregorian_calendar": "التبديل إلى التقويم الميلادي"
|
|
419
|
+
"switch_to_gregorian_calendar": "التبديل إلى التقويم الميلادي",
|
|
420
|
+
"choose_any_monthly_income": "رجاءا اختر الدخل الشهرى"
|
|
420
421
|
}
|
|
@@ -446,5 +446,6 @@
|
|
|
446
446
|
"alert_choose_segment_profit": "Please select segment profit",
|
|
447
447
|
"alert_choose_segment_tech": "Please select segment tech",
|
|
448
448
|
"switch_to_islamic_calendar": "Switch to Islamic Calendar",
|
|
449
|
-
"switch_to_gregorian_calendar": "Switch to Gregorian Calendar"
|
|
449
|
+
"switch_to_gregorian_calendar": "Switch to Gregorian Calendar",
|
|
450
|
+
"choose_any_monthly_income": "Please choose monthly income"
|
|
450
451
|
}
|
|
@@ -24,8 +24,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { Calendar, toDateObject } from 'react-multi-date-picker';
|
|
26
26
|
import arabic from 'react-date-object/calendars/arabic';
|
|
27
|
-
import arabic_ar from 'react-date-object/locales/arabic_ar';
|
|
28
|
-
import arabic_en from 'react-date-object/locales/arabic_en';
|
|
29
27
|
import Box from '@mui/material/Box';
|
|
30
28
|
import { styled } from '@mui/material/styles';
|
|
31
29
|
import Divider from '@mui/material/Divider';
|
|
@@ -36,6 +34,8 @@ import { getEighteenYearsAgo } from '../../utils';
|
|
|
36
34
|
import { EndAdornmentExpanded } from '../../features/shared/EndAdornment';
|
|
37
35
|
import Input from '../Input';
|
|
38
36
|
import Text from '../Text';
|
|
37
|
+
import arabic_en from './arabicEn';
|
|
38
|
+
import arabic_ar from './arabicAr';
|
|
39
39
|
import './style.css';
|
|
40
40
|
var ContainerIcon = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
|
|
41
41
|
var theme = _a.theme, disabled = _a.disabled;
|
|
@@ -106,6 +106,9 @@ var DatePicker = function (_a) {
|
|
|
106
106
|
var dateObject = toDateObject(date);
|
|
107
107
|
return dateObject.convert(arabic).format(DATE_FORMAT);
|
|
108
108
|
};
|
|
109
|
-
return (_jsxs(Container, __assign({ disabled: disabled, id: 'arabic-container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: getEndAdornment() })), value: date ? formateDate(date) : '', placeholder: DATE_FORMAT, onClick:
|
|
109
|
+
return (_jsxs(Container, __assign({ disabled: disabled, id: 'arabic-container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: getEndAdornment() })), value: date ? formateDate(date) : '', placeholder: DATE_FORMAT, onClick: function (e) {
|
|
110
|
+
if (!disabled)
|
|
111
|
+
toggleCalender(e);
|
|
112
|
+
}, startAdornment: calenderIcon, disabled: disabled, readOnly: readOnly, dir: dir }), _jsxs(Collapse, __assign({ in: openCalender }, { children: [_jsx(Calendar, __assign({ calendar: arabic, locale: dir === 'rtl' ? arabic_ar : arabic_en, maxDate: rest.maxDate || defaultMax, minDate: defaultMin, format: DATE_FORMAT, onChange: handleOnDateChange, value: date || (isDob ? new Date(getEighteenYearsAgo()) : undefined), className: 'custom-container' }, rest)), _jsx(Divider, {})] }))] })));
|
|
110
113
|
};
|
|
111
114
|
export default memo(DatePicker);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var arabic_ar = {
|
|
2
|
+
name: 'arabic_ar',
|
|
3
|
+
months: [
|
|
4
|
+
['محرم', 'محرم'],
|
|
5
|
+
['صفر', 'صفر'],
|
|
6
|
+
['ربیع الاول', 'ربیع الاول'],
|
|
7
|
+
['ربیع الثانی', 'ربیع الثانی'],
|
|
8
|
+
['جمادی الاول', 'جمادی الاول'],
|
|
9
|
+
['جمادی الثانی', 'جمادی الثانی'],
|
|
10
|
+
['رجب', 'رجب'],
|
|
11
|
+
['شعبان', 'شعبان'],
|
|
12
|
+
['رمضان', 'رمضان'],
|
|
13
|
+
['شوال', 'شوال'],
|
|
14
|
+
['ذی القعده ', 'ذی القعده'],
|
|
15
|
+
['ذی الحجه', 'ذی الحجه']
|
|
16
|
+
],
|
|
17
|
+
weekDays: [
|
|
18
|
+
['السّبت', 'سب'],
|
|
19
|
+
['الأحد', 'اح'],
|
|
20
|
+
['الإثنينِ', 'ثن'],
|
|
21
|
+
['الثلاثاء', 'ثل'],
|
|
22
|
+
['الأربعاء', 'ار'],
|
|
23
|
+
['الخميس', 'خم'],
|
|
24
|
+
['الجمعة', 'جم']
|
|
25
|
+
],
|
|
26
|
+
digits: ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'],
|
|
27
|
+
meridiems: [
|
|
28
|
+
['قبل الظهر', 'ق.ظ'],
|
|
29
|
+
['بعد الظهر', 'ب.ظ']
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
export default arabic_ar;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var arabic_en = {
|
|
2
|
+
name: 'arabic_en',
|
|
3
|
+
months: [
|
|
4
|
+
['Muharram', 'Mu'],
|
|
5
|
+
['Safar', 'Sa'],
|
|
6
|
+
['Rabi`al-Awwal', 'RI'],
|
|
7
|
+
['Rabi`ath-Thani', 'RII'],
|
|
8
|
+
['Jumada l-Ula', 'JI'],
|
|
9
|
+
['Jumada t-Tania', 'JII'],
|
|
10
|
+
['Rajab', 'Ra'],
|
|
11
|
+
['Sha`ban', 'Sh'],
|
|
12
|
+
['Ramadan', 'Ra'],
|
|
13
|
+
['Shawwal', 'Sh'],
|
|
14
|
+
['Dhu l-Qa`da ', 'DhQ'],
|
|
15
|
+
['Dhu l-Hijja', 'DhH']
|
|
16
|
+
],
|
|
17
|
+
weekDays: [
|
|
18
|
+
['as-sabt', 'Sab'],
|
|
19
|
+
["al-'ahad", 'Aha'],
|
|
20
|
+
["al-'ithnayn", 'Ith'],
|
|
21
|
+
['ath-thalatha', 'Tha'],
|
|
22
|
+
["al-'arb`a'", 'Arb'],
|
|
23
|
+
['al-khamis', 'Kha'],
|
|
24
|
+
['al-jum`a', 'Jum']
|
|
25
|
+
],
|
|
26
|
+
digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
27
|
+
meridiems: [
|
|
28
|
+
['AM', 'am'],
|
|
29
|
+
['PM', 'pm']
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
export default arabic_en;
|
|
@@ -3,8 +3,8 @@ export declare const CIVIL_ID_NUMBER_LENGTH = 12;
|
|
|
3
3
|
export declare const DEFAULT_TIMER_VALUE = 59;
|
|
4
4
|
export declare const VAT_ID_LENGTH = 15;
|
|
5
5
|
export declare const MAX_IBAN_VALUE = 34;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const FL_NUMBER_MAX_LENGTH = 20;
|
|
7
|
+
export declare const CR_NUMBER_MAX_LENGTH = 20;
|
|
8
8
|
export declare const FL_NUMBER_ENTITY_LENGTH = 50;
|
|
9
9
|
export declare const FL_MIN_LICENSE_LENGTH = 5;
|
|
10
10
|
export declare const CR_MIN_LICENSE_LENGTH = 5;
|
|
@@ -3,8 +3,8 @@ export var CIVIL_ID_NUMBER_LENGTH = 12;
|
|
|
3
3
|
export var DEFAULT_TIMER_VALUE = 59;
|
|
4
4
|
export var VAT_ID_LENGTH = 15;
|
|
5
5
|
export var MAX_IBAN_VALUE = 34;
|
|
6
|
-
export var
|
|
7
|
-
export var
|
|
6
|
+
export var FL_NUMBER_MAX_LENGTH = 20;
|
|
7
|
+
export var CR_NUMBER_MAX_LENGTH = 20;
|
|
8
8
|
export var FL_NUMBER_ENTITY_LENGTH = 50;
|
|
9
9
|
export var FL_MIN_LICENSE_LENGTH = 5;
|
|
10
10
|
export var CR_MIN_LICENSE_LENGTH = 5;
|
|
@@ -37,7 +37,7 @@ import { brandSelector, clearError } from '../../../app/brand/brandStore';
|
|
|
37
37
|
import Search from '../../../shared/Search';
|
|
38
38
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
39
39
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
40
|
-
import { InfoIconStyled, InfoOutlinedIconStyled, LabelContainerStyled } from './ActivitiesList';
|
|
40
|
+
import { InfoIconStyled, InfoOutlinedIconStyled, LabelContainerStyled, MandatoryStyled } from './ActivitiesList';
|
|
41
41
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
42
42
|
var theme = _a.theme;
|
|
43
43
|
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
@@ -128,7 +128,7 @@ var CustomerBase = function (_a) {
|
|
|
128
128
|
};
|
|
129
129
|
var customerLocationsValue = customerLocationsControl.field.value;
|
|
130
130
|
var customerLocationSelected = customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue[0];
|
|
131
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [
|
|
131
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsxs(BaseLabelStyled, { children: [t('select_customer_base'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Tooltip, __assign({ title: t('customer_base_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(InputStyled, { readOnly: readOnly, placeholder: t('choose_expected_sales'), value: isAr ? (_b = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) !== null && _c !== void 0 ? _c : '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
|
|
132
132
|
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.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, { isVerified: isVerified }), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
133
133
|
} })] }))] }) })));
|
|
134
134
|
};
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import { jsx as _jsx,
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import Box from '@mui/material/Box';
|
|
26
26
|
import { styled } from '@mui/material/styles';
|
|
@@ -35,6 +35,7 @@ import InputSelect from '../../../shared/InputSelect';
|
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
import { InputLabelStyled, NameContainer } from './CustomerBase';
|
|
38
|
+
import { MandatoryStyled } from './ActivitiesList';
|
|
38
39
|
var InputStyled = styled(InputSelect)(function (_a) {
|
|
39
40
|
var theme = _a.theme;
|
|
40
41
|
return ({
|
|
@@ -93,7 +94,7 @@ var ExpectedCustomers = function (_a) {
|
|
|
93
94
|
};
|
|
94
95
|
var expectedCustomersValue = expectedCustomerControl.field.value;
|
|
95
96
|
var expectedCustomersSelected = expectedCustomersValue;
|
|
96
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [
|
|
97
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('expected_customers_to_serve'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsx(InputStyled, { readOnly: readOnly, placeholder: t('choose_expected_sales'), value: isAr ? (_c = (_b = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _b === void 0 ? void 0 : _b.ar) !== null && _c !== void 0 ? _c : '' : (_e = (_d = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _d === void 0 ? void 0 : _d.en) !== null && _e !== void 0 ? _e : '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
97
98
|
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.name.ar : item.name.en })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
98
99
|
} }) }))] }) })));
|
|
99
100
|
};
|
|
@@ -28,6 +28,7 @@ import InputSelect from '../../../shared/InputSelect';
|
|
|
28
28
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
29
29
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
30
30
|
import { InputLabelStyled, NameContainer } from './CustomerBase';
|
|
31
|
+
import { MandatoryStyled } from './ActivitiesList';
|
|
31
32
|
var InputStyled = styled(InputSelect)(function (_a) {
|
|
32
33
|
var theme = _a.theme;
|
|
33
34
|
return ({
|
|
@@ -122,9 +123,9 @@ var ExpectedSalesRange = function (_a) {
|
|
|
122
123
|
if (item)
|
|
123
124
|
setSubIndex(item.id);
|
|
124
125
|
}, [anchorEl, expectedSalesRangeValue]);
|
|
125
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('expected_sales_monthly', {
|
|
127
|
+
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
128
|
+
}), ' ', _jsx(MandatoryStyled, { children: "*" })] }), _jsx(InputStyled, { readOnly: readOnly, value: isAr ? (_b = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.en) !== null && _c !== void 0 ? _c : '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
|
|
128
129
|
var isOnlyOneItem = !item.sub || item.sub.length === 1;
|
|
129
130
|
if (isOnlyOneItem)
|
|
130
131
|
onSelectItem(item);
|
|
@@ -17,8 +17,8 @@ export declare const BrandActivitiesValidationSchema: () => yup.ObjectSchema<imp
|
|
|
17
17
|
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
18
18
|
}>>[] | undefined>;
|
|
19
19
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
expectedCustomer: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
21
|
+
expectedSale: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
22
22
|
termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
23
23
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
24
24
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
@@ -40,8 +40,8 @@ export declare const BrandActivitiesValidationSchema: () => yup.ObjectSchema<imp
|
|
|
40
40
|
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
41
41
|
}>>[] | undefined>;
|
|
42
42
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
expectedCustomer: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
44
|
+
expectedSale: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
45
45
|
termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
46
46
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
47
47
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
@@ -63,8 +63,8 @@ export declare const BrandActivitiesValidationSchema: () => yup.ObjectSchema<imp
|
|
|
63
63
|
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
64
64
|
}>>[] | undefined>;
|
|
65
65
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
expectedCustomer: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
67
|
+
expectedSale: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
68
68
|
termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
69
69
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
70
70
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
var objectElements = {
|
|
3
|
-
id: yup.number(),
|
|
4
|
-
name_ar: yup.string(),
|
|
5
|
-
name_en: yup.string()
|
|
6
|
-
};
|
|
7
2
|
export var BrandActivitiesValidationSchema = function () {
|
|
8
3
|
return yup.object().shape({
|
|
9
4
|
activities: yup
|
|
@@ -13,9 +8,9 @@ export var BrandActivitiesValidationSchema = function () {
|
|
|
13
8
|
ar: yup.string().nullable(),
|
|
14
9
|
en: yup.string().nullable()
|
|
15
10
|
})),
|
|
16
|
-
customerLocations: yup.array().required('please_choose_base'),
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
customerLocations: yup.array().min(1, 'please_choose_base').required('please_choose_base'),
|
|
12
|
+
expectedCustomer: yup.object().required('select_expected_customers_serve'),
|
|
13
|
+
expectedSale: yup.object().required('select_expected_sales'),
|
|
19
14
|
termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond'),
|
|
20
15
|
refundPolicy: yup.boolean().required().isTrue('refund_policy_error'),
|
|
21
16
|
transactionPolicy: yup.boolean().required().isTrue('transaction_policy_error')
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import {
|
|
16
|
+
import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_MAX_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
17
17
|
import { removeAllOtherThanCharsAndNumber, isSA, isOtherLicense } from '../../../../utils';
|
|
18
18
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
19
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
@@ -45,8 +45,8 @@ var LicenseNumber = function (_a) {
|
|
|
45
45
|
};
|
|
46
46
|
var licenseNumberValue = licenseNumberControl.field.value;
|
|
47
47
|
var error = (_b = licenseNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
48
|
-
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ?
|
|
49
|
-
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH :
|
|
48
|
+
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_MAX_LENGTH : FL_NUMBER_MAX_LENGTH;
|
|
49
|
+
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : isCR ? CR_MIN_LICENSE_LENGTH : FL_MIN_LICENSE_LENGTH;
|
|
50
50
|
var label = isCR ? 'cr_number' : 'fl_number';
|
|
51
51
|
var showCheckIcon = !isSACountry ? (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) >= minLength : (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) === length;
|
|
52
52
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), required: !isSACountry, onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: showCheckIcon ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber }), placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }) }) }) })));
|
|
@@ -23,9 +23,9 @@ export var LicenseValidationSchema = yup.object().shape({
|
|
|
23
23
|
if (length === 0)
|
|
24
24
|
return true;
|
|
25
25
|
if (isCR) {
|
|
26
|
-
return length
|
|
26
|
+
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
27
27
|
}
|
|
28
|
-
return length
|
|
28
|
+
return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
|
|
29
29
|
}
|
|
30
30
|
})
|
|
31
31
|
.required('')
|
|
@@ -88,7 +88,7 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
88
88
|
termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond'),
|
|
89
89
|
salesChannels: yup
|
|
90
90
|
.array()
|
|
91
|
-
.min(1, '
|
|
91
|
+
.min(1, ' ')
|
|
92
92
|
.of(yup.object().shape({
|
|
93
93
|
id: yup.string().required('choose_atleast_one_channel')
|
|
94
94
|
}))
|
|
@@ -109,7 +109,7 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
109
109
|
return yup.object().shape({
|
|
110
110
|
salesChannels: yup
|
|
111
111
|
.array()
|
|
112
|
-
.min(1, '
|
|
112
|
+
.min(1, ' ')
|
|
113
113
|
.of(yup.object().shape({
|
|
114
114
|
id: yup.string().required('choose_atleast_one_channel')
|
|
115
115
|
}))
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import {
|
|
16
|
+
import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_MAX_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
17
17
|
import { removeAllOtherThanCharsAndNumber, isSA } from '../../../../utils';
|
|
18
18
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
19
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
@@ -43,8 +43,8 @@ var LicenseNumber = function (_a) {
|
|
|
43
43
|
};
|
|
44
44
|
var licenseNumberValue = licenseNumberControl.field.value;
|
|
45
45
|
var error = (_b = licenseNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
46
|
-
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ?
|
|
47
|
-
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH :
|
|
46
|
+
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_MAX_LENGTH : FL_NUMBER_MAX_LENGTH;
|
|
47
|
+
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : isCR ? CR_MIN_LICENSE_LENGTH : FL_MIN_LICENSE_LENGTH;
|
|
48
48
|
var label = isCR ? 'cr_number' : 'fl_number';
|
|
49
49
|
var showCheckIcon = !isSACountry ? (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) >= minLength : (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) === length;
|
|
50
50
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), required: !isSACountry, onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: showCheckIcon || (readOnly && licenseNumberValue) ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber }), placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }) }) }) })));
|
|
@@ -37,9 +37,9 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
|
|
|
37
37
|
if (length === 0)
|
|
38
38
|
return true;
|
|
39
39
|
if (isCR) {
|
|
40
|
-
return length
|
|
40
|
+
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
41
41
|
}
|
|
42
|
-
return length
|
|
42
|
+
return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
|
|
43
43
|
}
|
|
44
44
|
})
|
|
45
45
|
.required(''),
|
|
@@ -70,9 +70,9 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
|
|
|
70
70
|
if (length === 0)
|
|
71
71
|
return true;
|
|
72
72
|
if (isCR) {
|
|
73
|
-
return length
|
|
73
|
+
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
74
74
|
}
|
|
75
|
-
return length
|
|
75
|
+
return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
|
|
76
76
|
}
|
|
77
77
|
})
|
|
78
78
|
.required('')
|
|
@@ -17,7 +17,7 @@ import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
|
17
17
|
import { BusinessType } from '../../../../@types';
|
|
18
18
|
import { isSA, removeAllOtherThanCharsAndNumber } from '../../../../utils';
|
|
19
19
|
import { settingsSelector } from '../../../../app/settings';
|
|
20
|
-
import {
|
|
20
|
+
import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_ENTITY_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
23
23
|
import Input from '../../../shared/Input';
|
|
@@ -46,8 +46,8 @@ var LicenseNumber = function (_a) {
|
|
|
46
46
|
var licenseNumberValue = licenseNumberControl.field.value;
|
|
47
47
|
var error = (_c = licenseNumberControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
|
|
48
48
|
var isCR = type === BusinessType.CR;
|
|
49
|
-
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ?
|
|
50
|
-
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH :
|
|
49
|
+
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_MAX_LENGTH : FL_NUMBER_ENTITY_LENGTH;
|
|
50
|
+
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : isCR ? CR_MIN_LICENSE_LENGTH : FL_MIN_LICENSE_LENGTH;
|
|
51
51
|
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('license_number_label'), onChange: handleChange, inputProps: { maxLength: length }, value: licenseNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }), endAdornment: _jsx(EndAdornment, { value: licenseNumberValue, isVerified: isVerified }) }) })) })));
|
|
52
52
|
};
|
|
53
53
|
export default React.memo(LicenseNumber);
|
|
@@ -26,9 +26,9 @@ export var EntityNameValidationSchema = function () {
|
|
|
26
26
|
if (length === 0)
|
|
27
27
|
return true;
|
|
28
28
|
if (isCR) {
|
|
29
|
-
return length
|
|
29
|
+
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
30
30
|
}
|
|
31
|
-
return length
|
|
31
|
+
return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
|
|
32
32
|
}
|
|
33
33
|
})
|
|
34
34
|
.required(''),
|
|
@@ -82,7 +82,7 @@ var MonthlyIncome = function (props) {
|
|
|
82
82
|
var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
83
83
|
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: t('please_enter_actual_income', {
|
|
84
84
|
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
85
|
-
}), readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
85
|
+
}), required: true, readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
86
86
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIcon, { isVerified: isMonthlyIncomeVerified(item) })] }));
|
|
87
87
|
} }) }))] })) })));
|
|
88
88
|
};
|
|
@@ -5,7 +5,7 @@ export var IndividualInfoValidationSchema = function (objects) {
|
|
|
5
5
|
return yup.object().shape({
|
|
6
6
|
occupation: isUserType ? yup.object().required('alert_choose_occupation') : yup.object().optional(),
|
|
7
7
|
sourceIncome: isUserType ? yup.object().required('choose_any_source_of_income') : yup.object().optional(),
|
|
8
|
-
monthlyIncome: yup.object().optional(),
|
|
8
|
+
monthlyIncome: isUserType ? yup.object().required('choose_any_monthly_income') : yup.object().optional(),
|
|
9
9
|
civilID: yup.array().optional(),
|
|
10
10
|
signatureFileId: yup.array().optional(),
|
|
11
11
|
isPEP: isUserType ? yup.boolean().required('please_choose_relative_pep') : yup.boolean().optional().nullable(),
|
|
@@ -152,5 +152,5 @@ export default function IndividualActionButtons(_a) {
|
|
|
152
152
|
var theme = useTheme();
|
|
153
153
|
var isRequestedAndNotLoading = requestEmail.isRequested && !requestEmail.loading;
|
|
154
154
|
var requestEmailLoaderColor = isRequestedAndNotLoading ? theme.palette.success.main : theme.palette.primary.main;
|
|
155
|
-
return (_jsxs(ButtonBoxStyled, { children: [_jsxs(AddDetailsButtonStyled, __assign({ isCompleted: addDetails.status === 'verified', isLoading: addDetails.loading, type: 'button', variant: 'outlined', onClick: addDetails.onClick, startIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(Image, { src: addDetails.status === 'verified' ? ICONS_NAMES.ADD_DETAIL_GREEN : ICONS_NAMES.ADD_DETAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [addDetails.status !== 'verified' && _jsx(Dot, { sx: { margin: 0 }, completed: addDetails.status === 'reviewed' }), _jsx(ArrowIconStyled, { isAr: isAr, src: addDetails.status === 'verified' ? ICONS_NAMES.GREEN_ARROW : ICONS_NAMES.BLUE_ARROW })] })) })) }, { children: [_jsx(Collapse, __assign({ in: addDetails.loading }, { children: _jsx(LoaderStyled, { innerColor: addDetails.status === 'verified' ? theme.palette.success.main : theme.palette.primary.main, outerColor: addDetails.status === 'verified' ? theme.palette.success.main : theme.palette.primary.main, size: 15, toggleAnimation: addDetails.loading }) })), _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(TextStyled, { children: t(addDetails.title) }) }))] })), requestEmail.show && (_jsxs(_Fragment, { children: [requestEmail.children, _jsxs(RequestEmailButtonStyled, __assign({ isRequested: requestEmail.isRequested, isLoading: requestEmail.loading, variant: 'outlined', disabled: requestEmail.disabled, type: 'button', onClick: requestEmail.onClick, startIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(Image, { src: isRequestedAndNotLoading ? ICONS_NAMES.REQUEST_EMAIL_GREEN : ICONS_NAMES.REQUEST_EMAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: isRequestedAndNotLoading ? (_jsx(CheckIconStyled, { isVerified: requestEmail.isRequested })) : (_jsx(ArrowIconStyled, { isAr: isAr, src: ICONS_NAMES.BLUE_ARROW })) })) }, { children: [_jsx(Collapse, __assign({ in: requestEmail.loading }, { children: _jsx(LoaderStyled, { innerColor: requestEmailLoaderColor, outerColor: requestEmailLoaderColor, size: 15, toggleAnimation: requestEmail.loading }) })), _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(TextStyled, { children: t(requestEmail.title) }) }))] }))] }))] }));
|
|
155
|
+
return (_jsxs(ButtonBoxStyled, { children: [_jsxs(AddDetailsButtonStyled, __assign({ isCompleted: addDetails.status === 'verified', isLoading: addDetails.loading, type: 'button', variant: 'outlined', onClick: addDetails.onClick, startIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(Image, { src: addDetails.status === 'verified' ? ICONS_NAMES.ADD_DETAIL_GREEN : ICONS_NAMES.ADD_DETAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [addDetails.status !== 'verified' && (_jsx(Dot, { sx: { margin: 0 }, completed: addDetails.status === 'complete' || addDetails.status === 'completed' || addDetails.status === 'reviewed' })), _jsx(ArrowIconStyled, { isAr: isAr, src: addDetails.status === 'verified' ? ICONS_NAMES.GREEN_ARROW : ICONS_NAMES.BLUE_ARROW })] })) })) }, { children: [_jsx(Collapse, __assign({ in: addDetails.loading }, { children: _jsx(LoaderStyled, { innerColor: addDetails.status === 'verified' ? theme.palette.success.main : theme.palette.primary.main, outerColor: addDetails.status === 'verified' ? theme.palette.success.main : theme.palette.primary.main, size: 15, toggleAnimation: addDetails.loading }) })), _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(TextStyled, { children: t(addDetails.title) }) }))] })), requestEmail.show && (_jsxs(_Fragment, { children: [requestEmail.children, _jsxs(RequestEmailButtonStyled, __assign({ isRequested: requestEmail.isRequested, isLoading: requestEmail.loading, variant: 'outlined', disabled: requestEmail.disabled, type: 'button', onClick: requestEmail.onClick, startIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(Image, { src: isRequestedAndNotLoading ? ICONS_NAMES.REQUEST_EMAIL_GREEN : ICONS_NAMES.REQUEST_EMAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: isRequestedAndNotLoading ? (_jsx(CheckIconStyled, { isVerified: requestEmail.isRequested })) : (_jsx(ArrowIconStyled, { isAr: isAr, src: ICONS_NAMES.BLUE_ARROW })) })) }, { children: [_jsx(Collapse, __assign({ in: requestEmail.loading }, { children: _jsx(LoaderStyled, { innerColor: requestEmailLoaderColor, outerColor: requestEmailLoaderColor, size: 15, toggleAnimation: requestEmail.loading }) })), _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(TextStyled, { children: t(requestEmail.title) }) }))] }))] }))] }));
|
|
156
156
|
}
|
|
@@ -51,6 +51,6 @@ var CustomCalender = function (_a) {
|
|
|
51
51
|
}, onDatePicked: function () {
|
|
52
52
|
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false);
|
|
53
53
|
setOpen(false);
|
|
54
|
-
}, onDateChange: onDateChange, value: defaultValue }) })), _jsx(Collapse, __assign({ in:
|
|
54
|
+
}, onDateChange: onDateChange, value: defaultValue }) })), _jsx(Collapse, __assign({ in: open }, { children: _jsx(SwitchBoxStyled, __assign({ onClick: onSwitchCalender }, { children: _jsxs(_Fragment, { children: [_jsx(Icon, { src: !isHijriCalender ? ICONS_NAMES.SWITCH_HIJRI_CALENDER : ICONS_NAMES.SWITCH_CALENDER }), !isHijriCalender ? t('switch_to_islamic_calendar') : t('switch_to_gregorian_calendar')] }) })) }))] }));
|
|
55
55
|
};
|
|
56
56
|
export default CustomCalender;
|