@itilite/iui-user-management 1.5.14-beta.2 → 1.5.14-beta.4
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -5
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2673,11 +2673,9 @@ var IUILocalStorageService$3 = services.IUILocalStorageService;
|
|
|
2673
2673
|
var env$3 = configs.env,
|
|
2674
2674
|
paymentApi$1 = configs.paymentApi;
|
|
2675
2675
|
var CardsManagement = function CardsManagement(_ref) {
|
|
2676
|
-
var _selectedCard$metadat
|
|
2676
|
+
var _selectedCard$metadat;
|
|
2677
2677
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2678
2678
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2679
|
-
_ref$paymentMethod = _ref.paymentMethod,
|
|
2680
|
-
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
|
|
2681
2679
|
_ref$sendLog = _ref.sendLog,
|
|
2682
2680
|
sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
|
|
2683
2681
|
var dispatch = useDispatch();
|
|
@@ -2695,11 +2693,13 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2695
2693
|
var _useState3 = useState(false),
|
|
2696
2694
|
allowPersonalCardAdd = _useState3[0],
|
|
2697
2695
|
setAllowPersonalCardAdd = _useState3[1];
|
|
2696
|
+
console.log('allowPersonalCardAdd1', allowPersonalCardAdd);
|
|
2698
2697
|
useEffect(function () {
|
|
2699
2698
|
var isActive = true;
|
|
2700
2699
|
paymentApi$1.get(userAddEditUrl.personalCardEligibility()).then(function (res) {
|
|
2701
2700
|
if (isActive) {
|
|
2702
2701
|
var _res$data;
|
|
2702
|
+
console.log('allowPersonalCardAdd2', res === null || res === void 0 ? void 0 : res.data);
|
|
2703
2703
|
setAllowPersonalCardAdd((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.allow_personal_card_add) === true);
|
|
2704
2704
|
}
|
|
2705
2705
|
})["catch"](function () {
|
|
@@ -2926,7 +2926,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2926
2926
|
}, /*#__PURE__*/React.createElement(IUIGrid, {
|
|
2927
2927
|
container: true,
|
|
2928
2928
|
className: styles$1.formFieldsWrapper
|
|
2929
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null,
|
|
2929
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !allowPersonalCardAdd && /*#__PURE__*/React.createElement("div", {
|
|
2930
2930
|
className: classes.disabledNotice
|
|
2931
2931
|
}, "Company has disabled usage of your personal cards, please reach out to your admin"), /*#__PURE__*/React.createElement("div", {
|
|
2932
2932
|
className: classes.cardsGrid
|
|
@@ -2934,7 +2934,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2934
2934
|
return renderCard(card);
|
|
2935
2935
|
}) : null, corporateCards.length !== 0 ? corporateCards === null || corporateCards === void 0 ? void 0 : corporateCards.map(function (card) {
|
|
2936
2936
|
return renderCard(card);
|
|
2937
|
-
}) : null), (!cards
|
|
2937
|
+
}) : null), console.log('allowPersonalCardAdd3', !cards, cardsCount, allowPersonalCardAdd), (!cards || cardsCount < 10) && allowPersonalCardAdd && /*#__PURE__*/React.createElement("button", {
|
|
2938
2938
|
className: classes.addCardButton,
|
|
2939
2939
|
onClick: function onClick() {
|
|
2940
2940
|
sendLog({
|