@tap-payments/auth-jsconnect 1.0.71 → 1.0.76

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 (80) hide show
  1. package/build/@types/app.d.ts +16 -7
  2. package/build/@types/form.d.ts +3 -3
  3. package/build/api/auth.d.ts +7 -0
  4. package/build/api/auth.js +5 -1
  5. package/build/api/data.d.ts +1 -0
  6. package/build/api/data.js +5 -1
  7. package/build/api/entity.d.ts +1 -0
  8. package/build/api/entity.js +5 -1
  9. package/build/api/index.d.ts +9 -2
  10. package/build/api/index.js +3 -1
  11. package/build/api/individual.d.ts +8 -0
  12. package/build/api/individual.js +9 -0
  13. package/build/assets/locales/ar.json +9 -5
  14. package/build/assets/locales/en.json +14 -4
  15. package/build/components/SimpleList/SimpleList.js +4 -4
  16. package/build/constants/api.d.ts +3 -0
  17. package/build/constants/api.js +11 -5
  18. package/build/constants/app.js +18 -6
  19. package/build/constants/assets.d.ts +1 -0
  20. package/build/constants/assets.js +1 -0
  21. package/build/features/app/bank/bankStore.d.ts +3 -0
  22. package/build/features/app/bank/bankStore.js +45 -9
  23. package/build/features/app/business/businessStore.d.ts +4 -5
  24. package/build/features/app/business/businessStore.js +106 -66
  25. package/build/features/app/connect/connectStore.d.ts +1 -0
  26. package/build/features/app/connect/connectStore.js +19 -10
  27. package/build/features/app/individual/individualStore.d.ts +7 -1
  28. package/build/features/app/individual/individualStore.js +79 -30
  29. package/build/features/app/password/passwordStore.d.ts +4 -0
  30. package/build/features/app/password/passwordStore.js +71 -15
  31. package/build/features/bank/screens/Success/Success.js +5 -2
  32. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  33. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +87 -0
  34. package/build/features/bank/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  35. package/build/features/bank/screens/SuccessWithFlowButtons/index.js +2 -0
  36. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  37. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  38. package/build/features/business/screens/Activities/validation.d.ts +24 -24
  39. package/build/features/business/screens/Activities/validation.js +2 -2
  40. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  41. package/build/features/business/screens/Customers/CustomerLocations.js +2 -2
  42. package/build/features/business/screens/Customers/Customers.js +4 -4
  43. package/build/features/business/screens/Customers/ExpectedCustomers.js +2 -2
  44. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +1 -1
  45. package/build/features/business/screens/Customers/ExpectedSalesRange.js +60 -33
  46. package/build/features/business/screens/Customers/validation.js +2 -2
  47. package/build/features/business/screens/Success/Success.js +1 -1
  48. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +24 -20
  49. package/build/features/connect/screens/Individual/MobileNumber.js +11 -2
  50. package/build/features/connect/screens/Merchant/Merchant.js +9 -2
  51. package/build/features/connect/screens/Mobile/MobileNumber.js +11 -2
  52. package/build/features/connect/screens/ThankYou/ThankYou.js +1 -1
  53. package/build/features/featuresScreens.js +10 -0
  54. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -2
  55. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +5 -1
  56. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +62 -9
  57. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +3 -1
  58. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +5 -9
  59. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -6
  60. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -11
  61. package/build/features/individual/screens/Success/Success.js +5 -2
  62. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  63. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +87 -0
  64. package/build/features/individual/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  65. package/build/features/individual/screens/SuccessWithFlowButtons/index.js +2 -0
  66. package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -10
  67. package/build/features/password/screens/Success/Success.js +7 -1
  68. package/build/features/shared/Button/FlowsButtons.d.ts +2 -0
  69. package/build/features/shared/Button/FlowsButtons.js +2 -2
  70. package/build/features/shared/Input/Input.d.ts +1 -1
  71. package/build/features/shared/Search/Search.d.ts +1 -1
  72. package/build/features/shared/Search/Search.js +2 -14
  73. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +2 -1
  74. package/build/features/shared/SuccessScreen/SuccessScreen.js +9 -20
  75. package/build/features/tax/screens/Success/Success.js +1 -1
  76. package/build/utils/array.d.ts +1 -0
  77. package/build/utils/array.js +6 -0
  78. package/build/utils/string.d.ts +1 -0
  79. package/build/utils/string.js +7 -0
  80. package/package.json +1 -1
@@ -77,10 +77,10 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
77
77
  });
78
78
  }); });
79
79
  export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
80
- var _a, password, settings, responseBody, payload, data;
81
- var _b, _c, _d;
82
- return __generator(this, function (_e) {
83
- switch (_e.label) {
80
+ var _a, password, settings, responseBody, payload, data, steps, hasPasswordCompleted;
81
+ var _b, _c, _d, _e, _f, _g;
82
+ return __generator(this, function (_h) {
83
+ switch (_h.label) {
84
84
  case 0:
85
85
  _a = thunkApi.getState(), password = _a.password, settings = _a.settings;
86
86
  responseBody = password.data.verify.responseBody;
@@ -93,33 +93,68 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
93
93
  };
94
94
  return [4, API.leadService.verifyLeadOTP(payload)];
95
95
  case 1:
96
- data = (_e.sent()).data;
96
+ data = (_h.sent()).data;
97
97
  if (!data.errors) {
98
98
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
99
- thunkApi.dispatch(handleNextScreenStep());
99
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
100
+ steps = (_g = password.data.verify.responseBody) === null || _g === void 0 ? void 0 : _g.steps;
101
+ hasPasswordCompleted = Object.keys(steps).find(function (key) { return key === PASSWORD_STEP_NAMES.PASSWORD_SUCCESS; });
102
+ if (hasPasswordCompleted) {
103
+ thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_STEP'));
104
+ }
105
+ else {
106
+ thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
107
+ }
100
108
  }
101
109
  return [2, { data: data, formData: __assign({}, params) }];
102
110
  }
103
111
  });
104
112
  }); });
113
+ export var createPassword = createAsyncThunk('createPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
114
+ var _a, settings, password, requestBody, data;
115
+ var _b, _c, _d;
116
+ return __generator(this, function (_e) {
117
+ switch (_e.label) {
118
+ case 0:
119
+ _a = thunkApi.getState(), settings = _a.settings, password = _a.password;
120
+ requestBody = {
121
+ step_name: PASSWORD_STEP_NAMES.PASSWORD_CREATE,
122
+ signup_token: (_b = password.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.signup_token,
123
+ password: params.password,
124
+ encryption_contract: ['password']
125
+ };
126
+ return [4, API.authService.createPassword(requestBody)];
127
+ case 1:
128
+ data = (_e.sent()).data;
129
+ if (!data.errors) {
130
+ thunkApi.dispatch(handleNextScreenStep());
131
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
132
+ }
133
+ return [2, { data: data, formData: params }];
134
+ }
135
+ });
136
+ }); });
105
137
  export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
