@tap-payments/auth-jsconnect 2.0.34 → 2.0.35

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.
Files changed (49) hide show
  1. package/build/@types/form.d.ts +6 -4
  2. package/build/api/entity.d.ts +25 -0
  3. package/build/api/entity.js +17 -1
  4. package/build/api/index.d.ts +5 -2
  5. package/build/api/individual.d.ts +1 -1
  6. package/build/api/lead.d.ts +1 -0
  7. package/build/api/lead.js +8 -1
  8. package/build/assets/locales/ar.json +3 -1
  9. package/build/assets/locales/en.json +3 -1
  10. package/build/components/FileInput/DragAndDrop.js +2 -1
  11. package/build/constants/app.js +1 -1
  12. package/build/constants/assets.d.ts +3 -0
  13. package/build/constants/assets.js +3 -0
  14. package/build/constants/validation.js +2 -2
  15. package/build/features/app/auth/authStore.js +6 -11
  16. package/build/features/app/bank/bankStore.js +16 -13
  17. package/build/features/app/business/businessStore.js +7 -4
  18. package/build/features/app/connect/connectStore.js +2 -2
  19. package/build/features/app/entity/entityStore.d.ts +27 -7
  20. package/build/features/app/entity/entityStore.js +218 -146
  21. package/build/features/app/individual/individualStore.js +14 -12
  22. package/build/features/app/tax/taxStore.js +15 -12
  23. package/build/features/bank/screens/BankDetails/BankDetails.js +1 -1
  24. package/build/features/bank/screens/BankDetails/BankName.js +2 -1
  25. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  26. package/build/features/connect/screens/Merchant/SocialMedia.js +2 -2
  27. package/build/features/connect/screens/Mobile/Mobile.js +2 -1
  28. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +1 -1
  29. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +1 -0
  30. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +20 -11
  31. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +3 -0
  32. package/build/features/entity/screens/EntityInfoConfirm/Article.js +73 -0
  33. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +12 -6
  34. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +20 -5
  35. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +25 -4
  36. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +13 -18
  37. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +12 -51
  38. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -10
  39. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  40. package/build/features/entity/screens/Verify/Verify.js +5 -5
  41. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  42. package/build/features/password/screens/CreatePassword/CreatePassword.js +1 -1
  43. package/build/features/shared/UploadFile/UploadFile.d.ts +2 -1
  44. package/build/features/shared/UploadFile/UploadFile.js +3 -3
  45. package/build/features/tax/screens/TaxDetails/TaxDetails.js +1 -1
  46. package/build/utils/object.js +1 -1
  47. package/package.json +129 -129
  48. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  49. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -115
@@ -50,13 +50,13 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { hasKey } from '../../../utils';
53
- import { handleNextScreenStep, handleCurrentActiveScreen } from '../../../app/settings';
53
+ import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
54
54
  import { BUSINESS_FLOW_SUCCESS, TAX_STEP_NAMES } from '../../../constants';
55
55
  export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
