@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.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -1118,24 +1118,6 @@ 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
|
-
}
|
|
1139
1121
|
}
|
|
1140
1122
|
return res;
|
|
1141
1123
|
};
|
|
@@ -3075,8 +3057,8 @@ var workInfo = [{
|
|
|
3075
3057
|
validation: {
|
|
3076
3058
|
regexOnChange: null,
|
|
3077
3059
|
regexOnBlur: [{
|
|
3078
|
-
regex: /^[(A-Z)(a-z)(0-9)
|
|
3079
|
-
message: "Only alphabets, numbers and
|
|
3060
|
+
regex: /^[(A-Z)(a-z)(0-9)\-_& ]*$/,
|
|
3061
|
+
message: "Only alphabets, numbers, - and _ & are allowed."
|
|
3080
3062
|
}],
|
|
3081
3063
|
maxLimit: '',
|
|
3082
3064
|
minLimit: '',
|
|
@@ -3164,8 +3146,8 @@ var workInfo = [{
|
|
|
3164
3146
|
validation: {
|
|
3165
3147
|
regexOnChange: null,
|
|
3166
3148
|
regexOnBlur: [{
|
|
3167
|
-
regex: /^[A-Za-z0-9
|
|
3168
|
-
message: "Only alphabets, numbers & special characters . & ' ( ) - , / are allowed."
|
|
3149
|
+
regex: /^[A-Za-z0-9 \-_.,&'()\/]*$/,
|
|
3150
|
+
message: "Only alphabets, numbers & special characters . & ' ( ) _ - , / are allowed."
|
|
3169
3151
|
}, {
|
|
3170
3152
|
regex: /^[a-zA-Z]/,
|
|
3171
3153
|
message: 'Designation should start with alphabets'
|
|
@@ -3176,6 +3158,31 @@ var workInfo = [{
|
|
|
3176
3158
|
minLength: 0
|
|
3177
3159
|
},
|
|
3178
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
|
|
3179
3186
|
}, {
|
|
3180
3187
|
id: 9,
|
|
3181
3188
|
label: 'Base location',
|
|
@@ -5009,6 +5016,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5009
5016
|
},
|
|
5010
5017
|
designation: '',
|
|
5011
5018
|
base_location: '',
|
|
5019
|
+
manager_id: {
|
|
5020
|
+
value: '',
|
|
5021
|
+
label: 'Select Manager'
|
|
5022
|
+
},
|
|
5023
|
+
skip_manager_id: {
|
|
5024
|
+
value: '',
|
|
5025
|
+
label: 'Select Manager'
|
|
5026
|
+
},
|
|
5012
5027
|
currency: {
|
|
5013
5028
|
value: defaultCurrency,
|
|
5014
5029
|
label: defaultCurrency
|
|
@@ -5021,7 +5036,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5021
5036
|
entity: 0,
|
|
5022
5037
|
business_unit: 0,
|
|
5023
5038
|
department: 0,
|
|
5024
|
-
currency: 0
|
|
5039
|
+
currency: 0,
|
|
5040
|
+
manager_id: 0,
|
|
5041
|
+
skip_manager_id: 0
|
|
5025
5042
|
}),
|
|
5026
5043
|
cacheForAsyncDropdown = _useState4[0],
|
|
5027
5044
|
clearCacheForAsyncDropdown = _useState4[1];
|
|
@@ -5175,6 +5192,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5175
5192
|
var _useState25 = React.useState([]),
|
|
5176
5193
|
uploadedFiles = _useState25[0],
|
|
5177
5194
|
setUploadedFiles = _useState25[1];
|
|
5195
|
+
var _useState26 = React.useState(70),
|
|
5196
|
+
maxLengthForModal = _useState26[0],
|
|
5197
|
+
setMaxLengthForModal = _useState26[1];
|
|
5178
5198
|
var defaultAddModalData = {
|
|
5179
5199
|
isOpen: false,
|
|
5180
5200
|
isError: false,
|
|
@@ -5187,12 +5207,12 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5187
5207
|
regexOnBlur: null,
|
|
5188
5208
|
maxLimit: '',
|
|
5189
5209
|
minLimit: '',
|
|
5190
|
-
maxLength:
|
|
5210
|
+
maxLength: maxLengthForModal,
|
|
5191
5211
|
minLength: 0
|
|
5192
5212
|
};
|
|
5193
|
-
var
|
|
5194
|
-
addModalData =
|
|
5195
|
-
setAddModalData =
|
|
5213
|
+
var _useState27 = React.useState(defaultAddModalData),
|
|
5214
|
+
addModalData = _useState27[0],
|
|
5215
|
+
setAddModalData = _useState27[1];
|
|
5196
5216
|
var onAddModalClose = function onAddModalClose() {
|
|
5197
5217
|
setAddModalData(_extends({}, defaultAddModalData));
|
|
5198
5218
|
};
|
|
@@ -5212,12 +5232,16 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5212
5232
|
var title = '';
|
|
5213
5233
|
if (id === 'entity') {
|
|
5214
5234
|
title = 'Entity';
|
|
5235
|
+
setMaxLengthForModal(70);
|
|
5215
5236
|
} else if (id === 'department') {
|
|
5216
5237
|
title = 'Department';
|
|
5238
|
+
setMaxLengthForModal(70);
|
|
5217
5239
|
} else if (id === 'business_unit') {
|
|
5240
|
+
setMaxLengthForModal(150);
|
|
5218
5241
|
title = 'Business unit';
|
|
5219
5242
|
} else if (id === 'employee_level') {
|
|
5220
5243
|
title = 'Employee level';
|
|
5244
|
+
setMaxLengthForModal(70);
|
|
5221
5245
|
}
|
|
5222
5246
|
setAddModalData(_extends({}, addModalData, {
|
|
5223
5247
|
isOpen: true,
|
|
@@ -5365,10 +5389,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5365
5389
|
_value = args._value,
|
|
5366
5390
|
_isError = args._isError,
|
|
5367
5391
|
_errorMsg = args._errorMsg;
|
|
5368
|
-
console.log(
|
|
5369
|
-
_name: _name,
|
|
5370
|
-
_value: _value
|
|
5371
|
-
});
|
|
5392
|
+
console.log(_name, _value);
|
|
5372
5393
|
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends8 = {}, _extends8[_name] = _value, _extends8)));
|
|
5373
5394
|
updateError(_name, _isError, _errorMsg);
|
|
5374
5395
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
@@ -5656,6 +5677,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5656
5677
|
value: '',
|
|
5657
5678
|
label: 'Select employee level'
|
|
5658
5679
|
},
|
|
5680
|
+
manager_id: res.employee_info.manager ? {
|
|
5681
|
+
value: res.employee_info.manager,
|
|
5682
|
+
label: res.employee_info.manager
|
|
5683
|
+
} : {
|
|
5684
|
+
value: '',
|
|
5685
|
+
label: 'Select Manager'
|
|
5686
|
+
},
|
|
5687
|
+
skip_manager_id: res.employee_info.skip_manager ? {
|
|
5688
|
+
value: res.employee_info.skip_manager,
|
|
5689
|
+
label: res.employee_info.skip_manager
|
|
5690
|
+
} : {
|
|
5691
|
+
value: '',
|
|
5692
|
+
label: 'Select Manager'
|
|
5693
|
+
},
|
|
5659
5694
|
employee_id: res.employee_info.employee_id || '',
|
|
5660
5695
|
entity: res.employee_info.entity ? {
|
|
5661
5696
|
value: res.employee_info.entity.id,
|
|
@@ -5830,24 +5865,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5830
5865
|
return _extends({}, prevState, expenseApprovers);
|
|
5831
5866
|
});
|
|
5832
5867
|
}
|
|
5833
|
-
var _uploadedDocs2 = [];
|
|
5834
|
-
res.files.forEach(function (_file) {
|
|
5835
|
-
_uploadedDocs2.push({
|
|
5836
|
-
user_file_name: _file.user_file_name,
|
|
5837
|
-
id: _file.id,
|
|
5838
|
-
isExistingFile: true,
|
|
5839
|
-
file_type: _file.file_type
|
|
5840
|
-
});
|
|
5841
|
-
});
|
|
5842
|
-
if (res && res.profile_pic) {
|
|
5843
|
-
_uploadedDocs2.push({
|
|
5844
|
-
user_file_name: res.profile_pic.user_file_name,
|
|
5845
|
-
id: res.profile_pic.id,
|
|
5846
|
-
isExistingFile: true,
|
|
5847
|
-
file_type: res.profile_pic.file_type
|
|
5848
|
-
});
|
|
5849
|
-
}
|
|
5850
|
-
setUploadedFiles(_uploadedDocs2);
|
|
5851
5868
|
}
|
|
5852
5869
|
})["catch"](function () {})["finally"](function () {
|
|
5853
5870
|
dispatch(stopLoader());
|
|
@@ -5939,6 +5956,13 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5939
5956
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5940
5957
|
return Promise.resolve();
|
|
5941
5958
|
}
|
|
5959
|
+
console.log(employeeInfoInput, 'data');
|
|
5960
|
+
if (employeeInfoInput.manager_id.value !== '') {
|
|
5961
|
+
employeeInfoInput.manager_id = employeeInfoInput.manager.value;
|
|
5962
|
+
}
|
|
5963
|
+
if (employeeInfoInput.skip_manager_id.value !== '') {
|
|
5964
|
+
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
5965
|
+
}
|
|
5942
5966
|
var payload = {
|
|
5943
5967
|
personalInfoInput: personalInfoInput,
|
|
5944
5968
|
employeeInfoInput: employeeInfoInput,
|
|
@@ -6106,115 +6130,116 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6106
6130
|
var _ret = _loop();
|
|
6107
6131
|
if (_ret === "break") break;
|
|
6108
6132
|
}
|
|
6109
|
-
return Promise.resolve();
|
|
6110
6133
|
}
|
|
6111
|
-
if (
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
setFilesForDelete([]);
|
|
6122
|
-
setProfilePicDelete([]);
|
|
6123
|
-
})["catch"](function (err) {
|
|
6124
|
-
if (typeof err === 'object') {
|
|
6125
|
-
if (err.country_code) {
|
|
6126
|
-
err.contact_number = err.country_code;
|
|
6127
|
-
}
|
|
6128
|
-
if (err.contact_country_code) {
|
|
6129
|
-
err.contact_number = err.contact_country_code;
|
|
6130
|
-
}
|
|
6131
|
-
if (err.passport) {
|
|
6132
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6133
|
-
delete err.passport;
|
|
6134
|
+
if (!_isError) {
|
|
6135
|
+
if (isEditMode && editUserId || isProfile) {
|
|
6136
|
+
dispatch(showLoader());
|
|
6137
|
+
dispatch(updateUser(payload, isProfile ? id : editUserId, inputChangeLog)).then(function (res) {
|
|
6138
|
+
if (isProfile) {
|
|
6139
|
+
var _config$routes, _config$routes$profil, _config$routes$profil2;
|
|
6140
|
+
(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);
|
|
6141
|
+
} else {
|
|
6142
|
+
var _config$routes2, _config$routes2$users, _config$routes2$users2;
|
|
6143
|
+
(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);
|
|
6134
6144
|
}
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6145
|
+
setFilesForDelete([]);
|
|
6146
|
+
setProfilePicDelete([]);
|
|
6147
|
+
})["catch"](function (err) {
|
|
6148
|
+
if (typeof err === 'object') {
|
|
6149
|
+
if (err.country_code) {
|
|
6150
|
+
err.contact_number = err.country_code;
|
|
6151
|
+
}
|
|
6152
|
+
if (err.contact_country_code) {
|
|
6153
|
+
err.contact_number = err.contact_country_code;
|
|
6154
|
+
}
|
|
6155
|
+
if (err.passport) {
|
|
6156
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6157
|
+
delete err.passport;
|
|
6158
|
+
}
|
|
6159
|
+
setErrorArray(Object.keys(err));
|
|
6160
|
+
setErrorMsgs(err);
|
|
6161
|
+
var _loop2 = function _loop2() {
|
|
6162
|
+
if (Object.hasOwnProperty.call(err, _key4)) {
|
|
6163
|
+
if (err[_key4]) {
|
|
6164
|
+
if (_key4 in passportInfoInput || _key4 in travelPreferenceInfo || _key4 in secureTravelInputInfo) {
|
|
6165
|
+
setAdditionalInfoFlag('open');
|
|
6166
|
+
}
|
|
6167
|
+
var el = document.getElementById(_key4 === 'country_code' || _key4 === 'contact_country_code' ? 'contact_number' : _key4);
|
|
6168
|
+
if (el) {
|
|
6169
|
+
setTimeout(function () {
|
|
6170
|
+
el.scrollIntoView({
|
|
6171
|
+
behavior: 'smooth',
|
|
6172
|
+
block: 'center'
|
|
6173
|
+
});
|
|
6174
|
+
}, 500);
|
|
6175
|
+
return "break";
|
|
6176
|
+
}
|
|
6152
6177
|
}
|
|
6153
6178
|
}
|
|
6179
|
+
};
|
|
6180
|
+
for (var _key4 in err) {
|
|
6181
|
+
var _ret2 = _loop2();
|
|
6182
|
+
if (_ret2 === "break") break;
|
|
6154
6183
|
}
|
|
6155
|
-
}
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
}
|
|
6160
|
-
} else if (typeof err === 'string') {
|
|
6161
|
-
IUIToastMessageService$4.warningNotify(err);
|
|
6162
|
-
} else {
|
|
6163
|
-
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6164
|
-
}
|
|
6165
|
-
})["finally"](function () {
|
|
6166
|
-
dispatch(stopLoader());
|
|
6167
|
-
});
|
|
6168
|
-
} else {
|
|
6169
|
-
dispatch(showLoader());
|
|
6170
|
-
dispatch(createUser(payload)).then(function (res) {
|
|
6171
|
-
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6172
|
-
(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);
|
|
6173
|
-
})["catch"](function (err) {
|
|
6174
|
-
if (typeof err === 'object') {
|
|
6175
|
-
if (err.country_code) {
|
|
6176
|
-
err.contact_number = err.country_code;
|
|
6177
|
-
}
|
|
6178
|
-
if (err.contact_country_code) {
|
|
6179
|
-
err.contact_number = err.contact_country_code;
|
|
6180
|
-
}
|
|
6181
|
-
if (err.passport) {
|
|
6182
|
-
err.passport_photo = _extends({}, err.passport);
|
|
6183
|
-
delete err.passport;
|
|
6184
|
+
} else if (typeof err === 'string') {
|
|
6185
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6186
|
+
} else {
|
|
6187
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6184
6188
|
}
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6189
|
+
})["finally"](function () {
|
|
6190
|
+
dispatch(stopLoader());
|
|
6191
|
+
});
|
|
6192
|
+
} else {
|
|
6193
|
+
dispatch(showLoader());
|
|
6194
|
+
dispatch(createUser(payload)).then(function (res) {
|
|
6195
|
+
var _config$routes3, _config$routes3$users, _config$routes3$users2;
|
|
6196
|
+
(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);
|
|
6197
|
+
})["catch"](function (err) {
|
|
6198
|
+
if (typeof err === 'object') {
|
|
6199
|
+
if (err.country_code) {
|
|
6200
|
+
err.contact_number = err.country_code;
|
|
6201
|
+
}
|
|
6202
|
+
if (err.contact_country_code) {
|
|
6203
|
+
err.contact_number = err.contact_country_code;
|
|
6204
|
+
}
|
|
6205
|
+
if (err.passport) {
|
|
6206
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6207
|
+
delete err.passport;
|
|
6208
|
+
}
|
|
6209
|
+
setErrorArray(Object.keys(err));
|
|
6210
|
+
setErrorMsgs(err);
|
|
6211
|
+
var _loop3 = function _loop3() {
|
|
6212
|
+
if (Object.hasOwnProperty.call(err, _key5)) {
|
|
6213
|
+
if (err[_key5]) {
|
|
6214
|
+
if (_key5 in passportInfoInput || _key5 in travelPreferenceInfo || _key5 in secureTravelInputInfo) {
|
|
6215
|
+
setAdditionalInfoFlag('open');
|
|
6216
|
+
}
|
|
6217
|
+
var el = document.getElementById(_key5 === 'country_code' || _key5 === 'contact_country_code' ? 'contact_number' : _key5);
|
|
6218
|
+
if (el) {
|
|
6219
|
+
setTimeout(function () {
|
|
6220
|
+
el.scrollIntoView({
|
|
6221
|
+
behavior: 'smooth',
|
|
6222
|
+
block: 'center'
|
|
6223
|
+
});
|
|
6224
|
+
}, 500);
|
|
6225
|
+
return "break";
|
|
6226
|
+
}
|
|
6202
6227
|
}
|
|
6203
6228
|
}
|
|
6229
|
+
};
|
|
6230
|
+
for (var _key5 in err) {
|
|
6231
|
+
var _ret3 = _loop3();
|
|
6232
|
+
if (_ret3 === "break") break;
|
|
6204
6233
|
}
|
|
6205
|
-
}
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6234
|
+
} else if (typeof err === 'string') {
|
|
6235
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6236
|
+
} else {
|
|
6237
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6209
6238
|
}
|
|
6210
|
-
}
|
|
6211
|
-
|
|
6212
|
-
}
|
|
6213
|
-
|
|
6214
|
-
}
|
|
6215
|
-
})["finally"](function () {
|
|
6216
|
-
dispatch(stopLoader());
|
|
6217
|
-
});
|
|
6239
|
+
})["finally"](function () {
|
|
6240
|
+
dispatch(stopLoader());
|
|
6241
|
+
});
|
|
6242
|
+
}
|
|
6218
6243
|
}
|
|
6219
6244
|
return Promise.resolve();
|
|
6220
6245
|
} catch (e) {
|
|
@@ -6425,6 +6450,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6425
6450
|
if (!p.visibility) {
|
|
6426
6451
|
return null;
|
|
6427
6452
|
}
|
|
6453
|
+
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6454
|
+
return null;
|
|
6455
|
+
}
|
|
6428
6456
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
|
|
6429
6457
|
item: true,
|
|
6430
6458
|
sm: 12,
|
|
@@ -8550,6 +8578,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8550
8578
|
endIcon: null,
|
|
8551
8579
|
outlinedBtn: false,
|
|
8552
8580
|
className: "threedotMenuBtn",
|
|
8581
|
+
MoreHorizIcon: true,
|
|
8553
8582
|
placement: "bottom-end"
|
|
8554
8583
|
}));
|
|
8555
8584
|
},
|
|
@@ -8948,31 +8977,14 @@ var UserList = function UserList(_ref2) {
|
|
|
8948
8977
|
var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
|
|
8949
8978
|
var _SelectedUsersApprover = [].concat(selectedUsersApprover);
|
|
8950
8979
|
var _selected = Object.values(selected).flat();
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
var tempArray1 = [];
|
|
8954
|
-
var tempArray2 = [];
|
|
8955
|
-
_SelectedUsersNotApprover.map(function (item) {
|
|
8956
|
-
if (temp1[item.id] !== item) {
|
|
8957
|
-
temp1[item.id] = item;
|
|
8958
|
-
}
|
|
8980
|
+
_SelectedUsersNotApprover = _SelectedUsersNotApprover.filter(function (item) {
|
|
8981
|
+
return _selected.includes(item.id.toString());
|
|
8959
8982
|
});
|
|
8960
|
-
_SelectedUsersApprover.
|
|
8961
|
-
|
|
8962
|
-
temp2[item.id] = item;
|
|
8963
|
-
}
|
|
8983
|
+
_SelectedUsersApprover = _SelectedUsersApprover.filter(function (item) {
|
|
8984
|
+
return _selected.includes(item.id.toString());
|
|
8964
8985
|
});
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
if (_selected[i] == temp1[_selected[i]].id) {
|
|
8968
|
-
tempArray1.push(temp1[_selected[i]]);
|
|
8969
|
-
}
|
|
8970
|
-
} else if (temp2[_selected[i]].id != undefined) {
|
|
8971
|
-
if (_selected[i] == temp2[_selected[i]].id) tempArray2.push(temp2[_selected[i]]);
|
|
8972
|
-
}
|
|
8973
|
-
}
|
|
8974
|
-
setSelectedUsersNotApprover(tempArray1);
|
|
8975
|
-
setSelectedUsersApprover(tempArray2);
|
|
8986
|
+
setSelectedUsersNotApprover(_SelectedUsersNotApprover);
|
|
8987
|
+
setSelectedUsersApprover(_SelectedUsersApprover);
|
|
8976
8988
|
setIsBulkDeactivateModalOpen(true);
|
|
8977
8989
|
} else {
|
|
8978
8990
|
setOpenDeActivateModalFlag(true);
|
|
@@ -9730,10 +9742,7 @@ var UserList = function UserList(_ref2) {
|
|
|
9730
9742
|
}));
|
|
9731
9743
|
})), selectedUsersNotApprover !== null && selectedUsersNotApprover !== void 0 && selectedUsersNotApprover.length ? /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, null, /*#__PURE__*/React__default.createElement("hr", {
|
|
9732
9744
|
style: {
|
|
9733
|
-
borderColor: '#E5E9ED'
|
|
9734
|
-
borderLeft: 'none',
|
|
9735
|
-
borderTop: 'none',
|
|
9736
|
-
borderRight: 'none'
|
|
9745
|
+
borderColor: '#E5E9ED'
|
|
9737
9746
|
}
|
|
9738
9747
|
}), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9739
9748
|
className: "iui__my-15"
|
|
@@ -10433,12 +10442,20 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10433
10442
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
10434
10443
|
setDataList(validatedValue);
|
|
10435
10444
|
};
|
|
10445
|
+
var _useState17 = React.useState(70),
|
|
10446
|
+
maxLengthForModal = _useState17[0],
|
|
10447
|
+
setMaxLengthForModal = _useState17[1];
|
|
10448
|
+
React.useEffect(function () {
|
|
10449
|
+
if (title === 'Business unit') {
|
|
10450
|
+
setMaxLengthForModal(150);
|
|
10451
|
+
}
|
|
10452
|
+
}, []);
|
|
10436
10453
|
var validation = {
|
|
10437
10454
|
regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
|
|
10438
10455
|
regexOnBlur: null,
|
|
10439
10456
|
maxLimit: '',
|
|
10440
10457
|
minLimit: '',
|
|
10441
|
-
maxLength:
|
|
10458
|
+
maxLength: maxLengthForModal,
|
|
10442
10459
|
minLength: 0
|
|
10443
10460
|
};
|
|
10444
10461
|
React.useEffect(function () {
|