@itilite/iui-user-management 1.3.9 → 1.3.10
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.css +0 -4
- package/dist/index.js +98 -121
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +98 -121
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1115,24 +1115,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1115
1115
|
});
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
if (payload.uploadedFiles && payload.uploadedFiles.length > 0) {
|
|
1119
|
-
res.fields.files = payload.uploadedFiles.filter(function (_file) {
|
|
1120
|
-
return !_file.isExistingFile;
|
|
1121
|
-
}).map(function (_file) {
|
|
1122
|
-
return {
|
|
1123
|
-
file_type: _file.file_type,
|
|
1124
|
-
file_path: _file.file_path,
|
|
1125
|
-
user_file_name: _file.user_file_name,
|
|
1126
|
-
upload: _file.upload
|
|
1127
|
-
};
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
if (payload.filesForDelete.length > 0) {
|
|
1131
|
-
res.fields.filesToDelete = payload.filesForDelete;
|
|
1132
|
-
}
|
|
1133
|
-
if (payload.profilePicDelete.length > 0) {
|
|
1134
|
-
res.fields.profilePicDelete = payload.profilePicDelete;
|
|
1135
|
-
}
|
|
1136
1118
|
}
|
|
1137
1119
|
return res;
|
|
1138
1120
|
};
|
|
@@ -3072,8 +3054,8 @@ var workInfo = [{
|
|
|
3072
3054
|
validation: {
|
|
3073
3055
|
regexOnChange: null,
|
|
3074
3056
|
regexOnBlur: [{
|
|
3075
|
-
regex: /^[(A-Z)(a-z)(0-9)
|
|
3076
|
-
message: "Only alphabets, numbers and
|
|
3057
|
+
regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
|
|
3058
|
+
message: "Only alphabets, numbers, - and _ & are allowed."
|
|
3077
3059
|
}],
|
|
3078
3060
|
maxLimit: '',
|
|
3079
3061
|
minLimit: '',
|
|
@@ -3161,8 +3143,8 @@ var workInfo = [{
|
|
|
3161
3143
|
validation: {
|
|
3162
3144
|
regexOnChange: null,
|
|
3163
3145
|
regexOnBlur: [{
|
|
3164
|
-
regex: /^[A-Za-z0-9
|
|
3165
|
-
message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
|
|
3146
|
+
regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
|
|
3147
|
+
message: "Only alphabets, numbers & special characters . & ' ( ) _ - , / are allowed."
|
|
3166
3148
|
}, {
|
|
3167
3149
|
regex: /^[a-zA-Z]/,
|
|
3168
3150
|
message: 'Designation should start with alphabets'
|
|
@@ -3173,6 +3155,31 @@ var workInfo = [{
|
|
|
3173
3155
|
minLength: 0
|
|
3174
3156
|
},
|
|
3175
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
|
|
3176
3183
|
}, {
|
|
3177
3184
|
id: 9,
|
|
3178
3185
|
label: 'Base location',
|
|
@@ -5182,6 +5189,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5182
5189
|
var _useState25 = useState([]),
|
|
5183
5190
|
uploadedFiles = _useState25[0],
|
|
5184
5191
|
setUploadedFiles = _useState25[1];
|
|
5192
|
+
var _useState26 = useState(70),
|
|
5193
|
+
maxLengthForModal = _useState26[0],
|
|
5194
|
+
setMaxLengthForModal = _useState26[1];
|
|
5185
5195
|
var defaultAddModalData = {
|
|
5186
5196
|
isOpen: false,
|
|
5187
5197
|
isError: false,
|
|
@@ -5194,12 +5204,12 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5194
5204
|
regexOnBlur: null,
|
|
5195
5205
|
maxLimit: '',
|
|
5196
5206
|
minLimit: '',
|
|
5197
|
-
maxLength:
|
|
5207
|
+
maxLength: maxLengthForModal,
|
|
5198
5208
|
minLength: 0
|
|
5199
5209
|
};
|
|
5200
|
-
var
|
|
5201
|
-
addModalData =
|
|
5202
|
-
setAddModalData =
|
|
5210
|
+
var _useState27 = useState(defaultAddModalData),
|
|
5211
|
+
addModalData = _useState27[0],
|
|
5212
|
+
setAddModalData = _useState27[1];
|
|
5203
5213
|
var onAddModalClose = function onAddModalClose() {
|
|
5204
5214
|
setAddModalData(_extends({}, defaultAddModalData));
|
|
5205
5215
|
};
|
|
@@ -5219,12 +5229,16 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5219
5229
|
var title = '';
|
|
5220
5230
|
if (id === 'entity') {
|
|
5221
5231
|
title = 'Entity';
|
|
5232
|
+
setMaxLengthForModal(70);
|
|
5222
5233
|
} else if (id === 'department') {
|
|
5223
5234
|
title = 'Department';
|
|
5235
|
+
setMaxLengthForModal(70);
|
|
5224
5236
|
} else if (id === 'business_unit') {
|
|
5237
|
+
setMaxLengthForModal(150);
|
|
5225
5238
|
title = 'Business unit';
|
|
5226
5239
|
} else if (id === 'employee_level') {
|
|
5227
5240
|
title = 'Employee level';
|
|
5241
|
+
setMaxLengthForModal(70);
|
|
5228
5242
|
}
|
|
5229
5243
|
setAddModalData(_extends({}, addModalData, {
|
|
5230
5244
|
isOpen: true,
|
|
@@ -5848,24 +5862,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5848
5862
|
return _extends({}, prevState, expenseApprovers);
|
|
5849
5863
|
});
|
|
5850
5864
|
}
|
|
5851
|
-
var _uploadedDocs2 = [];
|
|
5852
|
-
res.files.forEach(function (_file) {
|
|
5853
|
-
_uploadedDocs2.push({
|
|
5854
|
-
user_file_name: _file.user_file_name,
|
|
5855
|
-
id: _file.id,
|
|
5856
|
-
isExistingFile: true,
|
|
5857
|
-
file_type: _file.file_type
|
|
5858
|
-
});
|
|
5859
|
-
});
|
|
5860
|
-
if (res && res.profile_pic) {
|
|
5861
|
-
_uploadedDocs2.push({
|
|
5862
|
-
user_file_name: res.profile_pic.user_file_name,
|
|
5863
|
-
id: res.profile_pic.id,
|
|
5864
|
-
isExistingFile: true,
|
|
5865
|
-
file_type: res.profile_pic.file_type
|
|
5866
|
-
});
|
|
5867
|
-
}
|
|
5868
|
-
setUploadedFiles(_uploadedDocs2);
|
|
5869
5865
|
}
|
|
5870
5866
|
})["catch"](function () {})["finally"](function () {
|
|
5871
5867
|
dispatch(stopLoader());
|
|
@@ -5957,7 +5953,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5957
5953
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5958
5954
|
return Promise.resolve();
|
|
5959
5955
|
}
|
|
5960
|
-
console.log(employeeInfoInput,
|
|
5956
|
+
console.log(employeeInfoInput, 'data');
|
|
5961
5957
|
if (employeeInfoInput.manager_id.value !== '') {
|
|
5962
5958
|
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5963
5959
|
}
|
|
@@ -6451,6 +6447,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6451
6447
|
if (!p.visibility) {
|
|
6452
6448
|
return null;
|
|
6453
6449
|
}
|
|
6450
|
+
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6451
|
+
return null;
|
|
6452
|
+
}
|
|
6454
6453
|
return /*#__PURE__*/React.createElement(IUIGrid, {
|
|
6455
6454
|
item: true,
|
|
6456
6455
|
sm: 12,
|
|
@@ -8804,10 +8803,8 @@ var UndoButton = function UndoButton(_ref) {
|
|
|
8804
8803
|
};
|
|
8805
8804
|
var UserList = function UserList(_ref2) {
|
|
8806
8805
|
var config = _ref2.config,
|
|
8807
|
-
isProfile = _ref2.isProfile
|
|
8808
|
-
|
|
8809
|
-
tabVal = _ref2$tabVal === void 0 ? 'current' : _ref2$tabVal;
|
|
8810
|
-
env$7.init(config, isProfile, tabVal);
|
|
8806
|
+
isProfile = _ref2.isProfile;
|
|
8807
|
+
env$7.init(config, isProfile);
|
|
8811
8808
|
var history = useHistory();
|
|
8812
8809
|
var _useSelector = useSelector(function (state) {
|
|
8813
8810
|
return state.userList;
|
|
@@ -8817,18 +8814,15 @@ var UserList = function UserList(_ref2) {
|
|
|
8817
8814
|
deactivatedUsers = _useSelector.deactivatedUsers,
|
|
8818
8815
|
tabValue = _useSelector.tabValue;
|
|
8819
8816
|
var newSelecteds = userListInfo.results;
|
|
8820
|
-
var _React$useState = React.useState(
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
var _React$useState2 = React.useState(
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
var _React$useState3 = React.useState(
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
var _React$useState4 = React.useState(1),
|
|
8830
|
-
page = _React$useState4[0],
|
|
8831
|
-
setPage = _React$useState4[1];
|
|
8817
|
+
var _React$useState = React.useState(''),
|
|
8818
|
+
deactivateUser = _React$useState[0],
|
|
8819
|
+
setDeactivateUser = _React$useState[1];
|
|
8820
|
+
var _React$useState2 = React.useState(null),
|
|
8821
|
+
defaultId = _React$useState2[0],
|
|
8822
|
+
setDefaultId = _React$useState2[1];
|
|
8823
|
+
var _React$useState3 = React.useState(1),
|
|
8824
|
+
page = _React$useState3[0],
|
|
8825
|
+
setPage = _React$useState3[1];
|
|
8832
8826
|
var _useState = useState([]),
|
|
8833
8827
|
selectedUsersNotApprover = _useState[0],
|
|
8834
8828
|
setSelectedUsersNotApprover = _useState[1];
|
|
@@ -8838,24 +8832,24 @@ var UserList = function UserList(_ref2) {
|
|
|
8838
8832
|
var _useState3 = useState(false),
|
|
8839
8833
|
isBulkDeactivateModalOpen = _useState3[0],
|
|
8840
8834
|
setIsBulkDeactivateModalOpen = _useState3[1];
|
|
8841
|
-
var _React$
|
|
8842
|
-
user = _React$
|
|
8843
|
-
setUser = _React$
|
|
8835
|
+
var _React$useState4 = React.useState(''),
|
|
8836
|
+
user = _React$useState4[0],
|
|
8837
|
+
setUser = _React$useState4[1];
|
|
8844
8838
|
var _useState4 = useState(10),
|
|
8845
8839
|
rowsPerPage = _useState4[0],
|
|
8846
8840
|
setRowsPerPage = _useState4[1];
|
|
8847
|
-
var _React$
|
|
8848
|
-
selected = _React$
|
|
8849
|
-
setSelected = _React$
|
|
8850
|
-
var _React$
|
|
8851
|
-
order = _React$
|
|
8852
|
-
setOrder = _React$
|
|
8853
|
-
var _React$
|
|
8854
|
-
deactivateSingle = _React$
|
|
8855
|
-
setDeactivateSingle = _React$
|
|
8856
|
-
var _React$
|
|
8857
|
-
orderBy = _React$
|
|
8858
|
-
setOrderBy = _React$
|
|
8841
|
+
var _React$useState5 = React.useState({}),
|
|
8842
|
+
selected = _React$useState5[0],
|
|
8843
|
+
setSelected = _React$useState5[1];
|
|
8844
|
+
var _React$useState6 = React.useState('asc'),
|
|
8845
|
+
order = _React$useState6[0],
|
|
8846
|
+
setOrder = _React$useState6[1];
|
|
8847
|
+
var _React$useState7 = React.useState(false),
|
|
8848
|
+
deactivateSingle = _React$useState7[0],
|
|
8849
|
+
setDeactivateSingle = _React$useState7[1];
|
|
8850
|
+
var _React$useState8 = React.useState('first_name'),
|
|
8851
|
+
orderBy = _React$useState8[0],
|
|
8852
|
+
setOrderBy = _React$useState8[1];
|
|
8859
8853
|
var _useState5 = useState(''),
|
|
8860
8854
|
searchValue = _useState5[0],
|
|
8861
8855
|
setSearchValue = _useState5[1];
|
|
@@ -8905,9 +8899,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8905
8899
|
var _useState17 = useState(''),
|
|
8906
8900
|
userIds = _useState17[0],
|
|
8907
8901
|
setUserIds = _useState17[1];
|
|
8908
|
-
var _React$
|
|
8909
|
-
overlayMenu = _React$
|
|
8910
|
-
setOverlayMenu = _React$
|
|
8902
|
+
var _React$useState9 = React.useState(false),
|
|
8903
|
+
overlayMenu = _React$useState9[0],
|
|
8904
|
+
setOverlayMenu = _React$useState9[1];
|
|
8911
8905
|
var _useState18 = useState(''),
|
|
8912
8906
|
userFirstName = _useState18[0],
|
|
8913
8907
|
setUserFirstName = _useState18[1];
|
|
@@ -8917,14 +8911,6 @@ var UserList = function UserList(_ref2) {
|
|
|
8917
8911
|
var _useState20 = useState(true),
|
|
8918
8912
|
isDisabledSubmitBtn = _useState20[0],
|
|
8919
8913
|
setIsDisabledSubmitBtn = _useState20[1];
|
|
8920
|
-
useEffect(function () {
|
|
8921
|
-
setActiveTab(tabValue);
|
|
8922
|
-
}, [tabValue]);
|
|
8923
|
-
useEffect(function () {
|
|
8924
|
-
if (tabVal === 'sign-up') {
|
|
8925
|
-
dispatch(updateTabValue(1));
|
|
8926
|
-
}
|
|
8927
|
-
}, []);
|
|
8928
8914
|
useScrollPosition(function (_ref3) {
|
|
8929
8915
|
var prevPos = _ref3.prevPos,
|
|
8930
8916
|
currPos = _ref3.currPos;
|
|
@@ -8945,18 +8931,18 @@ var UserList = function UserList(_ref2) {
|
|
|
8945
8931
|
behavior: 'smooth'
|
|
8946
8932
|
});
|
|
8947
8933
|
};
|
|
8948
|
-
var _React$
|
|
8949
|
-
signup_page = _React$
|
|
8950
|
-
setSignUpPage = _React$
|
|
8934
|
+
var _React$useState10 = React.useState(1),
|
|
8935
|
+
signup_page = _React$useState10[0],
|
|
8936
|
+
setSignUpPage = _React$useState10[1];
|
|
8951
8937
|
var _useState21 = useState(5),
|
|
8952
8938
|
signup_rowsPerPage = _useState21[0],
|
|
8953
8939
|
setSignUpRowsPerPage = _useState21[1];
|
|
8954
|
-
var _React$
|
|
8955
|
-
signup_order = _React$
|
|
8956
|
-
setSignUpOrder = _React$
|
|
8957
|
-
var _React$
|
|
8958
|
-
signup_orderBy = _React$
|
|
8959
|
-
setSignUpOrderBy = _React$
|
|
8940
|
+
var _React$useState11 = React.useState('asc'),
|
|
8941
|
+
signup_order = _React$useState11[0],
|
|
8942
|
+
setSignUpOrder = _React$useState11[1];
|
|
8943
|
+
var _React$useState12 = React.useState('fname'),
|
|
8944
|
+
signup_orderBy = _React$useState12[0],
|
|
8945
|
+
setSignUpOrderBy = _React$useState12[1];
|
|
8960
8946
|
var _useState22 = useState(''),
|
|
8961
8947
|
signup_searchValue = _useState22[0],
|
|
8962
8948
|
set_signup_SearchValue = _useState22[1];
|
|
@@ -8988,31 +8974,14 @@ var UserList = function UserList(_ref2) {
|
|
|
8988
8974
|
var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
|
|
8989
8975
|
var _SelectedUsersApprover = [].concat(selectedUsersApprover);
|
|
8990
8976
|
var _selected = Object.values(selected).flat();
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
var tempArray1 = [];
|
|
8994
|
-
var tempArray2 = [];
|
|
8995
|
-
_SelectedUsersNotApprover.map(function (item) {
|
|
8996
|
-
if (temp1[item.id] !== item) {
|
|
8997
|
-
temp1[item.id] = item;
|
|
8998
|
-
}
|
|
8977
|
+
_SelectedUsersNotApprover = _SelectedUsersNotApprover.filter(function (item) {
|
|
8978
|
+
return _selected.includes(item.id.toString());
|
|
8999
8979
|
});
|
|
9000
|
-
_SelectedUsersApprover.
|
|
9001
|
-
|
|
9002
|
-
temp2[item.id] = item;
|
|
9003
|
-
}
|
|
8980
|
+
_SelectedUsersApprover = _SelectedUsersApprover.filter(function (item) {
|
|
8981
|
+
return _selected.includes(item.id.toString());
|
|
9004
8982
|
});
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
if (_selected[i] == temp1[_selected[i]].id) {
|
|
9008
|
-
tempArray1.push(temp1[_selected[i]]);
|
|
9009
|
-
}
|
|
9010
|
-
} else if (temp2[_selected[i]].id != undefined) {
|
|
9011
|
-
if (_selected[i] == temp2[_selected[i]].id) tempArray2.push(temp2[_selected[i]]);
|
|
9012
|
-
}
|
|
9013
|
-
}
|
|
9014
|
-
setSelectedUsersNotApprover(tempArray1);
|
|
9015
|
-
setSelectedUsersApprover(tempArray2);
|
|
8983
|
+
setSelectedUsersNotApprover(_SelectedUsersNotApprover);
|
|
8984
|
+
setSelectedUsersApprover(_SelectedUsersApprover);
|
|
9016
8985
|
setIsBulkDeactivateModalOpen(true);
|
|
9017
8986
|
} else {
|
|
9018
8987
|
setOpenDeActivateModalFlag(true);
|
|
@@ -9555,7 +9524,7 @@ var UserList = function UserList(_ref2) {
|
|
|
9555
9524
|
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
9556
9525
|
className: styles$5.tablewrapper
|
|
9557
9526
|
}, /*#__PURE__*/React.createElement(IUITabs, {
|
|
9558
|
-
value:
|
|
9527
|
+
value: tabValue,
|
|
9559
9528
|
customTabHandler: function customTabHandler(value) {
|
|
9560
9529
|
return dispatch(updateTabValue(value));
|
|
9561
9530
|
},
|
|
@@ -10470,12 +10439,20 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10470
10439
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
10471
10440
|
setDataList(validatedValue);
|
|
10472
10441
|
};
|
|
10442
|
+
var _useState17 = useState(70),
|
|
10443
|
+
maxLengthForModal = _useState17[0],
|
|
10444
|
+
setMaxLengthForModal = _useState17[1];
|
|
10445
|
+
useEffect(function () {
|
|
10446
|
+
if (title === 'Business unit') {
|
|
10447
|
+
setMaxLengthForModal(150);
|
|
10448
|
+
}
|
|
10449
|
+
}, []);
|
|
10473
10450
|
var validation = {
|
|
10474
10451
|
regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
|
|
10475
10452
|
regexOnBlur: null,
|
|
10476
10453
|
maxLimit: '',
|
|
10477
10454
|
minLimit: '',
|
|
10478
|
-
maxLength:
|
|
10455
|
+
maxLength: maxLengthForModal,
|
|
10479
10456
|
minLength: 0
|
|
10480
10457
|
};
|
|
10481
10458
|
useEffect(function () {
|