- var payload, data, boardData, boardInfoData, info, hasTaxCompleted;
57
- var _a, _b;
58
- return __generator(this, function (_c) {
59
- switch (_c.label) {
56
+ var payload, data, boardData, boardInfoData, info, countryIso2, hasTaxCompleted;
57
+ var _a, _b, _c;
58
+ return __generator(this, function (_d) {
59
+ switch (_d.label) {
60
60
  case 0:
61
61
  payload = {
62
62
  service_name: 'tap_email',
@@ -64,20 +64,23 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
64
64
  };
65
65
  return [4, API.leadService.verifyLeadToken(payload)];
66
66
  case 1:
67
- data = (_c.sent()).data;
67
+ data = (_d.sent()).data;
68
68
  boardInfoData = undefined;
69
69
  if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
70
70
  if (!(!!data.id && !!data.board_info_id)) return [3, 3];
71
71
  return [4, API.boardService.retrieveBoardInfo({ id: data.id, infoId: data.board_info_id })];
72
72
  case 2:
73
- boardInfoData = _c.sent();
74
- _c.label = 3;
73
+ boardInfoData = _d.sent();
74
+ _d.label = 3;
75
75
  case 3:
76
76
  info = boardInfoData.info;
77
77
  return [4, API.boardService.retrieveBoardDetails(data === null || data === void 0 ? void 0 : data.id)];
78
78
  case 4:
79
- boardData = _c.sent();
80
- hasTaxCompleted = ((_a = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'tax'; })) === null || _a === void 0 ? void 0 : _a.status) === 'completed';
79
+ boardData = _d.sent();
80
+ countryIso2 = (_a = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _a === void 0 ? void 0 : _a.country;
81
+ if (countryIso2)
82
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
83
+ hasTaxCompleted = ((_b = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'tax'; })) === null || _b === void 0 ? void 0 : _b.status) === 'completed';
81
84
  if (hasTaxCompleted) {
82
85
  thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
83
86
  }
@@ -87,10 +90,10 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
87
90
  else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
88
91
  thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
89
92
  }
90
- _c.label = 5;
93
+ _d.label = 5;
91
94
  case 5: return [2, {
92
95
  data: data,
93
- boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info), entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
96
+ boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info), entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
94
97
  token: token
95
98
  }];
96
99
  }
@@ -74,6 +74,6 @@ var BankDetails = function () {
74
74
  if (error)
75
75
  dispatch(clearError());
76
76
  }, [methods.formState.isValid, methods.watch('bankStatementFile')]);
77
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
77
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, disableBack: true, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
78
78
  };
79
79
  export default BankDetails;
