ps-toolkit-ui 1.4.31 → 1.4.34

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.
@@ -2705,23 +2705,27 @@
2705
2705
  };
2706
2706
  }
2707
2707
  if (opt.modal.accordion) {
2708
+ var _loop_3 = function (r) {
2709
+ if (r.table) {
2710
+ var p = new PermissionClass();
2711
+ p.RelatedId = _this.row.Data.Id;
2712
+ p.Area = _this.table.permissions.Area;
2713
+ p.Controller = option.Controller;
2714
+ p.Action = r.name;
2715
+ p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2716
+ p.Accesses.forEach(function (x) { return x.Url = x.Url.replace('{}', r.name.toLowerCase()); });
2717
+ r.table.permissions = p;
2718
+ if (r.table.form) {
2719
+ r.table.form.url = option.Url + 'insert';
2720
+ r.table.form.baseUrl = option.Url + 'insert';
2721
+ }
2722
+ r.table.set();
2723
+ }
2724
+ };
2708
2725
  try {
2709
2726
  for (var _b = (e_3 = void 0, __values(opt.modal.accordion.rows)), _c = _b.next(); !_c.done; _c = _b.next()) {
2710
2727
  var r = _c.value;
2711
- if (r.table) {
2712
- var p = new PermissionClass();
2713
- p.RelatedId = _this.row.Data.Id;
2714
- p.Area = _this.table.permissions.Area;
2715
- p.Controller = option.Controller;
2716
- p.Action = r.name;
2717
- p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2718
- r.table.permissions = p;
2719
- if (r.table.form) {
2720
- r.table.form.url = option.Url + 'insert';
2721
- r.table.form.baseUrl = option.Url + 'insert';
2722
- }
2723
- r.table.set();
2724
- }
2728
+ _loop_3(r);
2725
2729
  }
2726
2730
  }
2727
2731
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
@@ -2750,7 +2754,7 @@
2750
2754
  p.Area = _this.table.permissions.Area;
2751
2755
  p.Controller = option.Controller;
2752
2756
  p.Action = option.Action;
2753
- _this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), option.Url + '/' + _this.row.Data.Id, null, function () {
2757
+ _this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), option.Url.replace('{}', _this.row.Data.Id), null, function () {
2754
2758
  _this.table.load();
2755
2759
  });
2756
2760
  };