@itilite/iui-user-management 1.0.0 → 1.0.2
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 +19 -7
- package/dist/index.js +205 -204
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +207 -206
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -2
- package/dist/VectorinfoIcon~bdIVCeRl.jpg +0 -0
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUIDropdownButton, IUITabs } from '@itilite/iuistyles';
|
|
1
|
+
import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUISearch, IUIDropdownButton, IUITabs } from '@itilite/iuistyles';
|
|
2
2
|
import React, { useState, useEffect, useRef, Fragment as Fragment$1 } from 'react';
|
|
3
3
|
import { configs, services, utilUrls } from '@itilite/utils';
|
|
4
4
|
import axios from 'axios';
|
|
@@ -14,7 +14,8 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
14
14
|
import Switch from '@material-ui/core/Switch';
|
|
15
15
|
import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
|
|
16
16
|
import Button from '@material-ui/core/Button';
|
|
17
|
-
import { Popper, Grow, Paper, ClickAwayListener, MenuList, MenuItem, Typography } from '@material-ui/core';
|
|
17
|
+
import { Popper, Grow, Paper, ClickAwayListener, MenuList, MenuItem, Typography, Box } from '@material-ui/core';
|
|
18
|
+
import { useScrollPosition } from '@n8tb1t/use-scroll-position';
|
|
18
19
|
|
|
19
20
|
function _extends() {
|
|
20
21
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -67,7 +68,6 @@ var _Pact = /*#__PURE__*/function () {
|
|
|
67
68
|
};
|
|
68
69
|
return _Pact;
|
|
69
70
|
}();
|
|
70
|
-
|
|
71
71
|
function _settle(pact, state, value) {
|
|
72
72
|
if (!pact.s) {
|
|
73
73
|
if (value instanceof _Pact) {
|
|
@@ -96,7 +96,6 @@ function _settle(pact, state, value) {
|
|
|
96
96
|
function _isSettledPact(thenable) {
|
|
97
97
|
return thenable instanceof _Pact && thenable.s & 1;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
99
|
function _forTo(array, body, check) {
|
|
101
100
|
var i = -1,
|
|
102
101
|
pact,
|
|
@@ -128,7 +127,6 @@ function _forTo(array, body, check) {
|
|
|
128
127
|
}
|
|
129
128
|
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
130
129
|
var _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
131
|
-
|
|
132
130
|
function _catch(body, recover) {
|
|
133
131
|
try {
|
|
134
132
|
var result = body();
|
|
@@ -466,7 +464,6 @@ var NAoptionConfig = {
|
|
|
466
464
|
},
|
|
467
465
|
applyFor: ['employee_level', 'department']
|
|
468
466
|
};
|
|
469
|
-
|
|
470
467
|
var commonLoadOptions = function commonLoadOptions(search, loadedOptions, _ref) {
|
|
471
468
|
var page = _ref.page,
|
|
472
469
|
tabelName = _ref.tabelName,
|
|
@@ -663,7 +660,6 @@ var countryOptions = function countryOptions(search, loadedOptions, _ref5) {
|
|
|
663
660
|
label: item[tabelName]
|
|
664
661
|
};
|
|
665
662
|
});
|
|
666
|
-
|
|
667
663
|
return {
|
|
668
664
|
options: mappedValue,
|
|
669
665
|
hasMore: !!response.next,
|
|
@@ -765,7 +761,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
765
761
|
if (userTags.length) {
|
|
766
762
|
res.user_tags = userTags;
|
|
767
763
|
}
|
|
768
|
-
|
|
769
764
|
if (payload.productAccess.travel) {
|
|
770
765
|
var _payload$passportInfo, _payload$passportInfo2, _payload$passportInfo3, _payload$passportInfo4, _payload$membershipIn, _payload$uploadedFile;
|
|
771
766
|
res.approvers.travel = [];
|
|
@@ -777,14 +772,12 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
777
772
|
});
|
|
778
773
|
}
|
|
779
774
|
}
|
|
780
|
-
|
|
781
775
|
if (payload.travelFYI && payload.travelFYI.value) {
|
|
782
776
|
res.approvers.travel.push({
|
|
783
777
|
email: payload.travelFYI.value,
|
|
784
778
|
sequence: 'fyi'
|
|
785
779
|
});
|
|
786
780
|
}
|
|
787
|
-
|
|
788
781
|
res.user_travel_info = {
|
|
789
782
|
passport_issue_country: payload !== null && payload !== void 0 && (_payload$passportInfo = payload.passportInfoInput) !== null && _payload$passportInfo !== void 0 && (_payload$passportInfo2 = _payload$passportInfo.passport_issue_country) !== null && _payload$passportInfo2 !== void 0 && _payload$passportInfo2.value ? payload.passportInfoInput.passport_issue_country.value : null,
|
|
790
783
|
nationality: payload !== null && payload !== void 0 && (_payload$passportInfo3 = payload.passportInfoInput) !== null && _payload$passportInfo3 !== void 0 && (_payload$passportInfo4 = _payload$passportInfo3.nationality) !== null && _payload$passportInfo4 !== void 0 && _payload$passportInfo4.value ? payload.passportInfoInput.nationality.value : null,
|
|
@@ -823,7 +816,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
823
816
|
res.files = [];
|
|
824
817
|
}
|
|
825
818
|
}
|
|
826
|
-
|
|
827
819
|
if (payload.productAccess.expense) {
|
|
828
820
|
res.approvers.expense = [];
|
|
829
821
|
for (var _key2 in payload.expenseApproversInput) {
|
|
@@ -834,7 +826,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
834
826
|
});
|
|
835
827
|
}
|
|
836
828
|
}
|
|
837
|
-
|
|
838
829
|
if (payload.expenseFYI && payload.expenseFYI.value) {
|
|
839
830
|
res.approvers.expense.push({
|
|
840
831
|
email: payload.expenseFYI.value,
|
|
@@ -942,7 +933,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
942
933
|
});
|
|
943
934
|
}
|
|
944
935
|
}
|
|
945
|
-
|
|
946
936
|
if (payload.travelFYI && payload.travelFYI.value) {
|
|
947
937
|
res.fields.approvers.travel.push({
|
|
948
938
|
email: payload.travelFYI.value,
|
|
@@ -1019,7 +1009,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1019
1009
|
res.fields.user_travel_info.redress_number = payload.secureTravelInputInfo.redress_number || null;
|
|
1020
1010
|
}
|
|
1021
1011
|
}
|
|
1022
|
-
|
|
1023
1012
|
if (payload.productAccess.expense) {
|
|
1024
1013
|
if (!env$1.isProfilePage()) {
|
|
1025
1014
|
res.fields.approvers.expense = [];
|
|
@@ -1031,7 +1020,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1031
1020
|
});
|
|
1032
1021
|
}
|
|
1033
1022
|
}
|
|
1034
|
-
|
|
1035
1023
|
if (payload.expenseFYI && payload.expenseFYI.value) {
|
|
1036
1024
|
res.fields.approvers.expense.push({
|
|
1037
1025
|
email: payload.expenseFYI.value,
|
|
@@ -1485,17 +1473,13 @@ var uploadSingleDocumnet = function uploadSingleDocumnet(payload) {
|
|
|
1485
1473
|
});
|
|
1486
1474
|
};
|
|
1487
1475
|
};
|
|
1488
|
-
|
|
1489
1476
|
var uploadFileToS3 = function uploadFileToS3(presignedPostData, file) {
|
|
1490
1477
|
return new Promise(function (resolve, reject) {
|
|
1491
1478
|
var formData = new FormData();
|
|
1492
|
-
|
|
1493
1479
|
Object.keys(presignedPostData.fields).forEach(function (key) {
|
|
1494
1480
|
formData.append(key, presignedPostData.fields[key]);
|
|
1495
1481
|
});
|
|
1496
|
-
|
|
1497
1482
|
formData.append('file', file);
|
|
1498
|
-
|
|
1499
1483
|
axios.post(presignedPostData.url, formData, {
|
|
1500
1484
|
headers: {
|
|
1501
1485
|
'Content-Type': 'multipart/form-data'
|
|
@@ -1777,7 +1761,6 @@ var getUserPanalData = function getUserPanalData(params) {
|
|
|
1777
1761
|
});
|
|
1778
1762
|
};
|
|
1779
1763
|
};
|
|
1780
|
-
|
|
1781
1764
|
var addRecord = function addRecord(tableName, data, getParam) {
|
|
1782
1765
|
return function (dispatch) {
|
|
1783
1766
|
return new Promise(function (resolve, reject) {
|
|
@@ -2321,7 +2304,6 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2321
2304
|
setOpenEditAproverModalFlag(false);
|
|
2322
2305
|
});
|
|
2323
2306
|
};
|
|
2324
|
-
|
|
2325
2307
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIGrid, {
|
|
2326
2308
|
container: true,
|
|
2327
2309
|
className: (styles.headingPadding)
|
|
@@ -2469,8 +2451,7 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2469
2451
|
headerText: "Edit approver field",
|
|
2470
2452
|
cancelLabel: "Cancel",
|
|
2471
2453
|
submitLabel: "Save",
|
|
2472
|
-
submitHandler: handleEditAproverLabel
|
|
2473
|
-
,
|
|
2454
|
+
submitHandler: handleEditAproverLabel,
|
|
2474
2455
|
width: "420px",
|
|
2475
2456
|
modalBodyStyle: {
|
|
2476
2457
|
maxHeight: '600px',
|
|
@@ -3025,31 +3006,6 @@ var workInfo = [{
|
|
|
3025
3006
|
minLength: 0
|
|
3026
3007
|
},
|
|
3027
3008
|
disableText: 'Please get in touch with your administrator to change this value.'
|
|
3028
|
-
}, {
|
|
3029
|
-
id: 7,
|
|
3030
|
-
label: 'Manager',
|
|
3031
|
-
name: 'manager',
|
|
3032
|
-
required: false,
|
|
3033
|
-
type: 'async_select',
|
|
3034
|
-
fullWidth: false,
|
|
3035
|
-
visibility: true,
|
|
3036
|
-
readOnly: false,
|
|
3037
|
-
placeholder: 'Select manager',
|
|
3038
|
-
tabelName: 'manager',
|
|
3039
|
-
product: 'travel',
|
|
3040
|
-
loadOption: approversOptions
|
|
3041
|
-
}, {
|
|
3042
|
-
id: 8,
|
|
3043
|
-
label: 'Skip manager',
|
|
3044
|
-
name: 'skip manager',
|
|
3045
|
-
required: false,
|
|
3046
|
-
type: 'async_select',
|
|
3047
|
-
fullWidth: false,
|
|
3048
|
-
visibility: true,
|
|
3049
|
-
readOnly: false,
|
|
3050
|
-
placeholder: 'Select manager',
|
|
3051
|
-
product: 'travel',
|
|
3052
|
-
loadOption: approversOptions
|
|
3053
3009
|
}, {
|
|
3054
3010
|
id: 9,
|
|
3055
3011
|
label: 'Base location',
|
|
@@ -3885,7 +3841,6 @@ var reducer$1 = function reducer(state, action) {
|
|
|
3885
3841
|
_userListInfo.results[i].is_active = action.payload.is_active;
|
|
3886
3842
|
}
|
|
3887
3843
|
});
|
|
3888
|
-
|
|
3889
3844
|
var _deactivatedUsers = _userListInfo.results.length > 0 ? _userListInfo.results.filter(function (val) {
|
|
3890
3845
|
return !val.is_active;
|
|
3891
3846
|
}).map(function (obj) {
|
|
@@ -3908,7 +3863,6 @@ var reducer$1 = function reducer(state, action) {
|
|
|
3908
3863
|
}
|
|
3909
3864
|
});
|
|
3910
3865
|
});
|
|
3911
|
-
|
|
3912
3866
|
var _deactivatedUsers2 = _userListInfo2.results.length > 0 ? _userListInfo2.results.filter(function (val) {
|
|
3913
3867
|
return !val.is_active;
|
|
3914
3868
|
}).map(function (obj) {
|
|
@@ -4217,8 +4171,7 @@ var rootReducer = combineReducers({
|
|
|
4217
4171
|
customFields: reducer$5
|
|
4218
4172
|
});
|
|
4219
4173
|
|
|
4220
|
-
var store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)
|
|
4221
|
-
));
|
|
4174
|
+
var store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)));
|
|
4222
4175
|
|
|
4223
4176
|
function withStore(Component) {
|
|
4224
4177
|
function WrappedComponent(props) {
|
|
@@ -4761,8 +4714,7 @@ function AddPanelDialog(_ref) {
|
|
|
4761
4714
|
flexDirection: "column",
|
|
4762
4715
|
padding: "8px 20px"
|
|
4763
4716
|
}, /*#__PURE__*/React.createElement(IUIInput, {
|
|
4764
|
-
label: name + " name"
|
|
4765
|
-
,
|
|
4717
|
+
label: name + " name",
|
|
4766
4718
|
name: "name",
|
|
4767
4719
|
defaultValue: "",
|
|
4768
4720
|
onValueChange: onValueChange,
|
|
@@ -4846,7 +4798,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4846
4798
|
}
|
|
4847
4799
|
setProductAccess(_productAccess);
|
|
4848
4800
|
};
|
|
4849
|
-
|
|
4850
4801
|
var _useState2 = useState({
|
|
4851
4802
|
first_name: '',
|
|
4852
4803
|
last_name: '',
|
|
@@ -5095,7 +5046,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5095
5046
|
dispatch(submitAddModalData(addModalData.id, {
|
|
5096
5047
|
names: [validatedValue]
|
|
5097
5048
|
})).then(function (res) {
|
|
5098
|
-
var _extends2;
|
|
5049
|
+
var _extends2, _extends3;
|
|
5099
5050
|
setAddModalData(_extends({}, addModalData, {
|
|
5100
5051
|
isOpen: false
|
|
5101
5052
|
}));
|
|
@@ -5105,10 +5056,11 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5105
5056
|
value: res.data.value,
|
|
5106
5057
|
label: res.data.label
|
|
5107
5058
|
}, _extends2)));
|
|
5059
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends3 = {}, _extends3[tempKey] = true, _extends3)));
|
|
5108
5060
|
asyncSelectRefs.current[tempKey].current.blur();
|
|
5109
5061
|
clearCacheForAsyncDropdown(function (prevState) {
|
|
5110
|
-
var
|
|
5111
|
-
return _extends({}, prevState, (
|
|
5062
|
+
var _extends4;
|
|
5063
|
+
return _extends({}, prevState, (_extends4 = {}, _extends4[tempKey] = prevState[tempKey] + 1, _extends4));
|
|
5112
5064
|
});
|
|
5113
5065
|
dispatch(stopLoader());
|
|
5114
5066
|
});
|
|
@@ -5127,8 +5079,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5127
5079
|
try {
|
|
5128
5080
|
var _temp6 = function _temp6() {
|
|
5129
5081
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5130
|
-
var
|
|
5131
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5082
|
+
var _extends5;
|
|
5083
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends5 = {}, _extends5[_name] = true, _extends5)));
|
|
5132
5084
|
}
|
|
5133
5085
|
};
|
|
5134
5086
|
var _name = args._name,
|
|
@@ -5151,8 +5103,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5151
5103
|
updateError('contact_country_code', _isError, _errorMsg);
|
|
5152
5104
|
} else {
|
|
5153
5105
|
var _temp8 = function _temp8() {
|
|
5154
|
-
var
|
|
5155
|
-
setPersonalInfoInput(_extends({}, personalInfoInput, (
|
|
5106
|
+
var _extends6;
|
|
5107
|
+
setPersonalInfoInput(_extends({}, personalInfoInput, (_extends6 = {}, _extends6[_name] = _value, _extends6)));
|
|
5156
5108
|
updateError(_name, _isError, _errorMsg);
|
|
5157
5109
|
};
|
|
5158
5110
|
var _temp9 = function () {
|
|
@@ -5200,16 +5152,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5200
5152
|
}
|
|
5201
5153
|
};
|
|
5202
5154
|
var onEmployeeInfoChange = function onEmployeeInfoChange(args) {
|
|
5203
|
-
var
|
|
5155
|
+
var _extends7;
|
|
5204
5156
|
var _name = args._name,
|
|
5205
5157
|
_value = args._value,
|
|
5206
5158
|
_isError = args._isError,
|
|
5207
5159
|
_errorMsg = args._errorMsg;
|
|
5208
|
-
|
|
5160
|
+
console.log({
|
|
5161
|
+
_name: _name,
|
|
5162
|
+
_value: _value
|
|
5163
|
+
});
|
|
5164
|
+
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends7 = {}, _extends7[_name] = _value, _extends7)));
|
|
5209
5165
|
updateError(_name, _isError, _errorMsg);
|
|
5210
5166
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5211
|
-
var
|
|
5212
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5167
|
+
var _extends8;
|
|
5168
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends8 = {}, _extends8[_name] = true, _extends8)));
|
|
5213
5169
|
}
|
|
5214
5170
|
};
|
|
5215
5171
|
var getUserTagTypeId = function getUserTagTypeId(name) {
|
|
@@ -5219,9 +5175,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5219
5175
|
return tag.id;
|
|
5220
5176
|
};
|
|
5221
5177
|
var onUserTagTypeChange = function onUserTagTypeChange(args) {
|
|
5222
|
-
var
|
|
5178
|
+
var _extends9;
|
|
5223
5179
|
var e = args._event;
|
|
5224
|
-
setUserTagType(_extends({}, userTagType, (
|
|
5180
|
+
setUserTagType(_extends({}, userTagType, (_extends9 = {}, _extends9[e.target.name] = userTagType[e.target.name] ? false : getUserTagTypeId(e.target.name), _extends9)));
|
|
5225
5181
|
if (Object.hasOwnProperty.call(inputChangeLog, 'userTagType')) {
|
|
5226
5182
|
updateInputChangeLog(_extends({}, inputChangeLog, {
|
|
5227
5183
|
userTagType: true
|
|
@@ -5229,30 +5185,26 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5229
5185
|
}
|
|
5230
5186
|
};
|
|
5231
5187
|
var onCustomFieldsChange = function onCustomFieldsChange(_ref2) {
|
|
5232
|
-
var
|
|
5188
|
+
var _extends10;
|
|
5233
5189
|
var _name = _ref2._name,
|
|
5234
5190
|
_value = _ref2._value;
|
|
5235
|
-
setCustomFieldsInput(_extends({}, customFieldsInput, (
|
|
5191
|
+
setCustomFieldsInput(_extends({}, customFieldsInput, (_extends10 = {}, _extends10[_name] = _value, _extends10)));
|
|
5236
5192
|
};
|
|
5237
5193
|
var onTravelApproversInputChange = function onTravelApproversInputChange(_ref3) {
|
|
5238
|
-
var
|
|
5194
|
+
var _extends11;
|
|
5239
5195
|
var _name = _ref3._name,
|
|
5240
5196
|
_value = _ref3._value;
|
|
5241
|
-
setTravelApproversInput(_extends({}, travelApproversInput, (
|
|
5197
|
+
setTravelApproversInput(_extends({}, travelApproversInput, (_extends11 = {}, _extends11[_name] = _value, _extends11)));
|
|
5242
5198
|
};
|
|
5243
5199
|
var onExpenseApproversInputChange = function onExpenseApproversInputChange(_ref4) {
|
|
5244
|
-
var
|
|
5200
|
+
var _extends12;
|
|
5245
5201
|
var _name = _ref4._name,
|
|
5246
5202
|
_value = _ref4._value;
|
|
5247
|
-
setExpenseApproversInput(_extends({}, expenseApproversInput, (
|
|
5203
|
+
setExpenseApproversInput(_extends({}, expenseApproversInput, (_extends12 = {}, _extends12[_name] = _value, _extends12)));
|
|
5248
5204
|
};
|
|
5249
5205
|
var onMemInfoInputChange = function onMemInfoInputChange(index, key, val) {
|
|
5250
5206
|
var _membershipInfoInput = [].concat(membershipInfoInput);
|
|
5251
|
-
|
|
5252
|
-
_membershipInfoInput[index][key] = val.label;
|
|
5253
|
-
} else {
|
|
5254
|
-
_membershipInfoInput[index][key] = val;
|
|
5255
|
-
}
|
|
5207
|
+
_membershipInfoInput[index][key] = val;
|
|
5256
5208
|
_membershipInfoInput[index].isEditMode = isEditMode;
|
|
5257
5209
|
setMembershipInfoInput(_membershipInfoInput);
|
|
5258
5210
|
};
|
|
@@ -5282,39 +5234,39 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5282
5234
|
setMembershipInfoInput(_membershipInfoInputTemp);
|
|
5283
5235
|
};
|
|
5284
5236
|
var travelPreferenceOnChange = function travelPreferenceOnChange(args) {
|
|
5285
|
-
var
|
|
5237
|
+
var _extends13;
|
|
5286
5238
|
var _name = args._name,
|
|
5287
5239
|
_value = args._value,
|
|
5288
5240
|
_isError = args._isError,
|
|
5289
5241
|
_errorMsg = args._errorMsg;
|
|
5290
|
-
settravelPreferenceInfo(_extends({}, travelPreferenceInfo, (
|
|
5242
|
+
settravelPreferenceInfo(_extends({}, travelPreferenceInfo, (_extends13 = {}, _extends13[_name] = _value, _extends13)));
|
|
5291
5243
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5292
|
-
var
|
|
5293
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5244
|
+
var _extends14;
|
|
5245
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends14 = {}, _extends14[_name] = true, _extends14)));
|
|
5294
5246
|
}
|
|
5295
5247
|
updateError(_name, _isError, _errorMsg);
|
|
5296
5248
|
};
|
|
5297
5249
|
var onSecureTraveelerInfoInputChange = function onSecureTraveelerInfoInputChange(args) {
|
|
5298
|
-
var
|
|
5250
|
+
var _extends15;
|
|
5299
5251
|
var _name = args._name,
|
|
5300
5252
|
_value = args._value,
|
|
5301
5253
|
_isError = args._isError,
|
|
5302
5254
|
_errorMsg = args._errorMsg;
|
|
5303
|
-
setSecureTravelInputInfo(_extends({}, secureTravelInputInfo, (
|
|
5255
|
+
setSecureTravelInputInfo(_extends({}, secureTravelInputInfo, (_extends15 = {}, _extends15[_name] = _value, _extends15)));
|
|
5304
5256
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5305
|
-
var
|
|
5306
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5257
|
+
var _extends16;
|
|
5258
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends16 = {}, _extends16[_name] = true, _extends16)));
|
|
5307
5259
|
}
|
|
5308
5260
|
updateError(_name, _isError, _errorMsg);
|
|
5309
5261
|
};
|
|
5310
5262
|
var onPassportInfoInputChange = function onPassportInfoInputChange(args) {
|
|
5311
5263
|
try {
|
|
5312
5264
|
var _temp14 = function _temp14() {
|
|
5313
|
-
var
|
|
5314
|
-
setPassportInfoInput(_extends({}, passportInfoInput, (
|
|
5265
|
+
var _extends17;
|
|
5266
|
+
setPassportInfoInput(_extends({}, passportInfoInput, (_extends17 = {}, _extends17[_name] = _value, _extends17)));
|
|
5315
5267
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5316
|
-
var
|
|
5317
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5268
|
+
var _extends18;
|
|
5269
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends18 = {}, _extends18[_name] = true, _extends18)));
|
|
5318
5270
|
}
|
|
5319
5271
|
updateError(_name, _isError, _errorMsg);
|
|
5320
5272
|
};
|
|
@@ -5420,8 +5372,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5420
5372
|
return _errorArray;
|
|
5421
5373
|
});
|
|
5422
5374
|
setErrorMsgs(function (prevState) {
|
|
5423
|
-
var
|
|
5424
|
-
return _extends({}, prevState, (
|
|
5375
|
+
var _extends19;
|
|
5376
|
+
return _extends({}, prevState, (_extends19 = {}, _extends19[_name] = _errorMsg, _extends19));
|
|
5425
5377
|
});
|
|
5426
5378
|
};
|
|
5427
5379
|
var dispatch = useDispatch();
|
|
@@ -5680,7 +5632,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5680
5632
|
required: true
|
|
5681
5633
|
}
|
|
5682
5634
|
}));
|
|
5683
|
-
|
|
5684
5635
|
var _productAccess = _extends({}, productAccess);
|
|
5685
5636
|
renderFields.products.forEach(function (product) {
|
|
5686
5637
|
_productAccess[product.name] = true;
|
|
@@ -5877,8 +5828,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5877
5828
|
}
|
|
5878
5829
|
_errorMsgs.passport_issue_date = '';
|
|
5879
5830
|
}
|
|
5880
|
-
if (passportInfoInput.passport_photo.length === 0 && userTravelInfo.file_name === false &&
|
|
5881
|
-
fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5831
|
+
if (passportInfoInput.passport_photo.length === 0 && userTravelInfo.file_name === false && fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5882
5832
|
_isError = true;
|
|
5883
5833
|
if (_errorArray.indexOf('passport_photo') === -1) {
|
|
5884
5834
|
_errorArray.push('passport_photo');
|
|
@@ -5890,8 +5840,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5890
5840
|
}
|
|
5891
5841
|
_errorMsgs.passport_photo = '';
|
|
5892
5842
|
}
|
|
5893
|
-
if (passportInfoInput.travel_docs.length === 0 && userTravelInfo.file_name === false &&
|
|
5894
|
-
fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5843
|
+
if (passportInfoInput.travel_docs.length === 0 && userTravelInfo.file_name === false && fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5895
5844
|
_isError = true;
|
|
5896
5845
|
if (_errorArray.indexOf('travel_docs') === -1) {
|
|
5897
5846
|
_errorArray.push('travel_docs');
|
|
@@ -5941,6 +5890,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5941
5890
|
var _config$routes2, _config$routes2$users, _config$routes2$users2;
|
|
5942
5891
|
(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);
|
|
5943
5892
|
}
|
|
5893
|
+
setFilesForDelete([]);
|
|
5894
|
+
setProfilePicDelete([]);
|
|
5944
5895
|
})["catch"](function (err) {
|
|
5945
5896
|
if (typeof err === 'object') {
|
|
5946
5897
|
if (err.country_code) {
|
|
@@ -6049,8 +6000,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6049
6000
|
window.location.href = config.routes.profile.redirectUrl.cancel;
|
|
6050
6001
|
}
|
|
6051
6002
|
}
|
|
6052
|
-
}
|
|
6053
|
-
else {
|
|
6003
|
+
} else {
|
|
6054
6004
|
var _config$routes4, _config$routes4$users, _config$routes4$users2;
|
|
6055
6005
|
(config === null || config === void 0 ? void 0 : (_config$routes4 = config.routes) === null || _config$routes4 === void 0 ? void 0 : (_config$routes4$users = _config$routes4.users) === null || _config$routes4$users === void 0 ? void 0 : (_config$routes4$users2 = _config$routes4$users.list) === null || _config$routes4$users2 === void 0 ? void 0 : _config$routes4$users2.path) && history.push(config.routes.users.list.path);
|
|
6056
6006
|
}
|
|
@@ -6083,7 +6033,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6083
6033
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
6084
6034
|
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
6085
6035
|
}(),
|
|
6086
|
-
|
|
6087
6036
|
gender: function () {
|
|
6088
6037
|
if (res.gender === 'male') return 'Male';else if (res.gender === 'female') return 'Female';else if (res.gender === 'others') return 'Others';else return '';
|
|
6089
6038
|
}()
|
|
@@ -6128,7 +6077,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6128
6077
|
}()
|
|
6129
6078
|
});
|
|
6130
6079
|
});
|
|
6131
|
-
|
|
6132
6080
|
if (res.client_admin) {
|
|
6133
6081
|
setTravelApproversInput(function (prevState) {
|
|
6134
6082
|
var nextState = _extends({}, prevState);
|
|
@@ -6162,7 +6110,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6162
6110
|
});
|
|
6163
6111
|
}
|
|
6164
6112
|
};
|
|
6165
|
-
|
|
6166
6113
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
6167
6114
|
component: "div",
|
|
6168
6115
|
className: styles.UUIUserManagementAddEdit
|
|
@@ -6179,8 +6126,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6179
6126
|
className: styles.breadcrumb
|
|
6180
6127
|
}, /*#__PURE__*/React.createElement(IUIBreadCrumb, {
|
|
6181
6128
|
breadCrumbs: [{
|
|
6182
|
-
href:
|
|
6183
|
-
config.routes.users.list.path,
|
|
6129
|
+
href: config.routes.users.list.path,
|
|
6184
6130
|
label: 'Users',
|
|
6185
6131
|
hasLink: true
|
|
6186
6132
|
}]
|
|
@@ -6249,6 +6195,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6249
6195
|
if (!p.visibility) {
|
|
6250
6196
|
return null;
|
|
6251
6197
|
}
|
|
6198
|
+
if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
|
|
6199
|
+
return null;
|
|
6200
|
+
}
|
|
6252
6201
|
return /*#__PURE__*/React.createElement(IUIGrid, {
|
|
6253
6202
|
item: true,
|
|
6254
6203
|
sm: 12,
|
|
@@ -6627,17 +6576,13 @@ var uploadBulkUsersFile = function uploadBulkUsersFile(payload) {
|
|
|
6627
6576
|
});
|
|
6628
6577
|
};
|
|
6629
6578
|
};
|
|
6630
|
-
|
|
6631
6579
|
var uploadFileToS3$1 = function uploadFileToS3(presignedPostData, file) {
|
|
6632
6580
|
return new Promise(function (resolve, reject) {
|
|
6633
6581
|
var formData = new FormData();
|
|
6634
|
-
|
|
6635
6582
|
Object.keys(presignedPostData.fields).forEach(function (key) {
|
|
6636
6583
|
formData.append(key, presignedPostData.fields[key]);
|
|
6637
6584
|
});
|
|
6638
|
-
|
|
6639
6585
|
formData.append('file', file);
|
|
6640
|
-
|
|
6641
6586
|
axios.post(presignedPostData.url, formData, {
|
|
6642
6587
|
headers: {
|
|
6643
6588
|
'Content-Type': 'multipart/form-data'
|
|
@@ -6754,7 +6699,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
|
|
|
6754
6699
|
};
|
|
6755
6700
|
};
|
|
6756
6701
|
|
|
6757
|
-
var styles$5 = {"UUIUserManagementList":"_3WNHx","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","avatarClassName":"_2qO_X","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","user_list_page_tabs":"_xWE7K","TabLabelCount":"_13pXn"};
|
|
6702
|
+
var styles$5 = {"UUIUserManagementList":"_3WNHx","scrollOverlayMenu":"_2_WEg","overlaysearch":"_1Pbhb","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","avatarClassName":"_2qO_X","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","user_list_page_tabs":"_xWE7K","TabLabelCount":"_13pXn"};
|
|
6758
6703
|
|
|
6759
6704
|
var BulkUploadModal = function BulkUploadModal(props) {
|
|
6760
6705
|
var isOpenImportUsersModal = props.isOpenImportUsersModal,
|
|
@@ -7038,7 +6983,6 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
7038
6983
|
setOpenImportUsersModal(false);
|
|
7039
6984
|
handleImportPagenavigation(jobId);
|
|
7040
6985
|
};
|
|
7041
|
-
|
|
7042
6986
|
var handleDownloadRecords = function handleDownloadRecords(type) {
|
|
7043
6987
|
try {
|
|
7044
6988
|
setDownlStatus(true);
|
|
@@ -8064,7 +8008,6 @@ var DropdownBtn = function DropdownBtn(props) {
|
|
|
8064
8008
|
if (val.disable) return false;
|
|
8065
8009
|
if (val.handler && typeof val.handler === 'function') val.handler();
|
|
8066
8010
|
};
|
|
8067
|
-
|
|
8068
8011
|
var prevOpen = React.useRef(open);
|
|
8069
8012
|
React.useEffect(function () {
|
|
8070
8013
|
if (prevOpen.current === true && open === false) {
|
|
@@ -8332,7 +8275,6 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8332
8275
|
paddingLeft: '40px'
|
|
8333
8276
|
}
|
|
8334
8277
|
}];
|
|
8335
|
-
|
|
8336
8278
|
return /*#__PURE__*/React.createElement(IUITable, {
|
|
8337
8279
|
searchPlaceholder: "Search by name, email & department",
|
|
8338
8280
|
isCheckboxTable: true,
|
|
@@ -8355,7 +8297,8 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8355
8297
|
isDataFetching: isDataFetching,
|
|
8356
8298
|
disableRowCheckbox: disableRowCheckbox,
|
|
8357
8299
|
searchBoxWidth: "400px",
|
|
8358
|
-
searchValue: searchValue
|
|
8300
|
+
searchValue: searchValue,
|
|
8301
|
+
hideTopPagination: false
|
|
8359
8302
|
});
|
|
8360
8303
|
};
|
|
8361
8304
|
var SingupRequests = function SingupRequests(props) {
|
|
@@ -8386,7 +8329,6 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8386
8329
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
8387
8330
|
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
8388
8331
|
};
|
|
8389
|
-
|
|
8390
8332
|
var columns = [{
|
|
8391
8333
|
id: 'fname',
|
|
8392
8334
|
label: 'Name',
|
|
@@ -8397,8 +8339,7 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8397
8339
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIProfileBox, {
|
|
8398
8340
|
firstName: row.fname,
|
|
8399
8341
|
lastName: row.lname,
|
|
8400
|
-
isLetterAvatar:
|
|
8401
|
-
row.profile_pic && row.profile_pic.presigned_url ? false : true,
|
|
8342
|
+
isLetterAvatar: row.profile_pic && row.profile_pic.presigned_url ? false : true,
|
|
8402
8343
|
primaryText: row.fname + ' ' + row.lname,
|
|
8403
8344
|
secondaryText: row.email,
|
|
8404
8345
|
letterAvatarTextColor: "black",
|
|
@@ -8474,9 +8415,34 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8474
8415
|
|
|
8475
8416
|
var IUIToastMessageService$7 = services.IUIToastMessageService;
|
|
8476
8417
|
var env$7 = configs.env;
|
|
8477
|
-
var
|
|
8478
|
-
var
|
|
8479
|
-
|
|
8418
|
+
var UndoButton = function UndoButton(_ref) {
|
|
8419
|
+
var onUndo = _ref.onUndo,
|
|
8420
|
+
msg = _ref.msg;
|
|
8421
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8422
|
+
style: {
|
|
8423
|
+
display: 'flex',
|
|
8424
|
+
flexDirection: 'row',
|
|
8425
|
+
width: '270px',
|
|
8426
|
+
justifyContent: 'space-between'
|
|
8427
|
+
}
|
|
8428
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
8429
|
+
style: {
|
|
8430
|
+
whiteSpace: 'nowrap',
|
|
8431
|
+
paddingTop: '8px'
|
|
8432
|
+
}
|
|
8433
|
+
}, msg), /*#__PURE__*/React.createElement("p", {
|
|
8434
|
+
onClick: onUndo,
|
|
8435
|
+
style: {
|
|
8436
|
+
whiteSpace: 'nowrap',
|
|
8437
|
+
fontWeight: '600',
|
|
8438
|
+
fontSize: '1rem',
|
|
8439
|
+
padding: '8px 20px 0'
|
|
8440
|
+
}
|
|
8441
|
+
}, "UNDO"));
|
|
8442
|
+
};
|
|
8443
|
+
var UserList = function UserList(_ref2) {
|
|
8444
|
+
var config = _ref2.config,
|
|
8445
|
+
isProfile = _ref2.isProfile;
|
|
8480
8446
|
env$7.init(config, isProfile);
|
|
8481
8447
|
var history = useHistory();
|
|
8482
8448
|
var _useSelector = useSelector(function (state) {
|
|
@@ -8489,7 +8455,7 @@ var UserList = function UserList(_ref) {
|
|
|
8489
8455
|
var _React$useState = React.useState(1),
|
|
8490
8456
|
page = _React$useState[0],
|
|
8491
8457
|
setPage = _React$useState[1];
|
|
8492
|
-
var _useState = useState(
|
|
8458
|
+
var _useState = useState(10),
|
|
8493
8459
|
rowsPerPage = _useState[0],
|
|
8494
8460
|
setRowsPerPage = _useState[1];
|
|
8495
8461
|
var _React$useState2 = React.useState({}),
|
|
@@ -8535,19 +8501,41 @@ var UserList = function UserList(_ref) {
|
|
|
8535
8501
|
var _useState10 = useState(false),
|
|
8536
8502
|
isApiFetching = _useState10[0],
|
|
8537
8503
|
setisApiFetching = _useState10[1];
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8504
|
+
var _React$useState5 = React.useState(false),
|
|
8505
|
+
overlayMenu = _React$useState5[0],
|
|
8506
|
+
setOverlayMenu = _React$useState5[1];
|
|
8507
|
+
useScrollPosition(function (_ref3) {
|
|
8508
|
+
var prevPos = _ref3.prevPos,
|
|
8509
|
+
currPos = _ref3.currPos;
|
|
8510
|
+
if (prevPos.y - currPos.y > 0) {
|
|
8511
|
+
if (currPos.y < -130) {
|
|
8512
|
+
setOverlayMenu(true);
|
|
8513
|
+
}
|
|
8514
|
+
} else {
|
|
8515
|
+
if (currPos.y > -190) {
|
|
8516
|
+
setOverlayMenu(false);
|
|
8517
|
+
}
|
|
8518
|
+
}
|
|
8519
|
+
}, [overlayMenu]);
|
|
8520
|
+
var scrollTo = function scrollTo(id) {
|
|
8521
|
+
var el = document.getElementById(id);
|
|
8522
|
+
window.scrollTo({
|
|
8523
|
+
top: el.offsetTop,
|
|
8524
|
+
behavior: 'smooth'
|
|
8525
|
+
});
|
|
8526
|
+
};
|
|
8527
|
+
var _React$useState6 = React.useState(1),
|
|
8528
|
+
signup_page = _React$useState6[0],
|
|
8529
|
+
setSignUpPage = _React$useState6[1];
|
|
8542
8530
|
var _useState11 = useState(5),
|
|
8543
8531
|
signup_rowsPerPage = _useState11[0],
|
|
8544
8532
|
setSignUpRowsPerPage = _useState11[1];
|
|
8545
|
-
var _React$
|
|
8546
|
-
signup_order = _React$
|
|
8547
|
-
setSignUpOrder = _React$
|
|
8548
|
-
var _React$
|
|
8549
|
-
signup_orderBy = _React$
|
|
8550
|
-
setSignUpOrderBy = _React$
|
|
8533
|
+
var _React$useState7 = React.useState('asc'),
|
|
8534
|
+
signup_order = _React$useState7[0],
|
|
8535
|
+
setSignUpOrder = _React$useState7[1];
|
|
8536
|
+
var _React$useState8 = React.useState('fname'),
|
|
8537
|
+
signup_orderBy = _React$useState8[0],
|
|
8538
|
+
setSignUpOrderBy = _React$useState8[1];
|
|
8551
8539
|
var _useState12 = useState(''),
|
|
8552
8540
|
signup_searchValue = _useState12[0],
|
|
8553
8541
|
set_signup_SearchValue = _useState12[1];
|
|
@@ -8589,38 +8577,16 @@ var UserList = function UserList(_ref) {
|
|
|
8589
8577
|
var handleVerifyUserClick = function handleVerifyUserClick(userId) {
|
|
8590
8578
|
history.push(config.routes.users.add.path + "?" + config.routes.users.add.queryParamKeys.verifyUserId + "=" + userId);
|
|
8591
8579
|
};
|
|
8592
|
-
var UndoButton = function UndoButton(_ref2) {
|
|
8593
|
-
var msg = _ref2.msg,
|
|
8594
|
-
id = _ref2.id;
|
|
8595
|
-
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
8596
|
-
display: "flex",
|
|
8597
|
-
flexDirection: "row",
|
|
8598
|
-
width: "270px"
|
|
8599
|
-
}, /*#__PURE__*/React.createElement(IUITypography, {
|
|
8600
|
-
style: {
|
|
8601
|
-
whiteSpace: 'nowrap',
|
|
8602
|
-
paddingTop: '8px'
|
|
8603
|
-
}
|
|
8604
|
-
}, msg), /*#__PURE__*/React.createElement(IUIButton, {
|
|
8605
|
-
type: "text",
|
|
8606
|
-
buttonText: "UNDO",
|
|
8607
|
-
style: {
|
|
8608
|
-
color: '#FFFFFF'
|
|
8609
|
-
},
|
|
8610
|
-
onClick: function onClick() {
|
|
8611
|
-
return dispatch(undoneSignUpRejection(id));
|
|
8612
|
-
}
|
|
8613
|
-
}));
|
|
8614
|
-
};
|
|
8615
8580
|
var handleRejectUserClick = function handleRejectUserClick(userId) {
|
|
8616
8581
|
dispatch(rejectUserVerification(userId)).then(function (res) {
|
|
8617
|
-
var _res$data;
|
|
8618
|
-
console.log(res);
|
|
8619
|
-
IUIToastMessageService$7.undoNotify( /*#__PURE__*/React.createElement(UndoButton, {
|
|
8620
|
-
msg: (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.message) || 'Sign-up request rejected',
|
|
8621
|
-
id: userId
|
|
8622
|
-
}));
|
|
8623
8582
|
if (res.status === true) {
|
|
8583
|
+
var _res$data;
|
|
8584
|
+
IUIToastMessageService$7.undoNotify( /*#__PURE__*/React.createElement(UndoButton, {
|
|
8585
|
+
onUndo: function onUndo() {
|
|
8586
|
+
return dispatch(undoneSignUpRejection(userId));
|
|
8587
|
+
},
|
|
8588
|
+
msg: (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.message) || 'Sign-up request rejected'
|
|
8589
|
+
}));
|
|
8624
8590
|
dispatch(showDataFetchingStatus());
|
|
8625
8591
|
dispatch(fetchUserSignupRequests({
|
|
8626
8592
|
ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
|
|
@@ -8794,6 +8760,7 @@ var UserList = function UserList(_ref) {
|
|
|
8794
8760
|
dispatch(fetchUsersList(url)).then(function () {
|
|
8795
8761
|
setSearchingChange(false);
|
|
8796
8762
|
setisApiFetching(false);
|
|
8763
|
+
scrollTo('table-root');
|
|
8797
8764
|
});
|
|
8798
8765
|
}, 1000);
|
|
8799
8766
|
return function () {
|
|
@@ -8819,6 +8786,7 @@ var UserList = function UserList(_ref) {
|
|
|
8819
8786
|
}
|
|
8820
8787
|
if (isSortingChange) {
|
|
8821
8788
|
setisApiFetching(true);
|
|
8789
|
+
scrollTo('table-root');
|
|
8822
8790
|
dispatch(fetchUsersList(url)).then(function () {
|
|
8823
8791
|
setisApiFetching(false);
|
|
8824
8792
|
setSortingChange(false);
|
|
@@ -8857,15 +8825,89 @@ var UserList = function UserList(_ref) {
|
|
|
8857
8825
|
}
|
|
8858
8826
|
}
|
|
8859
8827
|
}, [isTokenVerified, isSearchingChangeTemp, isSortingChangeTemp, isSignUpSearchingChangeTemp, isSignUpSortingChangeTemp]);
|
|
8828
|
+
var topRightButtons = function topRightButtons() {
|
|
8829
|
+
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
8830
|
+
component: "div",
|
|
8831
|
+
className: styles$5.buttonWrapper,
|
|
8832
|
+
display: "flex",
|
|
8833
|
+
justifyContent: "space-between",
|
|
8834
|
+
alignItems: "center",
|
|
8835
|
+
alignSelf: "flex-start"
|
|
8836
|
+
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8837
|
+
component: "div",
|
|
8838
|
+
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
8839
|
+
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
8840
|
+
buttonText: "Export all users",
|
|
8841
|
+
type: "outlined",
|
|
8842
|
+
startIcon: /*#__PURE__*/React.createElement(BulkDownloadIcon, {
|
|
8843
|
+
width: "22",
|
|
8844
|
+
height: "22"
|
|
8845
|
+
}),
|
|
8846
|
+
onClick: handleExportUsers
|
|
8847
|
+
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8848
|
+
component: "div",
|
|
8849
|
+
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
8850
|
+
}, /*#__PURE__*/React.createElement(IUIDropdownButton, {
|
|
8851
|
+
buttonText: "Bulk actions",
|
|
8852
|
+
type: "outlined",
|
|
8853
|
+
menuListInfo: BulkUploadInfo
|
|
8854
|
+
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8855
|
+
component: "div",
|
|
8856
|
+
className: "pageHeader--button-single button-right"
|
|
8857
|
+
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
8858
|
+
buttonText: "Add user",
|
|
8859
|
+
type: "contained",
|
|
8860
|
+
startIcon: /*#__PURE__*/React.createElement(AddIcon, {
|
|
8861
|
+
width: "9",
|
|
8862
|
+
height: "9",
|
|
8863
|
+
color: "white"
|
|
8864
|
+
}),
|
|
8865
|
+
onClick: handleAddPageNavigation
|
|
8866
|
+
})));
|
|
8867
|
+
};
|
|
8860
8868
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
8861
8869
|
component: "div",
|
|
8862
8870
|
className: styles$5.UUIUserManagementList
|
|
8863
|
-
},
|
|
8871
|
+
}, overlayMenu ? /*#__PURE__*/React.createElement(Box, {
|
|
8872
|
+
className: styles$5.scrollOverlayMenu
|
|
8873
|
+
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8874
|
+
component: "div",
|
|
8875
|
+
className: clsx(styles$5.pageHeader)
|
|
8876
|
+
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8877
|
+
component: "div",
|
|
8878
|
+
display: "flex",
|
|
8879
|
+
justifyContent: "space-between",
|
|
8880
|
+
alignItems: "center",
|
|
8881
|
+
flexWrap: "wrap",
|
|
8882
|
+
style: {
|
|
8883
|
+
gap: '1rem'
|
|
8884
|
+
}
|
|
8885
|
+
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8886
|
+
component: "div",
|
|
8887
|
+
display: "flex",
|
|
8888
|
+
flexDirection: "column",
|
|
8889
|
+
style: {
|
|
8890
|
+
gap: '0.5rem'
|
|
8891
|
+
}
|
|
8892
|
+
}, /*#__PURE__*/React.createElement(IUISearch, {
|
|
8893
|
+
placeholder: "Search by name, email & department",
|
|
8894
|
+
value: searchValue,
|
|
8895
|
+
onChangeHandler: function onChangeHandler(e) {
|
|
8896
|
+
return onSearchHandler(e.target.value);
|
|
8897
|
+
},
|
|
8898
|
+
className: styles$5.overlaysearch
|
|
8899
|
+
})), topRightButtons()), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8900
|
+
component: "div",
|
|
8901
|
+
display: "flex",
|
|
8902
|
+
justifyContent: "space-between",
|
|
8903
|
+
alignItems: "center"
|
|
8904
|
+
}))) : '', !hasVerificationError ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBackdrop, {
|
|
8864
8905
|
open: isFileDownloading || isApiFetching,
|
|
8865
8906
|
className: styles$5.backdrop
|
|
8866
8907
|
}, /*#__PURE__*/React.createElement(IUICircularProgress, {
|
|
8867
8908
|
color: "inherit"
|
|
8868
8909
|
})), isDataFetching ? /*#__PURE__*/React.createElement(SkeletonLoader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8910
|
+
id: "table-root",
|
|
8869
8911
|
component: "div",
|
|
8870
8912
|
className: clsx(styles$5.pageHeader)
|
|
8871
8913
|
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
@@ -8890,44 +8932,7 @@ var UserList = function UserList(_ref) {
|
|
|
8890
8932
|
}, /*#__PURE__*/React.createElement(IUITypography, {
|
|
8891
8933
|
variant: "h3",
|
|
8892
8934
|
className: clsx(styles$5.heading, styles$5.headingLarge)
|
|
8893
|
-
}, isILadmin && companyName ? companyName + " - Users" : 'Users'))), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8894
|
-
component: "div",
|
|
8895
|
-
className: styles$5.buttonWrapper,
|
|
8896
|
-
display: "flex",
|
|
8897
|
-
justifyContent: "space-between",
|
|
8898
|
-
alignItems: "center",
|
|
8899
|
-
alignSelf: "flex-start"
|
|
8900
|
-
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8901
|
-
component: "div",
|
|
8902
|
-
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
8903
|
-
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
8904
|
-
buttonText: "Export all users",
|
|
8905
|
-
type: "outlined",
|
|
8906
|
-
startIcon: /*#__PURE__*/React.createElement(BulkDownloadIcon, {
|
|
8907
|
-
width: "22",
|
|
8908
|
-
height: "22"
|
|
8909
|
-
}),
|
|
8910
|
-
onClick: handleExportUsers
|
|
8911
|
-
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8912
|
-
component: "div",
|
|
8913
|
-
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
8914
|
-
}, /*#__PURE__*/React.createElement(IUIDropdownButton, {
|
|
8915
|
-
buttonText: "Bulk actions",
|
|
8916
|
-
type: "outlined",
|
|
8917
|
-
menuListInfo: BulkUploadInfo
|
|
8918
|
-
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8919
|
-
component: "div",
|
|
8920
|
-
className: "pageHeader--button-single button-right"
|
|
8921
|
-
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
8922
|
-
buttonText: "Add user",
|
|
8923
|
-
type: "contained",
|
|
8924
|
-
startIcon: /*#__PURE__*/React.createElement(AddIcon, {
|
|
8925
|
-
width: "9",
|
|
8926
|
-
height: "9",
|
|
8927
|
-
color: "white"
|
|
8928
|
-
}),
|
|
8929
|
-
onClick: handleAddPageNavigation
|
|
8930
|
-
})))), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8935
|
+
}, isILadmin && companyName ? companyName + " - Users" : 'Users'))), topRightButtons()), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8931
8936
|
component: "div",
|
|
8932
8937
|
display: "flex",
|
|
8933
8938
|
justifyContent: "space-between",
|
|
@@ -9054,8 +9059,8 @@ var UserList = function UserList(_ref) {
|
|
|
9054
9059
|
errMsg: hasVerificationError
|
|
9055
9060
|
}));
|
|
9056
9061
|
};
|
|
9057
|
-
var TabLabelCount = function TabLabelCount(
|
|
9058
|
-
var count =
|
|
9062
|
+
var TabLabelCount = function TabLabelCount(_ref4) {
|
|
9063
|
+
var count = _ref4.count;
|
|
9059
9064
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9060
9065
|
className: styles$5.TabLabelCount
|
|
9061
9066
|
}, " ", count, " ");
|
|
@@ -9269,7 +9274,6 @@ function EditPanelDialog(_ref) {
|
|
|
9269
9274
|
return state.userPanel;
|
|
9270
9275
|
}),
|
|
9271
9276
|
dialogData = _useSelector.dialogData;
|
|
9272
|
-
|
|
9273
9277
|
return /*#__PURE__*/React.createElement(IUIModal, {
|
|
9274
9278
|
isDisabledSubmitBtn: isDisabledSubmitBtn,
|
|
9275
9279
|
isOpen: isOpen,
|
|
@@ -9296,8 +9300,7 @@ function EditPanelDialog(_ref) {
|
|
|
9296
9300
|
flexDirection: "column",
|
|
9297
9301
|
padding: "8px 24px"
|
|
9298
9302
|
}, /*#__PURE__*/React.createElement(IUIInput, {
|
|
9299
|
-
label: name + " name"
|
|
9300
|
-
,
|
|
9303
|
+
label: name + " name",
|
|
9301
9304
|
name: "name",
|
|
9302
9305
|
defaultValue: dialogData.data.name,
|
|
9303
9306
|
onValueChange: onValueChange,
|
|
@@ -9502,7 +9505,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
9502
9505
|
}),
|
|
9503
9506
|
isTokenVerified = _useSelector2.isTokenVerified,
|
|
9504
9507
|
hasVerificationError = _useSelector2.hasVerificationError;
|
|
9505
|
-
|
|
9506
9508
|
var onValueChange = function onValueChange(_ref2) {
|
|
9507
9509
|
var _value = _ref2._value;
|
|
9508
9510
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
@@ -9613,7 +9615,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
9613
9615
|
var message = title + " deleted successfully.";
|
|
9614
9616
|
handleApiCall(deleteRecord, payload, message, 'delete');
|
|
9615
9617
|
};
|
|
9616
|
-
|
|
9617
9618
|
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type) {
|
|
9618
9619
|
dispatch(userPanelShowLoader());
|
|
9619
9620
|
dispatch(dispatchFun(tableName, payload, getApiData())).then(function (res) {
|