@itilite/iui-user-management 1.4.495 → 1.4.497

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.
@@ -5095,25 +5095,21 @@ var Membership = function Membership(_ref) {
5095
5095
  if (reset) setPage(1);else setPage(function (prevPage) {
5096
5096
  return prevPage + 1;
5097
5097
  });
5098
- var _temp = _finallyRethrows(function () {
5099
- return _catch(function () {
5100
- return Promise.resolve(api$7.get(url).then(function (res) {
5101
- return res;
5102
- })).then(function (response) {
5103
- var _response$data, _response$data2;
5104
- var list = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.results;
5105
- nextRef.current = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.next;
5106
- setItems(function (prevItems) {
5107
- return reset ? list : [].concat(prevItems, list);
5108
- });
5098
+ var _temp = _catch(function () {
5099
+ return Promise.resolve(api$7.get(url).then(function (res) {
5100
+ return res;
5101
+ })).then(function (response) {
5102
+ var _response$data, _response$data2;
5103
+ var list = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.results;
5104
+ nextRef.current = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.next;
5105
+ setItems(function (prevItems) {
5106
+ return reset ? list : [].concat(prevItems, list);
5109
5107
  });
5110
- }, function (error) {
5111
- console.error('Error fetching data:', error);
5108
+ setLoading(false);
5112
5109
  });
5113
- }, function (_wasThrown, _result) {
5110
+ }, function (error) {
5114
5111
  setLoading(false);
5115
- if (_wasThrown) throw _result;
5116
- return _result;
5112
+ console.error('Error fetching data:', error);
5117
5113
  });
5118
5114
  return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
5119
5115
  } catch (e) {
@@ -5224,6 +5220,7 @@ var Membership = function Membership(_ref) {
5224
5220
  var _response$data3;
5225
5221
  var updatedResponse = response === null || response === void 0 ? void 0 : response.data;
5226
5222
  updatedResponse.program_name = selectedMembershipChain === null || selectedMembershipChain === void 0 ? void 0 : selectedMembershipChain.program_name;
5223
+ updatedResponse.loyalty_program_image_url = selectedMembershipChain === null || selectedMembershipChain === void 0 ? void 0 : selectedMembershipChain.loyalty_program_image_url;
5227
5224
  if (isOtherMembership) updatedResponse.loyalty_program_name = 'Other';
5228
5225
  updateList(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.membership_type, editIndex, updatedResponse);
5229
5226
  IUIToastMessageService$5.sNotify(editIndex ? "Membership updated." : "New membership added.");
@@ -5235,10 +5232,10 @@ var Membership = function Membership(_ref) {
5235
5232
  console.error(error);
5236
5233
  IUIToastMessageService$5.warningNotify('Something went wrong!');
5237
5234
  });
5238
- }, function (_wasThrown2, _result2) {
5235
+ }, function (_wasThrown, _result) {
5239
5236
  handleClose();
5240
- if (_wasThrown2) throw _result2;
5241
- return _result2;
5237
+ if (_wasThrown) throw _result;
5238
+ return _result;
5242
5239
  });
5243
5240
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
5244
5241
  } catch (e) {