@itilite/iui-user-management 1.4.7684 → 1.4.7721

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.
@@ -2373,15 +2373,16 @@ var CardsManagement = function CardsManagement(_ref) {
2373
2373
  className: classes.brandLogo
2374
2374
  })));
2375
2375
  };
2376
- var personalCards = cards.filter(function (card) {
2376
+ var personalCards = cards === null || cards === void 0 ? void 0 : cards.filter(function (card) {
2377
2377
  return card.category === 'Personal';
2378
2378
  });
2379
- var corporateCards = cards.filter(function (card) {
2379
+ var corporateCards = cards === null || cards === void 0 ? void 0 : cards.filter(function (card) {
2380
2380
  return card.category === 'Corporate';
2381
2381
  });
2382
- var companyCards = cards.filter(function (card) {
2382
+ var companyCards = cards === null || cards === void 0 ? void 0 : cards.filter(function (card) {
2383
2383
  return card.category === 'Company';
2384
2384
  });
2385
+ var cardsCount = (personalCards === null || personalCards === void 0 ? void 0 : personalCards.length) + (corporateCards === null || corporateCards === void 0 ? void 0 : corporateCards.length);
2385
2386
  var _url = env$3.getPaymentUrl() + ("/api/v1/auth/" + IUILocalStorageService$4.getAccessToken() + "/1/" + pg.entity_id + "/0/" + pg.vendor_id + "/1");
2386
2387
  return /*#__PURE__*/React.createElement("div", {
2387
2388
  style: {
@@ -2415,7 +2416,7 @@ var CardsManagement = function CardsManagement(_ref) {
2415
2416
  return renderCard(card);
2416
2417
  }), corporateCards.map(function (card) {
2417
2418
  return renderCard(card);
2418
- })), (!cards || (cards === null || cards === void 0 ? void 0 : cards.length) < 10) && (pg === null || pg === void 0 ? void 0 : (_pg$gateway = pg.gateway) === null || _pg$gateway === void 0 ? void 0 : _pg$gateway.toLowerCase()) === 'stripe' && (pg === null || pg === void 0 ? void 0 : pg.save_card_enable) === 1 && paymentMethod === 1 && /*#__PURE__*/React.createElement("button", {
2419
+ })), (!cards || (cardsCount === null || cardsCount === void 0 ? void 0 : cardsCount.length) < 10) && (pg === null || pg === void 0 ? void 0 : (_pg$gateway = pg.gateway) === null || _pg$gateway === void 0 ? void 0 : _pg$gateway.toLowerCase()) === 'stripe' && (pg === null || pg === void 0 ? void 0 : pg.save_card_enable) === 1 && paymentMethod === 1 && /*#__PURE__*/React.createElement("button", {
2419
2420
  className: classes.addCardButton,
2420
2421
  onClick: function onClick() {
2421
2422
  return window.location.assign(_url);