106
- var _a, settings, password, payload, data;
107
- var _b, _c, _d, _e, _f;
108
- return __generator(this, function (_g) {
109
- switch (_g.label) {
138
+ var _a, settings, password, response, payload;
139
+ var _b, _c, _d, _e, _f, _g;
140
+ return __generator(this, function (_h) {
141
+ switch (_h.label) {
110
142
  case 0:
111
143
  _a = thunkApi.getState(), settings = _a.settings, password = _a.password;
144
+ response = undefined;
145
+ if (!!!((_b = password.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.id)) return [3, 2];
112
146
  payload = {
113
147
  step_name: PASSWORD_STEP_NAMES.PASSWORD_SUCCESS,
114
- id: ((_b = password.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
148
+ id: ((_c = password.data.otpData.responseBody) === null || _c === void 0 ? void 0 : _c.id) || '',
115
149
  encryption_contract: []
116
150
  };
117
151
  return [4, API.leadService.updateLead(payload)];
118
152
  case 1:
119
- data = (_g.sent()).data;
120
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
121
- (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
122
- return [2, { response: data, formData: params }];
153
+ response = _h.sent();
154
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
155
+ (_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: response === null || response === void 0 ? void 0 : response.data });
156
+ _h.label = 2;
157
+ case 2: return [2, { response: response === null || response === void 0 ? void 0 : response.data, formData: params }];
123
158
  }
124
159
  });
125
160
  }); });
@@ -196,6 +231,27 @@ export var passwordSlice = createSlice({
196
231
  .addCase(verifyPasswordLeadOTP.rejected, function (state, action) {
197
232
  state.loading = false;
198
233
  state.error = action.error.message;
234
+ })
235
+ .addCase(createPassword.pending, function (state) {
236
+ state.loading = true;
237
+ state.error = null;
238
+ })
239
+ .addCase(createPassword.fulfilled, function (state, action) {
240
+ var _a;
241
+ state.loading = false;
242
+ state.error = null;
243
+ var _b = action.payload, data = _b.data, formData = _b.formData;
244
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
245
+ if (description) {
246
+ state.error = description;
247
+ return;
248
+ }
249
+ state.data.passwordData = formData;
250
+ state.data.passwordData.responseBody = data;
251
+ })
252
+ .addCase(createPassword.rejected, function (state, action) {
253
+ state.loading = false;
254
+ state.error = action.error.message;
199
255
  })
200
256
  .addCase(updateLeadSuccess.fulfilled, function (state, action) {
201
257
  var _a;
@@ -4,13 +4,16 @@ import { useTranslation } from 'react-i18next';
4
4
  import SuccessScreen from '../../../shared/SuccessScreen';
5
5
  import { useAppDispatch } from '../../../../hooks';
6
6
  import { updateLeadSuccess } from '../../../app/bank/bankStore';
7
+ import { handleNextScreenStep } from '../../../../app/settings';
7
8
  var Success = function (_a) {
8
9
  var t = useTranslation().t;
9
10
  var dispatch = useAppDispatch();
10
11
  React.useEffect(function () {
11
12
  dispatch(updateLeadSuccess());
12
13
  }, []);
13
- var onSuccess = function () { };
14
- return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess, successTitle: 'continue' });
14
+ var onSuccess = function () {
15
+ dispatch(handleNextScreenStep());
16
+ };
17
+ return _jsx(SuccessScreen, { title: t('bank_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
15
18
  };
16
19
  export default React.memo(Success);
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,87 @@
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
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
+ import { memo, useEffect, useState } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { styled } from '@mui/material/styles';
16
+ import { FlowsButtons } from '../../../shared/Button';
17
+ import { ICONS_NAMES } from '../../../../constants';
18
+ import { useAppSelector, useLanguage } from '../../../../hooks';
19
+ import { showLastFour } from '../../../../utils';
20
+ import { bankSelector } from '../../../app/bank/bankStore';
21
+ import Box from '@mui/material/Box';
22
+ import Text from '../../../../components/Text';
23
+ import Container from '../../../shared/Containers/ScreenContainer';
24
+ var TitleStyled = styled(Text)(function (_a) {
25
+ var theme = _a.theme;
26
+ return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.primary, marginBlockEnd: theme.spacing(2.375), marginBlockStart: theme.spacing(2.875), lineHeight: 1.75, padding: '0px 20px' }));
27
+ });
28
+ var ContainerStyled = styled(Container)(function (_a) {
29
+ var theme = _a.theme;
30
+ return ({
31
+ justifyContent: 'space-between',
32
+ minHeight: theme.spacing(30),
33
+ alignItems: 'center'
34
+ });
35
+ });
36
+ var ButtonGroupStyled = styled(Box)(function (_a) {
37
+ var theme = _a.theme;
38
+ return ({
39
+ width: '100%'
40
+ });
41
+ });
42
+ var SuccessWithFlowButtons = function () {
43
+ var _a;
44
+ var t = useTranslation().t;
45
+ var isAr = useLanguage().isAr;
46
+ var data = useAppSelector(bankSelector).data;
47
+ var _b = data.verify.responseBody || {}, flows = _b.flows, nameObj = _b.name, entity = _b.entity, businessType = _b.business_type, bank = _b.bank, tax = _b.tax_id;
48
+ var _c = useState([]), buttons = _c[0], setButtons = _c[1];
49
+ var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
50
+ var licenseNumber = ((_a = entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
51
+ var bankName = (bank === null || bank === void 0 ? void 0 : bank.name) || '';
52
+ var iban = (bank === null || bank === void 0 ? void 0 : bank.name) || '';
53
+ var taxID = tax || '';
54
+ var reMapFlowData = function (flows) {
55
+ if (flows === void 0) { flows = []; }
56
+ var images = ICONS_NAMES;
57
+ var mappedFlows = flows.map(function (_a) {
58
+ var name = _a.name, url = _a.url, status = _a.status;
59
+ var type = status === 'initiated' ? 'pending' : 'completed';
60
+ var title = t("".concat(name, "_flow_").concat(type), {
61
+ individual_name: username,
62
+ business_type: businessType,
63
+ license_number: t('masking_symbols') + showLastFour(licenseNumber),
64
+ bank_name: bankName,
65
+ iban: t('masking_symbols') + iban,
66
+ tax_id: t('masking_symbols') + taxID
67
+ });
68
+ var isCompleted = status === 'completed' && name !== 'password';
69
+ var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
70
+ var hoverSrc = "".concat(name, "_white_icon");
71
+ return {
72
+ title: title,
73
+ href: url,
74
+ src: images[src],
75
+ hoverSrc: images[hoverSrc],
76
+ isCompleted: isCompleted
77
+ };
78
+ });
79
+ setButtons(mappedFlows);
80
+ };
81
+ useEffect(function () {
82
+ if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
83
+ reMapFlowData(flows);
84
+ }, [flows, isAr]);
85
+ return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
86
+ };
87
+ export default memo(SuccessWithFlowButtons);
@@ -0,0 +1,2 @@
1
+ import SuccessWithFlowButtons from './SuccessWithFlowButtons';
2
+ export default SuccessWithFlowButtons;
@@ -0,0 +1,2 @@
1
+ import SuccessWithFlowButtons from './SuccessWithFlowButtons';
2
+ export default SuccessWithFlowButtons;
@@ -12,7 +12,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
12
12
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
13
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
14
  }, 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" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
15
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "sx" | "size" | "disabled" | "error" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
16
  placeholder?: string | undefined;
17
17
  hide?: boolean | undefined;
18
18
  warningType?: "alert" | "error" | "hint" | undefined;
@@ -103,6 +103,6 @@ var SalesChannels = function () {
103
103
  if (channelsChecked)
104
104
  return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
105
105
  };
106
- return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.titleAr : channel.title, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
106
+ return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name_ar : channel.name_en, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
107
107
  };
108
108
  export default SalesChannels;
@@ -18,20 +18,20 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
18
18
  }>>[] | undefined>;
19
19
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
20
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
21
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
- titleAr: 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
23
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
24
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
- titleAr: 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
27
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
28
28
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
- titleAr: 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
31
  }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
32
32
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
33
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
- titleAr: 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
35
  }>>[] | undefined>;
36
36
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
37
37
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -53,20 +53,20 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
53
53
  }>>[] | undefined>;
