@itilite/iui-user-management 0.4.14 → 0.4.16

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.
@@ -7739,18 +7739,18 @@ var StickyHeadTable = function StickyHeadTable(props) {
7739
7739
  return onEditHandler(row.id);
7740
7740
  }
7741
7741
  }];
7742
- if (row && row.has_visited) {
7742
+ if (row && row.has_visited && row.is_active) {
7743
7743
  options.push({
7744
- label: 'Resend invite',
7744
+ label: 'Reset password',
7745
7745
  handler: function handler() {
7746
- return toggleInviteModal(row.id);
7746
+ return onResetPasswordHandler(row.email);
7747
7747
  }
7748
7748
  });
7749
- } else {
7749
+ } else if (row && row.is_active) {
7750
7750
  options.push({
7751
- label: 'Reset password',
7751
+ label: 'Resend invite',
7752
7752
  handler: function handler() {
7753
- return onResetPasswordHandler(row.email);
7753
+ return toggleInviteModal(row.id);
7754
7754
  }
7755
7755
  });
7756
7756
  }
@@ -8003,6 +8003,10 @@ var UserList = function UserList(_ref) {
8003
8003
  }));
8004
8004
  };
8005
8005
  var toggleInviteModal = function toggleInviteModal(ids) {
8006
+ if (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined) {
8007
+ IUIToastMessageService$7.warningNotify('Select at least one user to invite.');
8008
+ return false;
8009
+ }
8006
8010
  setUserIds(ids);
8007
8011
  setToggleInviteModal(!showInviteModal);
8008
8012
  };
@@ -8236,7 +8240,7 @@ var UserList = function UserList(_ref) {
8236
8240
  }, '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, {
8237
8241
  className: styles$5.description
8238
8242
  }, "The", ' ', Object.values(selected).flat().length === 1 ? ' user ' : ' users ', "won\u2019t be able to access itilite platform"))), /*#__PURE__*/React.createElement(IUIModal, {
8239
- isOpen: showInviteModal,
8243
+ isOpen: Object.values(selected).flat().length > 0 && showInviteModal,
8240
8244
  closeHandler: toggleInviteModal,
8241
8245
  cancelLabel: "Cancel",
8242
8246
  headerText: "Resend Invites?",