@itilite/iui-user-management 1.0.4 → 1.1.0
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 +7 -19
- package/dist/index.js +259 -137
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +262 -140
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -3
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,
|
|
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';
|
|
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';
|
|
@@ -10,12 +10,12 @@ import thunk from 'redux-thunk';
|
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { composeWithDevTools } from 'redux-devtools-extension';
|
|
12
12
|
import { useHistory } from 'react-router-dom';
|
|
13
|
-
import { withStyles } from '@material-ui/core/styles';
|
|
13
|
+
import { withStyles, makeStyles } from '@material-ui/core/styles';
|
|
14
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
14
15
|
import Switch from '@material-ui/core/Switch';
|
|
15
16
|
import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
|
|
16
17
|
import Button from '@material-ui/core/Button';
|
|
17
|
-
import { Popper, Grow, Paper, ClickAwayListener, MenuList, MenuItem, Typography
|
|
18
|
-
import { useScrollPosition } from '@n8tb1t/use-scroll-position';
|
|
18
|
+
import { Popper, Grow, Paper, ClickAwayListener, MenuList, MenuItem, Typography } from '@material-ui/core';
|
|
19
19
|
|
|
20
20
|
function _extends() {
|
|
21
21
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -1251,7 +1251,6 @@ var fetchRenderFileds = function fetchRenderFileds() {
|
|
|
1251
1251
|
var _res$data;
|
|
1252
1252
|
IUIToastMessageService$1.warningNotify((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.message) || 'Opps, Something went wrong.');
|
|
1253
1253
|
dispatch(stopLoader());
|
|
1254
|
-
reject();
|
|
1255
1254
|
}
|
|
1256
1255
|
})["catch"](function (err) {
|
|
1257
1256
|
reject(err);
|
|
@@ -1423,11 +1422,9 @@ var createUser = function createUser(payload) {
|
|
|
1423
1422
|
} else {
|
|
1424
1423
|
if (res.data.errors && typeof res.data.errors === 'object') {
|
|
1425
1424
|
reject(res.data.errors);
|
|
1426
|
-
return;
|
|
1427
1425
|
} else if (!Object.keys(res.data.errors).length) {
|
|
1428
1426
|
IUIToastMessageService$1.warningNotify(res.data.message);
|
|
1429
1427
|
}
|
|
1430
|
-
reject();
|
|
1431
1428
|
}
|
|
1432
1429
|
})["catch"](function (err) {
|
|
1433
1430
|
var _err$response6;
|
|
@@ -1543,6 +1540,48 @@ var undoneSignUpRejection = function undoneSignUpRejection(userId) {
|
|
|
1543
1540
|
});
|
|
1544
1541
|
};
|
|
1545
1542
|
};
|
|
1543
|
+
var resetPasswordForUser = function resetPasswordForUser(data) {
|
|
1544
|
+
return function (dispatch) {
|
|
1545
|
+
return new Promise(function (resolve, reject) {
|
|
1546
|
+
api$2.post("" + userAddEditUrl.resetPasswordForUserApi(), {
|
|
1547
|
+
email: data.email
|
|
1548
|
+
}).then(function (res) {
|
|
1549
|
+
IUIToastMessageService$1.sNotify("The link to reset the password has been sent to the user's email address. Check your \"junk mail\" or \"spam\" folders in case it's not received.");
|
|
1550
|
+
resolve();
|
|
1551
|
+
})["catch"](function (err) {
|
|
1552
|
+
var _err$response9, _err$response9$data;
|
|
1553
|
+
if (!(err !== null && err !== void 0 && (_err$response9 = err.response) !== null && _err$response9 !== void 0 && (_err$response9$data = _err$response9.data) !== null && _err$response9$data !== void 0 && _err$response9$data.status)) {
|
|
1554
|
+
var _err$response10, _err$response10$data, _err$response10$data$;
|
|
1555
|
+
IUIToastMessageService$1.errNotify(err === null || err === void 0 ? void 0 : (_err$response10 = err.response) === null || _err$response10 === void 0 ? void 0 : (_err$response10$data = _err$response10.data) === null || _err$response10$data === void 0 ? void 0 : (_err$response10$data$ = _err$response10$data.message) === null || _err$response10$data$ === void 0 ? void 0 : _err$response10$data$.email[0]);
|
|
1556
|
+
reject(err);
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
reject(err);
|
|
1560
|
+
});
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
var resendInviteForUser = function resendInviteForUser(data) {
|
|
1565
|
+
return function (dispatch) {
|
|
1566
|
+
return new Promise(function (resolve, reject) {
|
|
1567
|
+
api$2.post(userAddEditUrl.resendInviteForUserApi(), {
|
|
1568
|
+
user_ids: data
|
|
1569
|
+
}).then(function (res) {
|
|
1570
|
+
IUIToastMessageService$1.sNotify(res.data.message);
|
|
1571
|
+
resolve();
|
|
1572
|
+
})["catch"](function (err) {
|
|
1573
|
+
var _err$response11, _err$response11$data;
|
|
1574
|
+
if (!(err !== null && err !== void 0 && (_err$response11 = err.response) !== null && _err$response11 !== void 0 && (_err$response11$data = _err$response11.data) !== null && _err$response11$data !== void 0 && _err$response11$data.status)) {
|
|
1575
|
+
var _err$response12, _err$response12$data, _err$response12$data$;
|
|
1576
|
+
IUIToastMessageService$1.errNotify(err === null || err === void 0 ? void 0 : (_err$response12 = err.response) === null || _err$response12 === void 0 ? void 0 : (_err$response12$data = _err$response12.data) === null || _err$response12$data === void 0 ? void 0 : (_err$response12$data$ = _err$response12$data.message) === null || _err$response12$data$ === void 0 ? void 0 : _err$response12$data$.email[0]);
|
|
1577
|
+
reject(err);
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
reject(err);
|
|
1581
|
+
});
|
|
1582
|
+
});
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1546
1585
|
var updateUser = function updateUser(payload, userId, inputChangeLog) {
|
|
1547
1586
|
return function (dispatch) {
|
|
1548
1587
|
return new Promise(function (resolve, reject) {
|
|
@@ -6699,7 +6738,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
|
|
|
6699
6738
|
};
|
|
6700
6739
|
};
|
|
6701
6740
|
|
|
6702
|
-
var styles$5 = {"UUIUserManagementList":"_3WNHx","
|
|
6741
|
+
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"};
|
|
6703
6742
|
|
|
6704
6743
|
var BulkUploadModal = function BulkUploadModal(props) {
|
|
6705
6744
|
var isOpenImportUsersModal = props.isOpenImportUsersModal,
|
|
@@ -8122,6 +8161,10 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8122
8161
|
selected = props.selected,
|
|
8123
8162
|
_props$handleSingleCh = props.handleSingleCheckBoxClick,
|
|
8124
8163
|
handleSingleCheckBoxClick = _props$handleSingleCh === void 0 ? function () {} : _props$handleSingleCh,
|
|
8164
|
+
_props$onResetPasswor = props.onResetPasswordHandler,
|
|
8165
|
+
onResetPasswordHandler = _props$onResetPasswor === void 0 ? function () {} : _props$onResetPasswor,
|
|
8166
|
+
_props$toggleInviteMo = props.toggleInviteModal,
|
|
8167
|
+
toggleInviteModal = _props$toggleInviteMo === void 0 ? function () {} : _props$toggleInviteMo,
|
|
8125
8168
|
orderBy = props.orderBy,
|
|
8126
8169
|
order = props.order,
|
|
8127
8170
|
_props$onRequestSort = props.onRequestSort,
|
|
@@ -8139,6 +8182,21 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8139
8182
|
searchValue = props.searchValue,
|
|
8140
8183
|
_props$isILadmin = props.isILadmin,
|
|
8141
8184
|
isILadmin = _props$isILadmin === void 0 ? false : _props$isILadmin;
|
|
8185
|
+
var useStyles = makeStyles(function (theme) {
|
|
8186
|
+
return {
|
|
8187
|
+
tooltip: {
|
|
8188
|
+
background: '#1F2937',
|
|
8189
|
+
fontSize: '14px',
|
|
8190
|
+
color: '#ffffff',
|
|
8191
|
+
padding: '12px 16px',
|
|
8192
|
+
borderRadius: '6px'
|
|
8193
|
+
},
|
|
8194
|
+
arrow: {
|
|
8195
|
+
color: '#1F2937'
|
|
8196
|
+
}
|
|
8197
|
+
};
|
|
8198
|
+
});
|
|
8199
|
+
var classes = useStyles();
|
|
8142
8200
|
var columns = [{
|
|
8143
8201
|
id: 'first_name',
|
|
8144
8202
|
label: 'Name',
|
|
@@ -8158,6 +8216,26 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8158
8216
|
profilePath: row === null || row === void 0 ? void 0 : (_row$profile_pic = row.profile_pic) === null || _row$profile_pic === void 0 ? void 0 : _row$profile_pic.presigned_url
|
|
8159
8217
|
}));
|
|
8160
8218
|
}
|
|
8219
|
+
}, {
|
|
8220
|
+
id: 'first_name',
|
|
8221
|
+
label: '',
|
|
8222
|
+
minWidth: 60,
|
|
8223
|
+
cell: function cell(row) {
|
|
8224
|
+
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
8225
|
+
component: "div",
|
|
8226
|
+
width: 60
|
|
8227
|
+
}, row && row.has_visited === 0 ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
8228
|
+
title: "This user hasn't logged on to the platform yet",
|
|
8229
|
+
arrow: true,
|
|
8230
|
+
classes: {
|
|
8231
|
+
arrow: classes.arrow,
|
|
8232
|
+
tooltip: classes.tooltip
|
|
8233
|
+
},
|
|
8234
|
+
placement: "top-start"
|
|
8235
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8236
|
+
className: clsx(styles$5.tooltipText)
|
|
8237
|
+
}, "Invited")) : null);
|
|
8238
|
+
}
|
|
8161
8239
|
}, {
|
|
8162
8240
|
id: 'emp_info__department__name',
|
|
8163
8241
|
label: 'Department',
|
|
@@ -8245,6 +8323,21 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8245
8323
|
return onEditHandler(row.id);
|
|
8246
8324
|
}
|
|
8247
8325
|
}];
|
|
8326
|
+
if (row && row.has_visited && row.is_active) {
|
|
8327
|
+
options.push({
|
|
8328
|
+
label: 'Reset password',
|
|
8329
|
+
handler: function handler() {
|
|
8330
|
+
return onResetPasswordHandler(row.email);
|
|
8331
|
+
}
|
|
8332
|
+
});
|
|
8333
|
+
} else if (row && row.is_active) {
|
|
8334
|
+
options.push({
|
|
8335
|
+
label: 'Resend invite',
|
|
8336
|
+
handler: function handler() {
|
|
8337
|
+
return toggleInviteModal(row.id, 'single');
|
|
8338
|
+
}
|
|
8339
|
+
});
|
|
8340
|
+
}
|
|
8248
8341
|
if (isILadmin) {
|
|
8249
8342
|
options.push({
|
|
8250
8343
|
label: 'Make primary admin',
|
|
@@ -8297,8 +8390,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
8297
8390
|
isDataFetching: isDataFetching,
|
|
8298
8391
|
disableRowCheckbox: disableRowCheckbox,
|
|
8299
8392
|
searchBoxWidth: "400px",
|
|
8300
|
-
searchValue: searchValue
|
|
8301
|
-
hideTopPagination: false
|
|
8393
|
+
searchValue: searchValue
|
|
8302
8394
|
});
|
|
8303
8395
|
};
|
|
8304
8396
|
var SingupRequests = function SingupRequests(props) {
|
|
@@ -8413,6 +8505,22 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8413
8505
|
});
|
|
8414
8506
|
};
|
|
8415
8507
|
|
|
8508
|
+
function InviteInfoIcon() {
|
|
8509
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
8510
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8511
|
+
width: "20",
|
|
8512
|
+
height: "20",
|
|
8513
|
+
fill: "none",
|
|
8514
|
+
viewBox: "0 0 20 20"
|
|
8515
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
8516
|
+
fill: "#CA8A04",
|
|
8517
|
+
d: "M11 5a1 1 0 11-2 0 1 1 0 012 0zM8 8a1 1 0 000 2h1v3H8a1 1 0 100 2h4a1 1 0 100-2h-1V9a1 1 0 00-1-1H8z"
|
|
8518
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
8519
|
+
fill: "#CA8A04",
|
|
8520
|
+
d: "M0 10c0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10S0 4.477 0 10zm10-8a8 8 0 110 16 8 8 0 010-16z"
|
|
8521
|
+
}));
|
|
8522
|
+
}
|
|
8523
|
+
|
|
8416
8524
|
var IUIToastMessageService$7 = services.IUIToastMessageService;
|
|
8417
8525
|
var env$7 = configs.env;
|
|
8418
8526
|
var UndoButton = function UndoButton(_ref) {
|
|
@@ -8455,7 +8563,7 @@ var UserList = function UserList(_ref2) {
|
|
|
8455
8563
|
var _React$useState = React.useState(1),
|
|
8456
8564
|
page = _React$useState[0],
|
|
8457
8565
|
setPage = _React$useState[1];
|
|
8458
|
-
var _useState = useState(
|
|
8566
|
+
var _useState = useState(5),
|
|
8459
8567
|
rowsPerPage = _useState[0],
|
|
8460
8568
|
setRowsPerPage = _useState[1];
|
|
8461
8569
|
var _React$useState2 = React.useState({}),
|
|
@@ -8501,56 +8609,39 @@ var UserList = function UserList(_ref2) {
|
|
|
8501
8609
|
var _useState10 = useState(false),
|
|
8502
8610
|
isApiFetching = _useState10[0],
|
|
8503
8611
|
setisApiFetching = _useState10[1];
|
|
8504
|
-
var
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
useScrollPosition(function (_ref3) {
|
|
8508
|
-
var prevPos = _ref3.prevPos,
|
|
8509
|
-
currPos = _ref3.currPos;
|
|
8510
|
-
if (prevPos.y - currPos.y > 0) {
|
|
8511
|
-
if (currPos.y <= -275) {
|
|
8512
|
-
setOverlayMenu(true);
|
|
8513
|
-
}
|
|
8514
|
-
} else {
|
|
8515
|
-
if (currPos.y > -295) {
|
|
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];
|
|
8530
|
-
var _useState11 = useState(5),
|
|
8531
|
-
signup_rowsPerPage = _useState11[0],
|
|
8532
|
-
setSignUpRowsPerPage = _useState11[1];
|
|
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];
|
|
8612
|
+
var _useState11 = useState(false),
|
|
8613
|
+
showInviteModal = _useState11[0],
|
|
8614
|
+
setToggleInviteModal = _useState11[1];
|
|
8539
8615
|
var _useState12 = useState(''),
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
var
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
var
|
|
8546
|
-
|
|
8547
|
-
|
|
8616
|
+
userIds = _useState12[0],
|
|
8617
|
+
setUserIds = _useState12[1];
|
|
8618
|
+
var _React$useState5 = React.useState(1),
|
|
8619
|
+
signup_page = _React$useState5[0],
|
|
8620
|
+
setSignUpPage = _React$useState5[1];
|
|
8621
|
+
var _useState13 = useState(5),
|
|
8622
|
+
signup_rowsPerPage = _useState13[0],
|
|
8623
|
+
setSignUpRowsPerPage = _useState13[1];
|
|
8624
|
+
var _React$useState6 = React.useState('asc'),
|
|
8625
|
+
signup_order = _React$useState6[0],
|
|
8626
|
+
setSignUpOrder = _React$useState6[1];
|
|
8627
|
+
var _React$useState7 = React.useState('fname'),
|
|
8628
|
+
signup_orderBy = _React$useState7[0],
|
|
8629
|
+
setSignUpOrderBy = _React$useState7[1];
|
|
8630
|
+
var _useState14 = useState(''),
|
|
8631
|
+
signup_searchValue = _useState14[0],
|
|
8632
|
+
set_signup_SearchValue = _useState14[1];
|
|
8548
8633
|
var _useState15 = useState(false),
|
|
8549
|
-
|
|
8550
|
-
|
|
8634
|
+
isSignUpSortingChange = _useState15[0],
|
|
8635
|
+
setSignUpSortingChange = _useState15[1];
|
|
8551
8636
|
var _useState16 = useState(false),
|
|
8552
|
-
|
|
8553
|
-
|
|
8637
|
+
isSignUpSearchingChange = _useState16[0],
|
|
8638
|
+
setSignUpSearchingChange = _useState16[1];
|
|
8639
|
+
var _useState17 = useState(false),
|
|
8640
|
+
isSignUpSortingChangeTemp = _useState17[0],
|
|
8641
|
+
setSignUpSortingChangeTemp = _useState17[1];
|
|
8642
|
+
var _useState18 = useState(false),
|
|
8643
|
+
isSignUpSearchingChangeTemp = _useState18[0],
|
|
8644
|
+
setSignUpSearchingChangeTemp = _useState18[1];
|
|
8554
8645
|
var _useSelector3 = useSelector(function (state) {
|
|
8555
8646
|
return state.userList;
|
|
8556
8647
|
}),
|
|
@@ -8697,6 +8788,37 @@ var UserList = function UserList(_ref2) {
|
|
|
8697
8788
|
setOpenImportUsersModal(false);
|
|
8698
8789
|
handleImportPagenavigation(jobId);
|
|
8699
8790
|
};
|
|
8791
|
+
var onResetPasswordHandler = function onResetPasswordHandler(email) {
|
|
8792
|
+
dispatch(resetPasswordForUser({
|
|
8793
|
+
email: email
|
|
8794
|
+
}));
|
|
8795
|
+
};
|
|
8796
|
+
var toggleInviteModal = function toggleInviteModal(ids, type) {
|
|
8797
|
+
console.log(type);
|
|
8798
|
+
if (!type && (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined)) {
|
|
8799
|
+
IUIToastMessageService$7.warningNotify('Select at least one user to invite.');
|
|
8800
|
+
return false;
|
|
8801
|
+
}
|
|
8802
|
+
setUserIds(ids);
|
|
8803
|
+
setToggleInviteModal(!showInviteModal);
|
|
8804
|
+
};
|
|
8805
|
+
var onResendInviteHandler = function onResendInviteHandler() {
|
|
8806
|
+
var userIdArr = [];
|
|
8807
|
+
if (userIds && !isNaN(userIds)) {
|
|
8808
|
+
userIdArr = [userIds];
|
|
8809
|
+
} else if (Object.keys(selected).length) {
|
|
8810
|
+
Object.values(selected).map(function (val, i) {
|
|
8811
|
+
if (val.length) {
|
|
8812
|
+
val.map(function (idx, i) {
|
|
8813
|
+
userIdArr.push(idx);
|
|
8814
|
+
});
|
|
8815
|
+
}
|
|
8816
|
+
});
|
|
8817
|
+
}
|
|
8818
|
+
setUserIds('');
|
|
8819
|
+
dispatch(resendInviteForUser(userIdArr));
|
|
8820
|
+
setToggleInviteModal(!showInviteModal);
|
|
8821
|
+
};
|
|
8700
8822
|
var handleExportUsers = function handleExportUsers() {
|
|
8701
8823
|
try {
|
|
8702
8824
|
setDownlStatus(true);
|
|
@@ -8736,6 +8858,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8736
8858
|
}, {
|
|
8737
8859
|
label: 'Bulk action history',
|
|
8738
8860
|
handler: handleBulkActionHistoryClick
|
|
8861
|
+
}, {
|
|
8862
|
+
label: 'Resend invite',
|
|
8863
|
+
handler: toggleInviteModal
|
|
8739
8864
|
}];
|
|
8740
8865
|
useEffect(function () {
|
|
8741
8866
|
var roleCanAccess = ['travel_itilite_admin', 'travel_admin', 'expense_itilite_admin', 'expense_admin'];
|
|
@@ -8760,7 +8885,6 @@ var UserList = function UserList(_ref2) {
|
|
|
8760
8885
|
dispatch(fetchUsersList(url)).then(function () {
|
|
8761
8886
|
setSearchingChange(false);
|
|
8762
8887
|
setisApiFetching(false);
|
|
8763
|
-
scrollTo('table-root');
|
|
8764
8888
|
});
|
|
8765
8889
|
}, 1000);
|
|
8766
8890
|
return function () {
|
|
@@ -8786,7 +8910,6 @@ var UserList = function UserList(_ref2) {
|
|
|
8786
8910
|
}
|
|
8787
8911
|
if (isSortingChange) {
|
|
8788
8912
|
setisApiFetching(true);
|
|
8789
|
-
scrollTo('table-root');
|
|
8790
8913
|
dispatch(fetchUsersList(url)).then(function () {
|
|
8791
8914
|
setisApiFetching(false);
|
|
8792
8915
|
setSortingChange(false);
|
|
@@ -8825,89 +8948,15 @@ var UserList = function UserList(_ref2) {
|
|
|
8825
8948
|
}
|
|
8826
8949
|
}
|
|
8827
8950
|
}, [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
|
-
};
|
|
8868
8951
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
8869
8952
|
component: "div",
|
|
8870
8953
|
className: styles$5.UUIUserManagementList
|
|
8871
|
-
},
|
|
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, {
|
|
8954
|
+
}, !hasVerificationError ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBackdrop, {
|
|
8905
8955
|
open: isFileDownloading || isApiFetching,
|
|
8906
8956
|
className: styles$5.backdrop
|
|
8907
8957
|
}, /*#__PURE__*/React.createElement(IUICircularProgress, {
|
|
8908
8958
|
color: "inherit"
|
|
8909
8959
|
})), isDataFetching ? /*#__PURE__*/React.createElement(SkeletonLoader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8910
|
-
id: "table-root",
|
|
8911
8960
|
component: "div",
|
|
8912
8961
|
className: clsx(styles$5.pageHeader)
|
|
8913
8962
|
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
@@ -8932,7 +8981,44 @@ var UserList = function UserList(_ref2) {
|
|
|
8932
8981
|
}, /*#__PURE__*/React.createElement(IUITypography, {
|
|
8933
8982
|
variant: "h3",
|
|
8934
8983
|
className: clsx(styles$5.heading, styles$5.headingLarge)
|
|
8935
|
-
}, isILadmin && companyName ? companyName + " - Users" : 'Users'))),
|
|
8984
|
+
}, isILadmin && companyName ? companyName + " - Users" : 'Users'))), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8985
|
+
component: "div",
|
|
8986
|
+
className: styles$5.buttonWrapper,
|
|
8987
|
+
display: "flex",
|
|
8988
|
+
justifyContent: "space-between",
|
|
8989
|
+
alignItems: "center",
|
|
8990
|
+
alignSelf: "flex-start"
|
|
8991
|
+
}, /*#__PURE__*/React.createElement(IUIBox, {
|
|
8992
|
+
component: "div",
|
|
8993
|
+
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
8994
|
+
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
8995
|
+
buttonText: "Export all users",
|
|
8996
|
+
type: "outlined",
|
|
8997
|
+
startIcon: /*#__PURE__*/React.createElement(BulkDownloadIcon, {
|
|
8998
|
+
width: "22",
|
|
8999
|
+
height: "22"
|
|
9000
|
+
}),
|
|
9001
|
+
onClick: handleExportUsers
|
|
9002
|
+
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
9003
|
+
component: "div",
|
|
9004
|
+
className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
|
|
9005
|
+
}, /*#__PURE__*/React.createElement(IUIDropdownButton, {
|
|
9006
|
+
buttonText: "Bulk actions",
|
|
9007
|
+
type: "outlined",
|
|
9008
|
+
menuListInfo: BulkUploadInfo
|
|
9009
|
+
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
9010
|
+
component: "div",
|
|
9011
|
+
className: "pageHeader--button-single button-right"
|
|
9012
|
+
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
9013
|
+
buttonText: "Add user",
|
|
9014
|
+
type: "contained",
|
|
9015
|
+
startIcon: /*#__PURE__*/React.createElement(AddIcon, {
|
|
9016
|
+
width: "9",
|
|
9017
|
+
height: "9",
|
|
9018
|
+
color: "white"
|
|
9019
|
+
}),
|
|
9020
|
+
onClick: handleAddPageNavigation
|
|
9021
|
+
})))), /*#__PURE__*/React.createElement(IUIBox, {
|
|
8936
9022
|
component: "div",
|
|
8937
9023
|
display: "flex",
|
|
8938
9024
|
justifyContent: "space-between",
|
|
@@ -8977,7 +9063,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8977
9063
|
disableRowCheckbox: deactivatedUsers,
|
|
8978
9064
|
searchValue: searchValue,
|
|
8979
9065
|
isILadmin: isILadmin,
|
|
8980
|
-
onPrimaryAdminHandler: onPrimaryAdminHandler
|
|
9066
|
+
onPrimaryAdminHandler: onPrimaryAdminHandler,
|
|
9067
|
+
onResetPasswordHandler: onResetPasswordHandler,
|
|
9068
|
+
toggleInviteModal: toggleInviteModal
|
|
8981
9069
|
}))
|
|
8982
9070
|
}, {
|
|
8983
9071
|
label: /*#__PURE__*/React.createElement(IUIBox, null, "Sign-up requests", ' ', /*#__PURE__*/React.createElement(TabLabelCount, {
|
|
@@ -9050,7 +9138,41 @@ var UserList = function UserList(_ref2) {
|
|
|
9050
9138
|
className: styles$5.headerText
|
|
9051
9139
|
}, 'Are you sure you want to deactivate ' + Object.values(selected).flat().length.toString() + (Object.values(selected).flat().length === 1 ? ' user ?' : ' users ?')), /*#__PURE__*/React.createElement(IUITypography, {
|
|
9052
9140
|
className: styles$5.description
|
|
9053
|
-
}, "The", ' ', Object.values(selected).flat().length === 1 ? ' user ' : ' users ', "won\u2019t be able to access itilite platform"))), /*#__PURE__*/React.createElement(
|
|
9141
|
+
}, "The", ' ', Object.values(selected).flat().length === 1 ? ' user ' : ' users ', "won\u2019t be able to access itilite platform"))), /*#__PURE__*/React.createElement(IUIModal, {
|
|
9142
|
+
isOpen: showInviteModal,
|
|
9143
|
+
closeHandler: toggleInviteModal,
|
|
9144
|
+
cancelLabel: "Cancel",
|
|
9145
|
+
headerText: "Resend Invites?",
|
|
9146
|
+
submitLabel: "Send",
|
|
9147
|
+
submitHandler: function submitHandler() {
|
|
9148
|
+
return onResendInviteHandler();
|
|
9149
|
+
},
|
|
9150
|
+
width: "400px",
|
|
9151
|
+
modalBodyStyle: {
|
|
9152
|
+
padding: '0px'
|
|
9153
|
+
},
|
|
9154
|
+
footerStyle: {
|
|
9155
|
+
justifyContent: 'center'
|
|
9156
|
+
}
|
|
9157
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9158
|
+
style: {
|
|
9159
|
+
display: 'flex',
|
|
9160
|
+
padding: '16px',
|
|
9161
|
+
margin: '8px 24px',
|
|
9162
|
+
border: '1px solid #FDE047',
|
|
9163
|
+
background: '#FEFCE8',
|
|
9164
|
+
borderRadius: '5px'
|
|
9165
|
+
}
|
|
9166
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9167
|
+
style: {
|
|
9168
|
+
marginRight: '5px'
|
|
9169
|
+
}
|
|
9170
|
+
}, /*#__PURE__*/React.createElement(InviteInfoIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
9171
|
+
style: {
|
|
9172
|
+
fontSize: '14px',
|
|
9173
|
+
color: '#374151'
|
|
9174
|
+
}
|
|
9175
|
+
}, "This invitation will be sent to users who have not logged into the platform."))), /*#__PURE__*/React.createElement(BulkUploadModal, {
|
|
9054
9176
|
isOpenImportUsersModal: isOpenImportUsersModal,
|
|
9055
9177
|
closeImportUsersModal: closeImportUsersModal,
|
|
9056
9178
|
closeImportModal: closeImportModal
|
|
@@ -9059,8 +9181,8 @@ var UserList = function UserList(_ref2) {
|
|
|
9059
9181
|
errMsg: hasVerificationError
|
|
9060
9182
|
}));
|
|
9061
9183
|
};
|
|
9062
|
-
var TabLabelCount = function TabLabelCount(
|
|
9063
|
-
var count =
|
|
9184
|
+
var TabLabelCount = function TabLabelCount(_ref3) {
|
|
9185
|
+
var count = _ref3.count;
|
|
9064
9186
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9065
9187
|
className: styles$5.TabLabelCount
|
|
9066
9188
|
}, " ", count, " ");
|