@@ -47,7 +47,8 @@ var BankName = function () {
47
47
  React.useEffect(function () {
48
48
  var _a;
49
49
  var bankName = (_a = data.bankData.responseBody) === null || _a === void 0 ? void 0 : _a.bank_name;
50
- setValue('bankName', bankName);
50
+ if (bankName && !bankNameValue)
51
+ setValue('bankName', bankName);
51
52
  }, [(_b = data.bankData.responseBody) === null || _b === void 0 ? void 0 : _b.bank_name]);
52
53
  var handleBankChange = function (_a) {
53
54
  var target = _a.target;
@@ -98,7 +98,7 @@ var SalesChannels = function (_a) {
98
98
  if (newChannel.code === 'website' && brandName) {
99
99
  var brandValue = brandName.replaceAll(' ', '-').toLowerCase();
100
100
  var address = (brandValue[brandValue.length - 1] === '-' ? brandValue.slice(0, -1) : brandValue) + '.com';
101
- newChannel.address = address;
101
+ newChannel.address = 'www.' + address;
102
102
  }
103
103
  channelsControl.field.onChange(__spreadArray(__spreadArray([], channelsControl.field.value, true), [newChannel], false));
104
104
  }
@@ -62,8 +62,8 @@ var ToggleIconStyled = styled(Icon, {
62
62
  })(function (_a) {
63
63
  var theme = _a.theme, isActive = _a.isActive;
64
64
  return ({
65
- width: theme.spacing(2.5),
66
- height: theme.spacing(2.5),
65
+ width: theme.spacing(3),
66
+ height: theme.spacing(3),
67
67
  filter: isActive ? 'invert(1) sepia(1) saturate(5) hue-rotate(175deg)' : ''
68
68
  });
69
69
  });
@@ -89,8 +89,9 @@ var Mobile = function (_a) {
89
89
  var settingsStore = useAppSelector(settingsSelector);
90
90
  var _c = useAppSelector(connectSelector), data = _c.data, loading = _c.loading, error = _c.error;
91
91
  var _d = React.useState(), listType = _d[0], setListType = _d[1];
92
+ var _e = data.mobileData, countryCode = _e.countryCode, mobile = _e.mobile;
92
93
  var dispatch = useAppDispatch();
93
- var _e = data.mobileData, responseBody = _e.responseBody, defaultValues = __rest(_e, ["responseBody"]);
94
+ var _f = data.mobileData, responseBody = _f.responseBody, defaultValues = __rest(_f, ["responseBody"]);
94
95
  var methods = useForm({
95
96
  resolver: yupResolver(PhoneValidationSchema),
96
97
  defaultValues: defaultValues,
@@ -94,11 +94,11 @@ var BackButton = styled('button')(function (_a) {
94
94
  var theme = _a.theme;
95
95
  return ({
96
96
  cursor: 'pointer',
97
+ pointerEvents: 'auto',
97
98
  height: 44,
98
99
  appearance: 'none',
99
100
  background: 'none',
100
101
  border: 'none',
101
- pointerEvents: 'auto',
102
102
  color: theme.palette.primary.main,
103
103
  fontSize: theme.typography.body1.fontSize,
104
104
  fontWeight: theme.typography.fontWeightMedium,
@@ -17,6 +17,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
17
17
  hide?: boolean | undefined;
18
18
  warningType?: "alert" | "error" | "hint" | undefined;
19
19
  } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
+ export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
20
21
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
21
22
  children?: React.ReactNode;
22
23
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
@@ -58,6 +58,10 @@ export var InputStyled = styled(Input)(function (_a) {
58
58
  }
59
59
  });
60
60
  });
61
+ export var MandatoryStyled = styled('span')(function (_a) {
62
+ var theme = _a.theme;
63
+ return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
64
+ });
61
65
  var SimpleListStyled = styled((SimpleList))(function () { return ({
62
66
  height: 'fit-content'
63
67
  }); });
@@ -74,21 +78,22 @@ export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { r
74
78
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
75
79
  });
76
80
  var ActivitiesList = function (_a) {
77
- var _b, _c, _d, _e;
81
+ var _b;
78
82
  var rest = __rest(_a, []);
79
- var _f = React.useState([]), activitiesMenuList = _f[0], setActivitiesMenuList = _f[1];
80
- var _g = React.useState([]), storedActivities = _g[0], setStoredActivities = _g[1];
81
- var _h = React.useState(null), anchorEl = _h[0], setAnchorEl = _h[1];
83
+ var _c = React.useState([]), activitiesMenuList = _c[0], setActivitiesMenuList = _c[1];
84
+ var _d = React.useState([]), storedActivities = _d[0], setStoredActivities = _d[1];
85
+ var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
82
86
  var t = useTranslation().t;
83
87
  var isAr = useLanguage().isAr;
84
- var control = useFormContext().control;
88
+ var _f = useFormContext(), control = _f.control, setValue = _f.setValue;
85
89
  var data = useAppSelector(entitySelector).data;
86
90
  var activitiesControl = useController({ name: 'activities', control: control });
87
91
  var controlValue = activitiesControl.field.value;
88
92
  var verify = data.verify, entityData = data.entityData;
89
- var activities = (((_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) || {}).activities;
90
- var selectedActivities = (entityData.responseBody || {}).selectedActivities;
91
- var businessType = (_e = (_d = (_c = verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.type;
93
+ var _g = entityData.responseBody || {}, activities = _g.activities, selectedActivities = _g.selectedActivities;
94
+ var entity = (verify.responseBody || {}).entity;
95
+ var licenseType = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.type;
96
+ var businessType = licenseType === 'freelance' ? BusinessType.FL : BusinessType.CR;
92
97
  var isCR = businessType === BusinessType.CR;
93
98
  React.useEffect(function () {
94
99
  if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0) {
@@ -98,8 +103,11 @@ var ActivitiesList = function (_a) {
98
103
  React.useEffect(function () {
99
104
  if ((selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) > 0) {
100
105
  setStoredActivities(selectedActivities);
106
+ if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) === 0) {
107
+ setValue('activities', selectedActivities);
108
+ }
101
109
  }
102
- }, []);
110
+ }, [selectedActivities]);
103
111
  var onOpenList = function (event) {
104
112
  var _a;
105
113
  setAnchorEl(event.currentTarget);
@@ -127,10 +135,11 @@ var ActivitiesList = function (_a) {
127
135
  if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
128
136
  return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
129
137
  }
130
- return isAr ? (_a = controlValue[0]) === null || _a === void 0 ? void 0 : _a.ar : (_b = controlValue[0]) === null || _b === void 0 ? void 0 : _b.en;
138
+ var item = controlValue[0];
139
+ return isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en;
131
140
  };
132
141
  var getSelectedActivityFlag = function (item) {
133
- return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === (item === null || item === void 0 ? void 0 : item.id); });
142
+ return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return (activity === null || activity === void 0 ? void 0 : activity.id) === (item === null || item === void 0 ? void 0 : item.id); });
134
143
  };
135
144
  return (_jsx(Collapse, __assign({ in: (activitiesMenuList === null || activitiesMenuList === void 0 ? void 0 : activitiesMenuList.length) > 0 }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t(isCR ? 'activities' : 'category') }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
136
145
  var _a;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Article: () => JSX.Element;
3
+ export default Article;
@@ -0,0 +1,73 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { styled } from '@mui/material/styles';
4
+ import { ScreenContainer } from '../../../shared/Containers';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { useController, useFormContext } from 'react-hook-form';
7
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
8
+ import { entitySelector, uploadArticle } from '../../../app/entity/entityStore';
9
+ import UploadFile from '../../../shared/UploadFile';
10
+ import { MAX_FILE_SIZE, VALID_FILE_FORMATS } from '../../../../constants';
11
+ import { maskFileName } from '../../../../utils';
12
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
13
+ var theme = _a.theme;
14
+ return ({
15
+ marginBlockStart: theme.spacing(3)
16
+ });
17
+ });
18
+ var Article = function () {
19
+ var _a, _b;
20
+ var _c = React.useState(0), progress = _c[0], setProgress = _c[1];
21
+ var t = useTranslation().t;
22
+ var _d = useFormContext(), control = _d.control, setError = _d.setError, clearErrors = _d.clearErrors, setValue = _d.setValue;
23
+ var articleFileControl = useController({ name: 'articleFile', control: control });
24
+ var articleIdControl = useController({ name: 'articleId', control: control });
25
+ var _e = useAppSelector(entitySelector), loading = _e.loading, uploading = _e.uploading, sysError = _e.error, data = _e.data;
26
+ var dispatch = useAppDispatch();
27
+ var articleValue = articleFileControl.field.value;
28
+ var error = ((_a = articleFileControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message) || ((_b = articleIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message);
29
+ var entityData = data.entityData;
30
+ var articleFile = entityData.articleFile, articleId = entityData.articleId;
31
+ React.useEffect(function () {
32
+ if (!articleValue) {
33
+ setValue('articleFile', articleFile);
34
+ setValue('articleId', articleId);
35
+ }
36
+ }, [articleFile, articleId]);
37
+ var handleArticleChange = function (file) {
38
+ if (!VALID_FILE_FORMATS.includes(file === null || file === void 0 ? void 0 : file.type)) {
39
+ setError('articleFile', { message: 'file_not_supported_alert' });
40
+ }
41
+ else if ((file === null || file === void 0 ? void 0 : file.size) > MAX_FILE_SIZE) {
42
+ setError('articleFile', { message: 'file_size_alert' });
43
+ }
44
+ else {
45
+ articleFileControl.field.onChange(file);
46
+ dispatch(uploadArticle({
47
+ file: file,
48
+ onProgress: function (value) {
49
+ setProgress(value);
50
+ }
51
+ }));
52
+ }
53
+ };
54
+ var handleReset = function () {
55
+ articleFileControl.field.onChange(null);
56
+ articleIdControl.field.onChange('');
57
+ setProgress(0);
58
+ };
59
+ React.useEffect(function () {
60
+ if (sysError === 'file_upload_error') {
61
+ setError('articleId', { message: sysError });
62
+ articleFileControl.field.onChange(null);
63
+ setProgress(0);
64
+ }
65
+ }, [sysError]);
66
+ React.useEffect(function () {
67
+ if ((articleFileControl.formState.isValid || !!articleValue) && error != 'file_upload_error')
68
+ clearErrors();
69
+ }, [articleFileControl.formState.isValid, articleValue]);
70
+ var fileName = articleValue ? maskFileName(articleValue === null || articleValue === void 0 ? void 0 : articleValue.name) : '';
71
+ return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_article'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('article_of_association'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleArticleChange, isFileUploaded: !uploading && !!articleValue, isSubmitting: loading, isUploading: uploading, progress: progress, onReset: handleReset, error: error && t(error), initialFileName: fileName }) }));
72
+ };
73
+ export default Article;
@@ -27,7 +27,7 @@ import * as React from 'react';
27
27
  import LicenseNumber from './LicenseNumber';
28
28
  import ActivitiesList from './ActivitiesList';
29
29
  import { useAppDispatch, useAppSelector, useLanguage, useSetFromDefaultValues } from '../../../../hooks';
30
- import { entitySelector, updateEntityInfo } from '../../../app/entity/entityStore';
30
+ import { entitySelector, updateEntity } from '../../../app/entity/entityStore';
31
31
  import { FormProvider, useForm } from 'react-hook-form';
32
32
  import { yupResolver } from '@hookform/resolvers/yup';
33
33
  import { handlePrevScreenStep } from '../../../../app/settings';
@@ -38,17 +38,19 @@ import Collapse from '../../../../components/Collapse';
38
38
  import Button from '../../../shared/Button';
39
39
  import { useTranslation } from 'react-i18next';
40
40
  import OperationStartDate from './OperationStartDate';
41
+ import Article from './Article';
41
42
  var FormStyled = styled(Form)(function () { return ({
42
43
  display: 'flex',
43
44
  flexDirection: 'column'
44
45
  }); });
45
46
  var EntityInfo = function (_a) {
46
47
  var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
47
- var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error;
48
+ var _c = React.useState(false), collapse = _c[0], setCollapse = _c[1];
49
+ var _d = useAppSelector(entitySelector), data = _d.data, loading = _d.loading, error = _d.error, uploading = _d.uploading;
48
50
  var isAr = useLanguage().isAr;
49
51
  var t = useTranslation().t;
50
52
  var dispatch = useAppDispatch();
51
- var _d = data.entityData, responseBody = _d.responseBody, defaultValues = __rest(_d, ["responseBody"]);
53
+ var _e = data.entityData, responseBody = _e.responseBody, defaultValues = __rest(_e, ["responseBody"]);
52
54
  var methods = useForm({
53
55
  resolver: yupResolver(EntityInfoValidationSchema),
54
56
  defaultValues: defaultValues,
@@ -56,14 +58,18 @@ var EntityInfo = function (_a) {
56
58
  });
57
59
  useSetFromDefaultValues(methods, defaultValues);
58
60
  var onSubmit = function (data) {
59
- dispatch(updateEntityInfo(__assign({}, data)));
61
+ dispatch(updateEntity(__assign({}, data)));
62
+ };
63
+ var handleCollapseOpenClose = function (flag) {
64
+ setCollapse(flag);
60
65
  };
61
66
  var onBack = function () {
62
- dispatch(handlePrevScreenStep());
67
+ dispatch(handlePrevScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
63
68
  };
64
69
  var handleMenuClick = function () {
65
70
  anchorEl ? setAnchorEl(false) : setAnchorEl(true);
66
71
  };
67
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(LicenseName, {}), _jsx(LicenseNumber, {})] })), _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(OperationStartDate, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
72
+ var disabled = !methods.formState.isValid || !!error || uploading;
73
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse && !anchorEl }, { children: [_jsx(LicenseName, {}), _jsx(LicenseNumber, {})] })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Article, {}) })), _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(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
68
74
  };
