@itilite/iui-user-management 0.4.505 → 0.4.900
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 +4 -0
- package/dist/index.js +253 -160
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +253 -160
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -1118,6 +1118,24 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
|
+
if (payload.uploadedFiles && payload.uploadedFiles.length > 0) {
|
|
1122
|
+
res.fields.files = payload.uploadedFiles.filter(function (_file) {
|
|
1123
|
+
return !_file.isExistingFile;
|
|
1124
|
+
}).map(function (_file) {
|
|
1125
|
+
return {
|
|
1126
|
+
file_type: _file.file_type,
|
|
1127
|
+
file_path: _file.file_path,
|
|
1128
|
+
user_file_name: _file.user_file_name,
|
|
1129
|
+
upload: _file.upload
|
|
1130
|
+
};
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
if (payload.filesForDelete.length > 0) {
|
|
1134
|
+
res.fields.filesToDelete = payload.filesForDelete;
|
|
1135
|
+
}
|
|
1136
|
+
if (payload.profilePicDelete.length > 0) {
|
|
1137
|
+
res.fields.profilePicDelete = payload.profilePicDelete;
|
|
1138
|
+
}
|
|
1121
1139
|
}
|
|
1122
1140
|
return res;
|
|
1123
1141
|
};
|
|
@@ -3057,8 +3075,8 @@ var workInfo = [{
|
|
|
3057
3075
|
validation: {
|
|
3058
3076
|
regexOnChange: null,
|
|
3059
3077
|
regexOnBlur: [{
|
|
3060
|
-
regex: /^[(A-Z)(a-z)(0-9)
|
|
3061
|
-
message: "Only alphabets, numbers and - & are allowed."
|
|
3078
|
+
regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
|
|
3079
|
+
message: "Only alphabets, numbers, _ and - & are allowed."
|
|
3062
3080
|
}],
|
|
3063
3081
|
maxLimit: '',
|
|
3064
3082
|
minLimit: '',
|
|
@@ -3146,8 +3164,8 @@ var workInfo = [{
|
|
|
3146
3164
|
validation: {
|
|
3147
3165
|
regexOnChange: null,
|
|
3148
3166
|
regexOnBlur: [{
|
|
3149
|
-
regex: /^[A-Za-z0-9
|
|
3150
|
-
message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
|
|
3167
|
+
regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
|
|
3168
|
+
message: "Only alphabets, numbers & special characters . & ' ( ) - _ , / are allowed."
|
|
3151
3169
|
}, {
|
|
3152
3170
|
regex: /^[a-zA-Z]/,
|
|
3153
3171
|
message: 'Designation should start with alphabets'
|
|
@@ -4991,6 +5009,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4991
5009
|
},
|
|
4992
5010
|
designation: '',
|
|
4993
5011
|
base_location: '',
|
|
5012
|
+
manager_id: {
|
|
5013
|
+
value: '',
|
|
5014
|
+
label: 'Select Manager'
|
|
5015
|
+
},
|
|
5016
|
+
skip_manager_id: {
|
|
5017
|
+
value: '',
|
|
5018
|
+
label: 'Select Manager'
|
|
5019
|
+
},
|
|
4994
5020
|
currency: {
|
|
4995
5021
|
value: defaultCurrency,
|
|
4996
5022
|
label: defaultCurrency
|
|
@@ -5003,7 +5029,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5003
5029
|
entity: 0,
|
|
5004
5030
|
business_unit: 0,
|
|
5005
5031
|
department: 0,
|
|
5006
|
-
currency: 0
|
|
5032
|
+
currency: 0,
|
|
5033
|
+
manager_id: 0,
|
|
5034
|
+
skip_manager_id: 0
|
|
5007
5035
|
}),
|
|
5008
5036
|
cacheForAsyncDropdown = _useState4[0],
|
|
5009
5037
|
clearCacheForAsyncDropdown = _useState4[1];
|
|
@@ -5347,10 +5375,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5347
5375
|
_value = args._value,
|
|
5348
5376
|
_isError = args._isError,
|
|
5349
5377
|
_errorMsg = args._errorMsg;
|
|
5350
|
-
console.log(
|
|
5351
|
-
_name: _name,
|
|
5352
|
-
_value: _value
|
|
5353
|
-
});
|
|
5378
|
+
console.log(_name, _value);
|
|
5354
5379
|
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends8 = {}, _extends8[_name] = _value, _extends8)));
|
|
5355
5380
|
updateError(_name, _isError, _errorMsg);
|
|
5356
5381
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
@@ -5638,6 +5663,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5638
5663
|
value: '',
|
|
5639
5664
|
label: 'Select employee level'
|
|
5640
5665
|
},
|
|
5666
|
+
manager_id: res.employee_info.manager ? {
|
|
5667
|
+
value: res.employee_info.manager,
|
|
5668
|
+
label: res.employee_info.manager
|
|
5669
|
+
} : {
|
|
5670
|
+
value: '',
|
|
5671
|
+
label: 'Select Manager'
|
|
5672
|
+
},
|
|
5673
|
+
skip_manager_id: res.employee_info.skip_manager ? {
|
|
5674
|
+
value: res.employee_info.skip_manager,
|
|
5675
|
+
label: res.employee_info.skip_manager
|
|
5676
|
+
} : {
|
|
5677
|
+
value: '',
|
|
5678
|
+
label: 'Select Manager'
|
|
5679
|
+
},
|
|
5641
5680
|
employee_id: res.employee_info.employee_id || '',
|
|
5642
5681
|
entity: res.employee_info.entity ? {
|
|
5643
5682
|
value: res.employee_info.entity.id,
|
|
@@ -5812,6 +5851,24 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5812
5851
|
return _extends({}, prevState, expenseApprovers);
|
|
5813
5852
|
});
|
|
5814
5853
|
}
|
|
5854
|
+
var _uploadedDocs2 = [];
|
|
5855
|
+
res.files.forEach(function (_file) {
|
|
5856
|
+
_uploadedDocs2.push({
|
|
5857
|
+
user_file_name: _file.user_file_name,
|
|
5858
|
+
id: _file.id,
|
|
5859
|
+
isExistingFile: true,
|
|
5860
|
+
file_type: _file.file_type
|
|
5861
|
+
});
|
|
5862
|
+
});
|
|
5863
|
+
if (res && res.profile_pic) {
|
|
5864
|
+
_uploadedDocs2.push({
|
|
5865
|
+
user_file_name: res.profile_pic.user_file_name,
|
|
5866
|
+
id: res.profile_pic.id,
|
|
5867
|
+
isExistingFile: true,
|
|
5868
|
+
file_type: res.profile_pic.file_type
|
|
5869
|
+
});
|
|
5870
|
+
}
|
|
5871
|
+
setUploadedFiles(_uploadedDocs2);
|
|
5815
5872
|
}
|
|
5816
5873
|
})["catch"](function () {})["finally"](function () {
|
|
5817
5874
|
dispatch(stopLoader());
|
|
@@ -5903,6 +5960,13 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5903
5960
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5904
5961
|
return Promise.resolve();
|
|
5905
5962
|
}
|
|
5963
|
+
console.log(employeeInfoInput, "data");
|
|
5964
|
+
if (employeeInfoInput.manager_id.value !== '') {
|
|
5965
|
+
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5966
|
+
}
|
|
5967
|
+
if (employeeInfoInput.skip_manager_id.value !== '') {
|
|
5968
|
+
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
5969
|
+
}
|
|
5906
5970
|
var payload = {
|
|
5907
5971
|
personalInfoInput: personalInfoInput,
|
|
5908
5972
|
employeeInfoInput: employeeInfoInput,
|
|
@@ -6048,12 +6112,12 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6048
6112
|
setErrorArray(_errorArray);
|
|
6049
6113
|
setErrorMsgs(_errorMsgs);
|
|
6050
6114
|
var _loop = function _loop() {
|
|
6051
|
-
if (Object.hasOwnProperty.call(_errorMsgs,
|
|
6052
|
-
if (_errorMsgs[
|
|
6053
|
-
if (
|
|
6115
|
+
if (Object.hasOwnProperty.call(_errorMsgs, _key3)) {
|
|
6116
|
+
if (_errorMsgs[_key3]) {
|
|
6117
|
+
if (_key3 in passportInfoInput || _key3 in travelPreferenceInfo || _key3 in secureTravelInputInfo) {
|
|
6054
6118
|
setAdditionalInfoFlag('open');
|
|
6055
6119
|
}
|
|
6056
|
-
var el = document.getElementById(
|
|
6120
|
+
var el = document.getElementById(_key3 === 'country_code' || _key3 === 'contact_country_code' ? 'contact_number' : _key3);
|
|
6057
6121
|
if (el) {
|
|
6058
6122
|
setTimeout(function () {
|
|
6059
6123
|
el.scrollIntoView({
|
|
@@ -6070,115 +6134,116 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6070
6134
|
var _ret = _loop();
|
|
6071
6135
|
if (_ret === "break") break;
|
|
6072
6136
|
}
|
|
6073
|
-
return Promise.resolve();
|
|
6074
6137
|
}
|
|
6075
|
-
if (
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
setFilesForDelete([]);
|
|
6086
|
-
setProfilePicDelete([]);
|
|
6087
|
-
})["catch"](function (err) {
|
|
6088
|
-
if (typeof err === 'object') {
|
|
6089
|
-
if (err.country_code) {
|
|
6090
|
-
err.contact_number = err.country_code;
|
|
6091
|
-
}
|
|
6092
|
-
if (err.contact_country_code) {
|
|
6093
|
-
err.contact_number = err.contact_country_code;
|
|
6094
|
-
}
|
|
6095
|
-
if (err.passport) {
|
|
6096
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6097
|
-
delete err.passport;
|
|
6138
|
+
if (!_isError) {
|
|
6139
|
+
if (isEditMode && editUserId || isProfile) {
|
|
6140
|
+
dispatch(showLoader());
|
|
6141
|
+
dispatch(updateUser(payload, isProfile ? id : editUserId, inputChangeLog)).then(function (res) {
|
|
6142
|
+
if (isProfile) {
|
|
6143
|
+
var _config$routes, _config$routes$profil, _config$routes$profil2;
|
|
6144
|
+
(config === null || config === void 0 ? void 0 : (_config$routes = config.routes) === null || _config$routes === void 0 ? void 0 : (_config$routes$profil = _config$routes.profile) === null || _config$routes$profil === void 0 ? void 0 : (_config$routes$profil2 = _config$routes$profil.redirectUrl) === null || _config$routes$profil2 === void 0 ? void 0 : _config$routes$profil2.submit) && history.push(config.routes.profile.redirectUrl.submit);
|
|
6145
|
+
} else {
|
|
6146
|
+
var _config$routes2, _config$routes2$users, _config$routes2$users2;
|
|
6147
|
+
(config === null || config === void 0 ? void 0 : (_config$routes2 = config.routes) === null || _config$routes2 === void 0 ? void 0 : (_config$routes2$users = _config$routes2.users) === null || _config$routes2$users === void 0 ? void 0 : (_config$routes2$users2 = _config$routes2$users.list) === null || _config$routes2$users2 === void 0 ? void 0 : _config$routes2$users2.path) && history.push(config.routes.users.list.path);
|
|
6098
6148
|
}
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6149
|
+
setFilesForDelete([]);
|
|
6150
|
+
setProfilePicDelete([]);
|
|
6151
|
+
})["catch"](function (err) {
|
|
6152
|
+
if (typeof err === 'object') {
|
|
6153
|
+
if (err.country_code) {
|
|
6154
|
+
err.contact_number = err.country_code;
|
|
6155
|
+
}
|
|
6156
|
+
if (err.contact_country_code) {
|
|
6157
|
+
err.contact_number = err.contact_country_code;
|
|
6158
|
+
}
|
|
6159
|
+
if (err.passport) {
|
|
6160
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6161
|
+
delete err.passport;
|
|
6162
|
+
}
|
|
6163
|
+
setErrorArray(Object.keys(err));
|
|
6164
|
+
setErrorMsgs(err);
|
|
6165
|
+
var _loop2 = function _loop2() {
|
|
6166
|
+
if (Object.hasOwnProperty.call(err, _key4)) {
|
|
6167
|
+
if (err[_key4]) {
|
|
6168
|
+
if (_key4 in passportInfoInput || _key4 in travelPreferenceInfo || _key4 in secureTravelInputInfo) {
|
|
6169
|
+
setAdditionalInfoFlag('open');
|
|
6170
|
+
}
|
|
6171
|
+
var el = document.getElementById(_key4 === 'country_code' || _key4 === 'contact_country_code' ? 'contact_number' : _key4);
|
|
6172
|
+
if (el) {
|
|
6173
|
+
setTimeout(function () {
|
|
6174
|
+
el.scrollIntoView({
|
|
6175
|
+
behavior: 'smooth',
|
|
6176
|
+
block: 'center'
|
|
6177
|
+
});
|
|
6178
|
+
}, 500);
|
|
6179
|
+
return "break";
|
|
6180
|
+
}
|
|
6116
6181
|
}
|
|
6117
6182
|
}
|
|
6183
|
+
};
|
|
6184
|
+
for (var _key4 in err) {
|
|
6185
|
+
var _ret2 = _loop2();
|
|
6186
|
+
if (_ret2 === "break") break;
|
|
6118
6187
|
}
|
|
6119
|
-
}
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
}
|
|
6124
|
-
} else if (typeof err === 'string') {
|
|
6125
|
-
IUIToastMessageService$4.warningNotify(err);
|
|
6126
|
-
} else {
|
|
6127
|
-
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6128
|
-
}
|
|
6129
|
-
})["finally"](function () {
|
|
6130
|
-
dispatch(stopLoader());
|
|
6131
|
-
});
|
|
6132
|
-
} else {
|
|
6133
|
-
dispatch(showLoader());
|
|
6134
|
-
dispatch(createUser(payload)).then(function (res) {
|
|
6135
|
-
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6136
|
-
(config === null || config === void 0 ? void 0 : (_config$routes3 = config.routes) === null || _config$routes3 === void 0 ? void 0 : (_config$routes3$users = _config$routes3.users) === null || _config$routes3$users === void 0 ? void 0 : (_config$routes3$users2 = _config$routes3$users.list) === null || _config$routes3$users2 === void 0 ? void 0 : _config$routes3$users2.path) && history.push(config.routes.users.list.path);
|
|
6137
|
-
})["catch"](function (err) {
|
|
6138
|
-
if (typeof err === 'object') {
|
|
6139
|
-
if (err.country_code) {
|
|
6140
|
-
err.contact_number = err.country_code;
|
|
6141
|
-
}
|
|
6142
|
-
if (err.contact_country_code) {
|
|
6143
|
-
err.contact_number = err.contact_country_code;
|
|
6144
|
-
}
|
|
6145
|
-
if (err.passport) {
|
|
6146
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6147
|
-
delete err.passport;
|
|
6188
|
+
} else if (typeof err === 'string') {
|
|
6189
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6190
|
+
} else {
|
|
6191
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6148
6192
|
}
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6193
|
+
})["finally"](function () {
|
|
6194
|
+
dispatch(stopLoader());
|
|
6195
|
+
});
|
|
6196
|
+
} else {
|
|
6197
|
+
dispatch(showLoader());
|
|
6198
|
+
dispatch(createUser(payload)).then(function (res) {
|
|
6199
|
+
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6200
|
+
(config === null || config === void 0 ? void 0 : (_config$routes3 = config.routes) === null || _config$routes3 === void 0 ? void 0 : (_config$routes3$users = _config$routes3.users) === null || _config$routes3$users === void 0 ? void 0 : (_config$routes3$users2 = _config$routes3$users.list) === null || _config$routes3$users2 === void 0 ? void 0 : _config$routes3$users2.path) && history.push(config.routes.users.list.path);
|
|
6201
|
+
})["catch"](function (err) {
|
|
6202
|
+
if (typeof err === 'object') {
|
|
6203
|
+
if (err.country_code) {
|
|
6204
|
+
err.contact_number = err.country_code;
|
|
6205
|
+
}
|
|
6206
|
+
if (err.contact_country_code) {
|
|
6207
|
+
err.contact_number = err.contact_country_code;
|
|
6208
|
+
}
|
|
6209
|
+
if (err.passport) {
|
|
6210
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6211
|
+
delete err.passport;
|
|
6212
|
+
}
|
|
6213
|
+
setErrorArray(Object.keys(err));
|
|
6214
|
+
setErrorMsgs(err);
|
|
6215
|
+
var _loop3 = function _loop3() {
|
|
6216
|
+
if (Object.hasOwnProperty.call(err, _key5)) {
|
|
6217
|
+
if (err[_key5]) {
|
|
6218
|
+
if (_key5 in passportInfoInput || _key5 in travelPreferenceInfo || _key5 in secureTravelInputInfo) {
|
|
6219
|
+
setAdditionalInfoFlag('open');
|
|
6220
|
+
}
|
|
6221
|
+
var el = document.getElementById(_key5 === 'country_code' || _key5 === 'contact_country_code' ? 'contact_number' : _key5);
|
|
6222
|
+
if (el) {
|
|
6223
|
+
setTimeout(function () {
|
|
6224
|
+
el.scrollIntoView({
|
|
6225
|
+
behavior: 'smooth',
|
|
6226
|
+
block: 'center'
|
|
6227
|
+
});
|
|
6228
|
+
}, 500);
|
|
6229
|
+
return "break";
|
|
6230
|
+
}
|
|
6166
6231
|
}
|
|
6167
6232
|
}
|
|
6233
|
+
};
|
|
6234
|
+
for (var _key5 in err) {
|
|
6235
|
+
var _ret3 = _loop3();
|
|
6236
|
+
if (_ret3 === "break") break;
|
|
6168
6237
|
}
|
|
6169
|
-
}
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6238
|
+
} else if (typeof err === 'string') {
|
|
6239
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6240
|
+
} else {
|
|
6241
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6173
6242
|
}
|
|
6174
|
-
}
|
|
6175
|
-
|
|
6176
|
-
}
|
|
6177
|
-
|
|
6178
|
-
}
|
|
6179
|
-
})["finally"](function () {
|
|
6180
|
-
dispatch(stopLoader());
|
|
6181
|
-
});
|
|
6243
|
+
})["finally"](function () {
|
|
6244
|
+
dispatch(stopLoader());
|
|
6245
|
+
});
|
|
6246
|
+
}
|
|
6182
6247
|
}
|
|
6183
6248
|
return Promise.resolve();
|
|
6184
6249
|
} catch (e) {
|
|
@@ -6389,9 +6454,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6389
6454
|
if (!p.visibility) {
|
|
6390
6455
|
return null;
|
|
6391
6456
|
}
|
|
6392
|
-
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6393
|
-
return null;
|
|
6394
|
-
}
|
|
6395
6457
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
|
|
6396
6458
|
item: true,
|
|
6397
6459
|
sm: 12,
|
|
@@ -8517,6 +8579,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8517
8579
|
endIcon: null,
|
|
8518
8580
|
outlinedBtn: false,
|
|
8519
8581
|
className: "threedotMenuBtn",
|
|
8582
|
+
MoreHorizIcon: true,
|
|
8520
8583
|
placement: "bottom-end"
|
|
8521
8584
|
}));
|
|
8522
8585
|
},
|
|
@@ -8744,8 +8807,10 @@ var UndoButton = function UndoButton(_ref) {
|
|
|
8744
8807
|
};
|
|
8745
8808
|
var UserList = function UserList(_ref2) {
|
|
8746
8809
|
var config = _ref2.config,
|
|
8747
|
-
isProfile = _ref2.isProfile
|
|
8748
|
-
|
|
8810
|
+
isProfile = _ref2.isProfile,
|
|
8811
|
+
_ref2$tabVal = _ref2.tabVal,
|
|
8812
|
+
tabVal = _ref2$tabVal === void 0 ? 'current' : _ref2$tabVal;
|
|
8813
|
+
env$7.init(config, isProfile, tabVal);
|
|
8749
8814
|
var history = reactRouterDom.useHistory();
|
|
8750
8815
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
8751
8816
|
return state.userList;
|
|
@@ -8755,15 +8820,18 @@ var UserList = function UserList(_ref2) {
|
|
|
8755
8820
|
deactivatedUsers = _useSelector.deactivatedUsers,
|
|
8756
8821
|
tabValue = _useSelector.tabValue;
|
|
8757
8822
|
var newSelecteds = userListInfo.results;
|
|
8758
|
-
var _React$useState = React__default.useState(
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
var _React$useState2 = React__default.useState(
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
var _React$useState3 = React__default.useState(
|
|
8765
|
-
|
|
8766
|
-
|
|
8823
|
+
var _React$useState = React__default.useState(0),
|
|
8824
|
+
activeTab = _React$useState[0],
|
|
8825
|
+
setActiveTab = _React$useState[1];
|
|
8826
|
+
var _React$useState2 = React__default.useState(''),
|
|
8827
|
+
deactivateUser = _React$useState2[0],
|
|
8828
|
+
setDeactivateUser = _React$useState2[1];
|
|
8829
|
+
var _React$useState3 = React__default.useState(null),
|
|
8830
|
+
defaultId = _React$useState3[0],
|
|
8831
|
+
setDefaultId = _React$useState3[1];
|
|
8832
|
+
var _React$useState4 = React__default.useState(1),
|
|
8833
|
+
page = _React$useState4[0],
|
|
8834
|
+
setPage = _React$useState4[1];
|
|
8767
8835
|
var _useState = React.useState([]),
|
|
8768
8836
|
selectedUsersNotApprover = _useState[0],
|
|
8769
8837
|
setSelectedUsersNotApprover = _useState[1];
|
|
@@ -8773,24 +8841,24 @@ var UserList = function UserList(_ref2) {
|
|
|
8773
8841
|
var _useState3 = React.useState(false),
|
|
8774
8842
|
isBulkDeactivateModalOpen = _useState3[0],
|
|
8775
8843
|
setIsBulkDeactivateModalOpen = _useState3[1];
|
|
8776
|
-
var _React$
|
|
8777
|
-
user = _React$
|
|
8778
|
-
setUser = _React$
|
|
8844
|
+
var _React$useState5 = React__default.useState(''),
|
|
8845
|
+
user = _React$useState5[0],
|
|
8846
|
+
setUser = _React$useState5[1];
|
|
8779
8847
|
var _useState4 = React.useState(10),
|
|
8780
8848
|
rowsPerPage = _useState4[0],
|
|
8781
8849
|
setRowsPerPage = _useState4[1];
|
|
8782
|
-
var _React$
|
|
8783
|
-
selected = _React$
|
|
8784
|
-
setSelected = _React$
|
|
8785
|
-
var _React$
|
|
8786
|
-
order = _React$
|
|
8787
|
-
setOrder = _React$
|
|
8788
|
-
var _React$
|
|
8789
|
-
deactivateSingle = _React$
|
|
8790
|
-
setDeactivateSingle = _React$
|
|
8791
|
-
var _React$
|
|
8792
|
-
orderBy = _React$
|
|
8793
|
-
setOrderBy = _React$
|
|
8850
|
+
var _React$useState6 = React__default.useState({}),
|
|
8851
|
+
selected = _React$useState6[0],
|
|
8852
|
+
setSelected = _React$useState6[1];
|
|
8853
|
+
var _React$useState7 = React__default.useState('asc'),
|
|
8854
|
+
order = _React$useState7[0],
|
|
8855
|
+
setOrder = _React$useState7[1];
|
|
8856
|
+
var _React$useState8 = React__default.useState(false),
|
|
8857
|
+
deactivateSingle = _React$useState8[0],
|
|
8858
|
+
setDeactivateSingle = _React$useState8[1];
|
|
8859
|
+
var _React$useState9 = React__default.useState('first_name'),
|
|
8860
|
+
orderBy = _React$useState9[0],
|
|
8861
|
+
setOrderBy = _React$useState9[1];
|
|
8794
8862
|
var _useState5 = React.useState(''),
|
|
8795
8863
|
searchValue = _useState5[0],
|
|
8796
8864
|
setSearchValue = _useState5[1];
|
|
@@ -8840,9 +8908,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8840
8908
|
var _useState17 = React.useState(''),
|
|
8841
8909
|
userIds = _useState17[0],
|
|
8842
8910
|
setUserIds = _useState17[1];
|
|
8843
|
-
var _React$
|
|
8844
|
-
overlayMenu = _React$
|
|
8845
|
-
setOverlayMenu = _React$
|
|
8911
|
+
var _React$useState10 = React__default.useState(false),
|
|
8912
|
+
overlayMenu = _React$useState10[0],
|
|
8913
|
+
setOverlayMenu = _React$useState10[1];
|
|
8846
8914
|
var _useState18 = React.useState(''),
|
|
8847
8915
|
userFirstName = _useState18[0],
|
|
8848
8916
|
setUserFirstName = _useState18[1];
|
|
@@ -8852,6 +8920,14 @@ var UserList = function UserList(_ref2) {
|
|
|
8852
8920
|
var _useState20 = React.useState(true),
|
|
8853
8921
|
isDisabledSubmitBtn = _useState20[0],
|
|
8854
8922
|
setIsDisabledSubmitBtn = _useState20[1];
|
|
8923
|
+
React.useEffect(function () {
|
|
8924
|
+
setActiveTab(tabValue);
|
|
8925
|
+
}, [tabValue]);
|
|
8926
|
+
React.useEffect(function () {
|
|
8927
|
+
if (tabVal === 'sign-up') {
|
|
8928
|
+
dispatch(updateTabValue(1));
|
|
8929
|
+
}
|
|
8930
|
+
}, []);
|
|
8855
8931
|
useScrollPosition.useScrollPosition(function (_ref3) {
|
|
8856
8932
|
var prevPos = _ref3.prevPos,
|
|
8857
8933
|
currPos = _ref3.currPos;
|
|
@@ -8872,18 +8948,18 @@ var UserList = function UserList(_ref2) {
|
|
|
8872
8948
|
behavior: 'smooth'
|
|
8873
8949
|
});
|
|
8874
8950
|
};
|
|
8875
|
-
var _React$
|
|
8876
|
-
signup_page = _React$
|
|
8877
|
-
setSignUpPage = _React$
|
|
8951
|
+
var _React$useState11 = React__default.useState(1),
|
|
8952
|
+
signup_page = _React$useState11[0],
|
|
8953
|
+
setSignUpPage = _React$useState11[1];
|
|
8878
8954
|
var _useState21 = React.useState(5),
|
|
8879
8955
|
signup_rowsPerPage = _useState21[0],
|
|
8880
8956
|
setSignUpRowsPerPage = _useState21[1];
|
|
8881
|
-
var _React$
|
|
8882
|
-
signup_order = _React$
|
|
8883
|
-
setSignUpOrder = _React$
|
|
8884
|
-
var _React$
|
|
8885
|
-
signup_orderBy = _React$
|
|
8886
|
-
setSignUpOrderBy = _React$
|
|
8957
|
+
var _React$useState12 = React__default.useState('asc'),
|
|
8958
|
+
signup_order = _React$useState12[0],
|
|
8959
|
+
setSignUpOrder = _React$useState12[1];
|
|
8960
|
+
var _React$useState13 = React__default.useState('fname'),
|
|
8961
|
+
signup_orderBy = _React$useState13[0],
|
|
8962
|
+
setSignUpOrderBy = _React$useState13[1];
|
|
8887
8963
|
var _useState22 = React.useState(''),
|
|
8888
8964
|
signup_searchValue = _useState22[0],
|
|
8889
8965
|
set_signup_SearchValue = _useState22[1];
|
|
@@ -8915,14 +8991,31 @@ var UserList = function UserList(_ref2) {
|
|
|
8915
8991
|
var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
|
|
8916
8992
|
var _SelectedUsersApprover = [].concat(selectedUsersApprover);
|
|
8917
8993
|
var _selected = Object.values(selected).flat();
|
|
8918
|
-
|
|
8919
|
-
|
|
8994
|
+
var temp1 = {};
|
|
8995
|
+
var temp2 = {};
|
|
8996
|
+
var tempArray1 = [];
|
|
8997
|
+
var tempArray2 = [];
|
|
8998
|
+
_SelectedUsersNotApprover.map(function (item) {
|
|
8999
|
+
if (temp1[item.id] !== item) {
|
|
9000
|
+
temp1[item.id] = item;
|
|
9001
|
+
}
|
|
8920
9002
|
});
|
|
8921
|
-
_SelectedUsersApprover
|
|
8922
|
-
|
|
9003
|
+
_SelectedUsersApprover.map(function (item) {
|
|
9004
|
+
if (temp2[item.id] !== item) {
|
|
9005
|
+
temp2[item.id] = item;
|
|
9006
|
+
}
|
|
8923
9007
|
});
|
|
8924
|
-
|
|
8925
|
-
|
|
9008
|
+
for (var i = 0; i < _selected.length; i++) {
|
|
9009
|
+
if (temp1[_selected[i]] != undefined) {
|
|
9010
|
+
if (_selected[i] == temp1[_selected[i]].id) {
|
|
9011
|
+
tempArray1.push(temp1[_selected[i]]);
|
|
9012
|
+
}
|
|
9013
|
+
} else if (temp2[_selected[i]].id != undefined) {
|
|
9014
|
+
if (_selected[i] == temp2[_selected[i]].id) tempArray2.push(temp2[_selected[i]]);
|
|
9015
|
+
}
|
|
9016
|
+
}
|
|
9017
|
+
setSelectedUsersNotApprover(tempArray1);
|
|
9018
|
+
setSelectedUsersApprover(tempArray2);
|
|
8926
9019
|
setIsBulkDeactivateModalOpen(true);
|
|
8927
9020
|
} else {
|
|
8928
9021
|
setOpenDeActivateModalFlag(true);
|
|
@@ -9465,7 +9558,7 @@ var UserList = function UserList(_ref2) {
|
|
|
9465
9558
|
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9466
9559
|
className: styles$5.tablewrapper
|
|
9467
9560
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITabs, {
|
|
9468
|
-
value:
|
|
9561
|
+
value: activeTab,
|
|
9469
9562
|
customTabHandler: function customTabHandler(value) {
|
|
9470
9563
|
return dispatch(updateTabValue(value));
|
|
9471
9564
|
},
|