@itilite/iui-user-management 1.4.7683 → 1.4.7711
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 +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2235,11 +2235,12 @@ var editCustomFieldLabel = function editCustomFieldLabel(payload) {
|
|
|
2235
2235
|
var IUILocalStorageService$4 = services.IUILocalStorageService;
|
|
2236
2236
|
var env$3 = configs.env;
|
|
2237
2237
|
var CardsManagement = function CardsManagement(_ref) {
|
|
2238
|
-
var _pg$gateway;
|
|
2238
|
+
var _pg$gateway, _pg$gateway2;
|
|
2239
2239
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2240
2240
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2241
2241
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2242
2242
|
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod;
|
|
2243
|
+
console.log(paymentMethod, 'paymentMethod in CardsManagement');
|
|
2243
2244
|
var dispatch = useDispatch();
|
|
2244
2245
|
var pg = paymentDetails.pg,
|
|
2245
2246
|
_paymentDetails$cards = paymentDetails.cards,
|
|
@@ -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$
|
|
2419
|
+
})), console.log(paymentMethod, 'paymentMethod in card section', !cards, (cards === null || cards === void 0 ? void 0 : cards.length) < 10, pg, (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), (!cards || (cards === null || cards === void 0 ? void 0 : cards.length) < 10) && (pg === null || pg === void 0 ? void 0 : (_pg$gateway2 = pg.gateway) === null || _pg$gateway2 === void 0 ? void 0 : _pg$gateway2.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);
|
|
@@ -2472,14 +2473,17 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2472
2473
|
|
|
2473
2474
|
var PaymentCards = function PaymentCards(_ref) {
|
|
2474
2475
|
var _paymentDetails$pg, _paymentDetails$pg2;
|
|
2475
|
-
var paymentDetails = _ref.paymentDetails
|
|
2476
|
-
|
|
2476
|
+
var paymentDetails = _ref.paymentDetails,
|
|
2477
|
+
paymentMethod = _ref.paymentMethod;
|
|
2478
|
+
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)) {
|
|
2477
2479
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2478
2480
|
}
|
|
2481
|
+
console.log(paymentMethod, 'paymentMethod in payment cards');
|
|
2479
2482
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIDivider, {
|
|
2480
2483
|
className: styles$1.dividerColor
|
|
2481
2484
|
}), /*#__PURE__*/React.createElement(CardsManagement, {
|
|
2482
|
-
paymentDetails: paymentDetails
|
|
2485
|
+
paymentDetails: paymentDetails,
|
|
2486
|
+
paymentMethod: paymentMethod
|
|
2483
2487
|
}));
|
|
2484
2488
|
};
|
|
2485
2489
|
|
|
@@ -7930,7 +7934,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7930
7934
|
maxApprovers: maxExpenseApprovers,
|
|
7931
7935
|
isProfile: isProfile,
|
|
7932
7936
|
editUserId: editUserId,
|
|
7933
|
-
roles: renderFields.expenseRoles
|
|
7937
|
+
roles: renderFields.expenseRoles,
|
|
7938
|
+
paymentMethod: paymentMethod
|
|
7934
7939
|
}), /*#__PURE__*/React.createElement(IUIDivider, {
|
|
7935
7940
|
className: styles.dividerColor
|
|
7936
7941
|
}), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React.createElement(CardsField, {
|