@itilite/iui-user-management 1.4.771 → 1.4.772
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 +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2243,7 +2243,6 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2243
2243
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2244
2244
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2245
2245
|
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod;
|
|
2246
|
-
console.log(paymentMethod, 'paymentMethod in CardsManagement');
|
|
2247
2246
|
var dispatch = reactRedux.useDispatch();
|
|
2248
2247
|
var pg = paymentDetails.pg,
|
|
2249
2248
|
_paymentDetails$cards = paymentDetails.cards,
|
|
@@ -2386,6 +2385,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2386
2385
|
var companyCards = cards.filter(function (card) {
|
|
2387
2386
|
return card.category === 'Company';
|
|
2388
2387
|
});
|
|
2388
|
+
var cardsCount = personalCards.length + corporateCards.length;
|
|
2389
2389
|
var _url = env$3.getPaymentUrl() + ("/api/v1/auth/" + IUILocalStorageService$4.getAccessToken() + "/1/" + pg.entity_id + "/0/" + pg.vendor_id + "/1");
|
|
2390
2390
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2391
2391
|
style: {
|
|
@@ -2419,7 +2419,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2419
2419
|
return renderCard(card);
|
|
2420
2420
|
}), corporateCards.map(function (card) {
|
|
2421
2421
|
return renderCard(card);
|
|
2422
|
-
})),
|
|
2422
|
+
})), (!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__default.createElement("button", {
|
|
2423
2423
|
className: classes.addCardButton,
|
|
2424
2424
|
onClick: function onClick() {
|
|
2425
2425
|
return window.location.assign(_url);
|
|
@@ -2481,7 +2481,6 @@ var PaymentCards = function PaymentCards(_ref) {
|
|
|
2481
2481
|
if (!paymentDetails || Object.keys(paymentDetails).length === 0 || (!paymentDetails.cards || paymentDetails.cards.length === 0) && ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$pg = paymentDetails.pg) === null || _paymentDetails$pg === void 0 ? void 0 : _paymentDetails$pg.gateway.toLowerCase()) !== 'stripe' || (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$pg2 = paymentDetails.pg) === null || _paymentDetails$pg2 === void 0 ? void 0 : _paymentDetails$pg2.save_card_enable) !== 1 || paymentMethod !== 1)) {
|
|
2482
2482
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
2483
2483
|
}
|
|
2484
|
-
console.log(paymentMethod, 'paymentMethod in payment cards');
|
|
2485
2484
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
|
|
2486
2485
|
className: styles$1.dividerColor
|
|
2487
2486
|
}), /*#__PURE__*/React__default.createElement(CardsManagement, {
|