mario-core 2.10.6-beta → 2.10.7-beta

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
@@ -7965,6 +7965,10 @@ var NEW_NOTIFICATION$1 = "NEW_NOTIFICATION";
7965
7965
 
7966
7966
  var useNotificationList = function useNotificationList() {
7967
7967
  var dispatch = reactRedux.useDispatch();
7968
+
7969
+ var _useParams = reactRouterDom.useParams(),
7970
+ roles = _useParams.roles;
7971
+
7968
7972
  var user = reactRedux.useSelector(function (state) {
7969
7973
  return state.common.user;
7970
7974
  });
@@ -8059,14 +8063,15 @@ var useNotificationList = function useNotificationList() {
8059
8063
  dispatch(setLoading(true));
8060
8064
 
8061
8065
  var _temp4 = _catch(function () {
8062
- return Promise.resolve(get(filters)).then(function (res) {
8066
+ return Promise.resolve(get(_extends({}, filters, {
8067
+ roles: !(roles !== null && roles !== void 0 && roles.trim()) ? user === null || user === void 0 ? void 0 : user.roles : [roles] || []
8068
+ }))).then(function (res) {
8063
8069
  var _res$data = res.data,
8064
8070
  items = _res$data.items,
8065
8071
  totalItems = _res$data.totalItems;
8066
8072
  dispatch(setNotification({
8067
8073
  notificationList: items,
8068
- totalItems: totalItems,
8069
- roles: (user === null || user === void 0 ? void 0 : user.roles) || []
8074
+ totalItems: totalItems
8070
8075
  }));
8071
8076
  });
8072
8077
  }, function (err) {