ps-toolkit-ui 1.4.12 → 1.4.15

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.
@@ -2612,7 +2612,7 @@
2612
2612
  if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
2613
2613
  if (this_2.table.form) {
2614
2614
  opt.onClick = function () {
2615
- _this.table.form.url = option.Url + '/' + _this.row.Data.Id;
2615
+ _this.table.form.url = option.Url.replace('{}', _this.row.Data.Id);
2616
2616
  if (_this.table.hasChildren && _this.row.Data.ParentId != null) {
2617
2617
  _this.table.form.onSuccessBase = function () {
2618
2618
  _this.table.modal.hide();
@@ -2633,7 +2633,7 @@
2633
2633
  _this.table.load();
2634
2634
  };
2635
2635
  }
2636
- _this.edit(opt);
2636
+ _this.edit(opt, option);
2637
2637
  };
2638
2638
  }
2639
2639
  else {
@@ -2651,7 +2651,7 @@
2651
2651
  _this.changeRows.emit(_this.row.Data);
2652
2652
  }
2653
2653
  else {
2654
- _this.confirmShow.emit({ id: _this.row.Data.Id, accept: function () {
2654
+ _this.confirmShow.emit({ url: option.Url.replace('{}', _this.row.Data.Id), accept: function () {
2655
2655
  if (_this.table.hasChildren && _this.table.childrenAutoLoad && _this.row.Data.ParentId != null) {
2656
2656
  _this.loadParent.emit(_this.row.Data.ParentId);
2657
2657
  }
@@ -2858,7 +2858,7 @@
2858
2858
  });
2859
2859
  return c;
2860
2860
  };
2861
- TableRowComponent.prototype.edit = function (opt) {
2861
+ TableRowComponent.prototype.edit = function (opt, option) {
2862
2862
  var _this = this;
2863
2863
  if (this.table.permissions.Type === exports.PermissionTypeEnum.Form) {
2864
2864
  this.table.form.name = opt.name;
@@ -2868,7 +2868,7 @@
2868
2868
  this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
2869
2869
  }
2870
2870
  else {
2871
- new RequestClass(this.table.environment, this.table.l).send(this.table.url + 'Get/' + this.row.Data.Id, exports.Method.Post, null, opt, function (result) {
2871
+ new RequestClass(this.table.environment, this.table.l).send(option.Url.replace('update', 'get').replace('{}', this.row.Data.Id), exports.Method.Post, null, opt, function (result) {
2872
2872
  _this.table.form.name = opt.name;
2873
2873
  _this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
2874
2874
  _this.table.form.setData(result);
@@ -3123,7 +3123,7 @@
3123
3123
  return this.changeRows.emit(e);
3124
3124
  };
3125
3125
  TableComponent.prototype.onConfirmShow = function (e) {
3126
- this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
3126
+ this.confirm.show(this.table.l('DeleteConfirm'), e.url, null, e.accept);
3127
3127
  };
3128
3128
  TableComponent.prototype.changeSort = function (e, s) {
3129
3129
  if ($__namespace(e.target).closest('.header-search').hasClass('header-search')) {