ps-toolkit-ui 0.0.127 → 0.0.131

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.
@@ -2600,6 +2600,7 @@
2600
2600
  }
2601
2601
  }
2602
2602
  else if (option.Action === 'Delete') {
2603
+ opt.class = opt.class.replace('blue', 'red');
2603
2604
  opt.onClick = function () {
2604
2605
  if (_this.table.form) {
2605
2606
  _this.table.form.clear();
@@ -2634,12 +2635,13 @@
2634
2635
  opt.onClick = function (btn) {
2635
2636
  var e_2, _a;
2636
2637
  if (opt.modal.table) {
2638
+ console.log(_this.row.Options.filter(function (x) { return x.ParentId === option.Id; }), 'this.row.Options.filter(x => x.ParentId === option.Id)');
2637
2639
  var p = new PermissionClass();
2638
2640
  p.RelatedId = btn.row.Data.Id;
2639
2641
  p.Area = _this.table.permissions.Area;
2640
2642
  p.Controller = _this.table.permissions.Controller;
2641
2643
  p.Action = option.Action;
2642
- p.Accesses = option.Accesses;
2644
+ p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2643
2645
  opt.modal.table.permissions = p;
2644
2646
  if (opt.modal.table.form) {
2645
2647
  opt.modal.table.form.url = p.getUrl() + 'Insert';
@@ -2726,7 +2728,7 @@
2726
2728
  };
2727
2729
  var this_1 = this;
2728
2730
  try {
2729
- for (var _b = __values(this.row.Options), _c = _b.next(); !_c.done; _c = _b.next()) {
2731
+ for (var _b = __values(this.row.Options.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Option; })), _c = _b.next(); !_c.done; _c = _b.next()) {
2730
2732
  var option = _c.value;
2731
2733
  _loop_1(option);
2732
2734
  }
@@ -7213,13 +7215,12 @@
7213
7215
  this.permission = false;
7214
7216
  return;
7215
7217
  }
7216
- console.log(this.permissions.getAccesses());
7217
- console.log(this.permissions.getAccesses().filter(function (x) { return x.InputAction !== exports.PermissionInputActionEnum.None; }));
7218
7218
  try {
7219
7219
  for (var _b = __values(this.permissions.getAccesses().filter(function (x) { return x.InputAction !== exports.PermissionInputActionEnum.None; })), _c = _b.next(); !_c.done; _c = _b.next()) {
7220
7220
  var access = _c.value;
7221
- var accessInp = new InputClass(this.environment, this.l, access.Name, access.Icon, access.InputType === exports.PermissionInputTypeEnum.Button ? exports.InputType.Button : exports.InputType.Icon, 'w-u h-30');
7221
+ var accessInp = new InputClass(this.environment, this.l, access.Name, access.Icon, access.InputType === exports.PermissionInputTypeEnum.Button ? exports.InputType.Button : exports.InputType.Icon, 'blue w-u h-30');
7222
7222
  if (access.Action === 'Insert') {
7223
+ accessInp.class = accessInp.class.replace('blue', 'green');
7223
7224
  if (this.form) {
7224
7225
  this.form.url = this.form.baseUrl = this.url + 'Insert';
7225
7226
  if (!this.form.onTop) {
@@ -7230,14 +7231,12 @@
7230
7231
  };
7231
7232
  _this.showInsertModal();
7232
7233
  };
7233
- this.buttons.unshift(accessInp);
7234
7234
  }
7235
7235
  else {
7236
7236
  this.form.displayLabel = false;
7237
7237
  }
7238
7238
  }
7239
7239
  else {
7240
- this.buttons.unshift(accessInp);
7241
7240
  if (this.modal) {
7242
7241
  accessInp.onClick = function () {
7243
7242
  _this.modal.show();