@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.
@@ -3257,7 +3257,7 @@ var products = [{
3257
3257
  label: 'Cards',
3258
3258
  name: 'cards',
3259
3259
  type: 'checkbox',
3260
- disableText: 'Please get in touch with your administrator to change this value.'
3260
+ disableText: 'Only Card admin can change this access.'
3261
3261
  }];
3262
3262
  var dropdownList = {
3263
3263
  gender: [{
@@ -3435,7 +3435,7 @@ var cardsConstants = {
3435
3435
  roles: [{
3436
3436
  id: 1,
3437
3437
  label: 'Card holder',
3438
- description: 'Can own and use cards that are issued to them',
3438
+ description: 'Can own and use card that are issued to them',
3439
3439
  value: '',
3440
3440
  name: '',
3441
3441
  type: 'radio',
@@ -3446,7 +3446,7 @@ var cardsConstants = {
3446
3446
  }, {
3447
3447
  id: 2,
3448
3448
  label: 'Card admin',
3449
- description: 'Can issue cards to others and can manage all cards and transactions across the company.',
3449
+ description: 'Can issue card to others and can manage all card and transactions across the company.',
3450
3450
  value: '',
3451
3451
  name: '',
3452
3452
  type: 'radio',
@@ -4941,8 +4941,8 @@ var ErrorMessages = {
4941
4941
  passport_photo: 'Please attach passport photo.',
4942
4942
  travel_docs: 'Please attach travel docs.',
4943
4943
  products: 'Please select atleast one product access.',
4944
- only_cards_products: 'Select at least one additional product if opting for cards.',
4945
- none_products: 'Select at least one product. If opting for cards, please choose at least one additional product.'
4944
+ only_cards_products: 'Select at least one additional product if opting for card.',
4945
+ none_products: 'Select at least one product. If opting for card, please choose at least one additional product.'
4946
4946
  };
4947
4947
 
4948
4948
  function AddPanelDialog(_ref) {
@@ -5040,7 +5040,19 @@ var CardsField = function CardsField(props) {
5040
5040
  value: roleValue,
5041
5041
  onValueChange: onRoleChange,
5042
5042
  disabled: cardsAdmin ? false : true
5043
- })))));
5043
+ })), !cardsAdmin && !isProfile && /*#__PURE__*/React.createElement(IUIGrid, {
5044
+ item: true,
5045
+ sm: 12,
5046
+ md: 12,
5047
+ lg: 12,
5048
+ style: {
5049
+ marginTop: "24px"
5050
+ }
5051
+ }, /*#__PURE__*/React.createElement(IUITypography, {
5052
+ variant: "body2",
5053
+ component: "span",
5054
+ className: styles.errorTextCls
5055
+ }, "Only Card admin can change the roles")))));
5044
5056
  };
5045
5057
 
5046
5058
  var IUIToastMessageService$4 = services.IUIToastMessageService,
@@ -6507,7 +6519,7 @@ var UserAddEdit = function UserAddEdit(props) {
6507
6519
  }
6508
6520
  }
6509
6521
  var cardApiflag = false;
6510
- if (productAccess.cards === false) {
6522
+ if (productAccess.cards === false || isCardsAdmin === false) {
6511
6523
  cardApiflag = false;
6512
6524
  } else {
6513
6525
  cardApiflag = true;
@@ -8853,7 +8865,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8853
8865
  cell: function cell(row) {
8854
8866
  return /*#__PURE__*/React.createElement(IUIBox, {
8855
8867
  component: "div"
8856
- }, row.products.length > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, row.products[0].role !== "Card Holder" ? /*#__PURE__*/React.createElement(IUIBox, {
8868
+ }, row.products.length > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, !row.products[0].role.toLowerCase().includes("holder") ? /*#__PURE__*/React.createElement(IUIBox, {
8857
8869
  component: "div",
8858
8870
  display: "flex"
8859
8871
  }, /*#__PURE__*/React.createElement(IUITypography, {
@@ -8866,7 +8878,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8866
8878
  style: {
8867
8879
  whiteSpace: 'nowrap'
8868
8880
  }
8869
- }, "\xA0" + row.products[0].role)) : "", row.products[1] && row.products[1].role !== "Card Holder" && /*#__PURE__*/React.createElement(IUIBox, {
8881
+ }, "\xA0" + row.products[0].role)) : "", row.products[1] && !row.products[1].role.toLowerCase().includes("holder") && /*#__PURE__*/React.createElement(IUIBox, {
8870
8882
  component: "div",
8871
8883
  display: "flex"
8872
8884
  }, /*#__PURE__*/React.createElement(IUITypography, {
@@ -8879,7 +8891,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
8879
8891
  style: {
8880
8892
  whiteSpace: 'nowrap'
8881
8893
  }
8882
- }, "\xA0" + row.products[1].role)), row.products[2] && row.products[2].role !== "Card Holder" && /*#__PURE__*/React.createElement(IUIBox, {
8894
+ }, "\xA0" + row.products[1].role)), row.products[2] && !row.products[2].role.toLowerCase().includes("holder") && /*#__PURE__*/React.createElement(IUIBox, {
8883
8895
  component: "div",
8884
8896
  display: "flex"
8885
8897
  }, /*#__PURE__*/React.createElement(IUITypography, {