@itilite/iui-user-management 1.0.4 → 1.2.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.
@@ -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, IUISearch, 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, 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, Box } from '@material-ui/core';
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) {
@@ -446,10 +446,10 @@ var userPanelUrl = {
446
446
  return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/table?action=delete&table=" + tableName;
447
447
  },
448
448
  getUnit: function getUnit(tableName, length, sort) {
449
- return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/table?table_name=" + tableName + "&length=" + length + "&order=" + sort;
449
+ return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/table?table_name=" + tableName + "&length=" + length + "&ordering=" + sort;
450
450
  },
451
451
  getPaginationUnit: function getPaginationUnit(tableName, length, page, sort) {
452
- return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/table?table_name=" + tableName + "&length=" + length + "&page=" + page + "&order=" + sort;
452
+ return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/table?table_name=" + tableName + "&length=" + length + "&page=" + page + "&ordering=" + sort;
453
453
  },
454
454
  moveUnit: function moveUnit() {
455
455
  return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/transfer-users";
@@ -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","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"};
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,27 @@ 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
+ sortable: false,
8224
+ cell: function cell(row) {
8225
+ return /*#__PURE__*/React.createElement(IUIBox, {
8226
+ component: "div",
8227
+ width: 60
8228
+ }, row && row.has_visited === 0 ? /*#__PURE__*/React.createElement(Tooltip, {
8229
+ title: "This user hasn't logged on to the platform yet",
8230
+ arrow: true,
8231
+ classes: {
8232
+ arrow: classes.arrow,
8233
+ tooltip: classes.tooltip
8234
+ },
8235
+ placement: "top-start"
8236
+ }, /*#__PURE__*/React.createElement("div", {
8237
+ className: clsx(styles$5.tooltipText)
8238
+ }, "Invited")) : null);
8239
+ }
8161
8240
  }, {
8162
8241
  id: 'emp_info__department__name',
8163
8242
  label: 'Department',
@@ -8245,6 +8324,21 @@ var StickyHeadTable = function StickyHeadTable(props) {
8245
8324
  return onEditHandler(row.id);
8246
8325
  }
8247
8326
  }];
8327
+ if (row && row.has_visited && row.is_active) {
8328
+ options.push({
8329
+ label: 'Reset password',
8330
+ handler: function handler() {
8331
+ return onResetPasswordHandler(row.email);
8332
+ }
8333
+ });
8334
+ } else if (row && row.is_active) {
8335
+ options.push({
8336
+ label: 'Resend invite',
8337
+ handler: function handler() {
8338
+ return toggleInviteModal(row.id, 'single');
8339
+ }
8340
+ });
8341
+ }
8248
8342
  if (isILadmin) {
8249
8343
  options.push({
8250
8344
  label: 'Make primary admin',
@@ -8297,8 +8391,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8297
8391
  isDataFetching: isDataFetching,
8298
8392
  disableRowCheckbox: disableRowCheckbox,
8299
8393
  searchBoxWidth: "400px",
8300
- searchValue: searchValue,
8301
- hideTopPagination: false
8394
+ searchValue: searchValue
8302
8395
  });
8303
8396
  };
8304
8397
  var SingupRequests = function SingupRequests(props) {
@@ -8413,6 +8506,22 @@ var SingupRequests = function SingupRequests(props) {
8413
8506
  });
8414
8507
  };
8415
8508
 
8509
+ function InviteInfoIcon() {
8510
+ return /*#__PURE__*/React.createElement("svg", {
8511
+ xmlns: "http://www.w3.org/2000/svg",
8512
+ width: "20",
8513
+ height: "20",
8514
+ fill: "none",
8515
+ viewBox: "0 0 20 20"
8516
+ }, /*#__PURE__*/React.createElement("path", {
8517
+ fill: "#CA8A04",
8518
+ 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"
8519
+ }), /*#__PURE__*/React.createElement("path", {
8520
+ fill: "#CA8A04",
8521
+ 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"
8522
+ }));
8523
+ }
8524
+
8416
8525
  var IUIToastMessageService$7 = services.IUIToastMessageService;
8417
8526
  var env$7 = configs.env;
8418
8527
  var UndoButton = function UndoButton(_ref) {
@@ -8455,7 +8564,7 @@ var UserList = function UserList(_ref2) {
8455
8564
  var _React$useState = React.useState(1),
8456
8565
  page = _React$useState[0],
8457
8566
  setPage = _React$useState[1];
8458
- var _useState = useState(10),
8567
+ var _useState = useState(5),
8459
8568
  rowsPerPage = _useState[0],
8460
8569
  setRowsPerPage = _useState[1];
8461
8570
  var _React$useState2 = React.useState({}),
@@ -8501,56 +8610,39 @@ var UserList = function UserList(_ref2) {
8501
8610
  var _useState10 = useState(false),
8502
8611
  isApiFetching = _useState10[0],
8503
8612
  setisApiFetching = _useState10[1];
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 <= -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];
8613
+ var _useState11 = useState(false),
8614
+ showInviteModal = _useState11[0],
8615
+ setToggleInviteModal = _useState11[1];
8539
8616
  var _useState12 = useState(''),
8540
- signup_searchValue = _useState12[0],
8541
- set_signup_SearchValue = _useState12[1];
8542
- var _useState13 = useState(false),
8543
- isSignUpSortingChange = _useState13[0],
8544
- setSignUpSortingChange = _useState13[1];
8545
- var _useState14 = useState(false),
8546
- isSignUpSearchingChange = _useState14[0],
8547
- setSignUpSearchingChange = _useState14[1];
8617
+ userIds = _useState12[0],
8618
+ setUserIds = _useState12[1];
8619
+ var _React$useState5 = React.useState(1),
8620
+ signup_page = _React$useState5[0],
8621
+ setSignUpPage = _React$useState5[1];
8622
+ var _useState13 = useState(5),
8623
+ signup_rowsPerPage = _useState13[0],
8624
+ setSignUpRowsPerPage = _useState13[1];
8625
+ var _React$useState6 = React.useState('asc'),
8626
+ signup_order = _React$useState6[0],
8627
+ setSignUpOrder = _React$useState6[1];
8628
+ var _React$useState7 = React.useState('fname'),
8629
+ signup_orderBy = _React$useState7[0],
8630
+ setSignUpOrderBy = _React$useState7[1];
8631
+ var _useState14 = useState(''),
8632
+ signup_searchValue = _useState14[0],
8633
+ set_signup_SearchValue = _useState14[1];
8548
8634
  var _useState15 = useState(false),
8549
- isSignUpSortingChangeTemp = _useState15[0],
8550
- setSignUpSortingChangeTemp = _useState15[1];
8635
+ isSignUpSortingChange = _useState15[0],
8636
+ setSignUpSortingChange = _useState15[1];
8551
8637
  var _useState16 = useState(false),
8552
- isSignUpSearchingChangeTemp = _useState16[0],
8553
- setSignUpSearchingChangeTemp = _useState16[1];
8638
+ isSignUpSearchingChange = _useState16[0],
8639
+ setSignUpSearchingChange = _useState16[1];
8640
+ var _useState17 = useState(false),
8641
+ isSignUpSortingChangeTemp = _useState17[0],
8642
+ setSignUpSortingChangeTemp = _useState17[1];
8643
+ var _useState18 = useState(false),
8644
+ isSignUpSearchingChangeTemp = _useState18[0],
8645
+ setSignUpSearchingChangeTemp = _useState18[1];
8554
8646
  var _useSelector3 = useSelector(function (state) {
8555
8647
  return state.userList;
8556
8648
  }),
@@ -8592,7 +8684,8 @@ var UserList = function UserList(_ref2) {
8592
8684
  ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
8593
8685
  length: signup_rowsPerPage,
8594
8686
  page: signup_page,
8595
- search: signup_searchValue.trim()
8687
+ search: signup_searchValue.trim(),
8688
+ pagename: 'company'
8596
8689
  })).then(function () {
8597
8690
  return dispatch(stopDataFetchingStatus());
8598
8691
  });
