@itilite/iui-user-management 0.4.21 → 0.4.23
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.js +45 -89
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +45 -89
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
- package/dist/VectorinfoIcon~bdIVCeRl.jpg +0 -0
package/dist/index.js
CHANGED
|
@@ -70,7 +70,6 @@ var _Pact = /*#__PURE__*/function () {
|
|
|
70
70
|
};
|
|
71
71
|
return _Pact;
|
|
72
72
|
}();
|
|
73
|
-
|
|
74
73
|
function _settle(pact, state, value) {
|
|
75
74
|
if (!pact.s) {
|
|
76
75
|
if (value instanceof _Pact) {
|
|
@@ -99,7 +98,6 @@ function _settle(pact, state, value) {
|
|
|
99
98
|
function _isSettledPact(thenable) {
|
|
100
99
|
return thenable instanceof _Pact && thenable.s & 1;
|
|
101
100
|
}
|
|
102
|
-
|
|
103
101
|
function _forTo(array, body, check) {
|
|
104
102
|
var i = -1,
|
|
105
103
|
pact,
|
|
@@ -131,7 +129,6 @@ function _forTo(array, body, check) {
|
|
|
131
129
|
}
|
|
132
130
|
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
133
131
|
var _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
134
|
-
|
|
135
132
|
function _catch(body, recover) {
|
|
136
133
|
try {
|
|
137
134
|
var result = body();
|
|
@@ -469,7 +466,6 @@ var NAoptionConfig = {
|
|
|
469
466
|
},
|
|
470
467
|
applyFor: ['employee_level', 'department']
|
|
471
468
|
};
|
|
472
|
-
|
|
473
469
|
var commonLoadOptions = function commonLoadOptions(search, loadedOptions, _ref) {
|
|
474
470
|
var page = _ref.page,
|
|
475
471
|
tabelName = _ref.tabelName,
|
|
@@ -666,7 +662,6 @@ var countryOptions = function countryOptions(search, loadedOptions, _ref5) {
|
|
|
666
662
|
label: item[tabelName]
|
|
667
663
|
};
|
|
668
664
|
});
|
|
669
|
-
|
|
670
665
|
return {
|
|
671
666
|
options: mappedValue,
|
|
672
667
|
hasMore: !!response.next,
|
|
@@ -768,7 +763,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
768
763
|
if (userTags.length) {
|
|
769
764
|
res.user_tags = userTags;
|
|
770
765
|
}
|
|
771
|
-
|
|
772
766
|
if (payload.productAccess.travel) {
|
|
773
767
|
var _payload$passportInfo, _payload$passportInfo2, _payload$passportInfo3, _payload$passportInfo4, _payload$membershipIn, _payload$uploadedFile;
|
|
774
768
|
res.approvers.travel = [];
|
|
@@ -780,14 +774,12 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
780
774
|
});
|
|
781
775
|
}
|
|
782
776
|
}
|
|
783
|
-
|
|
784
777
|
if (payload.travelFYI && payload.travelFYI.value) {
|
|
785
778
|
res.approvers.travel.push({
|
|
786
779
|
email: payload.travelFYI.value,
|
|
787
780
|
sequence: 'fyi'
|
|
788
781
|
});
|
|
789
782
|
}
|
|
790
|
-
|
|
791
783
|
res.user_travel_info = {
|
|
792
784
|
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,
|
|
793
785
|
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,
|
|
@@ -826,7 +818,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
826
818
|
res.files = [];
|
|
827
819
|
}
|
|
828
820
|
}
|
|
829
|
-
|
|
830
821
|
if (payload.productAccess.expense) {
|
|
831
822
|
res.approvers.expense = [];
|
|
832
823
|
for (var _key2 in payload.expenseApproversInput) {
|
|
@@ -837,7 +828,6 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
837
828
|
});
|
|
838
829
|
}
|
|
839
830
|
}
|
|
840
|
-
|
|
841
831
|
if (payload.expenseFYI && payload.expenseFYI.value) {
|
|
842
832
|
res.approvers.expense.push({
|
|
843
833
|
email: payload.expenseFYI.value,
|
|
@@ -945,7 +935,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
945
935
|
});
|
|
946
936
|
}
|
|
947
937
|
}
|
|
948
|
-
|
|
949
938
|
if (payload.travelFYI && payload.travelFYI.value) {
|
|
950
939
|
res.fields.approvers.travel.push({
|
|
951
940
|
email: payload.travelFYI.value,
|
|
@@ -1022,7 +1011,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1022
1011
|
res.fields.user_travel_info.redress_number = payload.secureTravelInputInfo.redress_number || null;
|
|
1023
1012
|
}
|
|
1024
1013
|
}
|
|
1025
|
-
|
|
1026
1014
|
if (payload.productAccess.expense) {
|
|
1027
1015
|
if (!env$1.isProfilePage()) {
|
|
1028
1016
|
res.fields.approvers.expense = [];
|
|
@@ -1034,7 +1022,6 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
|
|
|
1034
1022
|
});
|
|
1035
1023
|
}
|
|
1036
1024
|
}
|
|
1037
|
-
|
|
1038
1025
|
if (payload.expenseFYI && payload.expenseFYI.value) {
|
|
1039
1026
|
res.fields.approvers.expense.push({
|
|
1040
1027
|
email: payload.expenseFYI.value,
|
|
@@ -1488,17 +1475,13 @@ var uploadSingleDocumnet = function uploadSingleDocumnet(payload) {
|
|
|
1488
1475
|
});
|
|
1489
1476
|
};
|
|
1490
1477
|
};
|
|
1491
|
-
|
|
1492
1478
|
var uploadFileToS3 = function uploadFileToS3(presignedPostData, file) {
|
|
1493
1479
|
return new Promise(function (resolve, reject) {
|
|
1494
1480
|
var formData = new FormData();
|
|
1495
|
-
|
|
1496
1481
|
Object.keys(presignedPostData.fields).forEach(function (key) {
|
|
1497
1482
|
formData.append(key, presignedPostData.fields[key]);
|
|
1498
1483
|
});
|
|
1499
|
-
|
|
1500
1484
|
formData.append('file', file);
|
|
1501
|
-
|
|
1502
1485
|
axios.post(presignedPostData.url, formData, {
|
|
1503
1486
|
headers: {
|
|
1504
1487
|
'Content-Type': 'multipart/form-data'
|
|
@@ -1780,7 +1763,6 @@ var getUserPanalData = function getUserPanalData(params) {
|
|
|
1780
1763
|
});
|
|
1781
1764
|
};
|
|
1782
1765
|
};
|
|
1783
|
-
|
|
1784
1766
|
var addRecord = function addRecord(tableName, data, getParam) {
|
|
1785
1767
|
return function (dispatch) {
|
|
1786
1768
|
return new Promise(function (resolve, reject) {
|
|
@@ -2324,7 +2306,6 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2324
2306
|
setOpenEditAproverModalFlag(false);
|
|
2325
2307
|
});
|
|
2326
2308
|
};
|
|
2327
|
-
|
|
2328
2309
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
|
|
2329
2310
|
container: true,
|
|
2330
2311
|
className: (styles.headingPadding)
|
|
@@ -2472,8 +2453,7 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2472
2453
|
headerText: "Edit approver field",
|
|
2473
2454
|
cancelLabel: "Cancel",
|
|
2474
2455
|
submitLabel: "Save",
|
|
2475
|
-
submitHandler: handleEditAproverLabel
|
|
2476
|
-
,
|
|
2456
|
+
submitHandler: handleEditAproverLabel,
|
|
2477
2457
|
width: "420px",
|
|
2478
2458
|
modalBodyStyle: {
|
|
2479
2459
|
maxHeight: '600px',
|
|
@@ -3028,8 +3008,7 @@ var workInfo = [{
|
|
|
3028
3008
|
minLength: 0
|
|
3029
3009
|
},
|
|
3030
3010
|
disableText: 'Please get in touch with your administrator to change this value.'
|
|
3031
|
-
},
|
|
3032
|
-
{
|
|
3011
|
+
}, {
|
|
3033
3012
|
id: 9,
|
|
3034
3013
|
label: 'Base location',
|
|
3035
3014
|
name: 'base_location',
|
|
@@ -3864,7 +3843,6 @@ var reducer$1 = function reducer(state, action) {
|
|
|
3864
3843
|
_userListInfo.results[i].is_active = action.payload.is_active;
|
|
3865
3844
|
}
|
|
3866
3845
|
});
|
|
3867
|
-
|
|
3868
3846
|
var _deactivatedUsers = _userListInfo.results.length > 0 ? _userListInfo.results.filter(function (val) {
|
|
3869
3847
|
return !val.is_active;
|
|
3870
3848
|
}).map(function (obj) {
|
|
@@ -3887,7 +3865,6 @@ var reducer$1 = function reducer(state, action) {
|
|
|
3887
3865
|
}
|
|
3888
3866
|
});
|
|
3889
3867
|
});
|
|
3890
|
-
|
|
3891
3868
|
var _deactivatedUsers2 = _userListInfo2.results.length > 0 ? _userListInfo2.results.filter(function (val) {
|
|
3892
3869
|
return !val.is_active;
|
|
3893
3870
|
}).map(function (obj) {
|
|
@@ -4196,8 +4173,7 @@ var rootReducer = redux.combineReducers({
|
|
|
4196
4173
|
customFields: reducer$5
|
|
4197
4174
|
});
|
|
4198
4175
|
|
|
4199
|
-
var store = redux.createStore(rootReducer, reduxDevtoolsExtension.composeWithDevTools(redux.applyMiddleware(thunk)
|
|
4200
|
-
));
|
|
4176
|
+
var store = redux.createStore(rootReducer, reduxDevtoolsExtension.composeWithDevTools(redux.applyMiddleware(thunk)));
|
|
4201
4177
|
|
|
4202
4178
|
function withStore(Component) {
|
|
4203
4179
|
function WrappedComponent(props) {
|
|
@@ -4740,8 +4716,7 @@ function AddPanelDialog(_ref) {
|
|
|
4740
4716
|
flexDirection: "column",
|
|
4741
4717
|
padding: "8px 20px"
|
|
4742
4718
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
4743
|
-
label: name + " name"
|
|
4744
|
-
,
|
|
4719
|
+
label: name + " name",
|
|
4745
4720
|
name: "name",
|
|
4746
4721
|
defaultValue: "",
|
|
4747
4722
|
onValueChange: onValueChange,
|
|
@@ -4825,7 +4800,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4825
4800
|
}
|
|
4826
4801
|
setProductAccess(_productAccess);
|
|
4827
4802
|
};
|
|
4828
|
-
|
|
4829
4803
|
var _useState2 = React.useState({
|
|
4830
4804
|
first_name: '',
|
|
4831
4805
|
last_name: '',
|
|
@@ -5655,7 +5629,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5655
5629
|
required: true
|
|
5656
5630
|
}
|
|
5657
5631
|
}));
|
|
5658
|
-
|
|
5659
5632
|
var _productAccess = _extends({}, productAccess);
|
|
5660
5633
|
renderFields.products.forEach(function (product) {
|
|
5661
5634
|
_productAccess[product.name] = true;
|
|
@@ -5852,8 +5825,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5852
5825
|
}
|
|
5853
5826
|
_errorMsgs.passport_issue_date = '';
|
|
5854
5827
|
}
|
|
5855
|
-
if (passportInfoInput.passport_photo.length === 0 && userTravelInfo.file_name === false &&
|
|
5856
|
-
fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5828
|
+
if (passportInfoInput.passport_photo.length === 0 && userTravelInfo.file_name === false && fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5857
5829
|
_isError = true;
|
|
5858
5830
|
if (_errorArray.indexOf('passport_photo') === -1) {
|
|
5859
5831
|
_errorArray.push('passport_photo');
|
|
@@ -5865,8 +5837,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5865
5837
|
}
|
|
5866
5838
|
_errorMsgs.passport_photo = '';
|
|
5867
5839
|
}
|
|
5868
|
-
if (passportInfoInput.travel_docs.length === 0 && userTravelInfo.file_name === false &&
|
|
5869
|
-
fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5840
|
+
if (passportInfoInput.travel_docs.length === 0 && userTravelInfo.file_name === false && fieldsVisibility.user_travel_info.file_name !== 2) {
|
|
5870
5841
|
_isError = true;
|
|
5871
5842
|
if (_errorArray.indexOf('travel_docs') === -1) {
|
|
5872
5843
|
_errorArray.push('travel_docs');
|
|
@@ -6024,8 +5995,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6024
5995
|
window.location.href = config.routes.profile.redirectUrl.cancel;
|
|
6025
5996
|
}
|
|
6026
5997
|
}
|
|
6027
|
-
}
|
|
6028
|
-
else {
|
|
5998
|
+
} else {
|
|
6029
5999
|
var _config$routes4, _config$routes4$users, _config$routes4$users2;
|
|
6030
6000
|
(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);
|
|
6031
6001
|
}
|
|
@@ -6058,7 +6028,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6058
6028
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
6059
6029
|
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
6060
6030
|
}(),
|
|
6061
|
-
|
|
6062
6031
|
gender: function () {
|
|
6063
6032
|
if (res.gender === 'male') return 'Male';else if (res.gender === 'female') return 'Female';else if (res.gender === 'others') return 'Others';else return '';
|
|
6064
6033
|
}()
|
|
@@ -6103,7 +6072,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6103
6072
|
}()
|
|
6104
6073
|
});
|
|
6105
6074
|
});
|
|
6106
|
-
|
|
6107
6075
|
if (res.client_admin) {
|
|
6108
6076
|
setTravelApproversInput(function (prevState) {
|
|
6109
6077
|
var nextState = _extends({}, prevState);
|
|
@@ -6137,7 +6105,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6137
6105
|
});
|
|
6138
6106
|
}
|
|
6139
6107
|
};
|
|
6140
|
-
|
|
6141
6108
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
6142
6109
|
component: "div",
|
|
6143
6110
|
className: styles.UUIUserManagementAddEdit
|
|
@@ -6154,8 +6121,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6154
6121
|
className: styles.breadcrumb
|
|
6155
6122
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBreadCrumb, {
|
|
6156
6123
|
breadCrumbs: [{
|
|
6157
|
-
href:
|
|
6158
|
-
config.routes.users.list.path,
|
|
6124
|
+
href: config.routes.users.list.path,
|
|
6159
6125
|
label: 'Users',
|
|
6160
6126
|
hasLink: true
|
|
6161
6127
|
}]
|
|
@@ -6602,17 +6568,13 @@ var uploadBulkUsersFile = function uploadBulkUsersFile(payload) {
|
|
|
6602
6568
|
});
|
|
6603
6569
|
};
|
|
6604
6570
|
};
|
|
6605
|
-
|
|
6606
6571
|
var uploadFileToS3$1 = function uploadFileToS3(presignedPostData, file) {
|
|
6607
6572
|
return new Promise(function (resolve, reject) {
|
|
6608
6573
|
var formData = new FormData();
|
|
6609
|
-
|
|
6610
6574
|
Object.keys(presignedPostData.fields).forEach(function (key) {
|
|
6611
6575
|
formData.append(key, presignedPostData.fields[key]);
|
|
6612
6576
|
});
|
|
6613
|
-
|
|
6614
6577
|
formData.append('file', file);
|
|
6615
|
-
|
|
6616
6578
|
axios.post(presignedPostData.url, formData, {
|
|
6617
6579
|
headers: {
|
|
6618
6580
|
'Content-Type': 'multipart/form-data'
|
|
@@ -7013,7 +6975,6 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
7013
6975
|
setOpenImportUsersModal(false);
|
|
7014
6976
|
handleImportPagenavigation(jobId);
|
|
7015
6977
|
};
|
|
7016
|
-
|
|
7017
6978
|
var handleDownloadRecords = function handleDownloadRecords(type) {
|
|
7018
6979
|
try {
|
|
7019
6980
|
setDownlStatus(true);
|
|
@@ -8039,7 +8000,6 @@ var DropdownBtn = function DropdownBtn(props) {
|
|
|
8039
8000
|
if (val.disable) return false;
|
|
8040
8001
|
if (val.handler && typeof val.handler === 'function') val.handler();
|
|
8041
8002
|
};
|
|
8042
|
-
|
|
8043
8003
|
var prevOpen = React__default.useRef(open);
|
|
8044
8004
|
React__default.useEffect(function () {
|
|
8045
8005
|
if (prevOpen.current === true && open === false) {
|
|
@@ -8307,7 +8267,6 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8307
8267
|
paddingLeft: '40px'
|
|
8308
8268
|
}
|
|
8309
8269
|
}];
|
|
8310
|
-
|
|
8311
8270
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUITable, {
|
|
8312
8271
|
searchPlaceholder: "Search by name, email & department",
|
|
8313
8272
|
isCheckboxTable: true,
|
|
@@ -8361,7 +8320,6 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8361
8320
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
8362
8321
|
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
8363
8322
|
};
|
|
8364
|
-
|
|
8365
8323
|
var columns = [{
|
|
8366
8324
|
id: 'fname',
|
|
8367
8325
|
label: 'Name',
|
|
@@ -8372,8 +8330,7 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8372
8330
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIProfileBox, {
|
|
8373
8331
|
firstName: row.fname,
|
|
8374
8332
|
lastName: row.lname,
|
|
8375
|
-
isLetterAvatar:
|
|
8376
|
-
row.profile_pic && row.profile_pic.presigned_url ? false : true,
|
|
8333
|
+
isLetterAvatar: row.profile_pic && row.profile_pic.presigned_url ? false : true,
|
|
8377
8334
|
primaryText: row.fname + ' ' + row.lname,
|
|
8378
8335
|
secondaryText: row.email,
|
|
8379
8336
|
letterAvatarTextColor: "black",
|
|
@@ -8449,9 +8406,34 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8449
8406
|
|
|
8450
8407
|
var IUIToastMessageService$7 = utils.services.IUIToastMessageService;
|
|
8451
8408
|
var env$7 = utils.configs.env;
|
|
8452
|
-
var
|
|
8453
|
-
var
|
|
8454
|
-
|
|
8409
|
+
var UndoButton = function UndoButton(_ref) {
|
|
8410
|
+
var onUndo = _ref.onUndo,
|
|
8411
|
+
msg = _ref.msg;
|
|
8412
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8413
|
+
style: {
|
|
8414
|
+
display: 'flex',
|
|
8415
|
+
flexDirection: 'row',
|
|
8416
|
+
width: '270px',
|
|
8417
|
+
justifyContent: 'space-between'
|
|
8418
|
+
}
|
|
8419
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8420
|
+
style: {
|
|
8421
|
+
whiteSpace: 'nowrap',
|
|
8422
|
+
paddingTop: '8px'
|
|
8423
|
+
}
|
|
8424
|
+
}, msg), /*#__PURE__*/React__default.createElement("p", {
|
|
8425
|
+
onClick: onUndo,
|
|
8426
|
+
style: {
|
|
8427
|
+
whiteSpace: 'nowrap',
|
|
8428
|
+
fontWeight: '600',
|
|
8429
|
+
fontSize: '1rem',
|
|
8430
|
+
padding: '8px 20px 0'
|
|
8431
|
+
}
|
|
8432
|
+
}, "UNDO"));
|
|
8433
|
+
};
|
|
8434
|
+
var UserList = function UserList(_ref2) {
|
|
8435
|
+
var config = _ref2.config,
|
|
8436
|
+
isProfile = _ref2.isProfile;
|
|
8455
8437
|
env$7.init(config, isProfile);
|
|
8456
8438
|
var history = reactRouterDom.useHistory();
|
|
8457
8439
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
@@ -8510,7 +8492,6 @@ var UserList = function UserList(_ref) {
|
|
|
8510
8492
|
var _useState10 = React.useState(false),
|
|
8511
8493
|
isApiFetching = _useState10[0],
|
|
8512
8494
|
setisApiFetching = _useState10[1];
|
|
8513
|
-
|
|
8514
8495
|
var _React$useState5 = React__default.useState(1),
|
|
8515
8496
|
signup_page = _React$useState5[0],
|
|
8516
8497
|
setSignUpPage = _React$useState5[1];
|
|
@@ -8564,37 +8545,16 @@ var UserList = function UserList(_ref) {
|
|
|
8564
8545
|
var handleVerifyUserClick = function handleVerifyUserClick(userId) {
|
|
8565
8546
|
history.push(config.routes.users.add.path + "?" + config.routes.users.add.queryParamKeys.verifyUserId + "=" + userId);
|
|
8566
8547
|
};
|
|
8567
|
-
var UndoButton = function UndoButton(_ref2) {
|
|
8568
|
-
var msg = _ref2.msg,
|
|
8569
|
-
id = _ref2.id;
|
|
8570
|
-
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
8571
|
-
display: "flex",
|
|
8572
|
-
flexDirection: "row",
|
|
8573
|
-
width: "270px"
|
|
8574
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
8575
|
-
style: {
|
|
8576
|
-
whiteSpace: 'nowrap',
|
|
8577
|
-
paddingTop: '8px'
|
|
8578
|
-
}
|
|
8579
|
-
}, msg), /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
8580
|
-
type: "text",
|
|
8581
|
-
buttonText: "UNDO",
|
|
8582
|
-
style: {
|
|
8583
|
-
color: '#FFFFFF'
|
|
8584
|
-
},
|
|
8585
|
-
onClick: function onClick() {
|
|
8586
|
-
return dispatch(undoneSignUpRejection(id));
|
|
8587
|
-
}
|
|
8588
|
-
}));
|
|
8589
|
-
};
|
|
8590
8548
|
var handleRejectUserClick = function handleRejectUserClick(userId) {
|
|
8591
8549
|
dispatch(rejectUserVerification(userId)).then(function (res) {
|
|
8592
|
-
var _res$data;
|
|
8593
|
-
IUIToastMessageService$7.undoNotify( /*#__PURE__*/React__default.createElement(UndoButton, {
|
|
8594
|
-
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',
|
|
8595
|
-
id: userId
|
|
8596
|
-
}));
|
|
8597
8550
|
if (res.status === true) {
|
|
8551
|
+
var _res$data;
|
|
8552
|
+
IUIToastMessageService$7.undoNotify( /*#__PURE__*/React__default.createElement(UndoButton, {
|
|
8553
|
+
onUndo: function onUndo() {
|
|
8554
|
+
return dispatch(undoneSignUpRejection(userId));
|
|
8555
|
+
},
|
|
8556
|
+
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'
|
|
8557
|
+
}));
|
|
8598
8558
|
dispatch(showDataFetchingStatus());
|
|
8599
8559
|
dispatch(fetchUserSignupRequests({
|
|
8600
8560
|
ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
|
|
@@ -9243,7 +9203,6 @@ function EditPanelDialog(_ref) {
|
|
|
9243
9203
|
return state.userPanel;
|
|
9244
9204
|
}),
|
|
9245
9205
|
dialogData = _useSelector.dialogData;
|
|
9246
|
-
|
|
9247
9206
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9248
9207
|
isDisabledSubmitBtn: isDisabledSubmitBtn,
|
|
9249
9208
|
isOpen: isOpen,
|
|
@@ -9270,8 +9229,7 @@ function EditPanelDialog(_ref) {
|
|
|
9270
9229
|
flexDirection: "column",
|
|
9271
9230
|
padding: "8px 24px"
|
|
9272
9231
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9273
|
-
label: name + " name"
|
|
9274
|
-
,
|
|
9232
|
+
label: name + " name",
|
|
9275
9233
|
name: "name",
|
|
9276
9234
|
defaultValue: dialogData.data.name,
|
|
9277
9235
|
onValueChange: onValueChange,
|
|
@@ -9476,7 +9434,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
9476
9434
|
}),
|
|
9477
9435
|
isTokenVerified = _useSelector2.isTokenVerified,
|
|
9478
9436
|
hasVerificationError = _useSelector2.hasVerificationError;
|
|
9479
|
-
|
|
9480
9437
|
var onValueChange = function onValueChange(_ref2) {
|
|
9481
9438
|
var _value = _ref2._value;
|
|
9482
9439
|
var validatedValue = _value.replace(/\s+/g, ' ').trim();
|
|
@@ -9587,7 +9544,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
9587
9544
|
var message = title + " deleted successfully.";
|
|
9588
9545
|
handleApiCall(deleteRecord, payload, message, 'delete');
|
|
9589
9546
|
};
|
|
9590
|
-
|
|
9591
9547
|
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type) {
|
|
9592
9548
|
dispatch(userPanelShowLoader());
|
|
9593
9549
|
dispatch(dispatchFun(tableName, payload, getApiData())).then(function (res) {
|