@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.modern.js
CHANGED
|
@@ -2415,7 +2415,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2415
2415
|
return renderCard(card);
|
|
2416
2416
|
}), corporateCards.map(function (card) {
|
|
2417
2417
|
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
|
|
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
2419
|
className: classes.addCardButton,
|
|
2420
2420
|
onClick: function onClick() {
|
|
2421
2421
|
return window.location.assign(_url);
|
|
@@ -2472,14 +2472,16 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2472
2472
|
|
|
2473
2473
|
var PaymentCards = function PaymentCards(_ref) {
|
|
2474
2474
|
var _paymentDetails$pg, _paymentDetails$pg2;
|
|
2475
|
-
var paymentDetails = _ref.paymentDetails
|
|
2476
|
-
|
|
2475
|
+
var paymentDetails = _ref.paymentDetails,
|
|
2476
|
+
paymentMethod = _ref.paymentMethod;
|
|
2477
|
+
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
2478
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2478
2479
|
}
|
|
2479
2480
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IUIDivider, {
|
|
2480
2481
|
className: styles$1.dividerColor
|
|
2481
2482
|
}), /*#__PURE__*/React.createElement(CardsManagement, {
|
|
2482
|
-
paymentDetails: paymentDetails
|
|
2483
|
+
paymentDetails: paymentDetails,
|
|
2484
|
+
paymentMethod: paymentMethod
|
|
2483
2485
|
}));
|
|
2484
2486
|
};
|
|
2485
2487
|
|
|
@@ -4026,7 +4028,6 @@ var reducer = function reducer(state, action) {
|
|
|
4026
4028
|
{
|
|
4027
4029
|
var _action$payload8, _action$payload8$role, _action$payload9;
|
|
4028
4030
|
var cardsDetails = _extends({}, state.cardsDetails);
|
|
4029
|
-
console.log(action === null || action === void 0 ? void 0 : action.payload, 'cardsDetails22');
|
|
4030
4031
|
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) {
|
|
4031
4032
|
cardsDetails.cardsRoles = action.payload.roles.map(function (role) {
|
|
4032
4033
|
return {
|
|
@@ -4043,7 +4044,6 @@ var reducer = function reducer(state, action) {
|
|
|
4043
4044
|
};
|
|
4044
4045
|
});
|
|
4045
4046
|
}
|
|
4046
|
-
console.log(cardsDetails, 'cardsDetails2');
|
|
4047
4047
|
return _extends({}, state, {
|
|
4048
4048
|
cardsDetails: cardsDetails,
|
|
4049
4049
|
isCardsDetailsRendered: true,
|
|
@@ -6205,7 +6205,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6205
6205
|
}).then(function (res) {
|
|
6206
6206
|
var _res$roles;
|
|
6207
6207
|
if (res !== null && res !== void 0 && (_res$roles = res.roles) !== null && _res$roles !== void 0 && _res$roles.length) {
|
|
6208
|
-
console.log(res, 'cardsDetails222');
|
|
6209
6208
|
dispatch(setCardsDetails(res));
|
|
6210
6209
|
} else {
|
|
6211
6210
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
@@ -6912,7 +6911,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6912
6911
|
}
|
|
6913
6912
|
}, [isTokenVerified]);
|
|
6914
6913
|
useEffect(function () {
|
|
6915
|
-
console.log(isProfile, 'isProfile', id, 'id', editUserId, 'editUserId');
|
|
6916
6914
|
if (isRendered === true) {
|
|
6917
6915
|
renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
|
|
6918
6916
|
if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
|
|
@@ -7934,7 +7932,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7934
7932
|
maxApprovers: maxExpenseApprovers,
|
|
7935
7933
|
isProfile: isProfile,
|
|
7936
7934
|
editUserId: editUserId,
|
|
7937
|
-
roles: renderFields.expenseRoles
|
|
7935
|
+
roles: renderFields.expenseRoles,
|
|
7936
|
+
paymentMethod: paymentMethod
|
|
7938
7937
|
}), /*#__PURE__*/React.createElement(IUIDivider, {
|
|
7939
7938
|
className: styles.dividerColor
|
|
7940
7939
|
}), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React.createElement(CardsField, {
|