69
75
  export default EntityInfo;
@@ -2,16 +2,31 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { ScreenContainer } from '../../../shared/Containers';
5
+ import { useController, useFormContext } from 'react-hook-form';
5
6
  import Input from '../../../shared/Input';
6
7
  import { useAppSelector, useLanguage } from '../../../../hooks';
8
+ import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
7
9
  import { entitySelector } from '../../../app/entity/entityStore';
8
10
  var LicenseName = function (_a) {
9
- var _b, _c, _d;
11
+ var _b, _c;
10
12
  var t = useTranslation().t;
11
- var isAr = useLanguage().isAr;
13
+ var isAr = useLanguage();
14
+ var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
12
15
  var data = useAppSelector(entitySelector).data;
13
- var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
14
- var name = isAr ? (_c = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _c === void 0 ? void 0 : _c.ar : (_d = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _d === void 0 ? void 0 : _d.en;
15
- return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t('license_name_label'), readOnly: !!name, placeholder: t('license_name_label'), value: name, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) }));
16
+ var verify = data.verify;
17
+ var legalName = (_c = (_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.legal_name;
18
+ var name = isAr ? legalName === null || legalName === void 0 ? void 0 : legalName.ar : legalName === null || legalName === void 0 ? void 0 : legalName.en;
19
+ var licenseNameControl = useController({ control: control, name: 'licenseName' });
20
+ var licenseNameValue = licenseNameControl.field.value;
21
+ React.useEffect(function () {
22
+ if (name && !licenseNameValue)
23
+ setValue('licenseName', name, { shouldValidate: true });
24
+ }, [name]);
25
+ var handleChange = function (_a) {
26
+ var target = _a.target;
27
+ var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
28
+ licenseNameControl.field.onChange(value);
29
+ };
30
+ return (_jsx(ScreenContainer, { children: _jsx(Input, { onChange: handleChange, value: licenseNameValue, label: t('license_name_label'), placeholder: t('license_name_label'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) }));
16
31
  };
17
32
  export default React.memo(LicenseName);
@@ -12,17 +12,38 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
15
16
  import { ScreenContainer } from '../../../shared/Containers';
16
17
  import Input from '../../../shared/Input';
17
- import Collapse from '../../../../components/Collapse';
18
18
  import { useAppSelector } from '../../../../hooks';
19
19
  import { entitySelector } from '../../../app/entity/entityStore';
20
+ import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
21
+ import { BusinessType } from '../../../../@types';
22
+ import { CR_NUMBER_LENGTH, FL_NUMBER_LENGTH } from '../../../../constants';
20
23
  var LicenseNumber = function (_a) {
21
24
  var _b, _c;
22
25
  var t = useTranslation().t;
23
26
  var data = useAppSelector(entitySelector).data;
24
- var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
25
- var number = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.number;
26
- return (_jsx(Collapse, __assign({ in: !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { label: t('license_number_label'), readOnly: true, value: number, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })) })));
27
+ var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
28
+ var entity = (data.verify.responseBody || {}).entity;
29
+ var licenseType = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.type;
30
+ var type = licenseType === 'freelance' ? BusinessType.FL : BusinessType.CR;
31
+ var isLicensedTrue = entity === null || entity === void 0 ? void 0 : entity.is_licensed;
32
+ var hasLicenseNumber = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.number;
33
+ var licenseNumber = data.entityData.licenseNumber;
34
+ React.useEffect(function () {
35
+ setValue('licenseNumber', licenseNumber, { shouldValidate: true });
36
+ }, [licenseNumber]);
37
+ var handleChange = function (_a) {
38
+ var target = _a.target;
39
+ var value = removeAllOtherThanCharsAndNumber(target.value);
40
+ licenseNumberControl.field.onChange(value);
41
+ };
42
+ var licenseNumberControl = useController({ control: control, name: 'licenseNumber' });
43
+ var licenseNumberValue = licenseNumberControl.field.value;
44
+ var isCR = type === BusinessType.CR;
45
+ var length = isCR ? CR_NUMBER_LENGTH : FL_NUMBER_LENGTH;
46
+ var disabled = hasLicenseNumber && isLicensedTrue;
47
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { label: t('license_number_label'), onChange: handleChange, disabled: disabled, inputProps: { maxLength: length }, value: licenseNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })));
27
48
  };
