@itilite/iui-user-management 1.4.496 → 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.
- package/dist/index.css +1 -0
- package/dist/index.js +16 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16 -19
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -5098,25 +5098,21 @@ var Membership = function Membership(_ref) {
|
|
|
5098
5098
|
if (reset) setPage(1);else setPage(function (prevPage) {
|
|
5099
5099
|
return prevPage + 1;
|
|
5100
5100
|
});
|
|
5101
|
-
var _temp =
|
|
5102
|
-
return
|
|
5103
|
-
return
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
return reset ? list : [].concat(prevItems, list);
|
|
5111
|
-
});
|
|
5101
|
+
var _temp = _catch(function () {
|
|
5102
|
+
return Promise.resolve(api$7.get(url).then(function (res) {
|
|
5103
|
+
return res;
|
|
5104
|
+
})).then(function (response) {
|
|
5105
|
+
var _response$data, _response$data2;
|
|
5106
|
+
var list = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.results;
|
|
5107
|
+
nextRef.current = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.next;
|
|
5108
|
+
setItems(function (prevItems) {
|
|
5109
|
+
return reset ? list : [].concat(prevItems, list);
|
|
5112
5110
|
});
|
|
5113
|
-
|
|
5114
|
-
console.error('Error fetching data:', error);
|
|
5111
|
+
setLoading(false);
|
|
5115
5112
|
});
|
|
5116
|
-
}, function (
|
|
5113
|
+
}, function (error) {
|
|
5117
5114
|
setLoading(false);
|
|
5118
|
-
|
|
5119
|
-
return _result;
|
|
5115
|
+
console.error('Error fetching data:', error);
|
|
5120
5116
|
});
|
|
5121
5117
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
5122
5118
|
} catch (e) {
|
|
@@ -5227,6 +5223,7 @@ var Membership = function Membership(_ref) {
|
|
|
5227
5223
|
var _response$data3;
|
|
5228
5224
|
var updatedResponse = response === null || response === void 0 ? void 0 : response.data;
|
|
5229
5225
|
updatedResponse.program_name = selectedMembershipChain === null || selectedMembershipChain === void 0 ? void 0 : selectedMembershipChain.program_name;
|
|
5226
|
+
updatedResponse.loyalty_program_image_url = selectedMembershipChain === null || selectedMembershipChain === void 0 ? void 0 : selectedMembershipChain.loyalty_program_image_url;
|
|
5230
5227
|
if (isOtherMembership) updatedResponse.loyalty_program_name = 'Other';
|
|
5231
5228
|
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);
|
|
5232
5229
|
IUIToastMessageService$5.sNotify(editIndex ? "Membership updated." : "New membership added.");
|
|
@@ -5238,10 +5235,10 @@ var Membership = function Membership(_ref) {
|
|
|
5238
5235
|
console.error(error);
|
|
5239
5236
|
IUIToastMessageService$5.warningNotify('Something went wrong!');
|
|
5240
5237
|
});
|
|
5241
|
-
}, function (
|
|
5238
|
+
}, function (_wasThrown, _result) {
|
|
5242
5239
|
handleClose();
|
|
5243
|
-
if (
|
|
5244
|
-
return
|
|
5240
|
+
if (_wasThrown) throw _result;
|
|
5241
|
+
return _result;
|
|
5245
5242
|
});
|
|
5246
5243
|
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
5247
5244
|
} catch (e) {
|