@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.
@@ -3155,31 +3155,6 @@ var workInfo = [{
3155
3155
  minLength: 0
3156
3156
  },
3157
3157
  disableText: 'Please get in touch with your administrator to change this value.'
3158
- }, {
3159
- id: 7,
3160
- label: 'Manager',
3161
- name: 'manager',
3162
- required: false,
3163
- type: 'async_select',
3164
- fullWidth: false,
3165
- visibility: true,
3166
- readOnly: false,
3167
- placeholder: 'Select manager',
3168
- tabelName: 'manager',
3169
- product: 'travel',
3170
- loadOption: approversOptions
3171
- }, {
3172
- id: 8,
3173
- label: 'Skip manager',
3174
- name: 'skip_manager',
3175
- required: false,
3176
- type: 'async_select',
3177
- fullWidth: false,
3178
- visibility: true,
3179
- readOnly: false,
3180
- placeholder: 'Select manager',
3181
- product: 'travel',
3182
- loadOption: approversOptions
3183
3158
  }, {
3184
3159
  id: 9,
3185
3160
  label: 'Base location',
@@ -5189,6 +5164,9 @@ var UserAddEdit = function UserAddEdit(props) {
5189
5164
  var _useState25 = useState([]),
5190
5165
  uploadedFiles = _useState25[0],
5191
5166
  setUploadedFiles = _useState25[1];
5167
+ var _useState26 = useState(70),
5168
+ maxLengthForModal = _useState26[0],
5169
+ setMaxLengthForModal = _useState26[1];
5192
5170
  var defaultAddModalData = {
5193
5171
  isOpen: false,
5194
5172
  isError: false,
@@ -5201,12 +5179,12 @@ var UserAddEdit = function UserAddEdit(props) {
5201
5179
  regexOnBlur: null,
5202
5180
  maxLimit: '',
5203
5181
  minLimit: '',
5204
- maxLength: 150,
5182
+ maxLength: maxLengthForModal,
5205
5183
  minLength: 0
5206
5184
  };
5207
- var _useState26 = useState(defaultAddModalData),
5208
- addModalData = _useState26[0],
5209
- setAddModalData = _useState26[1];
5185
+ var _useState27 = useState(defaultAddModalData),
5186
+ addModalData = _useState27[0],
5187
+ setAddModalData = _useState27[1];
5210
5188
  var onAddModalClose = function onAddModalClose() {
5211
5189
  setAddModalData(_extends({}, defaultAddModalData));
5212
5190
  };
@@ -5226,12 +5204,16 @@ var UserAddEdit = function UserAddEdit(props) {
5226
5204
  var title = '';
5227
5205
  if (id === 'entity') {
5228
5206
  title = 'Entity';
5207
+ setMaxLengthForModal(70);
5229
5208
  } else if (id === 'department') {
5230
5209
  title = 'Department';
5210
+ setMaxLengthForModal(70);
5231
5211
  } else if (id === 'business_unit') {
5212
+ setMaxLengthForModal(150);
5232
5213
  title = 'Business unit';
5233
5214
  } else if (id === 'employee_level') {
5234
5215
  title = 'Employee level';
5216
+ setMaxLengthForModal(70);
5235
5217
  }
5236
5218
  setAddModalData(_extends({}, addModalData, {
5237
5219
  isOpen: true,
@@ -6011,7 +5993,8 @@ var UserAddEdit = function UserAddEdit(props) {
6011
5993
  }
6012
5994
  for (var _key in employeeInfo) {
6013
5995
  if (Object.hasOwnProperty.call(employeeInfo, _key)) {
6014
- 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) {
5996
+ console.log('employeeInfo', employeeInfoInput[_key]);
5997
+ 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) {
6015
5998
  _isError = true;
6016
5999
  if (_errorArray.indexOf(_key) === -1) _errorArray.push(_key);
6017
6000
  _errorMsgs[_key] = ErrorMessages[_key];
@@ -10432,12 +10415,20 @@ var UserPanel = function UserPanel(_ref) {
10432
10415
  var validatedValue = _value.replace(/\s+/g, ' ').trim();
10433
10416
  setDataList(validatedValue);
10434
10417
  };
10418
+ var _useState17 = useState(70),
10419
+ maxLengthForModal = _useState17[0],
10420
+ setMaxLengthForModal = _useState17[1];
10421
+ useEffect(function () {
10422
+ if (title === 'Business unit') {
10423
+ setMaxLengthForModal(150);
10424
+ }
10425
+ }, []);
10435
10426
  var validation = {
10436
10427
  regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
10437
10428
  regexOnBlur: null,
10438
10429
  maxLimit: '',
10439
10430
  minLimit: '',
10440
- maxLength: 150,
10431
+ maxLength: maxLengthForModal,
10441
10432
  minLength: 0
10442
10433
  };
10443
10434
  useEffect(function () {