@itilite/iui-user-management 1.4.781 → 1.4.842
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 +26 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +44 -43
package/dist/index.js
CHANGED
|
@@ -6651,6 +6651,26 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6651
6651
|
console.log('errorrr', error);
|
|
6652
6652
|
});
|
|
6653
6653
|
};
|
|
6654
|
+
var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
|
|
6655
|
+
fetch(userAddEditUrl.cardsAddUsersDetails(), {
|
|
6656
|
+
method: 'GET',
|
|
6657
|
+
headers: {
|
|
6658
|
+
'Content-Type': 'application/json',
|
|
6659
|
+
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6660
|
+
}
|
|
6661
|
+
}).then(function (response) {
|
|
6662
|
+
return response.json();
|
|
6663
|
+
}).then(function (res) {
|
|
6664
|
+
var _res$roles2;
|
|
6665
|
+
if (res !== null && res !== void 0 && (_res$roles2 = res.roles) !== null && _res$roles2 !== void 0 && _res$roles2.length) {
|
|
6666
|
+
dispatch(setCardsDetails(res));
|
|
6667
|
+
} else {
|
|
6668
|
+
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
6669
|
+
}
|
|
6670
|
+
})["catch"](function (error) {
|
|
6671
|
+
console.log('errorrr', error);
|
|
6672
|
+
});
|
|
6673
|
+
};
|
|
6654
6674
|
React.useEffect(function () {
|
|
6655
6675
|
var countryObject = countryContactCode.find(function (t) {
|
|
6656
6676
|
return t.dial_code === countryDialCode;
|
|
@@ -7351,8 +7371,13 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7351
7371
|
React.useEffect(function () {
|
|
7352
7372
|
if (isRendered === true) {
|
|
7353
7373
|
renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
|
|
7374
|
+
console.log(prod, isProfile, editUserId, id, 'card check');
|
|
7354
7375
|
if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
|
|
7355
|
-
|
|
7376
|
+
if (isProfile || editUserId) {
|
|
7377
|
+
fetchEditUserCardsDetails(isProfile ? id : editUserId);
|
|
7378
|
+
} else {
|
|
7379
|
+
fetchLoggedUserCardsDetails();
|
|
7380
|
+
}
|
|
7356
7381
|
}
|
|
7357
7382
|
});
|
|
7358
7383
|
setPersonalInfoInput(_extends({}, personalInfoInput, {
|