ps-toolkit-ui 0.0.23 → 0.0.27

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.
@@ -6880,16 +6880,24 @@
6880
6880
  }
6881
6881
  BaseComponent.prototype.getPermission = function () {
6882
6882
  var _this = this;
6883
+ console.log('getPermissiongetPermissiongetPermissiongetPermission');
6883
6884
  var p = this.app.currentUser.Permissions.filter(function (per) { return per.Controller === _this.c && (_this.a == null || per.Action === _this.a) &&
6884
6885
  per.Type === exports.PermissionTypeEnum.Item; });
6885
- return p.length > 0 ? this.getPermissionClass(p) : null;
6886
+ return p.length > 0 ? this.getPermissionClass(p[0]) : null;
6886
6887
  };
6887
6888
  BaseComponent.prototype.getPermissionClass = function (p) {
6889
+ console.log('$$$$$$$$$$');
6890
+ console.log(p);
6891
+ console.log('$$$$$$$$$$');
6888
6892
  return new PermissionClass(p.Name, p.Icon, p.Type, p.Area, p.Controller, p.Action, [], this.getPermissionAccessesClass(p.Id));
6889
6893
  };
6890
6894
  BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
6891
6895
  var _this = this;
6892
- return this.app.currentUser.Permissions.filter(function (x) { return x.ParentId = parentId; }).map(function (x) { return _this.getPermissionClass(x); });
6896
+ console.log('--------------');
6897
+ console.log(parentId);
6898
+ console.log(this.app.currentUser.Permissions.filter(function (x) { return x.ParentId === parentId; }));
6899
+ console.log('--------------');
6900
+ return this.app.currentUser.Permissions.filter(function (x) { return x.ParentId === parentId; }).map(function (x) { return _this.getPermissionClass(x); });
6893
6901
  };
6894
6902
  BaseComponent.prototype.hasAccess = function (a) {
6895
6903
  return this.permissions ? this.permissions.hasAccess(a) : false;