@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.modern.js
CHANGED
|
@@ -1115,6 +1115,24 @@ 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
|
+
}
|
|
1118
1136
|
}
|
|
1119
1137
|
return res;
|
|
1120
1138
|
};
|
|
@@ -3054,8 +3072,8 @@ var workInfo = [{
|
|
|
3054
3072
|
validation: {
|
|
3055
3073
|
regexOnChange: null,
|
|
3056
3074
|
regexOnBlur: [{
|
|
3057
|
-
regex: /^[(A-Z)(a-z)(0-9)
|
|
3058
|
-
message: "Only alphabets, numbers and - & are allowed."
|
|
3075
|
+
regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
|
|
3076
|
+
message: "Only alphabets, numbers, _ and - & are allowed."
|
|
3059
3077
|
}],
|
|
3060
3078
|
maxLimit: '',
|
|
3061
3079
|
minLimit: '',
|
|
@@ -3143,8 +3161,8 @@ var workInfo = [{
|
|
|
3143
3161
|
validation: {
|
|
3144
3162
|
regexOnChange: null,
|
|
3145
3163
|
regexOnBlur: [{
|
|
3146
|
-
regex: /^[A-Za-z0-9
|
|
3147
|
-
message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
|
|
3164
|
+
regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
|
|
3165
|
+
message: "Only alphabets, numbers & special characters . & ' ( ) - _ , / are allowed."
|
|
3148
3166
|
}, {
|
|
3149
3167
|
regex: /^[a-zA-Z]/,
|
|
3150
3168
|
message: 'Designation should start with alphabets'
|
|
@@ -4988,6 +5006,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4988
5006
|
},
|
|
4989
5007
|
designation: '',
|
|
4990
5008
|
base_location: '',
|
|
5009
|
+
manager_id: {
|
|
5010
|
+
value: '',
|
|
5011
|
+
label: 'Select Manager'
|
|
5012
|
+
},
|
|
5013
|
+
skip_manager_id: {
|
|
5014
|
+
value: '',
|
|
5015
|
+
label: 'Select Manager'
|
|
5016
|
+
},
|
|
4991
5017
|
currency: {
|
|
4992
5018
|
value: defaultCurrency,
|
|
4993
5019
|
label: defaultCurrency
|
|
@@ -5000,7 +5026,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5000
5026
|
entity: 0,
|
|
5001
5027
|
business_unit: 0,
|
|
5002
5028
|
department: 0,
|
|
5003
|
-
currency: 0
|
|
5029
|
+
currency: 0,
|
|
5030
|
+
manager_id: 0,
|
|
5031
|
+
skip_manager_id: 0
|
|
5004
5032
|
}),
|
|
5005
5033
|
cacheForAsyncDropdown = _useState4[0],
|
|
5006
5034
|
clearCacheForAsyncDropdown = _useState4[1];
|
|
@@ -5344,10 +5372,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5344
5372
|
_value = args._value,
|
|
5345
5373
|
_isError = args._isError,
|
|
5346
5374
|
_errorMsg = args._errorMsg;
|
|
5347
|
-
console.log(
|
|
5348
|
-
_name: _name,
|
|
5349
|
-
_value: _value
|
|
5350
|
-
});
|
|
5375
|
+
console.log(_name, _value);
|
|
5351
5376
|
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends8 = {}, _extends8[_name] = _value, _extends8)));
|
|
5352
5377
|
updateError(_name, _isError, _errorMsg);
|
|
5353
5378
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
@@ -5635,6 +5660,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5635
5660
|
value: '',
|
|
5636
5661
|
label: 'Select employee level'
|
|
5637
5662
|
},
|
|
5663
|
+
manager_id: res.employee_info.manager ? {
|
|
5664
|
+
value: res.employee_info.manager,
|
|
5665
|
+
label: res.employee_info.manager
|
|
5666
|
+
} : {
|
|
5667
|
+
value: '',
|
|
5668
|
+
label: 'Select Manager'
|
|
5669
|
+
},
|
|
5670
|
+
skip_manager_id: res.employee_info.skip_manager ? {
|
|
5671
|
+
value: res.employee_info.skip_manager,
|
|
5672
|
+
label: res.employee_info.skip_manager
|
|
5673
|
+
} : {
|
|
5674
|
+
value: '',
|
|
5675
|
+
label: 'Select Manager'
|
|
5676
|
+
},
|
|
5638
5677
|
employee_id: res.employee_info.employee_id || '',
|
|
5639
5678
|
entity: res.employee_info.entity ? {
|
|
5640
5679
|
value: res.employee_info.entity.id,
|
|
@@ -5809,6 +5848,24 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5809
5848
|
return _extends({}, prevState, expenseApprovers);
|
|
5810
5849
|
});
|
|
5811
5850
|
}
|
|
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);
|
|
5812
5869
|
}
|
|
5813
5870
|
})["catch"](function () {})["finally"](function () {
|
|
5814
5871
|
dispatch(stopLoader());
|
|
@@ -5900,6 +5957,13 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5900
5957
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5901
5958
|
return Promise.resolve();
|
|
5902
5959
|
}
|
|
5960
|
+
console.log(employeeInfoInput, "data");
|
|
5961
|
+
if (employeeInfoInput.manager_id.value !== '') {
|
|
5962
|
+
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5963
|
+
}
|
|
5964
|
+
if (employeeInfoInput.skip_manager_id.value !== '') {
|
|
5965
|
+
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
5966
|
+
}
|
|
5903
5967
|
var payload = {
|
|
5904
5968
|
personalInfoInput: personalInfoInput,
|
|
5905
5969
|
employeeInfoInput: employeeInfoInput,
|
|
@@ -6045,12 +6109,12 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6045
6109
|
setErrorArray(_errorArray);
|
|
6046
6110
|
setErrorMsgs(_errorMsgs);
|
|
6047
6111
|
var _loop = function _loop() {
|
|
6048
|
-
if (Object.hasOwnProperty.call(_errorMsgs,
|
|
6049
|
-
if (_errorMsgs[
|
|
6050
|
-
if (
|
|
6112
|
+
if (Object.hasOwnProperty.call(_errorMsgs, _key3)) {
|
|
6113
|
+
if (_errorMsgs[_key3]) {
|
|
6114
|
+
if (_key3 in passportInfoInput || _key3 in travelPreferenceInfo || _key3 in secureTravelInputInfo) {
|
|
6051
6115
|
setAdditionalInfoFlag('open');
|
|
6052
6116
|
}
|
|
6053
|
-
var el = document.getElementById(
|
|
6117
|
+
var el = document.getElementById(_key3 === 'country_code' || _key3 === 'contact_country_code' ? 'contact_number' : _key3);
|
|
6054
6118
|
if (el) {
|
|
6055
6119
|
setTimeout(function () {
|
|
6056
6120
|
el.scrollIntoView({
|
|
@@ -6067,115 +6131,116 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6067
6131
|
var _ret = _loop();
|
|
6068
6132
|
if (_ret === "break") break;
|
|
6069
6133
|
}
|
|
6070
|
-
return Promise.resolve();
|
|
6071
6134
|
}
|
|
6072
|
-
if (
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
setFilesForDelete([]);
|
|
6083
|
-
setProfilePicDelete([]);
|
|
6084
|
-
})["catch"](function (err) {
|
|
6085
|
-
if (typeof err === 'object') {
|
|
6086
|
-
if (err.country_code) {
|
|
6087
|
-
err.contact_number = err.country_code;
|
|
6088
|
-
}
|
|
6089
|
-
if (err.contact_country_code) {
|
|
6090
|
-
err.contact_number = err.contact_country_code;
|
|
6091
|
-
}
|
|
6092
|
-
if (err.passport) {
|
|
6093
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6094
|
-
delete err.passport;
|
|
6135
|
+
if (!_isError) {
|
|
6136
|
+
if (isEditMode && editUserId || isProfile) {
|
|
6137
|
+
dispatch(showLoader());
|
|
6138
|
+
dispatch(updateUser(payload, isProfile ? id : editUserId, inputChangeLog)).then(function (res) {
|
|
6139
|
+
if (isProfile) {
|
|
6140
|
+
var _config$routes, _config$routes$profil, _config$routes$profil2;
|
|
6141
|
+
(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);
|
|
6142
|
+
} else {
|
|
6143
|
+
var _config$routes2, _config$routes2$users, _config$routes2$users2;
|
|
6144
|
+
(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);
|
|
6095
6145
|
}
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6146
|
+
setFilesForDelete([]);
|
|
6147
|
+
setProfilePicDelete([]);
|
|
6148
|
+
})["catch"](function (err) {
|
|
6149
|
+
if (typeof err === 'object') {
|
|
6150
|
+
if (err.country_code) {
|
|
6151
|
+
err.contact_number = err.country_code;
|
|
6152
|
+
}
|
|
6153
|
+
if (err.contact_country_code) {
|
|
6154
|
+
err.contact_number = err.contact_country_code;
|
|
6155
|
+
}
|
|
6156
|
+
if (err.passport) {
|
|
6157
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6158
|
+
delete err.passport;
|
|
6159
|
+
}
|
|
6160
|
+
setErrorArray(Object.keys(err));
|
|
6161
|
+
setErrorMsgs(err);
|
|
6162
|
+
var _loop2 = function _loop2() {
|
|
6163
|
+
if (Object.hasOwnProperty.call(err, _key4)) {
|
|
6164
|
+
if (err[_key4]) {
|
|
6165
|
+
if (_key4 in passportInfoInput || _key4 in travelPreferenceInfo || _key4 in secureTravelInputInfo) {
|
|
6166
|
+
setAdditionalInfoFlag('open');
|
|
6167
|
+
}
|
|
6168
|
+
var el = document.getElementById(_key4 === 'country_code' || _key4 === 'contact_country_code' ? 'contact_number' : _key4);
|
|
6169
|
+
if (el) {
|
|
6170
|
+
setTimeout(function () {
|
|
6171
|
+
el.scrollIntoView({
|
|
6172
|
+
behavior: 'smooth',
|
|
6173
|
+
block: 'center'
|
|
6174
|
+
});
|
|
6175
|
+
}, 500);
|
|
6176
|
+
return "break";
|
|
6177
|
+
}
|
|
6113
6178
|
}
|
|
6114
6179
|
}
|
|
6180
|
+
};
|
|
6181
|
+
for (var _key4 in err) {
|
|
6182
|
+
var _ret2 = _loop2();
|
|
6183
|
+
if (_ret2 === "break") break;
|
|
6115
6184
|
}
|
|
6116
|
-
}
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
}
|
|
6121
|
-
} else if (typeof err === 'string') {
|
|
6122
|
-
IUIToastMessageService$4.warningNotify(err);
|
|
6123
|
-
} else {
|
|
6124
|
-
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6125
|
-
}
|
|
6126
|
-
})["finally"](function () {
|
|
6127
|
-
dispatch(stopLoader());
|
|
6128
|
-
});
|
|
6129
|
-
} else {
|
|
6130
|
-
dispatch(showLoader());
|
|
6131
|
-
dispatch(createUser(payload)).then(function (res) {
|
|
6132
|
-
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6133
|
-
(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);
|
|
6134
|
-
})["catch"](function (err) {
|
|
6135
|
-
if (typeof err === 'object') {
|
|
6136
|
-
if (err.country_code) {
|
|
6137
|
-
err.contact_number = err.country_code;
|
|
6138
|
-
}
|
|
6139
|
-
if (err.contact_country_code) {
|
|
6140
|
-
err.contact_number = err.contact_country_code;
|
|
6141
|
-
}
|
|
6142
|
-
if (err.passport) {
|
|
6143
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6144
|
-
delete err.passport;
|
|
6185
|
+
} else if (typeof err === 'string') {
|
|
6186
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6187
|
+
} else {
|
|
6188
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6145
6189
|
}
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6190
|
+
})["finally"](function () {
|
|
6191
|
+
dispatch(stopLoader());
|
|
6192
|
+
});
|
|
6193
|
+
} else {
|
|
6194
|
+
dispatch(showLoader());
|
|
6195
|
+
dispatch(createUser(payload)).then(function (res) {
|
|
6196
|
+
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6197
|
+
(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);
|
|
6198
|
+
})["catch"](function (err) {
|
|
6199
|
+
if (typeof err === 'object') {
|
|
6200
|
+
if (err.country_code) {
|
|
6201
|
+
err.contact_number = err.country_code;
|
|
6202
|
+
}
|
|
6203
|
+
if (err.contact_country_code) {
|
|
6204
|
+
err.contact_number = err.contact_country_code;
|
|
6205
|
+
}
|
|
6206
|
+
if (err.passport) {
|
|
6207
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6208
|
+
delete err.passport;
|
|
6209
|
+
}
|
|
6210
|
+
setErrorArray(Object.keys(err));
|
|
6211
|
+
setErrorMsgs(err);
|
|
6212
|
+
var _loop3 = function _loop3() {
|
|
6213
|
+
if (Object.hasOwnProperty.call(err, _key5)) {
|
|
6214
|
+
if (err[_key5]) {
|
|
6215
|
+
if (_key5 in passportInfoInput || _key5 in travelPreferenceInfo || _key5 in secureTravelInputInfo) {
|
|
6216
|
+
setAdditionalInfoFlag('open');
|
|
6217
|
+
}
|
|
6218
|
+
var el = document.getElementById(_key5 === 'country_code' || _key5 === 'contact_country_code' ? 'contact_number' : _key5);
|
|
6219
|
+
if (el) {
|
|
6220
|
+
setTimeout(function () {
|
|
6221
|
+
el.scrollIntoView({
|
|
6222
|
+
behavior: 'smooth',
|
|
6223
|
+
block: 'center'
|
|
6224
|
+
});
|
|
6225
|
+
}, 500);
|
|
6226
|
+
return "break";
|
|
6227
|
+
}
|
|
6163
6228
|
}
|
|
6164
6229
|
}
|
|
6230
|
+
};
|
|
6231
|
+
for (var _key5 in err) {
|
|
6232
|
+
var _ret3 = _loop3();
|
|
6233
|
+
if (_ret3 === "break") break;
|
|
6165
6234
|
}
|
|
6166
|
-
}
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6235
|
+
} else if (typeof err === 'string') {
|
|
6236
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6237
|
+
} else {
|
|
6238
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6170
6239
|
}
|
|
6171
|
-
}
|
|
6172
|
-
|
|
6173
|
-
}
|
|
6174
|
-
|
|
6175
|
-
}
|
|
6176
|
-
})["finally"](function () {
|
|
6177
|
-
dispatch(stopLoader());
|
|
6178
|
-
});
|
|
6240
|
+
})["finally"](function () {
|
|
6241
|
+
dispatch(stopLoader());
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6179
6244
|
}
|
|
6180
6245
|
return Promise.resolve();
|
|
6181
6246
|
} catch (e) {
|
|
@@ -6386,9 +6451,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6386
6451
|
if (!p.visibility) {
|
|
6387
6452
|
return null;
|
|
6388
6453
|
}
|
|
6389
|
-
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6390
|
-
return null;
|
|
6391
|
-
}
|
|
6392
6454
|
return /*#__PURE__*/React.createElement(IUIGrid, {
|
|
6393
6455
|
item: true,
|
|
6394
6456
|
sm: 12,
|
|
@@ -8514,6 +8576,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8514
8576
|
endIcon: null,
|
|
8515
8577
|
outlinedBtn: false,
|
|
8516
8578
|
className: "threedotMenuBtn",
|
|
8579
|
+
MoreHorizIcon: true,
|
|
8517
8580
|
placement: "bottom-end"
|
|
8518
8581
|
}));
|
|
8519
8582
|
},
|
|
@@ -8741,8 +8804,10 @@ var UndoButton = function UndoButton(_ref) {
|
|
|
8741
8804
|
};
|
|
8742
8805
|
var UserList = function UserList(_ref2) {
|
|
8743
8806
|
var config = _ref2.config,
|
|
8744
|
-
isProfile = _ref2.isProfile
|
|
8745
|
-
|
|
8807
|
+
isProfile = _ref2.isProfile,
|
|
8808
|
+
_ref2$tabVal = _ref2.tabVal,
|
|
8809
|
+
tabVal = _ref2$tabVal === void 0 ? 'current' : _ref2$tabVal;
|
|
8810
|
+
env$7.init(config, isProfile, tabVal);
|
|
8746
8811
|
var history = useHistory();
|
|
8747
8812
|
var _useSelector = useSelector(function (state) {
|
|
8748
8813
|
return state.userList;
|
|
@@ -8752,15 +8817,18 @@ var UserList = function UserList(_ref2) {
|
|
|
8752
8817
|
deactivatedUsers = _useSelector.deactivatedUsers,
|
|
8753
8818
|
tabValue = _useSelector.tabValue;
|
|
8754
8819
|
var newSelecteds = userListInfo.results;
|
|
8755
|
-
var _React$useState = React.useState(
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
var _React$useState2 = React.useState(
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
var _React$useState3 = React.useState(
|
|
8762
|
-
|
|
8763
|
-
|
|
8820
|
+
var _React$useState = React.useState(0),
|
|
8821
|
+
activeTab = _React$useState[0],
|
|
8822
|
+
setActiveTab = _React$useState[1];
|
|
8823
|
+
var _React$useState2 = React.useState(''),
|
|
8824
|
+
deactivateUser = _React$useState2[0],
|
|
8825
|
+
setDeactivateUser = _React$useState2[1];
|
|
8826
|
+
var _React$useState3 = React.useState(null),
|
|
8827
|
+
defaultId = _React$useState3[0],
|
|
8828
|
+
setDefaultId = _React$useState3[1];
|
|
8829
|
+
var _React$useState4 = React.useState(1),
|
|
8830
|
+
page = _React$useState4[0],
|
|
8831
|
+
setPage = _React$useState4[1];
|
|
8764
8832
|
var _useState = useState([]),
|
|
8765
8833
|
selectedUsersNotApprover = _useState[0],
|
|
8766
8834
|
setSelectedUsersNotApprover = _useState[1];
|
|
@@ -8770,24 +8838,24 @@ var UserList = function UserList(_ref2) {
|
|
|
8770
8838
|
var _useState3 = useState(false),
|
|
8771
8839
|
isBulkDeactivateModalOpen = _useState3[0],
|
|
8772
8840
|
setIsBulkDeactivateModalOpen = _useState3[1];
|
|
8773
|
-
var _React$
|
|
8774
|
-
user = _React$
|
|
8775
|
-
setUser = _React$
|
|
8841
|
+
var _React$useState5 = React.useState(''),
|
|
8842
|
+
user = _React$useState5[0],
|
|
8843
|
+
setUser = _React$useState5[1];
|
|
8776
8844
|
var _useState4 = useState(10),
|
|
8777
8845
|
rowsPerPage = _useState4[0],
|
|
8778
8846
|
setRowsPerPage = _useState4[1];
|
|
8779
|
-
var _React$
|
|
8780
|
-
selected = _React$
|
|
8781
|
-
setSelected = _React$
|
|
8782
|
-
var _React$
|
|
8783
|
-
order = _React$
|
|
8784
|
-
setOrder = _React$
|
|
8785
|
-
var _React$
|
|
8786
|
-
deactivateSingle = _React$
|
|
8787
|
-
setDeactivateSingle = _React$
|
|
8788
|
-
var _React$
|
|
8789
|
-
orderBy = _React$
|
|
8790
|
-
setOrderBy = _React$
|
|
8847
|
+
var _React$useState6 = React.useState({}),
|
|
8848
|
+
selected = _React$useState6[0],
|
|
8849
|
+
setSelected = _React$useState6[1];
|
|
8850
|
+
var _React$useState7 = React.useState('asc'),
|
|
8851
|
+
order = _React$useState7[0],
|
|
8852
|
+
setOrder = _React$useState7[1];
|
|
8853
|
+
var _React$useState8 = React.useState(false),
|
|
8854
|
+
deactivateSingle = _React$useState8[0],
|
|
8855
|
+
setDeactivateSingle = _React$useState8[1];
|
|
8856
|
+
var _React$useState9 = React.useState('first_name'),
|
|
8857
|
+
orderBy = _React$useState9[0],
|
|
8858
|
+
setOrderBy = _React$useState9[1];
|
|
8791
8859
|
var _useState5 = useState(''),
|
|
8792
8860
|
searchValue = _useState5[0],
|
|
8793
8861
|
setSearchValue = _useState5[1];
|
|
@@ -8837,9 +8905,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8837
8905
|
var _useState17 = useState(''),
|
|
8838
8906
|
userIds = _useState17[0],
|
|
8839
8907
|
setUserIds = _useState17[1];
|
|
8840
|
-
var _React$
|
|
8841
|
-
overlayMenu = _React$
|
|
8842
|
-
setOverlayMenu = _React$
|
|
8908
|
+
var _React$useState10 = React.useState(false),
|
|
8909
|
+
overlayMenu = _React$useState10[0],
|
|
8910
|
+
setOverlayMenu = _React$useState10[1];
|
|
8843
8911
|
var _useState18 = useState(''),
|
|
8844
8912
|
userFirstName = _useState18[0],
|
|
8845
8913
|
setUserFirstName = _useState18[1];
|
|
@@ -8849,6 +8917,14 @@ var UserList = function UserList(_ref2) {
|
|
|
8849
8917
|
var _useState20 = useState(true),
|
|
8850
8918
|
isDisabledSubmitBtn = _useState20[0],
|
|
8851
8919
|
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
|
+
}, []);
|
|
8852
8928
|
useScrollPosition(function (_ref3) {
|
|
8853
8929
|
var prevPos = _ref3.prevPos,
|
|
8854
8930
|
currPos = _ref3.currPos;
|
|
@@ -8869,18 +8945,18 @@ var UserList = function UserList(_ref2) {
|
|
|
8869
8945
|
behavior: 'smooth'
|
|
8870
8946
|
});
|
|
8871
8947
|
};
|
|
8872
|
-
var _React$
|
|
8873
|
-
signup_page = _React$
|
|
8874
|
-
setSignUpPage = _React$
|
|
8948
|
+
var _React$useState11 = React.useState(1),
|
|
8949
|
+
signup_page = _React$useState11[0],
|
|
8950
|
+
setSignUpPage = _React$useState11[1];
|
|
8875
8951
|
var _useState21 = useState(5),
|
|
8876
8952
|
signup_rowsPerPage = _useState21[0],
|
|
8877
8953
|
setSignUpRowsPerPage = _useState21[1];
|
|
8878
|
-
var _React$
|
|
8879
|
-
signup_order = _React$
|
|
8880
|
-
setSignUpOrder = _React$
|
|
8881
|
-
var _React$
|
|
8882
|
-
signup_orderBy = _React$
|
|
8883
|
-
setSignUpOrderBy = _React$
|
|
8954
|
+
var _React$useState12 = React.useState('asc'),
|
|
8955
|
+
signup_order = _React$useState12[0],
|
|
8956
|
+
setSignUpOrder = _React$useState12[1];
|
|
8957
|
+
var _React$useState13 = React.useState('fname'),
|
|
8958
|
+
signup_orderBy = _React$useState13[0],
|
|
8959
|
+
setSignUpOrderBy = _React$useState13[1];
|
|
8884
8960
|
var _useState22 = useState(''),
|
|
8885
8961
|
signup_searchValue = _useState22[0],
|
|
8886
8962
|
set_signup_SearchValue = _useState22[1];
|
|
@@ -8912,14 +8988,31 @@ var UserList = function UserList(_ref2) {
|
|
|
8912
8988
|
var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
|
|
8913
8989
|
var _SelectedUsersApprover = [].concat(selectedUsersApprover);
|
|
8914
8990
|
var _selected = Object.values(selected).flat();
|
|
8915
|
-
|
|
8916
|
-
|
|
8991
|
+
var temp1 = {};
|
|
8992
|
+
var temp2 = {};
|
|
8993
|
+
var tempArray1 = [];
|
|
8994
|
+
var tempArray2 = [];
|
|
8995
|
+
_SelectedUsersNotApprover.map(function (item) {
|
|
8996
|
+
if (temp1[item.id] !== item) {
|
|
8997
|
+
temp1[item.id] = item;
|
|
8998
|
+
}
|
|
8917
8999
|
});
|
|
8918
|
-
_SelectedUsersApprover
|
|
8919
|
-
|
|
9000
|
+
_SelectedUsersApprover.map(function (item) {
|
|
9001
|
+
if (temp2[item.id] !== item) {
|
|
9002
|
+
temp2[item.id] = item;
|
|
9003
|
+
}
|
|
8920
9004
|
});
|
|
8921
|
-
|
|
8922
|
-
|
|
9005
|
+
for (var i = 0; i < _selected.length; i++) {
|
|
9006
|
+
if (temp1[_selected[i]] != undefined) {
|
|
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);
|
|
8923
9016
|
setIsBulkDeactivateModalOpen(true);
|
|
8924
9017
|
} else {
|
|
8925
9018
|
setOpenDeActivateModalFlag(true);
|
|
@@ -9462,7 +9555,7 @@ var UserList = function UserList(_ref2) {
|
|
|
9462
9555
|
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
9463
9556
|
className: styles$5.tablewrapper
|
|
9464
9557
|
}, /*#__PURE__*/React.createElement(IUITabs, {
|
|
9465
|
-
value:
|
|
9558
|
+
value: activeTab,
|
|
9466
9559
|
customTabHandler: function customTabHandler(value) {
|
|
9467
9560
|
return dispatch(updateTabValue(value));
|
|
9468
9561
|
},
|