@itilite/iui-user-management 1.4.84 → 1.4.85

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.
@@ -184,17 +184,7 @@ function _finallyRethrows(body, finalizer) {
184
184
 
185
185
  var styles = {"UUIUserManagementAddEdit":"_3n-WG","pageHeader":"_3qWcA","buttonWrapper":"_1IP9P","scrolled":"_m8f96","headingButtonWrapper":"_w9z7b","headingButtonWrapperProfile":"_12Wd9","hintText":"_ySdbZ","heading":"_2Y1Aw","headingLarge":"_2K1NF","headingMedium":"_RUuAz","headingSmall":"_23Dye","additionalInfoContainer":"_1Suhw","additionalInfoTitle":"_56iJF","titleContainer":"_H5nfl","expandIconAlign":"_3F4i0","detailsContainer":"_2G0LW","formWrapper":"_2fPRc","sectionWrapper":"_37Gqp","margin":"_2Sdl7","minGridWidth":"_2D7iu","firstRowMargin":"_1BozG","firstChildMargin":"_2C3Mb","paddingTop":"_DBPjV","backGrdColorOnHover":"_5oE6H","fieldMargin":"_RCWjq","productContainerGap":"_tuCbi","containerWidth":"_1oWos","productItemBroder":"_T0Hcd","headingPadding":"_2MFfQ","emptyFieldContainer":"_3VWtw","emptyFieldDescription":"_2jC5u","rowGap":"_1NJFY","formTitle":"_GAKk2","formDescription":"_3TZ6Z","themeLink":"_eJ_1B","dashedLine":"_3ZOs1","dividerColor":"_2pxEJ","errorTextCls":"_27eth","backdrop":"_Pm0Au","inputWidth":"_ajB82"};
186
186
 
187
- function r(e) {
188
- var t,
189
- f,
190
- n = "";
191
- if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
192
- return n;
193
- }
194
- function clsx() {
195
- for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
196
- return n;
197
- }
187
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
198
188
 
199
189
  var GetInputType = React.forwardRef(function (props, ref) {
200
190
  var _p = props._p,
@@ -6678,6 +6668,26 @@ var UserAddEdit = function UserAddEdit(props) {
6678
6668
  console.log('errorrr', error);
6679
6669
  });
6680
6670
  };
6671
+ var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
6672
+ fetch(userAddEditUrl.cardsAddUsersDetails(), {
6673
+ method: 'GET',
6674
+ headers: {
6675
+ 'Content-Type': 'application/json',
6676
+ authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
6677
+ }
6678
+ }).then(function (response) {
6679
+ return response.json();
6680
+ }).then(function (res) {
6681
+ var _res$roles2;
6682
+ if (res !== null && res !== void 0 && (_res$roles2 = res.roles) !== null && _res$roles2 !== void 0 && _res$roles2.length) {
6683
+ dispatch(setCardsDetails(res));
6684
+ } else {
6685
+ IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
6686
+ }
6687
+ })["catch"](function (error) {
6688
+ console.log('errorrr', error);
6689
+ });
6690
+ };
6681
6691
  useEffect(function () {
6682
6692
  var countryObject = countryContactCode.find(function (t) {
6683
6693
  return t.dial_code === countryDialCode;
@@ -7379,8 +7389,12 @@ var UserAddEdit = function UserAddEdit(props) {
7379
7389
  if (isRendered === true) {
7380
7390
  renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
7381
7391
  console.log(prod, isProfile, editUserId, id, 'card check');
7382
- if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card' && (isProfile || editUserId)) {
7383
- fetchEditUserCardsDetails(isProfile ? id : editUserId);
7392
+ if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
7393
+ if (isProfile || editUserId) {
7394
+ fetchEditUserCardsDetails(isProfile ? id : editUserId);
7395
+ } else {
7396
+ fetchLoggedUserCardsDetails();
7397
+ }
7384
7398
  }
7385
7399
  });
7386
7400
  setPersonalInfoInput(_extends({}, personalInfoInput, {