28
49
  export default React.memo(LicenseNumber);
@@ -1,38 +1,33 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
13
3
  import { useTranslation } from 'react-i18next';
14
4
  import { useController, useFormContext } from 'react-hook-form';
15
- import Input from '../../../shared/Input';
16
5
  import { ScreenContainer } from '../../../shared/Containers';
17
6
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
7
  import { entitySelector, clearError } from '../../../app/entity/entityStore';
19
8
  import DatePicker from '../../../../components/DatePicker';
20
9
  import { InputLabelStyled } from './ActivitiesList';
21
10
  var OperationStartDate = function (_a) {
22
- var _b, _c, _d;
11
+ var _b;
23
12
  var onDateClicked = _a.onDateClicked;
24
13
  var t = useTranslation().t;
25
14
  var dispatch = useAppDispatch();
26
- var control = useFormContext().control;
27
- var _e = useAppSelector(entitySelector), data = _e.data, error = _e.error;
15
+ var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
16
+ var _d = useAppSelector(entitySelector), data = _d.data, error = _d.error;
17
+ var operationStartDate = (data.entityData.responseBody || {}).operationStartDate;
28
18
  var oDateControl = useController({ control: control, name: 'operationStartDate' });
19
+ var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
20
+ React.useEffect(function () {
21
+ if (!dateValue) {
22
+ var date = operationStartDate || new Date().toString();
23
+ setValue('operationStartDate', date, { shouldValidate: true });
24
+ }
25
+ }, [operationStartDate]);
29
26
  var handleOperationStartDateChange = function (data) {
30
27
  if (error)
31
28
  dispatch(clearError());
32
29
  oDateControl.field.onChange(data);
33
30
  };
34
- var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
35
- var storedDate = (_d = (_c = data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.business_operation_start_at;
36
- return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: !!storedDate ? (_jsx(Input, { label: t('business_start_date'), readOnly: true, value: dateValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } })) : (_jsxs(_Fragment, { children: [_jsx(InputLabelStyled, { children: t('business_start_date') }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] })) })));
31
+ return (_jsx(ScreenContainer, { children: _jsxs(_Fragment, { children: [_jsx(InputLabelStyled, { children: t('business_start_date') }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] }) }));
37
32
  };
