ps-toolkit-ui 1.17.86 → 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 -4
- 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 -5
- package/fesm2015/ps-toolkit-ui.js +8 -4
- 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,15 +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
|
-
console.log(_this.row.Options, 'this.row.Optionsthis.row.Optionsthis.row.Options');
|
|
3522
3521
|
var p = new PermissionClass();
|
|
3523
3522
|
p.RelatedId = _this.row.Data.Id;
|
|
3524
3523
|
p.Area = _this.table.permissions.Area;
|
|
3525
3524
|
p.Controller = _this.table.permissions.Controller;
|
|
3526
3525
|
p.Action = option.Action;
|
|
3527
|
-
p.Accesses = (
|
|
3526
|
+
p.Accesses = _this.getPermission(option.Id, _this.row.Options);
|
|
3528
3527
|
opt.modal.table.permissions = p;
|
|
3529
3528
|
if (opt.modal.table.form) {
|
|
3530
3529
|
opt.modal.table.form.url = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
|
|
@@ -3544,7 +3543,7 @@
|
|
|
3544
3543
|
if (opt.modal.accordion) {
|
|
3545
3544
|
var _loop_3 = function (r) {
|
|
3546
3545
|
if (r.table) {
|
|
3547
|
-
var options = JSON.parse(JSON.stringify((
|
|
3546
|
+
var options = JSON.parse(JSON.stringify((_a = _this.row.Options) !== null && _a !== void 0 ? _a : []));
|
|
3548
3547
|
var rowOption_1 = options.find(function (x) { return x.ParentId === option.Id && x.Action === r.name; });
|
|
3549
3548
|
if (rowOption_1) {
|
|
3550
3549
|
var p = new PermissionClass();
|
|
@@ -3635,6 +3634,12 @@
|
|
|
3635
3634
|
// .concat(this.table.permissions.hasAccess('Update') ? [this.optEdit] : [])
|
|
3636
3635
|
// .concat(this.table.permissions.hasAccess('Delete') ? [this.optDelete] : []);
|
|
3637
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
|
+
};
|
|
3638
3643
|
TableRowComponent.prototype.getCell = function (col) {
|
|
3639
3644
|
var e_4, _e;
|
|
3640
3645
|
// console.log('getCell');
|