ps-toolkit-ui 1.17.87 → 1.17.89
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/bundles/ps-toolkit-ui.umd.js +9 -7
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/permission.class.js +1 -1
- package/esm2015/lib/components/table/row/table.row.component.js +10 -8
- package/fesm2015/ps-toolkit-ui.js +9 -7
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/permission.class.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3327,15 +3327,14 @@
|
|
|
3327
3327
|
_this.loadChildren(_this.row.Data.Id);
|
|
3328
3328
|
}
|
|
3329
3329
|
else if (_this.table.subTable != null && _this.table.subTable.permissions == null) {
|
|
3330
|
-
|
|
3331
|
-
console.log(_this.table.permissions);
|
|
3332
|
-
var acc_1 = _this.row.Options.find(function (x) { return x.Action === _this.table.subTable.name; });
|
|
3330
|
+
var acc_1 = _this.table.permissions.Accesses.find(function (x) { return x.Action === _this.table.subTable.name; });
|
|
3333
3331
|
var ps = new PermissionClass();
|
|
3334
3332
|
ps.Area = acc_1.Area;
|
|
3335
3333
|
ps.Controller = acc_1.Controller;
|
|
3336
3334
|
ps.Action = acc_1.Action;
|
|
3337
|
-
ps.Accesses = (_b = (_a = _this.
|
|
3335
|
+
ps.Accesses = (_b = (_a = _this.table.permissions.Accesses) === null || _a === void 0 ? void 0 : _a.filter(function (x) { return x.ParentId === acc_1.Id; })) !== null && _b !== void 0 ? _b : [];
|
|
3338
3336
|
_this.table.subTable.permissions = ps;
|
|
3337
|
+
console.log(ps);
|
|
3339
3338
|
_this.table.load(_this.showChildren);
|
|
3340
3339
|
}
|
|
3341
3340
|
else {
|
|
@@ -3636,9 +3635,12 @@
|
|
|
3636
3635
|
};
|
|
3637
3636
|
TableRowComponent.prototype.getPermission = function (parentId, list) {
|
|
3638
3637
|
var _this = this;
|
|
3639
|
-
var
|
|
3640
|
-
|
|
3641
|
-
|
|
3638
|
+
var children = list.filter(function (item) { return item.ParentId === parentId; });
|
|
3639
|
+
return children.reduce(function (acc, child) {
|
|
3640
|
+
acc.push(child);
|
|
3641
|
+
acc.push.apply(acc, __spread(_this.getPermission(child.Id, list)));
|
|
3642
|
+
return acc;
|
|
3643
|
+
}, []);
|
|
3642
3644
|
};
|
|
3643
3645
|
TableRowComponent.prototype.getCell = function (col) {
|
|
3644
3646
|
var e_4, _e;
|