@tap-payments/auth-jsconnect 2.4.88-test → 2.4.90-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/app/settings.d.ts +3 -1
- package/build/app/settings.js +6 -2
- package/build/components/ArabicDatePicker/style.css +12 -5
- package/build/features/business/screens/Activities/Activities.js +3 -4
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/entity/screens/EntityName/EntityName.js +8 -10
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -3
- package/build/features/entity/screens/EntityName/IssuingDate.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -3
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -3
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +7 -9
- package/build/features/shared/Calender/Calender.d.ts +1 -3
- package/build/features/shared/Calender/Calender.js +10 -7
- package/package.json +1 -1
package/build/app/settings.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface SettingsData {
|
|
|
33
33
|
boardMaturity: boolean;
|
|
34
34
|
merchant?: MerchantInfo;
|
|
35
35
|
isMaturityExpress: boolean;
|
|
36
|
+
isHijri: boolean;
|
|
36
37
|
}
|
|
37
38
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
38
39
|
}
|
|
@@ -43,6 +44,7 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
43
44
|
handleSkin: (state: SettingsState, action: ActionState<ThemeMode>) => void;
|
|
44
45
|
handleLanguage: (state: SettingsState, action: ActionState<LanguageMode>) => void;
|
|
45
46
|
handlePublicKey: (state: SettingsState, action: ActionState<string>) => void;
|
|
47
|
+
handleSwitchCalender: (state: SettingsState, action: ActionState<boolean>) => void;
|
|
46
48
|
handleNextScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
47
49
|
handleCurrentActiveScreen: (state: SettingsState, action: ActionState<string>) => void;
|
|
48
50
|
handlePrevScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
@@ -50,7 +52,7 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
50
52
|
handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
|
|
51
53
|
handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
|
|
52
54
|
}, "settings">;
|
|
53
|
-
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, "settings/handleSkin">, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, "settings/handleLanguage">, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], "settings/handleActiveFlowScreens">, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handleNextScreenStep">, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handlePrevScreenStep">, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleCurrentActiveScreen">, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, "settings/handleSetAppConfig">, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleOpen">, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleSetCountryByIso2">, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleIsTapOrigin">, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handelBoardMaturity">, handlePublicKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handlePublicKey">;
|
|
55
|
+
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, "settings/handleSkin">, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, "settings/handleLanguage">, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], "settings/handleActiveFlowScreens">, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handleNextScreenStep">, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handlePrevScreenStep">, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleCurrentActiveScreen">, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, "settings/handleSetAppConfig">, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleOpen">, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleSetCountryByIso2">, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleIsTapOrigin">, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handelBoardMaturity">, handlePublicKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handlePublicKey">, handleSwitchCalender: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleSwitchCalender">;
|
|
54
56
|
declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
|
|
55
57
|
export default _default;
|
|
56
58
|
export declare const settingsSelector: (state: RootState) => SettingsState;
|
package/build/app/settings.js
CHANGED
|
@@ -155,7 +155,8 @@ var initialState = {
|
|
|
155
155
|
appConfig: {},
|
|
156
156
|
businessCountry: {},
|
|
157
157
|
countries: [],
|
|
158
|
-
isValidOperator: false
|
|
158
|
+
isValidOperator: false,
|
|
159
|
+
isHijri: false
|
|
159
160
|
}
|
|
160
161
|
};
|
|
161
162
|
export var settingsSlice = createSlice({
|
|
@@ -190,6 +191,9 @@ export var settingsSlice = createSlice({
|
|
|
190
191
|
return;
|
|
191
192
|
state.data.appConfig.publicKey = action.payload;
|
|
192
193
|
},
|
|
194
|
+
handleSwitchCalender: function (state, action) {
|
|
195
|
+
state.data.isHijri = action.payload;
|
|
196
|
+
},
|
|
193
197
|
handleNextScreenStep: function (state, action) {
|
|
194
198
|
var next = state.data.activeScreen.next;
|
|
195
199
|
var appConfig = state.data.appConfig;
|
|
@@ -291,6 +295,6 @@ export var settingsSlice = createSlice({
|
|
|
291
295
|
});
|
|
292
296
|
}
|
|
293
297
|
});
|
|
294
|
-
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin, handelBoardMaturity = _a.handelBoardMaturity, handlePublicKey = _a.handlePublicKey;
|
|
298
|
+
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin, handelBoardMaturity = _a.handelBoardMaturity, handlePublicKey = _a.handlePublicKey, handleSwitchCalender = _a.handleSwitchCalender;
|
|
295
299
|
export default settingsSlice.reducer;
|
|
296
300
|
export var settingsSelector = function (state) { return state.settings; };
|
|
@@ -14,11 +14,6 @@
|
|
|
14
14
|
.rmdp-calendar {
|
|
15
15
|
width: 100%;
|
|
16
16
|
}
|
|
17
|
-
/* .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover {
|
|
18
|
-
background: radial-gradient(circle closest-side, #fafafa 0%, #fafafa 98%, rgba(0, 0, 0, 0) 100%);
|
|
19
|
-
color: black !important;
|
|
20
|
-
background-color: unset !important;
|
|
21
|
-
} */
|
|
22
17
|
|
|
23
18
|
.rmdp-day.rmdp-selected span:not(.highlight) {
|
|
24
19
|
/* background: radial-gradient(circle closest-side, #3a4154 0%, #3a4154 98%, rgba(0, 0, 0, 0) 100%) !important; */
|
|
@@ -38,6 +33,10 @@
|
|
|
38
33
|
color: #3a4154 !important;
|
|
39
34
|
/* background: radial-gradient(circle closest-side, #fafafa 0, #fafafa 98%, transparent 100%) !important; */
|
|
40
35
|
}
|
|
36
|
+
.rmdp-day.rmdp-selected span:not(.highlight):hover {
|
|
37
|
+
color: #ffffff !important;
|
|
38
|
+
background-color: black !important;
|
|
39
|
+
}
|
|
41
40
|
.rmdp-arrow-container:hover {
|
|
42
41
|
background-color: unset !important;
|
|
43
42
|
box-shadow: unset !important;
|
|
@@ -54,3 +53,11 @@
|
|
|
54
53
|
margin-bottom: 12px;
|
|
55
54
|
margin-top: 10px !important;
|
|
56
55
|
}
|
|
56
|
+
.rmdp-day-picker .rmdp-day {
|
|
57
|
+
height: 36px !important;
|
|
58
|
+
width: 36px !important;
|
|
59
|
+
}
|
|
60
|
+
.rmdp-day-picker .rmdp-day span {
|
|
61
|
+
height: 36px !important;
|
|
62
|
+
width: 36px !important;
|
|
63
|
+
}
|
|
@@ -33,12 +33,11 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
33
33
|
var Activities = function () {
|
|
34
34
|
var _a = React.useState(false), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
35
35
|
var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
|
|
36
|
-
var _c = React.useState(false), isHijri = _c[0], setIsHijri = _c[1];
|
|
37
36
|
var dispatch = useAppDispatch();
|
|
38
37
|
var isAr = useLanguage().isAr;
|
|
39
38
|
var t = useTranslation().t;
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var _c = useAppSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
40
|
+
var _d = data.activitiesData, activities = _d.activities, operationStartDate = _d.operationStartDate;
|
|
42
41
|
var methods = useForm({
|
|
43
42
|
resolver: yupResolver(ActivitiesValidationSchema),
|
|
44
43
|
defaultValues: {
|
|
@@ -65,6 +64,6 @@ var Activities = function () {
|
|
|
65
64
|
anchorEl ? setAnchorEl(false) : setAnchorEl(true);
|
|
66
65
|
};
|
|
67
66
|
var disabled = !methods.formState.isValid || !!error;
|
|
68
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(LicenseName, {}) })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, {
|
|
67
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(LicenseName, {}) })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
69
68
|
};
|
|
70
69
|
export default Activities;
|
|
@@ -15,8 +15,6 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
15
15
|
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
16
16
|
export interface OperationStartDateProps {
|
|
17
17
|
onDateClicked?: (flag: boolean) => void;
|
|
18
|
-
isHijri?: boolean;
|
|
19
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
20
18
|
}
|
|
21
|
-
declare const OperationStartDate: ({ onDateClicked
|
|
19
|
+
declare const OperationStartDate: ({ onDateClicked }: OperationStartDateProps) => JSX.Element;
|
|
22
20
|
export default OperationStartDate;
|
|
@@ -28,7 +28,7 @@ export var MandatoryStyled = styled('span')(function (_a) {
|
|
|
28
28
|
});
|
|
29
29
|
var OperationStartDate = function (_a) {
|
|
30
30
|
var _b;
|
|
31
|
-
var onDateClicked = _a.onDateClicked
|
|
31
|
+
var onDateClicked = _a.onDateClicked;
|
|
32
32
|
var t = useTranslation().t;
|
|
33
33
|
var dispatch = useAppDispatch();
|
|
34
34
|
var control = useFormContext().control;
|
|
@@ -40,6 +40,6 @@ var OperationStartDate = function (_a) {
|
|
|
40
40
|
oDateControl.field.onChange(data);
|
|
41
41
|
};
|
|
42
42
|
var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
43
|
-
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('business_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Calender, {
|
|
43
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('business_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Calender, { defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleOperationStartDateChange })] }));
|
|
44
44
|
};
|
|
45
45
|
export default OperationStartDate;
|
|
@@ -39,23 +39,21 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
39
39
|
}); });
|
|
40
40
|
var EntityName = function (_a) {
|
|
41
41
|
var _b;
|
|
42
|
-
var _c = React.useState(false),
|
|
43
|
-
var _d = React.useState(false),
|
|
44
|
-
var _e = React.useState(false),
|
|
45
|
-
var _f =
|
|
46
|
-
var _g = React.useState(false), entityTypeAnchorEl = _g[0], setEntityTypeAnchorEl = _g[1];
|
|
47
|
-
var _h = useAppSelector(entitySelector), data = _h.data, loading = _h.loading, error = _h.error, uploading = _h.uploading, uploadingArticle = _h.uploadingArticle;
|
|
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;
|
|
48
46
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
49
47
|
var isAr = useLanguage().isAr;
|
|
50
48
|
var t = useTranslation().t;
|
|
51
49
|
var dispatch = useAppDispatch();
|
|
52
|
-
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;
|
|
53
51
|
var country_code = settingsData.businessCountry.iso2;
|
|
54
52
|
var isSACountry = React.useMemo(function () { return isSA(country_code); }, [country_code]);
|
|
55
53
|
var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
|
|
56
54
|
var isCR = licenseType === BusinessType.CR;
|
|
57
|
-
var
|
|
58
|
-
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;
|
|
59
57
|
var methods = useForm({
|
|
60
58
|
resolver: yupResolver(isSACountry ? EntityNameValidationSchema() : EntityNameKWValidationSchema()),
|
|
61
59
|
defaultValues: {
|
|
@@ -134,6 +132,6 @@ var EntityName = function (_a) {
|
|
|
134
132
|
var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
|
|
135
133
|
var showLicenseNumber = !isSACountry ? isCR : true;
|
|
136
134
|
var showUnifiedNumber = isSACountry ? isCR : false;
|
|
137
|
-
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, {
|
|
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') })) }))] })) })) }));
|
|
138
136
|
};
|
|
139
137
|
export default EntityName;
|
|
@@ -16,8 +16,6 @@ export interface ExpiryDateProps {
|
|
|
16
16
|
onDateClicked?: (flag: boolean) => void;
|
|
17
17
|
readOnly?: boolean;
|
|
18
18
|
isVerified?: boolean;
|
|
19
|
-
isHijri?: boolean;
|
|
20
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
21
19
|
}
|
|
22
|
-
declare const ExpiryDate: ({ onDateClicked, readOnly, isVerified
|
|
20
|
+
declare const ExpiryDate: ({ onDateClicked, readOnly, isVerified }: ExpiryDateProps) => JSX.Element;
|
|
23
21
|
export default ExpiryDate;
|
|
@@ -25,7 +25,7 @@ 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, isVerified = _a.isVerified
|
|
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;
|
|
@@ -39,6 +39,6 @@ var ExpiryDate = function (_a) {
|
|
|
39
39
|
dispatch(clearError());
|
|
40
40
|
oDateControl.field.onChange(data);
|
|
41
41
|
};
|
|
42
|
-
return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(Calender, {
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(Calender, { isVerified: isVerified, disabled: readOnly, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleExpiryDateChange })] })) })));
|
|
43
43
|
};
|
|
44
44
|
export default ExpiryDate;
|
|
@@ -16,8 +16,6 @@ export interface IssuingDateProps {
|
|
|
16
16
|
onDateClicked?: (flag: boolean) => void;
|
|
17
17
|
readOnly?: boolean;
|
|
18
18
|
isVerified?: boolean;
|
|
19
|
-
isHijri?: boolean;
|
|
20
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
21
19
|
}
|
|
22
|
-
declare const IssuingDate: ({ onDateClicked, readOnly, isVerified
|
|
20
|
+
declare const IssuingDate: ({ onDateClicked, readOnly, isVerified }: IssuingDateProps) => JSX.Element;
|
|
23
21
|
export default IssuingDate;
|
|
@@ -24,7 +24,7 @@ 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, isVerified = _a.isVerified
|
|
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;
|
|
@@ -38,6 +38,6 @@ var IssuingDate = function (_a) {
|
|
|
38
38
|
dispatch(clearError());
|
|
39
39
|
oDateControl.field.onChange(data);
|
|
40
40
|
};
|
|
41
|
-
return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(Calender, {
|
|
41
|
+
return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleIssuingDateChange })] })) })));
|
|
42
42
|
};
|
|
43
43
|
export default IssuingDate;
|
|
@@ -4,8 +4,6 @@ interface BODProps {
|
|
|
4
4
|
onDateClicked?: (flag: boolean) => void;
|
|
5
5
|
isVerified?: boolean;
|
|
6
6
|
readOnly?: boolean;
|
|
7
|
-
isHijri?: boolean;
|
|
8
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
9
7
|
}
|
|
10
|
-
declare const _default: React.MemoExoticComponent<({ onDateClicked, show, readOnly, isVerified
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ onDateClicked, show, readOnly, isVerified }: BODProps) => JSX.Element>;
|
|
11
9
|
export default _default;
|
|
@@ -26,7 +26,7 @@ var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
26
26
|
});
|
|
27
27
|
var BOD = function (_a) {
|
|
28
28
|
var _b;
|
|
29
|
-
var onDateClicked = _a.onDateClicked, show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified
|
|
29
|
+
var onDateClicked = _a.onDateClicked, show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
30
30
|
var t = useTranslation().t;
|
|
31
31
|
var control = useFormContext().control;
|
|
32
32
|
var dispatch = useAppDispatch();
|
|
@@ -41,6 +41,6 @@ var BOD = function (_a) {
|
|
|
41
41
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
42
42
|
var spacing = _a.spacing;
|
|
43
43
|
return spacing(2.5, 2.5, 2.5, 2.5);
|
|
44
|
-
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true,
|
|
44
|
+
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }) })));
|
|
45
45
|
};
|
|
46
46
|
export default React.memo(BOD);
|
|
@@ -4,8 +4,6 @@ interface ExpiryDateProps {
|
|
|
4
4
|
onDateClicked?: (flag: boolean) => void;
|
|
5
5
|
readOnly?: boolean;
|
|
6
6
|
isVerified?: boolean;
|
|
7
|
-
isHijri?: boolean;
|
|
8
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
9
7
|
}
|
|
10
|
-
declare const _default: React.MemoExoticComponent<({ onDateClicked, show, readOnly, isVerified
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ onDateClicked, show, readOnly, isVerified }: ExpiryDateProps) => JSX.Element>;
|
|
11
9
|
export default _default;
|
|
@@ -27,7 +27,7 @@ var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
27
27
|
});
|
|
28
28
|
var ExpiryDate = function (_a) {
|
|
29
29
|
var _b;
|
|
30
|
-
var onDateClicked = _a.onDateClicked, show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified
|
|
30
|
+
var onDateClicked = _a.onDateClicked, show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
31
31
|
var t = useTranslation().t;
|
|
32
32
|
var control = useFormContext().control;
|
|
33
33
|
var dispatch = useAppDispatch();
|
|
@@ -42,6 +42,6 @@ var ExpiryDate = function (_a) {
|
|
|
42
42
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
43
43
|
var spacing = _a.spacing;
|
|
44
44
|
return spacing(2.5, 2.5, 2.5, 2.5);
|
|
45
|
-
} } }, { children: t('enter_expiry_date') })), _jsx(Calender, {
|
|
45
|
+
} } }, { children: t('enter_expiry_date') })), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }) })));
|
|
46
46
|
};
|
|
47
47
|
export default React.memo(ExpiryDate);
|
|
@@ -54,15 +54,13 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
54
54
|
var t = useTranslation().t;
|
|
55
55
|
var isAr = useLanguage().isAr;
|
|
56
56
|
var dispatch = useAppDispatch();
|
|
57
|
-
var _l =
|
|
58
|
-
var _m = React.useState(false), isHijriExpiryDate = _m[0], setIsHijriExpiryDate = _m[1];
|
|
59
|
-
var _o = useAppSelector(individualSelector), data = _o.data, loading = _o.loading, error = _o.error, cityLoading = _o.cityLoading;
|
|
57
|
+
var _l = useAppSelector(individualSelector), data = _l.data, loading = _l.loading, error = _l.error, cityLoading = _l.cityLoading;
|
|
60
58
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
61
59
|
var countries = settingsData.countries;
|
|
62
60
|
var verify = data.verify, individualPersonalData = data.individualPersonalData;
|
|
63
|
-
var
|
|
61
|
+
var _m = verify.responseBody || {}, user = _m.user, flows = _m.flows;
|
|
64
62
|
var name = individualPersonalData.name, email = individualPersonalData.email, mobile = individualPersonalData.mobile, countryCode = individualPersonalData.countryCode, gender = individualPersonalData.gender, nid = individualPersonalData.nid, issuedCountry = individualPersonalData.issuedCountry, expiryDate = individualPersonalData.expiryDate, dob = individualPersonalData.dob, placeOfBirthCountry = individualPersonalData.placeOfBirthCountry, placeOfBirthCity = individualPersonalData.placeOfBirthCity, nationality = individualPersonalData.nationality;
|
|
65
|
-
var
|
|
63
|
+
var _o = user || {}, data_status = _o.data_status, is_authorized = _o.is_authorized, data_verification = _o.data_verification, contact = _o.contact, genderRes = _o.gender, identification = _o.identification, birth = _o.birth, nationalityRes = _o.nationality;
|
|
66
64
|
var methods = useForm({
|
|
67
65
|
resolver: yupResolver(IndividualInfoValidationSchema),
|
|
68
66
|
defaultValues: {
|
|
@@ -83,9 +81,9 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
83
81
|
});
|
|
84
82
|
var watch = methods.watch;
|
|
85
83
|
useSetFromDefaultValues(methods, data.individualPersonalData);
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
84
|
+
var _p = React.useState(), listActive = _p[0], setListActive = _p[1];
|
|
85
|
+
var _q = React.useState(false), dobActive = _q[0], setDobActive = _q[1];
|
|
86
|
+
var _r = React.useState(false), expiryDateActive = _r[0], setExpiryDateActive = _r[1];
|
|
89
87
|
var originalReadOnly = useFormReadOnly(methods);
|
|
90
88
|
var noneEditable = useDataNoneEditable(data_status, [
|
|
91
89
|
'name.en',
|
|
@@ -174,7 +172,7 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
174
172
|
var isBirthCountryListActive = listActive === ListType.BirthCountryList;
|
|
175
173
|
var isBirthCityListActive = listActive === ListType.BirthCityList;
|
|
176
174
|
var isNationalityListActive = listActive === ListType.NationalityList;
|
|
177
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Name, { show: showField, readOnly: readOnly['name'] || (noneEditable['name.en'] && noneEditable['name.ar']), isVerified: isNameVerified }), _jsx(MobileNumber, { readOnly: readOnly['mobile'] || noneEditable['contact.phone.number'] || noneEditable['contact.phone.country_code'], show: !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive && !isIssuedCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.MobileCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isPhoneNumberVerified }), _jsx(Email, { show: showField, readOnly: readOnly['email'] || noneEditable['contact.email'], isVerified: isEmailVerified }), _jsx(Gender, { show: showField, readOnly: readOnly['gender'] || noneEditable['gender'], isVerified: isGenderVerified }), _jsx(ID, { show: showField, readOnly: readOnly['nid'] || noneEditable['identification.id'], isVerified: isIDVerified }), _jsx(IssuedCountry, { readOnly: readOnly['issuedCountry'] || noneEditable['identification.issuer_country'], show: !isMobileCountryListActive && !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.IssuedCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isIssuedCountryVerified }), _jsx(ExpiryDate, {
|
|
175
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Name, { show: showField, readOnly: readOnly['name'] || (noneEditable['name.en'] && noneEditable['name.ar']), isVerified: isNameVerified }), _jsx(MobileNumber, { readOnly: readOnly['mobile'] || noneEditable['contact.phone.number'] || noneEditable['contact.phone.country_code'], show: !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive && !isIssuedCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.MobileCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isPhoneNumberVerified }), _jsx(Email, { show: showField, readOnly: readOnly['email'] || noneEditable['contact.email'], isVerified: isEmailVerified }), _jsx(Gender, { show: showField, readOnly: readOnly['gender'] || noneEditable['gender'], isVerified: isGenderVerified }), _jsx(ID, { show: showField, readOnly: readOnly['nid'] || noneEditable['identification.id'], isVerified: isIDVerified }), _jsx(IssuedCountry, { readOnly: readOnly['issuedCountry'] || noneEditable['identification.issuer_country'], show: !isMobileCountryListActive && !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.IssuedCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isIssuedCountryVerified }), _jsx(ExpiryDate, { show: !listActive && !dobActive, onDateClicked: handleExpiryDateActive, readOnly: readOnly['expiryDate'] || noneEditable['identification.expiry'], isVerified: isExpiryDateVerified }), _jsx(DOB, { show: !listActive && !expiryDateActive, onDateClicked: handleDobActive, readOnly: readOnly['dob'] || noneEditable['birth.date'], isVerified: isDOBVerified }), _jsx(BirthCountry, { readOnly: readOnly['placeOfBirthCountry'] || noneEditable['birth.country'], show: !isMobileCountryListActive && !isDateFieldActive && !isIssuedCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.BirthCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isBirthCountryVerified }), _jsx(BirthCity, { readOnly: readOnly['placeOfBirthCity'] || noneEditable['birth.city'], show: !isMobileCountryListActive &&
|
|
178
176
|
!isDateFieldActive &&
|
|
179
177
|
!isIssuedCountryListActive &&
|
|
180
178
|
!isBirthCountryListActive &&
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CalendarProps } from 'react-multi-date-picker';
|
|
3
3
|
interface CustomCalenderProps extends CalendarProps {
|
|
4
|
-
isHijri?: boolean;
|
|
5
4
|
defaultValue?: Date | Date[];
|
|
6
5
|
onDateClicked?: (flag: boolean) => void;
|
|
7
6
|
onDateChange?: (date: string) => void;
|
|
@@ -9,7 +8,6 @@ interface CustomCalenderProps extends CalendarProps {
|
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
isVerified?: boolean;
|
|
11
10
|
maxDate?: Date;
|
|
12
|
-
onSwitchCalender?: (isHijri: boolean) => void;
|
|
13
11
|
}
|
|
14
|
-
declare const CustomCalender: ({
|
|
12
|
+
declare const CustomCalender: ({ onDateClicked, onDateChange, defaultValue, isDob, disabled, isVerified, maxDate }: CustomCalenderProps) => JSX.Element;
|
|
15
13
|
export default CustomCalender;
|
|
@@ -12,8 +12,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useAppDispatch, useAppSelector } from '../../../hooks';
|
|
15
16
|
import Box from '@mui/material/Box';
|
|
16
17
|
import { styled, useTheme } from '@mui/material/styles';
|
|
18
|
+
import { settingsSelector, handleSwitchCalender } from '../../../app/settings';
|
|
17
19
|
import { ICONS_NAMES } from '../../../constants';
|
|
18
20
|
import DatePicker from '../../../components/DatePicker';
|
|
19
21
|
import ArabicDatePicker from '../../../components/ArabicDatePicker';
|
|
@@ -27,14 +29,15 @@ var SwitchBoxStyled = styled(Box)(function (_a) {
|
|
|
27
29
|
} }));
|
|
28
30
|
});
|
|
29
31
|
var CustomCalender = function (_a) {
|
|
30
|
-
var
|
|
32
|
+
var onDateClicked = _a.onDateClicked, onDateChange = _a.onDateChange, defaultValue = _a.defaultValue, isDob = _a.isDob, disabled = _a.disabled, isVerified = _a.isVerified, maxDate = _a.maxDate;
|
|
31
33
|
var t = useTranslation().t;
|
|
32
34
|
var theme = useTheme();
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
var data = useAppSelector(settingsSelector).data;
|
|
36
|
+
var dispatch = useAppDispatch();
|
|
37
|
+
var _b = React.useState(false), open = _b[0], setOpen = _b[1];
|
|
38
|
+
var isHijriCalender = data.isHijri;
|
|
39
|
+
var onSwitchCalender = function () {
|
|
40
|
+
dispatch(handleSwitchCalender(!isHijriCalender));
|
|
38
41
|
};
|
|
39
42
|
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !isHijriCalender }, { children: _jsx(DatePicker, { open: open, defaultValue: defaultValue, readOnly: true, disabled: disabled, isVerified: isVerified, dir: 'ltr', locale: 'en', isDob: isDob, maxDate: maxDate, onDateChange: onDateChange, onClick: function () {
|
|
40
43
|
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true);
|
|
@@ -48,6 +51,6 @@ var CustomCalender = function (_a) {
|
|
|
48
51
|
}, onDatePicked: function () {
|
|
49
52
|
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false);
|
|
50
53
|
setOpen(false);
|
|
51
|
-
}, onDateChange: onDateChange, value: defaultValue }) })), _jsx(Collapse, __assign({ in:
|
|
54
|
+
}, onDateChange: onDateChange, value: defaultValue }) })), _jsx(Collapse, __assign({ in: false }, { 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')] }) })) }))] }));
|
|
52
55
|
};
|
|
53
56
|
export default CustomCalender;
|