54
54
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
55
55
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
56
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
- titleAr: 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
58
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
59
59
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
- titleAr: 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
62
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
63
63
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
65
- titleAr: 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
66
  }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
67
67
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
68
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
69
- titleAr: 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
70
  }>>[] | undefined>;
71
71
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
72
72
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -88,20 +88,20 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
88
88
  }>>[] | undefined>;
89
89
  salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
90
90
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
91
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
92
- titleAr: 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
93
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
94
94
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
95
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
- titleAr: 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
97
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
98
98
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
99
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
- titleAr: 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
101
  }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
102
102
  id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
103
- title: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
- titleAr: 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
105
  }>>[] | undefined>;
106
106
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
107
107
  }>>>;
@@ -9,8 +9,8 @@ export var ActivitiesValidationSchema = yup.object().shape({
9
9
  .min(1, 'choose_atleast_one_channel')
10
10
  .of(yup.object().shape({
11
11
  id: yup.string(),
12
- title: yup.string(),
13
- titleAr: yup.string()
12
+ name_en: yup.string(),
13
+ name_ar: yup.string()
14
14
  }))
15
15
  .required('choose_atleast_one_channel'),
16
16
  operationStartDate: yup.string().required('choose_any_business_date')
@@ -12,7 +12,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
12
12
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
13
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
14
  }, 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" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
15
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "sx" | "size" | "disabled" | "error" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
16
  placeholder?: string | undefined;
17
17
  hide?: boolean | undefined;
18
18
  warningType?: "alert" | "error" | "hint" | undefined;
@@ -30,7 +30,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
30
30
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
31
31
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
32
32
  }, 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" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
