@itilite/iui-user-management 1.4.7682 → 1.4.7684
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 +8 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2418,7 +2418,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2418
2418
|
return renderCard(card);
|
|
2419
2419
|
}), corporateCards.map(function (card) {
|
|
2420
2420
|
return renderCard(card);
|
|
2421
|
-
})), (!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
|
|
2421
|
+
})), (!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__default.createElement("button", {
|
|
2422
2422
|
className: classes.addCardButton,
|
|
2423
2423
|
onClick: function onClick() {
|
|
2424
2424
|
return window.location.assign(_url);
|
|
@@ -2475,14 +2475,16 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2475
2475
|
|
|
2476
2476
|
var PaymentCards = function PaymentCards(_ref) {
|
|
2477
2477
|
var _paymentDetails$pg, _paymentDetails$pg2;
|
|
2478
|
-
var paymentDetails = _ref.paymentDetails
|
|
2479
|
-
|
|
2478
|
+
var paymentDetails = _ref.paymentDetails,
|
|
2479
|
+
paymentMethod = _ref.paymentMethod;
|
|
2480
|
+
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)) {
|
|
2480
2481
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
2481
2482
|
}
|
|
2482
2483
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
|
|
2483
2484
|
className: styles$1.dividerColor
|
|
2484
2485
|
}), /*#__PURE__*/React__default.createElement(CardsManagement, {
|
|
2485
|
-
paymentDetails: paymentDetails
|
|
2486
|
+
paymentDetails: paymentDetails,
|
|
2487
|
+
paymentMethod: paymentMethod
|
|
2486
2488
|
}));
|
|
2487
2489
|
};
|
|
2488
2490
|
|
|
@@ -4029,7 +4031,6 @@ var reducer = function reducer(state, action) {
|
|
|
4029
4031
|
{
|
|
4030
4032
|
var _action$payload8, _action$payload8$role, _action$payload9;
|
|
4031
4033
|
var cardsDetails = _extends({}, state.cardsDetails);
|
|
4032
|
-
console.log(action === null || action === void 0 ? void 0 : action.payload, 'cardsDetails22');
|
|
4033
4034
|
if (action !== null && action !== void 0 && (_action$payload8 = action.payload) !== null && _action$payload8 !== void 0 && (_action$payload8$role = _action$payload8.roles) !== null && _action$payload8$role !== void 0 && _action$payload8$role.length) {
|
|
4034
4035
|
cardsDetails.cardsRoles = action.payload.roles.map(function (role) {
|
|
4035
4036
|
return {
|
|
@@ -4046,7 +4047,6 @@ var reducer = function reducer(state, action) {
|
|
|
4046
4047
|
};
|
|
4047
4048
|
});
|
|
4048
4049
|
}
|
|
4049
|
-
console.log(cardsDetails, 'cardsDetails2');
|
|
4050
4050
|
return _extends({}, state, {
|
|
4051
4051
|
cardsDetails: cardsDetails,
|
|
4052
4052
|
isCardsDetailsRendered: true,
|
|
@@ -6208,7 +6208,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6208
6208
|
}).then(function (res) {
|
|
6209
6209
|
var _res$roles;
|
|
6210
6210
|
if (res !== null && res !== void 0 && (_res$roles = res.roles) !== null && _res$roles !== void 0 && _res$roles.length) {
|
|
6211
|
-
console.log(res, 'cardsDetails222');
|
|
6212
6211
|
dispatch(setCardsDetails(res));
|
|
6213
6212
|
} else {
|
|
6214
6213
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
@@ -6915,7 +6914,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6915
6914
|
}
|
|
6916
6915
|
}, [isTokenVerified]);
|
|
6917
6916
|
React.useEffect(function () {
|
|
6918
|
-
console.log(isProfile, 'isProfile', id, 'id', editUserId, 'editUserId');
|
|
6919
6917
|
if (isRendered === true) {
|
|
6920
6918
|
renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
|
|
6921
6919
|
if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
|
|
@@ -7937,7 +7935,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7937
7935
|
maxApprovers: maxExpenseApprovers,
|
|
7938
7936
|
isProfile: isProfile,
|
|
7939
7937
|
editUserId: editUserId,
|
|
7940
|
-
roles: renderFields.expenseRoles
|
|
7938
|
+
roles: renderFields.expenseRoles,
|
|
7939
|
+
paymentMethod: paymentMethod
|
|
7941
7940
|
}), /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
|
|
7942
7941
|
className: styles.dividerColor
|
|
7943
7942
|
}), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React__default.createElement(CardsField, {
|