@itilite/iui-user-management 1.3.12 → 1.3.13

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.
@@ -3054,8 +3054,8 @@ var workInfo = [{
3054
3054
  validation: {
3055
3055
  regexOnChange: null,
3056
3056
  regexOnBlur: [{
3057
- regex: /^[(A-Z)(a-z)(0-9)\-& ]*$/,
3058
- message: "Only alphabets, numbers and - & are allowed."
3057
+ regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
3058
+ message: "Only alphabets, numbers, - and _ & are allowed."
3059
3059
  }],
3060
3060
  maxLimit: '',
3061
3061
  minLimit: '',
@@ -3143,8 +3143,8 @@ var workInfo = [{
3143
3143
  validation: {
3144
3144
  regexOnChange: null,
3145
3145
  regexOnBlur: [{
3146
- regex: /^[A-Za-z0-9 \-.,&'()\/]*$/,
3147
- message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
3146
+ regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
3147
+ message: "Only alphabets, numbers & special characters . & ' ( ) _ - , / are allowed."
3148
3148
  }, {
3149
3149
  regex: /^[a-zA-Z]/,
3150
3150
  message: 'Designation should start with alphabets'
@@ -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: 70,
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,
@@ -5946,7 +5928,7 @@ var UserAddEdit = function UserAddEdit(props) {
5946
5928
  IUIToastMessageService$4.warningNotify(checkAnyError);
5947
5929
  return Promise.resolve();
5948
5930
  }
5949
- console.log(employeeInfoInput, "data");
5931
+ console.log(employeeInfoInput, 'data');
5950
5932
  if (employeeInfoInput.manager_id.value !== '') {
5951
5933
  employeeInfoInput.manager_id = employeeInfoInput.manager.value;
5952
5934
  }
@@ -6010,8 +5992,11 @@ var UserAddEdit = function UserAddEdit(props) {
6010
5992
  }
6011
5993
  }
6012
5994
  for (var _key in employeeInfo) {
5995
+ console.log('key', _key);
6013
5996
  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) {
5997
+ var _employeeInfoInput$_k;
5998
+ console.log('employeeInfo0000', (_employeeInfoInput$_k = employeeInfoInput[_key]) === null || _employeeInfoInput$_k === void 0 ? void 0 : _employeeInfoInput$_k.value, 'sajkdhjasj');
5999
+ if (employeeInfo[_key] === false && employeeInfoInput[_key] !== undefined && (typeof employeeInfoInput[_key] === 'string' && !employeeInfoInput[_key] || typeof employeeInfoInput[_key] === 'object' && !employeeInfoInput[_key].value || !employeeInfoInput[_key].value) === '' && fieldsVisibility.employee_info[_key] !== 2) {
6015
6000
  _isError = true;
6016
6001
  if (_errorArray.indexOf(_key) === -1) _errorArray.push(_key);
6017
6002
  _errorMsgs[_key] = ErrorMessages[_key];
@@ -8956,9 +8941,7 @@ var UserList = function UserList(_ref2) {
8956
8941
  }),
8957
8942
  signupRequestListInfo = _useSelector3.signupRequestListInfo;
8958
8943
  var redirectToNotifications = function redirectToNotifications() {
8959
- history.push({
8960
- pathname: "/settings/notifications"
8961
- });
8944
+ history.push(config.routes.notification.path);
8962
8945
  };
8963
8946
  var openDeactivateModal = function openDeactivateModal() {
8964
8947
  if (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined) {
@@ -9071,11 +9054,13 @@ var UserList = function UserList(_ref2) {
9071
9054
  setSortingChangeTemp(!isSortingChangeTemp);
9072
9055
  };
9073
9056
  var onSearchHandler = function onSearchHandler(value) {
9057
+ setPage(1);
9074
9058
  setSearchValue(value);
9075
9059
  setSearchingChange(true);
9076
9060
  setSearchingChangeTemp(!isSearchingChangeTemp);
9077
9061
  };
9078
9062
  var onSignUpReqeustSearchHandler = function onSignUpReqeustSearchHandler(value) {
9063
+ setPage(1);
9079
9064
  set_signup_SearchValue(value);
9080
9065
  setSignUpSearchingChange(true);
9081
9066
  setSignUpSearchingChangeTemp(!isSignUpSearchingChangeTemp);
@@ -10434,12 +10419,20 @@ var UserPanel = function UserPanel(_ref) {
10434
10419
  var validatedValue = _value.replace(/\s+/g, ' ').trim();
10435
10420
  setDataList(validatedValue);
10436
10421
  };
10422
+ var _useState17 = useState(70),
10423
+ maxLengthForModal = _useState17[0],
10424
+ setMaxLengthForModal = _useState17[1];
10425
+ useEffect(function () {
10426
+ if (title === 'Business unit') {
10427
+ setMaxLengthForModal(150);
10428
+ }
10429
+ }, []);
10437
10430
  var validation = {
10438
10431
  regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
10439
10432
  regexOnBlur: null,
10440
10433
  maxLimit: '',
10441
10434
  minLimit: '',
10442
- maxLength: 70,
10435
+ maxLength: maxLengthForModal,
10443
10436
  minLength: 0
10444
10437
  };
10445
10438
  useEffect(function () {