@itilite/iui-user-management 0.4.63 → 0.4.65

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 CHANGED
@@ -3260,7 +3260,7 @@ var products = [{
3260
3260
  label: 'Cards',
3261
3261
  name: 'cards',
3262
3262
  type: 'checkbox',
3263
- disableText: 'Please get in touch with your administrator to change this value.'
3263
+ disableText: 'Only Card admin can change this access.'
3264
3264
  }];
3265
3265
  var dropdownList = {
3266
3266
  gender: [{
@@ -3438,7 +3438,7 @@ var cardsConstants = {
3438
3438
  roles: [{
3439
3439
  id: 1,
3440
3440
  label: 'Card holder',
3441
- description: 'Can own and use cards that are issued to them',
3441
+ description: 'Can own and use card that are issued to them',
3442
3442
  value: '',
3443
3443
  name: '',
3444
3444
  type: 'radio',
@@ -3449,7 +3449,7 @@ var cardsConstants = {
3449
3449
  }, {
3450
3450
  id: 2,
3451
3451
  label: 'Card admin',
3452
- description: 'Can issue cards to others and can manage all cards and transactions across the company.',
3452
+ description: 'Can issue card to others and can manage all card and transactions across the company.',
3453
3453
  value: '',
3454
3454
  name: '',
3455
3455
  type: 'radio',
@@ -4944,8 +4944,8 @@ var ErrorMessages = {
4944
4944
  passport_photo: 'Please attach passport photo.',
4945
4945
  travel_docs: 'Please attach travel docs.',
4946
4946
  products: 'Please select atleast one product access.',
4947
- only_cards_products: 'Select at least one additional product if opting for cards.',
4948
- none_products: 'Select at least one product. If opting for cards, please choose at least one additional product.'
4947
+ only_cards_products: 'Select at least one additional product if opting for card.',
4948
+ none_products: 'Select at least one product. If opting for card, please choose at least one additional product.'
4949
4949
  };
4950
4950
 
4951
4951
  function AddPanelDialog(_ref) {
@@ -5043,7 +5043,19 @@ var CardsField = function CardsField(props) {
5043
5043
  value: roleValue,
5044
5044
  onValueChange: onRoleChange,
5045
5045
  disabled: cardsAdmin ? false : true
5046
- })))));
5046
+ })), !cardsAdmin && !isProfile && /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
5047
+ item: true,
5048
+ sm: 12,
5049
+ md: 12,
5050
+ lg: 12,
5051
+ style: {
5052
+ marginTop: "24px"
5053
+ }
5054
+ }, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
5055
+ variant: "body2",
5056
+ component: "span",
5057
+ className: styles.errorTextCls
5058
+ }, "Only Card admin can change the roles")))));
5047
5059
  };
5048
5060
 
5049
5061
  var IUIToastMessageService$4 = utils.services.IUIToastMessageService,
@@ -6510,7 +6522,7 @@ var UserAddEdit = function UserAddEdit(props) {
6510
6522
  }
6511
6523
  }
6512
6524
  var cardApiflag = false;
6513
- if (productAccess.cards === false) {
6525
+ if (productAccess.cards === false || isCardsAdmin === false) {
6514
6526
  cardApiflag = false;
6515
6527
  } else {
6516
6528
  cardApiflag = true;
@@ -8856,7 +8868,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8856
8868
  cell: function cell(row) {
8857
8869
  return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8858
8870
  component: "div"
8859
- }, row.products.length > 0 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, row.products[0].role !== "Card Holder" ? /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8871
+ }, row.products.length > 0 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !row.products[0].role.toLowerCase().includes("holder") ? /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8860
8872
  component: "div",
8861
8873
  display: "flex"
8862
8874
  }, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
@@ -8869,7 +8881,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8869
8881
  style: {
8870
8882
  whiteSpace: 'nowrap'
8871
8883
  }
8872
- }, "\xA0" + row.products[0].role)) : "", row.products[1] && row.products[1].role !== "Card Holder" && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8884
+ }, "\xA0" + row.products[0].role)) : "", row.products[1] && !row.products[1].role.toLowerCase().includes("holder") && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8873
8885
  component: "div",
8874
8886
  display: "flex"
8875
8887
  }, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
@@ -8882,7 +8894,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8882
8894
  style: {
8883
8895
  whiteSpace: 'nowrap'
8884
8896
  }
8885
- }, "\xA0" + row.products[1].role)), row.products[2] && row.products[2].role !== "Card Holder" && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8897
+ }, "\xA0" + row.products[1].role)), row.products[2] && !row.products[2].role.toLowerCase().includes("holder") && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8886
8898
  component: "div",
8887
8899
  display: "flex"
8888
8900
  }, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {