ps-toolkit-ui 1.17.83 → 1.17.85

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.
@@ -3299,7 +3299,7 @@
3299
3299
  });
3300
3300
  TableRowComponent.prototype.ngOnInit = function () {
3301
3301
  var _this = this;
3302
- if (this.table.hasChildren || this.table.subTable != null) {
3302
+ if (this.table.hasChildren) {
3303
3303
  if (!this.table.childrenAutoLoad) {
3304
3304
  this.children = this.getChildren();
3305
3305
  }
@@ -3314,15 +3314,30 @@
3314
3314
  _this.table.showInsertModal(_this.row.Data.Id, _this.level, _this.row.Data);
3315
3315
  };
3316
3316
  }
3317
+ }
3318
+ if (this.table.hasChildren || this.table.subTable != null) {
3317
3319
  this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fa-duotone fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) || this.table.subTable != null ? exports.InputType.Icon : exports.InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
3318
3320
  this.showChildren.onClick = function () {
3321
+ var _a, _b;
3319
3322
  if ($__namespace(_this.childrenDiv.nativeElement).is(':visible')) {
3320
3323
  $__namespace(_this.childrenDiv.nativeElement).slideUp();
3321
3324
  _this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
3322
3325
  }
3323
- else if (_this.children.length === 0) {
3326
+ else if (_this.table.hasChildren && _this.children.length === 0) {
3324
3327
  _this.loadChildren(_this.row.Data.Id);
3325
3328
  }
3329
+ else if (_this.table.subTable != null && _this.table.subTable.permissions == null) {
3330
+ console.log(_this.row.Options);
3331
+ console.log(_this.table.permissions);
3332
+ var acc_1 = _this.row.Options.find(function (x) { return x.Action === _this.table.subTable.name; });
3333
+ var ps = new PermissionClass();
3334
+ ps.Area = acc_1.Area;
3335
+ ps.Controller = acc_1.Controller;
3336
+ ps.Action = acc_1.Action;
3337
+ ps.Accesses = (_b = (_a = _this.row.Options) === null || _a === void 0 ? void 0 : _a.filter(function (x) { return x.ParentId === acc_1.Id; })) !== null && _b !== void 0 ? _b : [];
3338
+ _this.table.subTable.permissions = ps;
3339
+ _this.table.load(_this.showChildren);
3340
+ }
3326
3341
  else {
3327
3342
  $__namespace(_this.childrenDiv.nativeElement).slideDown();
3328
3343
  _this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';