ps-toolkit-ui 1.17.85 → 1.17.87
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 -3
- 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/components/table/row/table.row.component.js +9 -4
- package/fesm2015/ps-toolkit-ui.js +8 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/table/row/table.row.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -3516,14 +3516,14 @@
|
|
|
3516
3516
|
opt.modal = this_2.table.optionsActions.find(function (x) { return x.name === option.Action; });
|
|
3517
3517
|
opt.onClick = function () {
|
|
3518
3518
|
var e_3, _e;
|
|
3519
|
-
var _a
|
|
3519
|
+
var _a;
|
|
3520
3520
|
if (opt.modal.table) {
|
|
3521
3521
|
var p = new PermissionClass();
|
|
3522
3522
|
p.RelatedId = _this.row.Data.Id;
|
|
3523
3523
|
p.Area = _this.table.permissions.Area;
|
|
3524
3524
|
p.Controller = _this.table.permissions.Controller;
|
|
3525
3525
|
p.Action = option.Action;
|
|
3526
|
-
p.Accesses = (
|
|
3526
|
+
p.Accesses = _this.getPermission(option.Id, _this.row.Options);
|
|
3527
3527
|
opt.modal.table.permissions = p;
|
|
3528
3528
|
if (opt.modal.table.form) {
|
|
3529
3529
|
opt.modal.table.form.url = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
|
|
@@ -3543,7 +3543,7 @@
|
|
|
3543
3543
|
if (opt.modal.accordion) {
|
|
3544
3544
|
var _loop_3 = function (r) {
|
|
3545
3545
|
if (r.table) {
|
|
3546
|
-
var options = JSON.parse(JSON.stringify((
|
|
3546
|
+
var options = JSON.parse(JSON.stringify((_a = _this.row.Options) !== null && _a !== void 0 ? _a : []));
|
|
3547
3547
|
var rowOption_1 = options.find(function (x) { return x.ParentId === option.Id && x.Action === r.name; });
|
|
3548
3548
|
if (rowOption_1) {
|
|
3549
3549
|
var p = new PermissionClass();
|
|
@@ -3634,6 +3634,12 @@
|
|
|
3634
3634
|
// .concat(this.table.permissions.hasAccess('Update') ? [this.optEdit] : [])
|
|
3635
3635
|
// .concat(this.table.permissions.hasAccess('Delete') ? [this.optDelete] : []);
|
|
3636
3636
|
};
|
|
3637
|
+
TableRowComponent.prototype.getPermission = function (parentId, list) {
|
|
3638
|
+
var _this = this;
|
|
3639
|
+
var _a;
|
|
3640
|
+
var children = (_a = list === null || list === void 0 ? void 0 : list.filter(function (item) { return item.ParentId === parentId; })) !== null && _a !== void 0 ? _a : [];
|
|
3641
|
+
return children.map(function (child) { return (Object.assign(Object.assign({}, child), { children: _this.getPermission(child.Id, list) })); });
|
|
3642
|
+
};
|
|
3637
3643
|
TableRowComponent.prototype.getCell = function (col) {
|
|
3638
3644
|
var e_4, _e;
|
|
3639
3645
|
// console.log('getCell');
|