@itilite/iui-user-management 0.4.903 → 0.4.905

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3158,31 +3158,6 @@ var workInfo = [{
3158
3158
  minLength: 0
3159
3159
  },
3160
3160
  disableText: 'Please get in touch with your administrator to change this value.'
3161
- }, {
3162
- id: 7,
3163
- label: 'Manager',
3164
- name: 'manager',
3165
- required: false,
3166
- type: 'async_select',
3167
- fullWidth: false,
3168
- visibility: true,
3169
- readOnly: false,
3170
- placeholder: 'Select manager',
3171
- tabelName: 'manager',
3172
- product: 'travel',
3173
- loadOption: approversOptions
3174
- }, {
3175
- id: 8,
3176
- label: 'Skip manager',
3177
- name: 'skip_manager',
3178
- required: false,
3179
- type: 'async_select',
3180
- fullWidth: false,
3181
- visibility: true,
3182
- readOnly: false,
3183
- placeholder: 'Select manager',
3184
- product: 'travel',
3185
- loadOption: approversOptions
3186
3161
  }, {
3187
3162
  id: 9,
3188
3163
  label: 'Base location',
@@ -5192,6 +5167,9 @@ var UserAddEdit = function UserAddEdit(props) {
5192
5167
  var _useState25 = React.useState([]),
5193
5168
  uploadedFiles = _useState25[0],
5194
5169
  setUploadedFiles = _useState25[1];
5170
+ var _useState26 = React.useState(70),
5171
+ maxLengthForModal = _useState26[0],
5172
+ setMaxLengthForModal = _useState26[1];
5195
5173
  var defaultAddModalData = {
5196
5174
  isOpen: false,
5197
5175
  isError: false,
@@ -5204,12 +5182,12 @@ var UserAddEdit = function UserAddEdit(props) {
5204
5182
  regexOnBlur: null,
5205
5183
  maxLimit: '',
5206
5184
  minLimit: '',
5207
- maxLength: 150,
5185
+ maxLength: maxLengthForModal,
5208
5186
  minLength: 0
5209
5187
  };
5210
- var _useState26 = React.useState(defaultAddModalData),
5211
- addModalData = _useState26[0],
5212
- setAddModalData = _useState26[1];
5188
+ var _useState27 = React.useState(defaultAddModalData),
5189
+ addModalData = _useState27[0],
5190
+ setAddModalData = _useState27[1];
5213
5191
  var onAddModalClose = function onAddModalClose() {
5214
5192
  setAddModalData(_extends({}, defaultAddModalData));
5215
5193
  };
@@ -5229,12 +5207,16 @@ var UserAddEdit = function UserAddEdit(props) {
5229
5207
  var title = '';
5230
5208
  if (id === 'entity') {
5231
5209
  title = 'Entity';
5210
+ setMaxLengthForModal(70);
5232
5211
  } else if (id === 'department') {
5233
5212
  title = 'Department';
5213
+ setMaxLengthForModal(70);
5234
5214
  } else if (id === 'business_unit') {
5215
+ setMaxLengthForModal(150);
5235
5216
  title = 'Business unit';
5236
5217
  } else if (id === 'employee_level') {
5237
5218
  title = 'Employee level';
5219
+ setMaxLengthForModal(70);
5238
5220
  }
5239
5221
  setAddModalData(_extends({}, addModalData, {
5240
5222
  isOpen: true,
@@ -6014,7 +5996,8 @@ var UserAddEdit = function UserAddEdit(props) {
6014
5996
  }
6015
5997
  for (var _key in employeeInfo) {
6016
5998
  if (Object.hasOwnProperty.call(employeeInfo, _key)) {
6017
- if (employeeInfo[_key] === false && employeeInfoInput[_key] !== undefined && (typeof employeeInfoInput[_key] === 'string' && !employeeInfoInput[_key] || typeof employeeInfoInput[_key] === 'object' && !employeeInfoInput[_key].value) && fieldsVisibility.employee_info[_key] !== 2) {
5999
+ console.log('employeeInfo', employeeInfoInput[_key]);
6000
+ if (employeeInfo[_key] === false && employeeInfoInput[_key] !== undefined && (typeof employeeInfoInput[_key] === 'string' && !employeeInfoInput[_key] || typeof employeeInfoInput[_key] === 'object' && employeeInfoInput[_key].value) && fieldsVisibility.employee_info[_key] !== 2) {
6018
6001
  _isError = true;
6019
6002
  if (_errorArray.indexOf(_key) === -1) _errorArray.push(_key);
6020
6003
  _errorMsgs[_key] = ErrorMessages[_key];
@@ -10435,12 +10418,20 @@ var UserPanel = function UserPanel(_ref) {
10435
10418
  var validatedValue = _value.replace(/\s+/g, ' ').trim();
10436
10419
  setDataList(validatedValue);
10437
10420
  };
10421
+ var _useState17 = React.useState(70),
10422
+ maxLengthForModal = _useState17[0],
10423
+ setMaxLengthForModal = _useState17[1];
10424
+ React.useEffect(function () {
10425
+ if (title === 'Business unit') {
10426
+ setMaxLengthForModal(150);
10427
+ }
10428
+ }, []);
10438
10429
  var validation = {
10439
10430
  regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
10440
10431
  regexOnBlur: null,
10441
10432
  maxLimit: '',
10442
10433
  minLimit: '',
10443
- maxLength: 150,
10434
+ maxLength: maxLengthForModal,
10444
10435
  minLength: 0
10445
10436
  };
10446
10437
  React.useEffect(function () {