@@ -8697,6 +8790,37 @@ var UserList = function UserList(_ref2) {
8697
8790
  setOpenImportUsersModal(false);
8698
8791
  handleImportPagenavigation(jobId);
8699
8792
  };
8793
+ var onResetPasswordHandler = function onResetPasswordHandler(email) {
8794
+ dispatch(resetPasswordForUser({
8795
+ email: email
8796
+ }));
8797
+ };
8798
+ var toggleInviteModal = function toggleInviteModal(ids, type) {
8799
+ console.log(type);
8800
+ if (!type && (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined)) {
8801
+ IUIToastMessageService$7.warningNotify('Select at least one user to invite.');
8802
+ return false;
8803
+ }
8804
+ setUserIds(ids);
8805
+ setToggleInviteModal(!showInviteModal);
8806
+ };
8807
+ var onResendInviteHandler = function onResendInviteHandler() {
8808
+ var userIdArr = [];
8809
+ if (userIds && !isNaN(userIds)) {
8810
+ userIdArr = [userIds];
8811
+ } else if (Object.keys(selected).length) {
8812
+ Object.values(selected).map(function (val, i) {
8813
+ if (val.length) {
8814
+ val.map(function (idx, i) {
8815
+ userIdArr.push(idx);
8816
+ });
8817
+ }
8818
+ });
8819
+ }
8820
+ setUserIds('');
8821
+ dispatch(resendInviteForUser(userIdArr));
8822
+ setToggleInviteModal(!showInviteModal);
8823
+ };
8700
8824
  var handleExportUsers = function handleExportUsers() {
8701
8825
  try {
8702
8826
  setDownlStatus(true);
@@ -8736,6 +8860,9 @@ var UserList = function UserList(_ref2) {
8736
8860
  }, {
8737
8861
  label: 'Bulk action history',
8738
8862
  handler: handleBulkActionHistoryClick
8863
+ }, {
8864
+ label: 'Resend invite',
8865
+ handler: toggleInviteModal
8739
8866
  }];
8740
8867
  useEffect(function () {
8741
8868
  var roleCanAccess = ['travel_itilite_admin', 'travel_admin', 'expense_itilite_admin', 'expense_admin'];
@@ -8760,7 +8887,6 @@ var UserList = function UserList(_ref2) {
8760
8887
  dispatch(fetchUsersList(url)).then(function () {
8761
8888
  setSearchingChange(false);
8762
8889
  setisApiFetching(false);
8763
- scrollTo('table-root');
8764
8890
  });
8765
8891
  }, 1000);
8766
8892
  return function () {
@@ -8774,7 +8900,8 @@ var UserList = function UserList(_ref2) {
8774
8900
  ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
8775
8901
  length: signup_rowsPerPage,
8776
8902
  page: signup_page,
8777
- search: signup_searchValue.trim()
8903
+ search: signup_searchValue.trim(),
8904
+ pagename: 'company'
8778
8905
  })).then(function () {
8779
8906
  setSignUpSearchingChange(false);
8780
8907
  setisApiFetching(false);
@@ -8786,7 +8913,6 @@ var UserList = function UserList(_ref2) {
8786
8913
  }
8787
8914
  if (isSortingChange) {
8788
8915
  setisApiFetching(true);
8789
- scrollTo('table-root');
8790
8916
  dispatch(fetchUsersList(url)).then(function () {
8791
8917
  setisApiFetching(false);
8792
8918
  setSortingChange(false);
@@ -8801,7 +8927,8 @@ var UserList = function UserList(_ref2) {
8801
8927
  ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
8802
8928
  length: signup_rowsPerPage,
8803
8929
  page: signup_page,
8804
- search: signup_searchValue.trim()
8930
+ search: signup_searchValue.trim(),
8931
+ pagename: 'company'
8805
8932
  })).then(function () {
8806
8933
  setisApiFetching(false);
8807
8934
  setSignUpSortingChange(false);
@@ -8817,7 +8944,8 @@ var UserList = function UserList(_ref2) {
8817
8944
  ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
8818
8945
  length: signup_rowsPerPage,
8819
8946
  page: signup_page,
8820
- search: signup_searchValue.trim()
8947
+ search: signup_searchValue.trim(),
8948
+ pagename: 'company'
8821
8949
  })).then(function () {
8822
8950
  return dispatch(stopDataFetchingStatus());
8823
8951
  });
@@ -8825,89 +8953,15 @@ var UserList = function UserList(_ref2) {
8825
8953
  }
8826
8954
  }
8827
8955
  }, [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
8956
  return /*#__PURE__*/React.createElement(IUIBox, {
8869
8957
  component: "div",
8870
8958
  className: styles$5.UUIUserManagementList
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, {
8959
+ }, !hasVerificationError ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBackdrop, {
8905
8960
  open: isFileDownloading || isApiFetching,
8906
8961
  className: styles$5.backdrop
8907
8962
  }, /*#__PURE__*/React.createElement(IUICircularProgress, {
8908
8963
  color: "inherit"
8909
8964
  })), isDataFetching ? /*#__PURE__*/React.createElement(SkeletonLoader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIBox, {
8910
- id: "table-root",
8911
8965
  component: "div",
8912
8966
  className: clsx(styles$5.pageHeader)
8913
8967
  }, /*#__PURE__*/React.createElement(IUIBox, {
@@ -8932,7 +8986,44 @@ var UserList = function UserList(_ref2) {
8932
8986
  }, /*#__PURE__*/React.createElement(IUITypography, {
8933
8987
  variant: "h3",
8934
8988
  className: clsx(styles$5.heading, styles$5.headingLarge)
8935
- }, isILadmin && companyName ? companyName + " - Users" : 'Users'))), topRightButtons()), /*#__PURE__*/React.createElement(IUIBox, {
8989
+ }, isILadmin && companyName ? companyName + " - Users" : 'Users'))), /*#__PURE__*/React.createElement(IUIBox, {
8990
+ component: "div",
8991
+ className: styles$5.buttonWrapper,
8992
+ display: "flex",
8993
+ justifyContent: "space-between",
8994
+ alignItems: "center",
8995
+ alignSelf: "flex-start"
8996
+ }, /*#__PURE__*/React.createElement(IUIBox, {
8997
+ component: "div",
8998
+ className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
8999
+ }, /*#__PURE__*/React.createElement(IUIButton, {
9000
+ buttonText: "Export all users",
9001
+ type: "outlined",
9002
+ startIcon: /*#__PURE__*/React.createElement(BulkDownloadIcon, {
9003
+ width: "22",
9004
+ height: "22"
9005
+ }),
9006
+ onClick: handleExportUsers
9007
+ })), /*#__PURE__*/React.createElement(IUIBox, {
9008
+ component: "div",
9009
+ className: clsx(styles$5.buttonSingle, styles$5.buttonLeft)
9010
+ }, /*#__PURE__*/React.createElement(IUIDropdownButton, {
9011
+ buttonText: "Bulk actions",
9012
+ type: "outlined",
9013
+ menuListInfo: BulkUploadInfo
9014
+ })), /*#__PURE__*/React.createElement(IUIBox, {
9015
+ component: "div",
9016
+ className: "pageHeader--button-single button-right"
9017
+ }, /*#__PURE__*/React.createElement(IUIButton, {
9018
+ buttonText: "Add user",
9019
+ type: "contained",
9020
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
9021
+ width: "9",
9022
+ height: "9",
9023
+ color: "white"
9024
+ }),
9025
+ onClick: handleAddPageNavigation
9026
+ })))), /*#__PURE__*/React.createElement(IUIBox, {
8936
9027
  component: "div",
8937
9028
  display: "flex",
8938
9029
  justifyContent: "space-between",
@@ -8977,7 +9068,9 @@ var UserList = function UserList(_ref2) {
8977
9068
  disableRowCheckbox: deactivatedUsers,
8978
9069
  searchValue: searchValue,
8979
9070
  isILadmin: isILadmin,
8980
- onPrimaryAdminHandler: onPrimaryAdminHandler
9071
+ onPrimaryAdminHandler: onPrimaryAdminHandler,
9072
+ onResetPasswordHandler: onResetPasswordHandler,
9073
+ toggleInviteModal: toggleInviteModal
8981
9074
  }))