33
- isSelected: boolean;
33
+ isSelected?: boolean | undefined;
34
34
  }, {}, {}>;
35
35
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
36
36
  children?: React.ReactNode;
@@ -110,8 +110,8 @@ var customerLocations = function (_a) {
110
110
  };
111
111
  var customerLocationsValue = customerLocationsControl.field.value;
112
112
  var customerLocationSelected = customerLocationsValue[customerLocationsValue.length - 1];
113
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.titleAr : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.title, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
114
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.titleAr : item.title })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
113
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name_ar : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name_en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
114
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name_ar : item.name_en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
115
115
  } }) }))] }) })));
116
116
  };
117
117
  export default React.memo(customerLocations);
@@ -51,7 +51,7 @@ var Customers = function (_a) {
51
51
  mode: 'onChange'
52
52
  });
53
53
  var onSubmit = function (data) {
54
- dispatch(updateCustomersInfo(__assign({}, data)));
54
+ dispatch(updateCustomersInfo(data));
55
55
  };
56
56
  var onBack = function () {
57
57
  dispatch(handlePrevScreenStep());
@@ -66,11 +66,11 @@ var Customers = function (_a) {
66
66
  dispatch(clearError());
67
67
  }, [methods.formState.isValid]);
68
68
  React.useEffect(function () {
69
- var customerLocations = customerData.customerLocations, expectedCustomer = customerData.expectedCustomer, expectedSalesRange = customerData.expectedSalesRange;
69
+ var customerLocations = customerData.customerLocations, expectedCustomer = customerData.expectedCustomer, expectedSale = customerData.expectedSale;
70
70
  methods.setValue('customerLocations', customerLocations);
71
71
  methods.setValue('expectedCustomer', expectedCustomer);
72
- methods.setValue('expectedSalesRange', expectedSalesRange);
73
- }, [customerData.customerLocations, customerData.expectedCustomer, customerData.expectedSalesRange]);
72
+ methods.setValue('expectedSale', expectedSale);
73
+ }, [customerData.customerLocations, customerData.expectedCustomer, customerData.expectedSale]);
74
74
  var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
75
75
  var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
76
76
  var isExpectedSalesListActive = listActive === ListType.ExpectedSalesList;
@@ -76,8 +76,8 @@ var ExpectedCustomers = function (_a) {
76
76
  };
77
77
  var expectedCustomersValue = expectedCustomerControl.field.value;
78
78
  var expectedCustomersSelected = expectedCustomersValue;
79
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.titleAr : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.title, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
80
- return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.titleAr : item.title })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
79
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name_ar : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name_en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
80
+ return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.name_ar : item.name_en })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
81
81
  } }) }))] }) })));
82
82
  };
83
83
  export default ExpectedCustomers;
@@ -4,5 +4,5 @@ interface ExpectedSalesRangeProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  }
7
- declare const ExpectedSalesRange: ({ ...rest }: ExpectedSalesRangeProps) => JSX.Element;
7
+ declare const ExpectedSalesRange: ({ show, onListClose, onListOpen }: ExpectedSalesRangeProps) => JSX.Element;
8
8
  export default ExpectedSalesRange;