ps-toolkit-ui 0.0.3 → 0.0.7

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.
@@ -2412,7 +2412,7 @@
2412
2412
  _this.table.form.onSuccessBase = function () {
2413
2413
  _this.table.modal.hide();
2414
2414
  if (_this.table.childrenAutoLoad) {
2415
- _this.loadParent.emit(_this.row.parent_id);
2415
+ _this.loadParent.emit(_this.row.ParentId);
2416
2416
  }
2417
2417
  else {
2418
2418
  _this.table.load();
@@ -2442,7 +2442,14 @@
2442
2442
  _this.changeRows.emit(_this.row);
2443
2443
  }
2444
2444
  else {
2445
- _this.confirmShow.emit(_this.row.Id);
2445
+ _this.confirmShow.emit({ id: _this.row.Id, accept: function () {
2446
+ if (_this.table.hasChildren && _this.table.childrenAutoLoad && _this.row.ParentId != null) {
2447
+ _this.loadParent.emit(_this.row.ParentId);
2448
+ }
2449
+ else {
2450
+ _this.table.load();
2451
+ }
2452
+ } });
2446
2453
  }
2447
2454
  };
2448
2455
  if (this.table.sortable) {
@@ -2493,7 +2500,7 @@
2493
2500
  TableRowComponent.prototype.getOptions = function () {
2494
2501
  var _this = this;
2495
2502
  return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
2496
- .concat(this.table.options.filter(function (x) { return x.condition == null || x.condition(_this.row); }).map(function (o) {
2503
+ .concat(this.table.options.filter(function (x) { return x.condition == null || _this.row[x.condition]; }).map(function (o) {
2497
2504
  var i = HelperClass.clone(o);
2498
2505
  if (i.url) {
2499
2506
  i.url = i.url.replace('{}', _this.row.Id);
@@ -2782,11 +2789,8 @@
2782
2789
  TableComponent.prototype.onChangeRows = function (e) {
2783
2790
  return this.changeRows.emit(e);
2784
2791
  };
2785
- TableComponent.prototype.onConfirmShow = function (rowId) {
2786
- var _this = this;
2787
- this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + rowId, null, function () {
2788
- _this.table.load(null);
2789
- });
2792
+ TableComponent.prototype.onConfirmShow = function (e) {
2793
+ this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + e.id, null, e.accept);
2790
2794
  };
2791
2795
  TableComponent.prototype.changeSort = function (e, s) {
2792
2796
  if ($__namespace(e.target).closest('.header-search').hasClass('header-search')) {
@@ -6382,7 +6386,7 @@
6382
6386
  if (_this.table.hasChildren && _this.row.ParentId != null) {
6383
6387
  _this.table.form.onSuccessBase = function () {
6384
6388
  _this.table.modal.hide();
6385
- _this.loadParent.emit(_this.row.parent_id);
6389
+ _this.loadParent.emit(_this.row.ParentId);
6386
6390
  };
6387
6391
  }
6388
6392
  else {
@@ -7115,9 +7119,8 @@
7115
7119
  if (this_1.options.filter(function (x) { return x.name === option.Name; }).length > 0) {
7116
7120
  return "continue";
7117
7121
  }
7118
- console.log(this_1.permissions, 'this.permissions');
7119
7122
  var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, exports.InputType.Icon, 'blue h-25 m-h-5 d-ib va-m f-u');
7120
- opt.condition = this_1.permissions.Condition;
7123
+ opt.condition = option.Condition;
7121
7124
  if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
7122
7125
  var p = new PermissionClass();
7123
7126
  p.RelatedId = this_1.permissions.RelatedId;