8982
9075
  }, {
8983
9076
  label: /*#__PURE__*/React.createElement(IUIBox, null, "Sign-up requests", ' ', /*#__PURE__*/React.createElement(TabLabelCount, {
@@ -9050,7 +9143,41 @@ var UserList = function UserList(_ref2) {
9050
9143
  className: styles$5.headerText
9051
9144
  }, '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
9145
  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(BulkUploadModal, {
9146
+ }, "The", ' ', Object.values(selected).flat().length === 1 ? ' user ' : ' users ', "won\u2019t be able to access itilite platform"))), /*#__PURE__*/React.createElement(IUIModal, {
9147
+ isOpen: showInviteModal,
9148
+ closeHandler: toggleInviteModal,
9149
+ cancelLabel: "Cancel",
9150
+ headerText: "Resend Invites?",
9151
+ submitLabel: "Send",
9152
+ submitHandler: function submitHandler() {
9153
+ return onResendInviteHandler();
9154
+ },
9155
+ width: "400px",
9156
+ modalBodyStyle: {
9157
+ padding: '0px'
9158
+ },
9159
+ footerStyle: {
9160
+ justifyContent: 'center'
9161
+ }
9162
+ }, /*#__PURE__*/React.createElement("div", {
9163
+ style: {
9164
+ display: 'flex',
9165
+ padding: '16px',
9166
+ margin: '8px 24px',
9167
+ border: '1px solid #FDE047',
9168
+ background: '#FEFCE8',
9169
+ borderRadius: '5px'
9170
+ }
9171
+ }, /*#__PURE__*/React.createElement("div", {
9172
+ style: {
9173
+ marginRight: '5px'
9174
+ }
9175
+ }, /*#__PURE__*/React.createElement(InviteInfoIcon, null)), /*#__PURE__*/React.createElement("div", {
9176
+ style: {
9177
+ fontSize: '14px',
9178
+ color: '#374151'
9179
+ }
9180
+ }, "This invitation will be sent to users who have not logged into the platform."))), /*#__PURE__*/React.createElement(BulkUploadModal, {
9054
9181
  isOpenImportUsersModal: isOpenImportUsersModal,
9055
9182
  closeImportUsersModal: closeImportUsersModal,
9056
9183
  closeImportModal: closeImportModal
@@ -9059,8 +9186,8 @@ var UserList = function UserList(_ref2) {
9059
9186
  errMsg: hasVerificationError
9060
9187
  }));
9061
9188
  };
9062
- var TabLabelCount = function TabLabelCount(_ref4) {
9063
- var count = _ref4.count;
9189
+ var TabLabelCount = function TabLabelCount(_ref3) {
9190
+ var count = _ref3.count;
9064
9191
  return /*#__PURE__*/React.createElement(IUIBox, {
9065
9192
  className: styles$5.TabLabelCount
9066
9193
  }, " ", count, " ");
@@ -9166,7 +9293,7 @@ function Listview(_ref) {
9166
9293
  id: 'no_of_users',
9167
9294
  label: 'Number of users',
9168
9295
  width: '45%',
9169
- sortable: true,
9296
+ sortable: false,
9170
9297
  cell: function cell(row) {
9171
9298
  return /*#__PURE__*/React.createElement(IUIBox, {
9172
9299
  component: "div"