ps-toolkit-ui 1.4.11 → 1.4.12

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.
@@ -2534,7 +2534,7 @@
2534
2534
  };
2535
2535
  TableRowComponent.prototype.loadChildren = function (p) {
2536
2536
  var _this = this;
2537
- new RequestClass(this.table.environment, this.table.l).send(this.table.url + ("List/" + p), exports.Method.Post, null, this.showChildren, function (result) {
2537
+ new RequestClass(this.table.environment, this.table.l).send(this.table.url + ("/" + p), exports.Method.Post, null, this.showChildren, function (result) {
2538
2538
  _this.children = result.List;
2539
2539
  setTimeout(function () {
2540
2540
  $__namespace(_this.childrenDiv.nativeElement).slideDown();
@@ -2563,7 +2563,7 @@
2563
2563
  var data = [];
2564
2564
  // @ts-ignore
2565
2565
  $__namespace(_this.childrenDiv.nativeElement).sortable('toArray').forEach(function (x) { return data.push(x); });
2566
- new RequestClass(_this.table.l).send(_this.table.url + 'Sort', exports.Method.Post, data, null, function () {
2566
+ new RequestClass(_this.table.l).send(_this.table.url + '/Sort', exports.Method.Post, data, null, function () {
2567
2567
  if (_this.table.onSort) {
2568
2568
  _this.table.onSort();
2569
2569
  }
@@ -2583,12 +2583,7 @@
2583
2583
  inp.tooltip = option.Name;
2584
2584
  inp.onChange = function () {
2585
2585
  _this.row.Data[option.Action] = !inp.data();
2586
- var p = new PermissionClass();
2587
- p.RelatedId = _this.table.permissions.RelatedId;
2588
- p.Area = _this.table.permissions.Area;
2589
- p.Controller = option.Controller;
2590
- p.Action = option.Action;
2591
- new RequestClass(_this.table.environment, _this.table.l).send(p.getUrl() + '/' + _this.row.Data.Id, exports.Method.Post, null, null, function () {
2586
+ new RequestClass(_this.table.environment, _this.table.l).send(option.url + '/' + _this.row.Data.Id, exports.Method.Post, null, null, function () {
2592
2587
  });
2593
2588
  };
2594
2589
  inp.displayLabel = false;
@@ -2617,7 +2612,7 @@
2617
2612
  if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
2618
2613
  if (this_2.table.form) {
2619
2614
  opt.onClick = function () {
2620
- _this.table.form.url = _this.table.url + 'update/' + _this.row.Data.Id;
2615
+ _this.table.form.url = option.Url + '/' + _this.row.Data.Id;
2621
2616
  if (_this.table.hasChildren && _this.row.Data.ParentId != null) {
2622
2617
  _this.table.form.onSuccessBase = function () {
2623
2618
  _this.table.modal.hide();
@@ -2642,7 +2637,7 @@
2642
2637
  };
2643
2638
  }
2644
2639
  else {
2645
- opt.url = this_2.table.url + '/update/' + this_2.row.Data.Id;
2640
+ opt.url = option.Url + '/' + this_2.row.Data.Id;
2646
2641
  }
2647
2642
  }
2648
2643
  else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
@@ -2668,20 +2663,12 @@
2668
2663
  };
2669
2664
  }
2670
2665
  else if (option.AccessType === exports.PermissionAccessTypeEnum.Report) {
2671
- var p = new PermissionClass();
2672
- p.Area = this_2.table.permissions.Area;
2673
- p.Controller = 'Print';
2674
- p.Action = option.Controller;
2675
- opt.url = '/Report' + p.getUrl() + '/' + this_2.row.Data.Id;
2666
+ opt.url = '/Report' + option.Url + '/' + this_2.row.Data.Id;
2676
2667
  opt.urlNewTab = true;
2677
2668
  }
2678
2669
  else if (option.InputAction === exports.PermissionInputActionEnum.Link || option.InputAction === exports.PermissionInputActionEnum.LinkNewTab) {
2679
2670
  var p = new PermissionClass();
2680
- p.RelatedId = this_2.table.permissions.RelatedId;
2681
- p.Area = this_2.table.permissions.Area;
2682
- p.Controller = option.Controller;
2683
- p.Action = option.Action;
2684
- opt.url = p.getUrl() + '/' + this_2.row.Data.Id;
2671
+ opt.url = option.Url + '/' + this_2.row.Data.Id;
2685
2672
  opt.urlNewTab = option.InputAction === exports.PermissionInputActionEnum.LinkNewTab;
2686
2673
  }
2687
2674
  else if (option.InputAction === exports.PermissionInputActionEnum.Modal) {
@@ -2697,15 +2684,15 @@
2697
2684
  p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2698
2685
  opt.modal.table.permissions = p;
2699
2686
  if (opt.modal.table.form) {
2700
- opt.modal.table.form.url = p.getUrl() + 'insert';
2701
- opt.modal.table.form.baseUrl = p.getUrl() + 'insert';
2687
+ opt.modal.table.form.url = option.Url + 'insert';
2688
+ opt.modal.table.form.baseUrl = option.Url + 'insert';
2702
2689
  }
2703
2690
  opt.modal.table.set();
2704
2691
  }
2705
2692
  if (opt.modal.form) {
2706
2693
  opt.modal.form.name = option.Name;
2707
- opt.modal.form.url = opt.modal.form.baseUrl + 'update/' + _this.row.Data.Id;
2708
- opt.modal.form.loadData(opt.modal.form.baseUrl + 'get/' + _this.row.Data.Id);
2694
+ opt.modal.form.url = option.Url + 'update/' + _this.row.Data.Id;
2695
+ opt.modal.form.loadData(option.Url + 'get/' + _this.row.Data.Id);
2709
2696
  opt.modal.form.onSuccessBase = function () {
2710
2697
  opt.modal.hide();
2711
2698
  };
@@ -2723,8 +2710,8 @@
2723
2710
  p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2724
2711
  r.table.permissions = p;
2725
2712
  if (r.table.form) {
2726
- r.table.form.url = p.getUrl() + 'insert';
2727
- r.table.form.baseUrl = p.getUrl() + 'insert';
2713
+ r.table.form.url = option.Url + 'insert';
2714
+ r.table.form.baseUrl = option.Url + 'insert';
2728
2715
  }
2729
2716
  r.table.set();
2730
2717
  }
@@ -2746,7 +2733,7 @@
2746
2733
  p.Area = this_2.table.permissions.Area;
2747
2734
  p.Controller = option.Controller;
2748
2735
  p.Action = option.Action;
2749
- opt.url = '/File' + p.getUrl() + '/' + this_2.row.Data.Id;
2736
+ opt.url = '/File' + option.Url + '/' + this_2.row.Data.Id;
2750
2737
  opt.urlNewTab = true;
2751
2738
  }
2752
2739
  else if (option.InputAction === exports.PermissionInputActionEnum.Confirm) {
@@ -2756,7 +2743,7 @@
2756
2743
  p.Area = _this.table.permissions.Area;
2757
2744
  p.Controller = option.Controller;
2758
2745
  p.Action = option.Action;
2759
- _this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), p.getUrl() + '/' + _this.row.Data.Id, null, function () {
2746
+ _this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), option.Url + '/' + _this.row.Data.Id, null, function () {
2760
2747
  _this.table.load();
2761
2748
  });
2762
2749
  };