@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.
- package/dist/index.js +32 -39
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +32 -39
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3057,8 +3057,8 @@ var workInfo = [{
|
|
|
3057
3057
|
validation: {
|
|
3058
3058
|
regexOnChange: null,
|
|
3059
3059
|
regexOnBlur: [{
|
|
3060
|
-
regex: /^[(A-Z)(a-z)(0-9)
|
|
3061
|
-
message: "Only alphabets, numbers and
|
|
3060
|
+
regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
|
|
3061
|
+
message: "Only alphabets, numbers, - and _ & are allowed."
|
|
3062
3062
|
}],
|
|
3063
3063
|
maxLimit: '',
|
|
3064
3064
|
minLimit: '',
|
|
@@ -3146,8 +3146,8 @@ var workInfo = [{
|
|
|
3146
3146
|
validation: {
|
|
3147
3147
|
regexOnChange: null,
|
|
3148
3148
|
regexOnBlur: [{
|
|
3149
|
-
regex: /^[A-Za-z0-9
|
|
3150
|
-
message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
|
|
3149
|
+
regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
|
|
3150
|
+
message: "Only alphabets, numbers & special characters . & ' ( ) _ - , / are allowed."
|
|
3151
3151
|
}, {
|
|
3152
3152
|
regex: /^[a-zA-Z]/,
|
|
3153
3153
|
message: 'Designation should start with alphabets'
|
|
@@ -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:
|
|
5185
|
+
maxLength: maxLengthForModal,
|
|
5208
5186
|
minLength: 0
|
|
5209
5187
|
};
|
|
5210
|
-
var
|
|
5211
|
-
addModalData =
|
|
5212
|
-
setAddModalData =
|
|
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,
|
|
@@ -5949,7 +5931,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5949
5931
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5950
5932
|
return Promise.resolve();
|
|
5951
5933
|
}
|
|
5952
|
-
console.log(employeeInfoInput,
|
|
5934
|
+
console.log(employeeInfoInput, 'data');
|
|
5953
5935
|
if (employeeInfoInput.manager_id.value !== '') {
|
|
5954
5936
|
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5955
5937
|
}
|
|
@@ -6013,8 +5995,11 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6013
5995
|
}
|
|
6014
5996
|
}
|
|
6015
5997
|
for (var _key in employeeInfo) {
|
|
5998
|
+
console.log('key', _key);
|
|
6016
5999
|
if (Object.hasOwnProperty.call(employeeInfo, _key)) {
|
|
6017
|
-
|
|
6000
|
+
var _employeeInfoInput$_k;
|
|
6001
|
+
console.log('employeeInfo0000', (_employeeInfoInput$_k = employeeInfoInput[_key]) === null || _employeeInfoInput$_k === void 0 ? void 0 : _employeeInfoInput$_k.value, 'sajkdhjasj');
|
|
6002
|
+
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) {
|
|
6018
6003
|
_isError = true;
|
|
6019
6004
|
if (_errorArray.indexOf(_key) === -1) _errorArray.push(_key);
|
|
6020
6005
|
_errorMsgs[_key] = ErrorMessages[_key];
|
|
@@ -8959,9 +8944,7 @@ var UserList = function UserList(_ref2) {
|
|
|
8959
8944
|
}),
|
|
8960
8945
|
signupRequestListInfo = _useSelector3.signupRequestListInfo;
|
|
8961
8946
|
var redirectToNotifications = function redirectToNotifications() {
|
|
8962
|
-
history.push(
|
|
8963
|
-
pathname: "/settings/notifications"
|
|
8964
|
-
});
|
|
8947
|
+
history.push(config.routes.notification.path);
|
|
8965
8948
|
};
|
|
8966
8949
|
var openDeactivateModal = function openDeactivateModal() {
|
|
8967
8950
|
if (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined) {
|
|
@@ -9074,11 +9057,13 @@ var UserList = function UserList(_ref2) {
|
|
|
9074
9057
|
setSortingChangeTemp(!isSortingChangeTemp);
|
|
9075
9058
|
};
|
|
9076
9059
|
var onSearchHandler = function onSearchHandler(value) {
|
|
9060
|
+
setPage(1);
|
|
9077
9061
|
setSearchValue(value);
|
|
9078
9062
|
setSearchingChange(true);
|
|
9079
9063
|
setSearchingChangeTemp(!isSearchingChangeTemp);
|
|
9080
9064
|
};
|
|
9081
9065
|
var onSignUpReqeustSearchHandler = function onSignUpReqeustSearchHandler(value) {
|
|
9066
|
+
setPage(1);
|
|
9082
9067
|
set_signup_SearchValue(value);
|
|
9083
9068
|
setSignUpSearchingChange(true);
|
|
9084
9069
|
setSignUpSearchingChangeTemp(!isSignUpSearchingChangeTemp);
|
|
@@ -10437,12 +10422,20 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10437
10422
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
10438
10423
|
setDataList(validatedValue);
|
|
10439
10424
|
};
|
|
10425
|
+
var _useState17 = React.useState(70),
|
|
10426
|
+
maxLengthForModal = _useState17[0],
|
|
10427
|
+
setMaxLengthForModal = _useState17[1];
|
|
10428
|
+
React.useEffect(function () {
|
|
10429
|
+
if (title === 'Business unit') {
|
|
10430
|
+
setMaxLengthForModal(150);
|
|
10431
|
+
}
|
|
10432
|
+
}, []);
|
|
10440
10433
|
var validation = {
|
|
10441
10434
|
regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
|
|
10442
10435
|
regexOnBlur: null,
|
|
10443
10436
|
maxLimit: '',
|
|
10444
10437
|
minLimit: '',
|
|
10445
|
-
maxLength:
|
|
10438
|
+
maxLength: maxLengthForModal,
|
|
10446
10439
|
minLength: 0
|
|
10447
10440
|
};
|
|
10448
10441
|
React.useEffect(function () {
|