@itilite/iui-user-management 1.3.8 → 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 +193 -176
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +193 -176
- 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',
|
|
@@ -5006,6 +5013,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5006
5013
|
},
|
|
5007
5014
|
designation: '',
|
|
5008
5015
|
base_location: '',
|
|
5016
|
+
manager_id: {
|
|
5017
|
+
value: '',
|
|
5018
|
+
label: 'Select Manager'
|
|
5019
|
+
},
|
|
5020
|
+
skip_manager_id: {
|
|
5021
|
+
value: '',
|
|
5022
|
+
label: 'Select Manager'
|
|
5023
|
+
},
|
|
5009
5024
|
currency: {
|
|
5010
5025
|
value: defaultCurrency,
|
|
5011
5026
|
label: defaultCurrency
|
|
@@ -5018,7 +5033,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5018
5033
|
entity: 0,
|
|
5019
5034
|
business_unit: 0,
|
|
5020
5035
|
department: 0,
|
|
5021
|
-
currency: 0
|
|
5036
|
+
currency: 0,
|
|
5037
|
+
manager_id: 0,
|
|
5038
|
+
skip_manager_id: 0
|
|
5022
5039
|
}),
|
|
5023
5040
|
cacheForAsyncDropdown = _useState4[0],
|
|
5024
5041
|
clearCacheForAsyncDropdown = _useState4[1];
|
|
@@ -5172,6 +5189,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5172
5189
|
var _useState25 = useState([]),
|
|
5173
5190
|
uploadedFiles = _useState25[0],
|
|
5174
5191
|
setUploadedFiles = _useState25[1];
|
|
5192
|
+
var _useState26 = useState(70),
|
|
5193
|
+
maxLengthForModal = _useState26[0],
|
|
5194
|
+
setMaxLengthForModal = _useState26[1];
|
|
5175
5195
|
var defaultAddModalData = {
|
|
5176
5196
|
isOpen: false,
|
|
5177
5197
|
isError: false,
|
|
@@ -5184,12 +5204,12 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5184
5204
|
regexOnBlur: null,
|
|
5185
5205
|
maxLimit: '',
|
|
5186
5206
|
minLimit: '',
|
|
5187
|
-
maxLength:
|
|
5207
|
+
maxLength: maxLengthForModal,
|
|
5188
5208
|
minLength: 0
|
|
5189
5209
|
};
|
|
5190
|
-
var
|
|
5191
|
-
addModalData =
|
|
5192
|
-
setAddModalData =
|
|
5210
|
+
var _useState27 = useState(defaultAddModalData),
|
|
5211
|
+
addModalData = _useState27[0],
|
|
5212
|
+
setAddModalData = _useState27[1];
|
|
5193
5213
|
var onAddModalClose = function onAddModalClose() {
|
|
5194
5214
|
setAddModalData(_extends({}, defaultAddModalData));
|
|
5195
5215
|
};
|
|
@@ -5209,12 +5229,16 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5209
5229
|
var title = '';
|
|
5210
5230
|
if (id === 'entity') {
|
|
5211
5231
|
title = 'Entity';
|
|
5232
|
+
setMaxLengthForModal(70);
|
|
5212
5233
|
} else if (id === 'department') {
|
|
5213
5234
|
title = 'Department';
|
|
5235
|
+
setMaxLengthForModal(70);
|
|
5214
5236
|
} else if (id === 'business_unit') {
|
|
5237
|
+
setMaxLengthForModal(150);
|
|
5215
5238
|
title = 'Business unit';
|
|
5216
5239
|
} else if (id === 'employee_level') {
|
|
5217
5240
|
title = 'Employee level';
|
|
5241
|
+
setMaxLengthForModal(70);
|
|
5218
5242
|
}
|
|
5219
5243
|
setAddModalData(_extends({}, addModalData, {
|
|
5220
5244
|
isOpen: true,
|
|
@@ -5362,10 +5386,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5362
5386
|
_value = args._value,
|
|
5363
5387
|
_isError = args._isError,
|
|
5364
5388
|
_errorMsg = args._errorMsg;
|
|
5365
|
-
console.log(
|
|
5366
|
-
_name: _name,
|
|
5367
|
-
_value: _value
|
|
5368
|
-
});
|
|
5389
|
+
console.log(_name, _value);
|
|
5369
5390
|
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends8 = {}, _extends8[_name] = _value, _extends8)));
|
|
5370
5391
|
updateError(_name, _isError, _errorMsg);
|
|
5371
5392
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
@@ -5653,6 +5674,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5653
5674
|
value: '',
|
|
5654
5675
|
label: 'Select employee level'
|
|
5655
5676
|
},
|
|
5677
|
+
manager_id: res.employee_info.manager ? {
|
|
5678
|
+
value: res.employee_info.manager,
|
|
5679
|
+
label: res.employee_info.manager
|
|
5680
|
+
} : {
|
|
5681
|
+
value: '',
|
|
5682
|
+
label: 'Select Manager'
|
|
5683
|
+
},
|
|
5684
|
+
skip_manager_id: res.employee_info.skip_manager ? {
|
|
5685
|
+
value: res.employee_info.skip_manager,
|
|
5686
|
+
label: res.employee_info.skip_manager
|
|
5687
|
+
} : {
|
|
5688
|
+
value: '',
|
|
5689
|
+
label: 'Select Manager'
|
|
5690
|
+
},
|
|
5656
5691
|
employee_id: res.employee_info.employee_id || '',
|
|
5657
5692
|
entity: res.employee_info.entity ? {
|
|
5658
5693
|
value: res.employee_info.entity.id,
|
|
@@ -5827,24 +5862,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5827
5862
|
return _extends({}, prevState, expenseApprovers);
|
|
5828
5863
|
});
|
|
5829
5864
|
}
|
|
5830
|
-
var _uploadedDocs2 = [];
|
|
5831
|
-
res.files.forEach(function (_file) {
|
|
5832
|
-
_uploadedDocs2.push({
|
|
5833
|
-
user_file_name: _file.user_file_name,
|
|
5834
|
-
id: _file.id,
|
|
5835
|
-
isExistingFile: true,
|
|
5836
|
-
file_type: _file.file_type
|
|
5837
|
-
});
|
|
5838
|
-
});
|
|
5839
|
-
if (res && res.profile_pic) {
|
|
5840
|
-
_uploadedDocs2.push({
|
|
5841
|
-
user_file_name: res.profile_pic.user_file_name,
|
|
5842
|
-
id: res.profile_pic.id,
|
|
5843
|
-
isExistingFile: true,
|
|
5844
|
-
file_type: res.profile_pic.file_type
|
|
5845
|
-
});
|
|
5846
|
-
}
|
|
5847
|
-
setUploadedFiles(_uploadedDocs2);
|
|
5848
5865
|
}
|
|
5849
5866
|
})["catch"](function () {})["finally"](function () {
|
|
5850
5867
|
dispatch(stopLoader());
|
|
@@ -5936,6 +5953,13 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5936
5953
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5937
5954
|
return Promise.resolve();
|
|
5938
5955
|
}
|
|
5956
|
+
console.log(employeeInfoInput, 'data');
|
|
5957
|
+
if (employeeInfoInput.manager_id.value !== '') {
|
|
5958
|
+
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5959
|
+
}
|
|
5960
|
+
if (employeeInfoInput.skip_manager_id.value !== '') {
|
|
5961
|
+
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
5962
|
+
}
|
|
5939
5963
|
var payload = {
|
|
5940
5964
|
personalInfoInput: personalInfoInput,
|
|
5941
5965
|
employeeInfoInput: employeeInfoInput,
|
|
@@ -6103,115 +6127,116 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6103
6127
|
var _ret = _loop();
|
|
6104
6128
|
if (_ret === "break") break;
|
|
6105
6129
|
}
|
|
6106
|
-
return Promise.resolve();
|
|
6107
6130
|
}
|
|
6108
|
-
if (
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
setFilesForDelete([]);
|
|
6119
|
-
setProfilePicDelete([]);
|
|
6120
|
-
})["catch"](function (err) {
|
|
6121
|
-
if (typeof err === 'object') {
|
|
6122
|
-
if (err.country_code) {
|
|
6123
|
-
err.contact_number = err.country_code;
|
|
6124
|
-
}
|
|
6125
|
-
if (err.contact_country_code) {
|
|
6126
|
-
err.contact_number = err.contact_country_code;
|
|
6127
|
-
}
|
|
6128
|
-
if (err.passport) {
|
|
6129
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6130
|
-
delete err.passport;
|
|
6131
|
+
if (!_isError) {
|
|
6132
|
+
if (isEditMode && editUserId || isProfile) {
|
|
6133
|
+
dispatch(showLoader());
|
|
6134
|
+
dispatch(updateUser(payload, isProfile ? id : editUserId, inputChangeLog)).then(function (res) {
|
|
6135
|
+
if (isProfile) {
|
|
6136
|
+
var _config$routes, _config$routes$profil, _config$routes$profil2;
|
|
6137
|
+
(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);
|
|
6138
|
+
} else {
|
|
6139
|
+
var _config$routes2, _config$routes2$users, _config$routes2$users2;
|
|
6140
|
+
(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);
|
|
6131
6141
|
}
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6142
|
+
setFilesForDelete([]);
|
|
6143
|
+
setProfilePicDelete([]);
|
|
6144
|
+
})["catch"](function (err) {
|
|
6145
|
+
if (typeof err === 'object') {
|
|
6146
|
+
if (err.country_code) {
|
|
6147
|
+
err.contact_number = err.country_code;
|
|
6148
|
+
}
|
|
6149
|
+
if (err.contact_country_code) {
|
|
6150
|
+
err.contact_number = err.contact_country_code;
|
|
6151
|
+
}
|
|
6152
|
+
if (err.passport) {
|
|
6153
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6154
|
+
delete err.passport;
|
|
6155
|
+
}
|
|
6156
|
+
setErrorArray(Object.keys(err));
|
|
6157
|
+
setErrorMsgs(err);
|
|
6158
|
+
var _loop2 = function _loop2() {
|
|
6159
|
+
if (Object.hasOwnProperty.call(err, _key4)) {
|
|
6160
|
+
if (err[_key4]) {
|
|
6161
|
+
if (_key4 in passportInfoInput || _key4 in travelPreferenceInfo || _key4 in secureTravelInputInfo) {
|
|
6162
|
+
setAdditionalInfoFlag('open');
|
|
6163
|
+
}
|
|
6164
|
+
var el = document.getElementById(_key4 === 'country_code' || _key4 === 'contact_country_code' ? 'contact_number' : _key4);
|
|
6165
|
+
if (el) {
|
|
6166
|
+
setTimeout(function () {
|
|
6167
|
+
el.scrollIntoView({
|
|
6168
|
+
behavior: 'smooth',
|
|
6169
|
+
block: 'center'
|
|
6170
|
+
});
|
|
6171
|
+
}, 500);
|
|
6172
|
+
return "break";
|
|
6173
|
+
}
|
|
6149
6174
|
}
|
|
6150
6175
|
}
|
|
6176
|
+
};
|
|
6177
|
+
for (var _key4 in err) {
|
|
6178
|
+
var _ret2 = _loop2();
|
|
6179
|
+
if (_ret2 === "break") break;
|
|
6151
6180
|
}
|
|
6152
|
-
}
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
}
|
|
6157
|
-
} else if (typeof err === 'string') {
|
|
6158
|
-
IUIToastMessageService$4.warningNotify(err);
|
|
6159
|
-
} else {
|
|
6160
|
-
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6161
|
-
}
|
|
6162
|
-
})["finally"](function () {
|
|
6163
|
-
dispatch(stopLoader());
|
|
6164
|
-
});
|
|
6165
|
-
} else {
|
|
6166
|
-
dispatch(showLoader());
|
|
6167
|
-
dispatch(createUser(payload)).then(function (res) {
|
|
6168
|
-
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6169
|
-
(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);
|
|
6170
|
-
})["catch"](function (err) {
|
|
6171
|
-
if (typeof err === 'object') {
|
|
6172
|
-
if (err.country_code) {
|
|
6173
|
-
err.contact_number = err.country_code;
|
|
6174
|
-
}
|
|
6175
|
-
if (err.contact_country_code) {
|
|
6176
|
-
err.contact_number = err.contact_country_code;
|
|
6177
|
-
}
|
|
6178
|
-
if (err.passport) {
|
|
6179
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6180
|
-
delete err.passport;
|
|
6181
|
+
} else if (typeof err === 'string') {
|
|
6182
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6183
|
+
} else {
|
|
6184
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6181
6185
|
}
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6186
|
+
})["finally"](function () {
|
|
6187
|
+
dispatch(stopLoader());
|
|
6188
|
+
});
|
|
6189
|
+
} else {
|
|
6190
|
+
dispatch(showLoader());
|
|
6191
|
+
dispatch(createUser(payload)).then(function (res) {
|
|
6192
|
+
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6193
|
+
(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);
|
|
6194
|
+
})["catch"](function (err) {
|
|
6195
|
+
if (typeof err === 'object') {
|
|
6196
|
+
if (err.country_code) {
|
|
6197
|
+
err.contact_number = err.country_code;
|
|
6198
|
+
}
|
|
6199
|
+
if (err.contact_country_code) {
|
|
6200
|
+
err.contact_number = err.contact_country_code;
|
|
6201
|
+
}
|
|
6202
|
+
if (err.passport) {
|
|
6203
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6204
|
+
delete err.passport;
|
|
6205
|
+
}
|
|
6206
|
+
setErrorArray(Object.keys(err));
|
|
6207
|
+
setErrorMsgs(err);
|
|
6208
|
+
var _loop3 = function _loop3() {
|
|
6209
|
+
if (Object.hasOwnProperty.call(err, _key5)) {
|
|
6210
|
+
if (err[_key5]) {
|
|
6211
|
+
if (_key5 in passportInfoInput || _key5 in travelPreferenceInfo || _key5 in secureTravelInputInfo) {
|
|
6212
|
+
setAdditionalInfoFlag('open');
|
|
6213
|
+
}
|
|
6214
|
+
var el = document.getElementById(_key5 === 'country_code' || _key5 === 'contact_country_code' ? 'contact_number' : _key5);
|
|
6215
|
+
if (el) {
|
|
6216
|
+
setTimeout(function () {
|
|
6217
|
+
el.scrollIntoView({
|
|
6218
|
+
behavior: 'smooth',
|
|
6219
|
+
block: 'center'
|
|
6220
|
+
});
|
|
6221
|
+
}, 500);
|
|
6222
|
+
return "break";
|
|
6223
|
+
}
|
|
6199
6224
|
}
|
|
6200
6225
|
}
|
|
6226
|
+
};
|
|
6227
|
+
for (var _key5 in err) {
|
|
6228
|
+
var _ret3 = _loop3();
|
|
6229
|
+
if (_ret3 === "break") break;
|
|
6201
6230
|
}
|
|
6202
|
-
}
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6231
|
+
} else if (typeof err === 'string') {
|
|
6232
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6233
|
+
} else {
|
|
6234
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6206
6235
|
}
|
|
6207
|
-
}
|
|
6208
|
-
|
|
6209
|
-
}
|
|
6210
|
-
|
|
6211
|
-
}
|
|
6212
|
-
})["finally"](function () {
|
|
6213
|
-
dispatch(stopLoader());
|
|
6214
|
-
});
|
|
6236
|
+
})["finally"](function () {
|
|
6237
|
+
dispatch(stopLoader());
|
|
6238
|
+
});
|
|
6239
|
+
}
|
|
6215
6240
|
}
|
|
6216
6241
|
return Promise.resolve();
|
|
6217
6242
|
} catch (e) {
|
|
@@ -6422,6 +6447,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6422
6447
|
if (!p.visibility) {
|
|
6423
6448
|
return null;
|
|
6424
6449
|
}
|
|
6450
|
+
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6451
|
+
return null;
|
|
6452
|
+
}
|
|
6425
6453
|
return /*#__PURE__*/React.createElement(IUIGrid, {
|
|
6426
6454
|
item: true,
|
|
6427
6455
|
sm: 12,
|
|
@@ -8547,6 +8575,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8547
8575
|
endIcon: null,
|
|
8548
8576
|
outlinedBtn: false,
|
|
8549
8577
|
className: "threedotMenuBtn",
|
|
8578
|
+
MoreHorizIcon: true,
|
|
8550
8579
|
placement: "bottom-end"
|
|
8551
8580
|
}));
|
|
8552
8581
|
},
|
|
@@ -8945,31 +8974,14 @@ var UserList = function UserList(_ref2) {
|
|
|
8945
8974
|
var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
|
|
8946
8975
|
var _SelectedUsersApprover = [].concat(selectedUsersApprover);
|
|
8947
8976
|
var _selected = Object.values(selected).flat();
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
var tempArray1 = [];
|
|
8951
|
-
var tempArray2 = [];
|
|
8952
|
-
_SelectedUsersNotApprover.map(function (item) {
|
|
8953
|
-
if (temp1[item.id] !== item) {
|
|
8954
|
-
temp1[item.id] = item;
|
|
8955
|
-
}
|
|
8977
|
+
_SelectedUsersNotApprover = _SelectedUsersNotApprover.filter(function (item) {
|
|
8978
|
+
return _selected.includes(item.id.toString());
|
|
8956
8979
|
});
|
|
8957
|
-
_SelectedUsersApprover.
|
|
8958
|
-
|
|
8959
|
-
temp2[item.id] = item;
|
|
8960
|
-
}
|
|
8980
|
+
_SelectedUsersApprover = _SelectedUsersApprover.filter(function (item) {
|
|
8981
|
+
return _selected.includes(item.id.toString());
|
|
8961
8982
|
});
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
if (_selected[i] == temp1[_selected[i]].id) {
|
|
8965
|
-
tempArray1.push(temp1[_selected[i]]);
|
|
8966
|
-
}
|
|
8967
|
-
} else if (temp2[_selected[i]].id != undefined) {
|
|
8968
|
-
if (_selected[i] == temp2[_selected[i]].id) tempArray2.push(temp2[_selected[i]]);
|
|
8969
|
-
}
|
|
8970
|
-
}
|
|
8971
|
-
setSelectedUsersNotApprover(tempArray1);
|
|
8972
|
-
setSelectedUsersApprover(tempArray2);
|
|
8983
|
+
setSelectedUsersNotApprover(_SelectedUsersNotApprover);
|
|
8984
|
+
setSelectedUsersApprover(_SelectedUsersApprover);
|
|
8973
8985
|
setIsBulkDeactivateModalOpen(true);
|
|
8974
8986
|
} else {
|
|
8975
8987
|
setOpenDeActivateModalFlag(true);
|
|
@@ -9727,10 +9739,7 @@ var UserList = function UserList(_ref2) {
|
|
|
9727
9739
|
}));
|
|
9728
9740
|
})), selectedUsersNotApprover !== null && selectedUsersNotApprover !== void 0 && selectedUsersNotApprover.length ? /*#__PURE__*/React.createElement(IUIBox, null, /*#__PURE__*/React.createElement("hr", {
|
|
9729
9741
|
style: {
|
|
9730
|
-
borderColor: '#E5E9ED'
|
|
9731
|
-
borderLeft: 'none',
|
|
9732
|
-
borderTop: 'none',
|
|
9733
|
-
borderRight: 'none'
|
|
9742
|
+
borderColor: '#E5E9ED'
|
|
9734
9743
|
}
|
|
9735
9744
|
}), /*#__PURE__*/React.createElement(IUIBox, {
|
|
9736
9745
|
className: "iui__my-15"
|
|
@@ -10430,12 +10439,20 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10430
10439
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
10431
10440
|
setDataList(validatedValue);
|
|
10432
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
|
+
}, []);
|
|
10433
10450
|
var validation = {
|
|
10434
10451
|
regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
|
|
10435
10452
|
regexOnBlur: null,
|
|
10436
10453
|
maxLimit: '',
|
|
10437
10454
|
minLimit: '',
|
|
10438
|
-
maxLength:
|
|
10455
|
+
maxLength: maxLengthForModal,
|
|
10439
10456
|
minLength: 0
|
|
10440
10457
|
};
|
|
10441
10458
|
useEffect(function () {
|