ps-toolkit-ui 1.4.39 → 1.4.40

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,27 +2705,30 @@
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
+ console.log(r.name);
2716
+ p.Accesses = HelperClass.clone(_this.row.Options.filter(function (x) { return x.ParentId === option.Id; }));
2717
+ console.log(p.Accesses);
2718
+ p.Accesses.forEach(function (x) { return x.Url = x.Url.replace('{action}', r.name.toLowerCase()); });
2719
+ console.log(p.Accesses);
2720
+ r.table.permissions = p;
2721
+ if (r.table.form) {
2722
+ r.table.form.url = option.Url + 'insert';
2723
+ r.table.form.baseUrl = option.Url + 'insert';
2724
+ }
2725
+ r.table.set();
2726
+ }
2727
+ };
2708
2728
  try {
2709
2729
  for (var _b = (e_3 = void 0, __values(opt.modal.accordion.rows)), _c = _b.next(); !_c.done; _c = _b.next()) {
2710
2730
  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
- console.log(r.name);
2718
- p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2719
- console.log(p.Accesses);
2720
- // p.Accesses.forEach(x => x.Url = x.Url.replace('{action}', r.name.toLowerCase()));
2721
- // console.log(p.Accesses);
2722
- r.table.permissions = p;
2723
- if (r.table.form) {
2724
- r.table.form.url = option.Url + 'insert';
2725
- r.table.form.baseUrl = option.Url + 'insert';
2726
- }
2727
- r.table.set();
2728
- }
2731
+ _loop_3(r);
2729
2732
  }
2730
2733
  }
2731
2734
  catch (e_3_1) { e_3 = { error: e_3_1 }; }