@itilite/iui-user-management 1.4.765 → 1.4.768

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 CHANGED
@@ -3611,6 +3611,17 @@ var cardsConstants = {
3611
3611
  fullWidth: false,
3612
3612
  visibility: true,
3613
3613
  disableText: 'Please get in touch with your administrator to change this value.'
3614
+ }, {
3615
+ id: 3,
3616
+ label: 'Bookkeeper',
3617
+ description: 'This role is capable of reading all the action for own and other card employees',
3618
+ value: '',
3619
+ name: '',
3620
+ type: 'radio',
3621
+ isAssigned: false,
3622
+ fullWidth: false,
3623
+ visibility: true,
3624
+ disableText: 'Please get in touch with your administrator to change this value.'
3614
3625
  }]
3615
3626
  };
3616
3627
  var passportInfo = [{
@@ -6203,26 +6214,6 @@ var UserAddEdit = function UserAddEdit(props) {
6203
6214
  console.log("errorrr", error);
6204
6215
  });
6205
6216
  };
6206
- var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
6207
- fetch(userAddEditUrl.cardsAddUsersDetails(), {
6208
- method: 'GET',
6209
- headers: {
6210
- 'Content-Type': 'application/json',
6211
- 'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
6212
- }
6213
- }).then(function (response) {
6214
- return response.json();
6215
- }).then(function (res) {
6216
- var _res$roles2;
6217
- if (res !== null && res !== void 0 && (_res$roles2 = res.roles) !== null && _res$roles2 !== void 0 && _res$roles2.length) {
6218
- dispatch(setCardsDetails(res));
6219
- } else {
6220
- IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
6221
- }
6222
- })["catch"](function (error) {
6223
- console.log("errorrr", error);
6224
- });
6225
- };
6226
6217
  React.useEffect(function () {
6227
6218
  var countryObject = countryContactCode.find(function (t) {
6228
6219
  return t.dial_code === countryDialCode;
@@ -6914,10 +6905,11 @@ var UserAddEdit = function UserAddEdit(props) {
6914
6905
  }
6915
6906
  }, [isTokenVerified]);
6916
6907
  React.useEffect(function () {
6908
+ console.log(isProfile, 'isProfile', id, 'id', editUserId, 'editUserId');
6917
6909
  if (isRendered === true) {
6918
6910
  renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
6919
6911
  if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
6920
- editUserId ? fetchEditUserCardsDetails(editUserId) : fetchLoggedUserCardsDetails();
6912
+ fetchEditUserCardsDetails(isProfile ? id : editUserId);
6921
6913
  }
6922
6914
  });
6923
6915
  setPersonalInfoInput(_extends({}, personalInfoInput, {