@itilite/iui-user-management 1.4.80 → 1.4.81
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 +39 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +39 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2648,7 +2648,9 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2648
2648
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2649
2649
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2650
2650
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2651
|
-
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod
|
|
2651
|
+
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
|
|
2652
|
+
_ref$sendLog = _ref.sendLog,
|
|
2653
|
+
sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
|
|
2652
2654
|
var dispatch = useDispatch();
|
|
2653
2655
|
var _ref2 = paymentDetails || {},
|
|
2654
2656
|
_ref2$pg = _ref2.pg,
|
|
@@ -2672,6 +2674,13 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2672
2674
|
var handleMarkAsDefault = function handleMarkAsDefault() {
|
|
2673
2675
|
console.log('Mark as default:', selectedCard);
|
|
2674
2676
|
if (!pg || !selectedCard) return;
|
|
2677
|
+
sendLog({
|
|
2678
|
+
eventName: 'edit_card_clicked',
|
|
2679
|
+
customProperties: {
|
|
2680
|
+
action_type: 'Make default'
|
|
2681
|
+
},
|
|
2682
|
+
logImpression: true
|
|
2683
|
+
});
|
|
2675
2684
|
dispatch(setDefaultPaymentCard({
|
|
2676
2685
|
user_id: +pg.user_id,
|
|
2677
2686
|
method_id: selectedCard.id,
|
|
@@ -2681,6 +2690,13 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2681
2690
|
handleMenuClose();
|
|
2682
2691
|
};
|
|
2683
2692
|
var handleDeleteCard = function handleDeleteCard() {
|
|
2693
|
+
sendLog({
|
|
2694
|
+
eventName: 'edit_card_clicked',
|
|
2695
|
+
customProperties: {
|
|
2696
|
+
action_type: 'Delete'
|
|
2697
|
+
},
|
|
2698
|
+
logImpression: true
|
|
2699
|
+
});
|
|
2684
2700
|
dispatch(deletePaymentCard({
|
|
2685
2701
|
pmId: selectedCard.id,
|
|
2686
2702
|
vendorId: pg.vendor_id
|
|
@@ -2851,7 +2867,11 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2851
2867
|
}) : null), console.log('cards', cards, 'cardsCount', cardsCount, pg), (!cards || cardsCount < 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", {
|
|
2852
2868
|
className: classes.addCardButton,
|
|
2853
2869
|
onClick: function onClick() {
|
|
2854
|
-
|
|
2870
|
+
sendLog({
|
|
2871
|
+
eventName: 'add_user_card_clicked',
|
|
2872
|
+
logImpression: true
|
|
2873
|
+
});
|
|
2874
|
+
window.location.assign(_url);
|
|
2855
2875
|
}
|
|
2856
2876
|
}, /*#__PURE__*/React.createElement("span", {
|
|
2857
2877
|
className: classes.plusIcon
|
|
@@ -2908,7 +2928,9 @@ var PaymentCards = function PaymentCards(_ref) {
|
|
|
2908
2928
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2909
2929
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2910
2930
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2911
|
-
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod
|
|
2931
|
+
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
|
|
2932
|
+
_ref$sendLog = _ref.sendLog,
|
|
2933
|
+
sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
|
|
2912
2934
|
if (!paymentDetails || ((_Object$keys = Object.keys(paymentDetails)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) === 0 || (!(paymentDetails !== null && paymentDetails !== void 0 && paymentDetails.cards) || (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$cards = paymentDetails.cards) === null || _paymentDetails$cards === void 0 ? void 0 : _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)) {
|
|
2913
2935
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2914
2936
|
}
|
|
@@ -2916,7 +2938,8 @@ var PaymentCards = function PaymentCards(_ref) {
|
|
|
2916
2938
|
className: styles$1.dividerColor
|
|
2917
2939
|
}), /*#__PURE__*/React.createElement(CardsManagement, {
|
|
2918
2940
|
paymentDetails: paymentDetails,
|
|
2919
|
-
paymentMethod: paymentMethod
|
|
2941
|
+
paymentMethod: paymentMethod,
|
|
2942
|
+
sendLog: sendLog
|
|
2920
2943
|
}));
|
|
2921
2944
|
};
|
|
2922
2945
|
|
|
@@ -2992,7 +3015,9 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2992
3015
|
_props$roles = props.roles,
|
|
2993
3016
|
roles = _props$roles === void 0 ? [] : _props$roles,
|
|
2994
3017
|
_props$paymentMethod = props.paymentMethod,
|
|
2995
|
-
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod
|
|
3018
|
+
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
|
|
3019
|
+
_props$sendLog = props.sendLog,
|
|
3020
|
+
sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
|
|
2996
3021
|
var _useState = useState({
|
|
2997
3022
|
product: '',
|
|
2998
3023
|
approvers: []
|
|
@@ -3290,7 +3315,8 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
3290
3315
|
}));
|
|
3291
3316
|
})))), type === 'travel' && paymentDetails && isProfile && /*#__PURE__*/React.createElement(PaymentCards, {
|
|
3292
3317
|
paymentDetails: paymentDetails,
|
|
3293
|
-
paymentMethod: paymentMethod
|
|
3318
|
+
paymentMethod: paymentMethod,
|
|
3319
|
+
sendLog: sendLog
|
|
3294
3320
|
}));
|
|
3295
3321
|
};
|
|
3296
3322
|
|
|
@@ -6424,7 +6450,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6424
6450
|
_props$isProfile = props.isProfile,
|
|
6425
6451
|
isProfile = _props$isProfile === void 0 ? false : _props$isProfile,
|
|
6426
6452
|
_props$paymentMethod = props.paymentMethod,
|
|
6427
|
-
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod
|
|
6453
|
+
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
|
|
6454
|
+
_props$sendLog = props.sendLog,
|
|
6455
|
+
sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
|
|
6428
6456
|
env$4.init(config, isProfile);
|
|
6429
6457
|
var queryParams = new URLSearchParams(window.location.search);
|
|
6430
6458
|
var verifyUserId = Number(queryParams.get(config.routes.users.add.queryParamKeys.verifyUserId));
|
|
@@ -8324,7 +8352,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
8324
8352
|
isProfile: isProfile,
|
|
8325
8353
|
editUserId: editUserId,
|
|
8326
8354
|
roles: renderFields.travelRoles,
|
|
8327
|
-
paymentMethod: paymentMethod
|
|
8355
|
+
paymentMethod: paymentMethod,
|
|
8356
|
+
sendLog: sendLog
|
|
8328
8357
|
}), /*#__PURE__*/React.createElement(AdditionalInfo, {
|
|
8329
8358
|
membershipInfoInput: membershipInfoInput,
|
|
8330
8359
|
onMemInfoInputChange: onMemInfoInputChange,
|
|
@@ -8369,7 +8398,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
8369
8398
|
isProfile: isProfile,
|
|
8370
8399
|
editUserId: editUserId,
|
|
8371
8400
|
roles: renderFields.expenseRoles,
|
|
8372
|
-
paymentMethod: paymentMethod
|
|
8401
|
+
paymentMethod: paymentMethod,
|
|
8402
|
+
sendLog: sendLog
|
|
8373
8403
|
}), /*#__PURE__*/React.createElement(IUIDivider, {
|
|
8374
8404
|
className: styles.dividerColor
|
|
8375
8405
|
}), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React.createElement(CardsField, {
|