38
33
  export default OperationStartDate;
@@ -1,5 +1,7 @@
1
1
  import * as yup from 'yup';
2
2
  export declare const EntityInfoValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ licenseName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
3
5
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
4
6
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
7
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -16,25 +18,12 @@ export declare const EntityInfoValidationSchema: yup.ObjectSchema<import("yup/li
16
18
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
17
19
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
20
  }>>[] | undefined>;
19
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
21
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
23
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
27
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
28
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
31
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
32
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
33
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
35
- }>>[] | undefined>;
36
21
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
22
+ articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
23
+ articleFile: any;
37
24
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
25
+ licenseName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
26
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
38
27
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
39
28
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
40
29
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -51,25 +40,12 @@ export declare const EntityInfoValidationSchema: yup.ObjectSchema<import("yup/li
51
40
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
52
41
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
53
42
  }>>[] | undefined>;
54
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
55
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
56
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
59
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
62
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
63
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
65
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
66
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
67
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
68
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
69
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
70
- }>>[] | undefined>;
71
43
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
44
+ articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
45
+ articleFile: any;
72
46
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
47
+ licenseName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
48
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
73
49
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
74
50
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
75
51
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -86,22 +62,7 @@ export declare const EntityInfoValidationSchema: yup.ObjectSchema<import("yup/li
86
62
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
87
63
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
88
64
  }>>[] | undefined>;
89
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
90
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
91
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
92
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
93
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
94
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
95
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
97
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
98
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
99
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
101
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
102
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
103
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
105
- }>>[] | undefined>;
106
65
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
66
+ articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
67
+ articleFile: any;
107
68
  }>>>;