@tap-payments/auth-jsconnect 2.4.13-test → 2.4.15-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/@types/app.d.ts +28 -1
- package/build/components/DatePicker/DatePicker.d.ts +2 -1
- package/build/components/DatePicker/DatePicker.js +12 -11
- package/build/features/app/individual/individualStore.js +8 -5
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -14
- package/build/features/entity/screens/EntityCapital/ActivityList.js +9 -14
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -5
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +3 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -8
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +13 -5
- package/build/features/entity/screens/EntityName/Article.d.ts +2 -1
- package/build/features/entity/screens/EntityName/Article.js +3 -2
- package/build/features/entity/screens/EntityName/EntityName.js +34 -12
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -14
- package/build/features/entity/screens/EntityName/EntityTypeList.js +7 -16
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -1
- package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -4
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -1
- package/build/features/entity/screens/EntityName/IssuingDate.js +2 -4
- package/build/features/entity/screens/EntityName/LegalName.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LegalName.js +3 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +8 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -5
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +28 -21
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +10 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +13 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +14 -19
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +9 -18
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +12 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +14 -18
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +5 -13
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +5 -13
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +3 -8
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +3 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +3 -5
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +58 -20
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +6 -15
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -8
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +6 -15
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +1 -1
- package/build/features/shared/EndAdornment/EndAdornment.js +1 -1
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/package.json +1 -1
|
@@ -15,9 +15,9 @@ import { FormProvider, useForm } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
|
-
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
|
|
18
|
+
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
19
19
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
20
|
-
import { getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
|
|
20
|
+
import { convertToEnglishDateFormat, getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
|
|
21
21
|
import { BusinessType, DocumentPurpose } from '../../../../@types';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Collapse from '../../../../components/Collapse';
|
|
@@ -38,20 +38,22 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
38
38
|
flexDirection: 'column'
|
|
39
39
|
}); });
|
|
40
40
|
var EntityName = function (_a) {
|
|
41
|
-
var _b
|
|
42
|
-
var _c = React.useState(false),
|
|
43
|
-
var _d = React.useState(false),
|
|
44
|
-
var _e =
|
|
41
|
+
var _b;
|
|
42
|
+
var _c = React.useState(false), issueAnchorEl = _c[0], setIssueAnchorEl = _c[1];
|
|
43
|
+
var _d = React.useState(false), expiryAnchorEl = _d[0], setExpiryAnchorEl = _d[1];
|
|
44
|
+
var _e = React.useState(false), entityTypeAnchorEl = _e[0], setEntityTypeAnchorEl = _e[1];
|
|
45
|
+
var _f = useAppSelector(entitySelector), data = _f.data, loading = _f.loading, error = _f.error, uploading = _f.uploading, uploadingArticle = _f.uploadingArticle;
|
|
45
46
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
46
47
|
var isAr = useLanguage().isAr;
|
|
47
48
|
var t = useTranslation().t;
|
|
48
49
|
var dispatch = useAppDispatch();
|
|
49
|
-
var
|
|
50
|
+
var _g = data.entityNameData, legalName = _g.legalName, licenseNumber = _g.licenseNumber, licenseType = _g.licenseType, entityType = _g.entityType, issuingDate = _g.issuingDate, expiryDate = _g.expiryDate, unifiedNumber = _g.unifiedNumber, certificateId = _g.certificateId, articleId = _g.articleId;
|
|
50
51
|
var country_code = settingsData.businessCountry.iso2;
|
|
51
52
|
var isSACountry = React.useMemo(function () { return isSA(country_code); }, [country_code]);
|
|
52
53
|
var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
|
|
53
54
|
var isCR = licenseType === BusinessType.CR;
|
|
54
|
-
var
|
|
55
|
+
var _h = data.verify.responseBody || {}, entity = _h.entity, flows = _h.flows;
|
|
56
|
+
var _j = entity || {}, AOA_file = _j.AOA_file, id = _j.id, documents = _j.documents, data_status = _j.data_status, data_verification = _j.data_verification, legal_name = _j.legal_name, type = _j.type, license = _j.license;
|
|
55
57
|
var methods = useForm({
|
|
56
58
|
resolver: yupResolver(isSACountry ? EntityNameValidationSchema() : EntityNameKWValidationSchema()),
|
|
57
59
|
defaultValues: {
|
|
@@ -67,11 +69,12 @@ var EntityName = function (_a) {
|
|
|
67
69
|
},
|
|
68
70
|
mode: 'onChange'
|
|
69
71
|
});
|
|
72
|
+
var watch = methods.watch;
|
|
70
73
|
useSetFromDefaultValues(methods, data.entityNameData, true);
|
|
71
|
-
var defaultCertificateFiles = React.useMemo(function () { return getFileDetailsFromDocument(
|
|
72
|
-
var defaultArticleFile = React.useMemo(function () { return
|
|
74
|
+
var defaultCertificateFiles = React.useMemo(function () { return getFileDetailsFromDocument(documents, DocumentPurpose.CR); }, [documents]);
|
|
75
|
+
var defaultArticleFile = React.useMemo(function () { return AOA_file && __assign(__assign({}, AOA_file), { docId: id }); }, [AOA_file]);
|
|
73
76
|
var originalReadOnly = useFormReadOnly(methods, { certificateId: defaultCertificateFiles, articleId: defaultArticleFile });
|
|
74
|
-
var noneEditable = useDataNoneEditable(
|
|
77
|
+
var noneEditable = useDataNoneEditable(data_status, [
|
|
75
78
|
'legal_name.en',
|
|
76
79
|
'legal_name.ar',
|
|
77
80
|
'type',
|
|
@@ -84,6 +87,25 @@ var EntityName = function (_a) {
|
|
|
84
87
|
]);
|
|
85
88
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
86
89
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
90
|
+
var dataVerified = useDataVerified(data_verification, [
|
|
91
|
+
'legal_name.en',
|
|
92
|
+
'legal_name.ar',
|
|
93
|
+
'type',
|
|
94
|
+
'license.number',
|
|
95
|
+
'license.additional_info',
|
|
96
|
+
'license.issuing_date',
|
|
97
|
+
'license.expiry_date',
|
|
98
|
+
'AOA_file_id'
|
|
99
|
+
]);
|
|
100
|
+
var issueDateRes = (license === null || license === void 0 ? void 0 : license.issuing_date) && convertToEnglishDateFormat(new Date(license.issuing_date));
|
|
101
|
+
var expDateRes = (license === null || license === void 0 ? void 0 : license.expiry_date) && convertToEnglishDateFormat(new Date(license.expiry_date));
|
|
102
|
+
var isLegalNameVerified = dataVerified['legal_name.en'] && dataVerified['legal_name.ar'] && ((legal_name === null || legal_name === void 0 ? void 0 : legal_name.en) === watch('legalName') || (legal_name === null || legal_name === void 0 ? void 0 : legal_name.ar) === watch('legalName'));
|
|
103
|
+
var isEntityTypeVerified = dataVerified['type'] && type === watch('entityType');
|
|
104
|
+
var isLicenseNumberVerified = dataVerified['license.number'] && (license === null || license === void 0 ? void 0 : license.number) === watch('licenseNumber');
|
|
105
|
+
var isUnifiedNumberVerified = dataVerified['license.additional_info'] && ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === watch('unifiedNumber');
|
|
106
|
+
var isIssuingDateVerified = dataVerified['license.issuing_date'] && issueDateRes === watch('issuingDate');
|
|
107
|
+
var isExpiryDateVerified = dataVerified['license.expiry_date'] && expDateRes === watch('expiryDate');
|
|
108
|
+
var isArticleIdVerified = dataVerified['AOA_file_id'];
|
|
87
109
|
var onSubmit = function (data) {
|
|
88
110
|
dispatch(updateEntityName(getFelids(data)));
|
|
89
111
|
};
|
|
@@ -110,6 +132,6 @@ var EntityName = function (_a) {
|
|
|
110
132
|
var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
|
|
111
133
|
var showLicenseNumber = !isSACountry ? isCR : true;
|
|
112
134
|
var showUnifiedNumber = isSACountry ? isCR : false;
|
|
113
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']) }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); } }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'] }), _jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'] })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'] }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'] }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: !(isKWCountry && !isCR), readOnly: readOnly['certificateId'] || noneEditable['documents'] }), _jsx(Article, { defaultFile: defaultArticleFile, show: true, readOnly: readOnly['articleId'] || noneEditable['AOA_file_id'] })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
135
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']), isVerified: isLegalNameVerified }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); }, isVerified: isEntityTypeVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'], isVerified: isLicenseNumberVerified }), _jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'], isVerified: isUnifiedNumberVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'], isVerified: isIssuingDateVerified }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'], isVerified: isExpiryDateVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: !(isKWCountry && !isCR), readOnly: readOnly['certificateId'] || noneEditable['documents'] }), _jsx(Article, { defaultFile: defaultArticleFile, show: true, readOnly: readOnly['articleId'] || noneEditable['AOA_file_id'], isVerified: isArticleIdVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
114
136
|
};
|
|
115
137
|
export default EntityName;
|
|
@@ -48,20 +48,6 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
48
48
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
49
49
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
50
50
|
}, 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" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
51
|
-
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
52
|
-
children?: React.ReactNode;
|
|
53
|
-
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
54
|
-
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
55
|
-
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
56
|
-
htmlColor?: string | undefined;
|
|
57
|
-
inheritViewBox?: boolean | undefined;
|
|
58
|
-
shapeRendering?: string | undefined;
|
|
59
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
60
|
-
titleAccess?: string | undefined;
|
|
61
|
-
viewBox?: string | undefined;
|
|
62
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "children" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "operator" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
63
|
-
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
64
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
65
51
|
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
66
52
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
67
53
|
children?: React.ReactNode;
|
|
@@ -81,6 +67,7 @@ export interface EntityTypeListProps {
|
|
|
81
67
|
onListOpen?: () => void;
|
|
82
68
|
onListClose?: () => void;
|
|
83
69
|
readOnly?: boolean;
|
|
70
|
+
isVerified?: boolean;
|
|
84
71
|
}
|
|
85
72
|
declare const EntityTypeList: (props: EntityTypeListProps) => JSX.Element;
|
|
86
73
|
export default EntityTypeList;
|
|
@@ -16,19 +16,19 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { alpha, styled, useTheme } from '@mui/material/styles';
|
|
18
18
|
import InfoIcon from '@mui/icons-material/Info';
|
|
19
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
20
19
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
21
20
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
21
|
import Text from '../../../../components/Text';
|
|
23
22
|
import Collapse from '../../../../components/Collapse';
|
|
24
23
|
import SimpleList from '../../../../components/SimpleList';
|
|
25
|
-
import
|
|
24
|
+
import { hasVerifiedValue, removeAllOtherThanAlphabet } from '../../../../utils';
|
|
26
25
|
import Input from '../../../shared/Input';
|
|
27
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
28
27
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
29
28
|
import Search from '../../../shared/Search';
|
|
30
29
|
import SharedInput from '../../../shared/Input';
|
|
31
|
-
import
|
|
30
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
31
|
+
import { EndAdornment, EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
32
32
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
33
33
|
var theme = _a.theme;
|
|
34
34
|
return (__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
|
|
@@ -69,14 +69,6 @@ export var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
var SimpleListStyled = styled((SimpleList))(function () { return ({}); });
|
|
72
|
-
export var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
73
|
-
var theme = _a.theme;
|
|
74
|
-
return ({
|
|
75
|
-
color: theme.palette.success.main,
|
|
76
|
-
display: 'flex',
|
|
77
|
-
alignItems: 'flex-end'
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
72
|
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
81
73
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
82
74
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
@@ -93,11 +85,10 @@ var EntityTypeList = function (props) {
|
|
|
93
85
|
var dispatch = useAppDispatch();
|
|
94
86
|
var _d = data.verify.responseBody || {}, entityTypes = _d.entityTypes, entity = _d.entity;
|
|
95
87
|
var type = entity === null || entity === void 0 ? void 0 : entity.type;
|
|
96
|
-
var disabled = false;
|
|
97
88
|
var isListAvailable = (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes.length) > 0;
|
|
98
89
|
var hide = React.useMemo(function () {
|
|
99
|
-
return
|
|
100
|
-
}, [type,
|
|
90
|
+
return !type || hasVerifiedValue(entity === null || entity === void 0 ? void 0 : entity.data_verification, 'type');
|
|
91
|
+
}, [type, entity === null || entity === void 0 ? void 0 : entity.data_verification]);
|
|
101
92
|
React.useEffect(function () {
|
|
102
93
|
if ((entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes.length) > 0) {
|
|
103
94
|
setEntityTypesMenuList(entityTypes);
|
|
@@ -139,8 +130,8 @@ var EntityTypeList = function (props) {
|
|
|
139
130
|
var filteredList = entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes.filter(function (i) { return i === null || i === void 0 ? void 0 : i.toLowerCase().includes(val); });
|
|
140
131
|
setEntityTypesMenuList(filteredList);
|
|
141
132
|
};
|
|
142
|
-
return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, {
|
|
143
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedTypeFlag(i) }, { children: i })) })), getSelectedTypeFlag(i) && _jsx(
|
|
133
|
+
return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, { readOnly: props.readOnly, onChange: handleChange, value: t(getSelectedValue()), label: t('entity_type'), placeholder: t('entity_type_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: getSelectedValue(), isVerified: props.isVerified }) }) })), _jsxs(Collapse, __assign({ in: isListAvailable }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('entity_type') }) }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: props.readOnly, value: t(getSelectedValue()), placeholder: t('choose_entity_type'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { isVerified: props.isVerified, anchorEl: anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { list: entityTypesMenuList, onSelectItem: onSelectItem, renderItem: function (i) {
|
|
134
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedTypeFlag(i) }, { children: i })) })), getSelectedTypeFlag(i) && _jsx(CheckIcon, { isVerified: props.isVerified })] }));
|
|
144
135
|
} })] }))] })] }))] })) })));
|
|
145
136
|
};
|
|
146
137
|
export default EntityTypeList;
|
|
@@ -15,6 +15,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
15
15
|
export interface ExpiryDateProps {
|
|
16
16
|
onDateClicked?: (flag: boolean) => void;
|
|
17
17
|
readOnly?: boolean;
|
|
18
|
+
isVerified?: boolean;
|
|
18
19
|
}
|
|
19
|
-
declare const ExpiryDate: ({ onDateClicked, readOnly }: ExpiryDateProps) => JSX.Element;
|
|
20
|
+
declare const ExpiryDate: ({ onDateClicked, readOnly, isVerified }: ExpiryDateProps) => JSX.Element;
|
|
20
21
|
export default ExpiryDate;
|
|
@@ -25,15 +25,13 @@ export var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
25
25
|
});
|
|
26
26
|
var ExpiryDate = function (_a) {
|
|
27
27
|
var _b, _c;
|
|
28
|
-
var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly;
|
|
28
|
+
var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
29
29
|
var t = useTranslation().t;
|
|
30
30
|
var dispatch = useAppDispatch();
|
|
31
31
|
var control = useFormContext().control;
|
|
32
32
|
var _d = useAppSelector(entitySelector), data = _d.data, error = _d.error;
|
|
33
33
|
var entity = (data.verify.responseBody || {}).entity;
|
|
34
34
|
var expiryDate = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.expiry_date;
|
|
35
|
-
var disabled = false;
|
|
36
|
-
var hide = !expiryDate && disabled;
|
|
37
35
|
var oDateControl = useController({ control: control, name: 'expiryDate' });
|
|
38
36
|
var dateValue = (_c = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _c === void 0 ? void 0 : _c.value;
|
|
39
37
|
var handleExpiryDateChange = function (data) {
|
|
@@ -41,6 +39,6 @@ var ExpiryDate = function (_a) {
|
|
|
41
39
|
dispatch(clearError());
|
|
42
40
|
oDateControl.field.onChange(data);
|
|
43
41
|
};
|
|
44
|
-
return (_jsx(Collapse, __assign({ in:
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(DatePicker, { readOnly: true, isVerified: isVerified, disabled: readOnly, maxDate: getFutureDate(), 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: handleExpiryDateChange })] })) })));
|
|
45
43
|
};
|
|
46
44
|
export default ExpiryDate;
|
|
@@ -15,6 +15,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
15
15
|
export interface IssuingDateProps {
|
|
16
16
|
onDateClicked?: (flag: boolean) => void;
|
|
17
17
|
readOnly?: boolean;
|
|
18
|
+
isVerified?: boolean;
|
|
18
19
|
}
|
|
19
|
-
declare const IssuingDate: ({ onDateClicked, readOnly }: IssuingDateProps) => JSX.Element;
|
|
20
|
+
declare const IssuingDate: ({ onDateClicked, readOnly, isVerified }: IssuingDateProps) => JSX.Element;
|
|
20
21
|
export default IssuingDate;
|
|
@@ -24,15 +24,13 @@ export var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
24
24
|
});
|
|
25
25
|
var IssuingDate = function (_a) {
|
|
26
26
|
var _b, _c;
|
|
27
|
-
var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly;
|
|
27
|
+
var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
28
28
|
var t = useTranslation().t;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var control = useFormContext().control;
|
|
31
31
|
var _d = useAppSelector(entitySelector), data = _d.data, error = _d.error;
|
|
32
32
|
var entity = (data.verify.responseBody || {}).entity;
|
|
33
33
|
var issueDate = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
|
|
34
|
-
var disabled = false;
|
|
35
|
-
var hide = !issueDate && disabled;
|
|
36
34
|
var oDateControl = useController({ control: control, name: 'issuingDate' });
|
|
37
35
|
var dateValue = (_c = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _c === void 0 ? void 0 : _c.value;
|
|
38
36
|
var handleIssuingDateChange = function (data) {
|
|
@@ -40,6 +38,6 @@ var IssuingDate = function (_a) {
|
|
|
40
38
|
dispatch(clearError());
|
|
41
39
|
oDateControl.field.onChange(data);
|
|
42
40
|
};
|
|
43
|
-
return (_jsx(Collapse, __assign({ in:
|
|
41
|
+
return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(DatePicker, { readOnly: true, disabled: readOnly, isVerified: isVerified, 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: handleIssuingDateChange })] })) })));
|
|
44
42
|
};
|
|
45
43
|
export default IssuingDate;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
interface LegalNameProps {
|
|
3
3
|
readOnly?: boolean;
|
|
4
|
+
isVerified?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const _default: React.MemoExoticComponent<({ readOnly }: LegalNameProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ readOnly, isVerified }: LegalNameProps) => JSX.Element>;
|
|
6
7
|
export default _default;
|
|
@@ -19,8 +19,9 @@ import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
20
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
21
21
|
import Input from '../../../shared/Input';
|
|
22
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
22
23
|
var LegalName = function (_a) {
|
|
23
|
-
var readOnly = _a.readOnly;
|
|
24
|
+
var readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
24
25
|
var t = useTranslation().t;
|
|
25
26
|
var isAr = useLanguage();
|
|
26
27
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
@@ -32,8 +33,6 @@ var LegalName = function (_a) {
|
|
|
32
33
|
var name = isAr ? legalName === null || legalName === void 0 ? void 0 : legalName.ar : legalName === null || legalName === void 0 ? void 0 : legalName.en;
|
|
33
34
|
var legalNameControl = useController({ control: control, name: 'legalName' });
|
|
34
35
|
var legalNameValue = legalNameControl.field.value;
|
|
35
|
-
var disabled = false;
|
|
36
|
-
var hide = !legalName && disabled;
|
|
37
36
|
React.useEffect(function () {
|
|
38
37
|
if (name && !legalNameValue)
|
|
39
38
|
setValue('legalName', name, { shouldValidate: true });
|
|
@@ -45,6 +44,6 @@ var LegalName = function (_a) {
|
|
|
45
44
|
var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
|
|
46
45
|
legalNameControl.field.onChange(value);
|
|
47
46
|
};
|
|
48
|
-
return (_jsx(Collapse, __assign({ in:
|
|
47
|
+
return (_jsx(Collapse, __assign({ in: !!legalName }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, onChange: handleChange, value: legalNameValue, label: t('license_name_label'), placeholder: t('license_name_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: legalNameValue, isVerified: isVerified }) }) }) })));
|
|
49
48
|
};
|
|
50
49
|
export default React.memo(LegalName);
|
|
@@ -10,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import React from 'react';
|
|
13
14
|
import { useTranslation } from 'react-i18next';
|
|
14
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
16
|
import { styled } from '@mui/material/styles';
|
|
@@ -17,6 +18,7 @@ import Collapse from '../../../../components/Collapse';
|
|
|
17
18
|
import { DocumentPurpose } from '../../../../@types';
|
|
18
19
|
import { FileType } from '../../../../constants';
|
|
19
20
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
21
|
+
import { hasVerifiedValue } from '../../../../utils';
|
|
20
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
23
|
import { clearError, entitySelector, uploadingStatus } from '../../../app/entity/entityStore';
|
|
22
24
|
import UploadMultipleFile from '../../../shared/UploadMultipleFile';
|
|
@@ -27,12 +29,16 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
var LicenseCertificate = function (_a) {
|
|
32
|
+
var _b;
|
|
30
33
|
var show = _a.show, readOnly = _a.readOnly, defaultFiles = _a.defaultFiles;
|
|
31
34
|
var t = useTranslation().t;
|
|
32
35
|
var control = useFormContext().control;
|
|
33
36
|
var dispatch = useAppDispatch();
|
|
34
37
|
var certificateIdControl = useController({ name: 'certificateId', control: control });
|
|
35
|
-
var
|
|
38
|
+
var _c = useAppSelector(entitySelector), loading = _c.loading, error = _c.error, data = _c.data;
|
|
39
|
+
var data_verification = (((_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) || {}).data_verification;
|
|
40
|
+
var uploadedIds = certificateIdControl.field.value;
|
|
41
|
+
var isDocumentVerified = React.useMemo(function () { var _a; return !!((_a = defaultFiles === null || defaultFiles === void 0 ? void 0 : defaultFiles[0]) === null || _a === void 0 ? void 0 : _a.docId) && hasVerifiedValue(data_verification, "documents.".concat(defaultFiles[0].docId)); }, [data_verification]);
|
|
36
42
|
var handleLicenseCertificateChange = function (ids) {
|
|
37
43
|
if (error)
|
|
38
44
|
dispatch(clearError());
|
|
@@ -43,6 +49,6 @@ var LicenseCertificate = function (_a) {
|
|
|
43
49
|
dispatch(clearError());
|
|
44
50
|
certificateIdControl.field.onChange(ids);
|
|
45
51
|
};
|
|
46
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { readOnly: readOnly, id: 'certificateId', control: control, label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, defaultFiles: defaultFiles, purpose: DocumentPurpose.CR, fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); }, fileType: FileType.IMAGES }) }) })));
|
|
52
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { readOnly: readOnly, id: 'certificateId', control: control, label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, defaultFiles: defaultFiles, purpose: DocumentPurpose.CR, fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); }, fileType: FileType.IMAGES, isVerified: !(uploadedIds === null || uploadedIds === void 0 ? void 0 : uploadedIds.length) && isDocumentVerified }) }) })));
|
|
47
53
|
};
|
|
48
54
|
export default LicenseCertificate;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
interface LicenseNumberProps {
|
|
3
3
|
show: boolean;
|
|
4
4
|
readOnly?: boolean;
|
|
5
|
+
isVerified?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ show, readOnly }: LicenseNumberProps) => JSX.Element>;
|
|
7
|
+
declare const _default: React.MemoExoticComponent<({ show, readOnly, isVerified }: LicenseNumberProps) => JSX.Element>;
|
|
7
8
|
export default _default;
|
|
@@ -18,13 +18,14 @@ import { BusinessType } from '../../../../@types';
|
|
|
18
18
|
import { isSA, removeAllOtherThanCharsAndNumber } from '../../../../utils';
|
|
19
19
|
import { settingsSelector } from '../../../../app/settings';
|
|
20
20
|
import { CR_NUMBER_LENGTH, FL_NUMBER_ENTITY_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
21
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
23
|
import Input from '../../../shared/Input';
|
|
23
24
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
24
|
-
import
|
|
25
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
25
26
|
var LicenseNumber = function (_a) {
|
|
26
27
|
var _b, _c;
|
|
27
|
-
var show = _a.show, readOnly = _a.readOnly;
|
|
28
|
+
var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
28
29
|
var t = useTranslation().t;
|
|
29
30
|
var _d = useAppSelector(entitySelector), data = _d.data, bckError = _d.error;
|
|
30
31
|
var dispatch = useAppDispatch();
|
|
@@ -33,8 +34,6 @@ var LicenseNumber = function (_a) {
|
|
|
33
34
|
var entity = (data.verify.responseBody || {}).entity;
|
|
34
35
|
var type = data.entityNameData.licenseType;
|
|
35
36
|
var number = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.number;
|
|
36
|
-
var disabled = false;
|
|
37
|
-
var hide = !number && disabled;
|
|
38
37
|
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
39
38
|
var handleChange = function (_a) {
|
|
40
39
|
var target = _a.target;
|
|
@@ -49,6 +48,6 @@ var LicenseNumber = function (_a) {
|
|
|
49
48
|
var isCR = type === BusinessType.CR;
|
|
50
49
|
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_LENGTH : FL_NUMBER_ENTITY_LENGTH;
|
|
51
50
|
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : length;
|
|
52
|
-
return (_jsx(Collapse, __assign({ in: show &&
|
|
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 }) }) })) })));
|
|
53
52
|
};
|
|
54
53
|
export default React.memo(LicenseNumber);
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
interface UnifiedNumberProps {
|
|
3
3
|
show: boolean;
|
|
4
4
|
readOnly?: boolean;
|
|
5
|
+
isVerified?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ show, readOnly }: UnifiedNumberProps) => JSX.Element>;
|
|
7
|
+
declare const _default: React.MemoExoticComponent<({ show, readOnly, isVerified }: UnifiedNumberProps) => JSX.Element>;
|
|
7
8
|
export default _default;
|
|
@@ -19,17 +19,16 @@ import Collapse from '../../../../components/Collapse';
|
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
20
|
import Input from '../../../shared/Input';
|
|
21
21
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
22
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
22
23
|
var UnifiedNumber = function (_a) {
|
|
23
24
|
var _b, _c, _d;
|
|
24
|
-
var show = _a.show, readOnly = _a.readOnly;
|
|
25
|
+
var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
25
26
|
var t = useTranslation().t;
|
|
26
27
|
var _e = useAppSelector(entitySelector), data = _e.data, bckError = _e.error;
|
|
27
28
|
var control = useFormContext().control;
|
|
28
29
|
var dispatch = useAppDispatch();
|
|
29
30
|
var entity = (data.verify.responseBody || {}).entity;
|
|
30
31
|
var number = (_c = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number;
|
|
31
|
-
var disabled = false;
|
|
32
|
-
var hide = !number && disabled;
|
|
33
32
|
var handleChange = function (_a) {
|
|
34
33
|
var target = _a.target;
|
|
35
34
|
if (bckError)
|
|
@@ -40,6 +39,6 @@ var UnifiedNumber = function (_a) {
|
|
|
40
39
|
var unifiedNumberControl = useController({ control: control, name: 'unifiedNumber' });
|
|
41
40
|
var unifiedNumberValue = unifiedNumberControl.field.value;
|
|
42
41
|
var error = (_d = unifiedNumberControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
|
|
43
|
-
return (_jsx(Collapse, __assign({ in: show &&
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('unified_number_label'), onChange: handleChange, value: unifiedNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('unified_number_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: unifiedNumberValue, isVerified: isVerified }) }) })) })));
|
|
44
43
|
};
|
|
45
44
|
export default React.memo(UnifiedNumber);
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
17
17
|
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import { alpha, styled } from '@mui/material/styles';
|
|
20
|
-
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
|
|
20
|
+
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
21
21
|
import { DocumentPurpose, IndividualType } from '../../../../@types';
|
|
22
22
|
import { isSA } from '../../../../utils';
|
|
23
23
|
import Form from '../../../../components/Form';
|
|
@@ -52,14 +52,16 @@ var ListType;
|
|
|
52
52
|
ListType["OccupationList"] = "OccupationList";
|
|
53
53
|
})(ListType || (ListType = {}));
|
|
54
54
|
var AdditionalIndividualInfo = function (_a) {
|
|
55
|
+
var _b;
|
|
55
56
|
var t = useTranslation().t;
|
|
56
57
|
var isAr = useLanguage().isAr;
|
|
57
58
|
var dispatch = useAppDispatch();
|
|
58
|
-
var
|
|
59
|
+
var _c = useAppSelector(individualSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
59
60
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
60
61
|
var verify = data.verify;
|
|
61
62
|
var user = (verify.responseBody || {}).user;
|
|
62
|
-
var
|
|
63
|
+
var _d = data.individualData, occupation = _d.occupation, sourceIncome = _d.sourceIncome, monthlyIncome = _d.monthlyIncome, employerName = _d.employerName, employerLocation = _d.employerLocation, isPEP = _d.isPEP, isInfluencer = _d.isInfluencer, civilID = _d.civilID, signatureFileId = _d.signatureFileId, civilIDUploading = _d.civilIDUploading, signatureFileUploading = _d.signatureFileUploading, shareCount = _d.shareCount, shareValue = _d.shareValue;
|
|
64
|
+
var _e = user || {}, type = _e.type, documents = _e.documents, is_authorized = _e.is_authorized, data_status = _e.data_status, data_verification = _e.data_verification, names = _e.names, role = _e.role, occupationRes = _e.occupation, is_relative_PEP = _e.is_relative_PEP, is_influencer = _e.is_influencer;
|
|
63
65
|
var methods = useForm({
|
|
64
66
|
resolver: yupResolver(IndividualInfoValidationSchema(user === null || user === void 0 ? void 0 : user.type)),
|
|
65
67
|
defaultValues: {
|
|
@@ -80,15 +82,16 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
80
82
|
mode: 'onChange'
|
|
81
83
|
});
|
|
82
84
|
useSetFromDefaultValues(methods, data.individualData, true);
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
+
var watch = methods.watch;
|
|
86
|
+
var defaultCivilIdFiles = React.useMemo(function () { return getFileDetailsFromDocument(documents, DocumentPurpose.IDENTITY_DOCUMENT); }, [documents]);
|
|
87
|
+
var defaultSignatureFiles = React.useMemo(function () { return getFileDetailsFromDocument(documents, DocumentPurpose.CUSTOMER_SIGNATURE); }, [documents]);
|
|
85
88
|
var originalReadOnly = useFormReadOnly(methods, {
|
|
86
89
|
isPEP: typeof isPEP === 'boolean',
|
|
87
90
|
isInfluencer: typeof isInfluencer === 'boolean',
|
|
88
91
|
civilID: defaultCivilIdFiles,
|
|
89
92
|
signatureFileId: defaultSignatureFiles
|
|
90
93
|
});
|
|
91
|
-
var noneEditable = useDataNoneEditable(
|
|
94
|
+
var noneEditable = useDataNoneEditable(data_status, [
|
|
92
95
|
'occupation',
|
|
93
96
|
'source_of_income',
|
|
94
97
|
'monthly_income',
|
|
@@ -97,7 +100,11 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
97
100
|
]);
|
|
98
101
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
99
102
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
100
|
-
var
|
|
103
|
+
var dataVerified = useDataVerified(data_verification, ['occupation', 'is_relative_PEP', 'is_influencer']);
|
|
104
|
+
var isOccupationVerified = dataVerified['occupation'] && (occupationRes === null || occupationRes === void 0 ? void 0 : occupationRes.id) === ((_b = watch('occupation')) === null || _b === void 0 ? void 0 : _b.id);
|
|
105
|
+
var isPEPSwitchVerified = dataVerified['is_relative_PEP'] && is_relative_PEP === watch('isPEP');
|
|
106
|
+
var isInfluencerSwitchVerified = dataVerified['is_influencer'] && is_influencer === watch('isInfluencer');
|
|
107
|
+
var _f = React.useState(), listActive = _f[0], setListActive = _f[1];
|
|
101
108
|
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
102
109
|
var onSubmit = function (data) {
|
|
103
110
|
dispatch(updateIndividualInfo(getFelids(data)));
|
|
@@ -109,31 +116,31 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
109
116
|
setListActive(flag);
|
|
110
117
|
};
|
|
111
118
|
var getUserName = function () {
|
|
112
|
-
var _a, _b
|
|
113
|
-
var name = isAr ? (
|
|
119
|
+
var _a, _b;
|
|
120
|
+
var name = isAr ? (_a = names === null || names === void 0 ? void 0 : names.ar) === null || _a === void 0 ? void 0 : _a.first : (_b = names === null || names === void 0 ? void 0 : names.en) === null || _b === void 0 ? void 0 : _b.first;
|
|
114
121
|
return name;
|
|
115
122
|
};
|
|
116
123
|
var getUserRole = function () {
|
|
117
|
-
var _a, _b, _c, _d
|
|
118
|
-
if (((
|
|
119
|
-
return isAr ? (
|
|
120
|
-
if (
|
|
124
|
+
var _a, _b, _c, _d;
|
|
125
|
+
if (((role === null || role === void 0 ? void 0 : role.length) || 0) > 0)
|
|
126
|
+
return isAr ? (_b = (_a = user.role[0]) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.ar : (_d = (_c = user.role[0]) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.en;
|
|
127
|
+
if (type === IndividualType.SHARE_HOLDER)
|
|
121
128
|
return t('type_share_holder');
|
|
122
|
-
if (
|
|
129
|
+
if (type === IndividualType.BOARD_MEMBER)
|
|
123
130
|
return t('type_board_member');
|
|
124
131
|
return t('type_user');
|
|
125
132
|
};
|
|
126
|
-
var showSignatureFile =
|
|
127
|
-
var showOccupationFile =
|
|
128
|
-
var showSourceOfIncome =
|
|
129
|
-
var showIsPEP =
|
|
130
|
-
var showIsInfluencer =
|
|
131
|
-
var showShares =
|
|
133
|
+
var showSignatureFile = type === IndividualType.USER || type === IndividualType.BUYER;
|
|
134
|
+
var showOccupationFile = type === IndividualType.USER || type === IndividualType.BUYER;
|
|
135
|
+
var showSourceOfIncome = type === IndividualType.USER || type === IndividualType.BUYER;
|
|
136
|
+
var showIsPEP = type === IndividualType.USER || type === IndividualType.BOARD_MEMBER;
|
|
137
|
+
var showIsInfluencer = type === IndividualType.USER || type === IndividualType.BOARD_MEMBER;
|
|
138
|
+
var showShares = type === IndividualType.SHARE_HOLDER;
|
|
132
139
|
var isSourceOfIncomeListActive = listActive === ListType.SourceOfIncomeList;
|
|
133
140
|
var isMonthlyIncomeListActive = listActive === ListType.MonthlyIncomeList;
|
|
134
141
|
var isOccupationListActive = listActive === ListType.OccupationList;
|
|
135
142
|
var disabled = !methods.formState.isValid || civilIDUploading || signatureFileUploading;
|
|
136
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !listActive && !!
|
|
143
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !listActive && !!is_authorized, timeout: 500 }, { children: _jsxs(TextBoxStyled, { children: [getUserName() || '', _jsx(RoleTextStyled, { children: getUserRole() || '' })] }) })), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Occupation, { isVerified: isOccupationVerified, readOnly: readOnly['occupation'] || noneEditable['occupation'], onListOpen: function () { return handleMenuClick(ListType.OccupationList); }, onListClose: function () { return handleMenuClick(); }, show: showOccupationFile && !isMonthlyIncomeListActive && !isSourceOfIncomeListActive }), _jsx(SourceOfIncome, { readOnly: readOnly['sourceIncome'] || noneEditable['source_of_income'], onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: showSourceOfIncome && !isMonthlyIncomeListActive && !isOccupationListActive }), _jsx(MonthlyIncome, { readOnly: readOnly['monthlyIncome'] || noneEditable['monthly_income'], show: showSourceOfIncome && !isSourceOfIncomeListActive && !isOccupationListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ShareCount, { show: !listActive && showShares, readOnly: readOnly['shareCount'] }), _jsx(ShareValue, { show: !listActive && showShares, readOnly: readOnly['shareValue'] }), _jsxs(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: [_jsx(CivilIDFile, { show: !isSACountry, readOnly: readOnly['civilID'], defaultFiles: defaultCivilIdFiles }), _jsx(SignatureFile, { show: is_authorized && showSignatureFile, readOnly: readOnly['signatureFileId'], defaultFiles: defaultSignatureFiles })] })), _jsx(PEPSwitch, { show: showIsPEP && !listActive, readOnly: readOnly['isPEP'] || noneEditable['is_relative_PEP'], isVerified: isPEPSwitchVerified }), _jsx(InfluencerSwitch, { show: showIsInfluencer && !listActive, readOnly: readOnly['isInfluencer'] || noneEditable['is_influencer'], isVerified: isInfluencerSwitchVerified })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) }))] }));
|
|
137
144
|
};
|
|
138
145
|
export default React.memo(AdditionalIndividualInfo);
|
|
139
146
|
AdditionalIndividualInfo.defaultProps = {};
|