ps-toolkit-ui 0.0.28 → 0.0.29

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.
@@ -1506,7 +1506,6 @@
1506
1506
  FormClass.prototype.clear = function () {
1507
1507
  this.method = exports.Method.Post;
1508
1508
  this.url = this.baseUrl;
1509
- this.name = this.name.replace('Update', 'Insert');
1510
1509
  this.setButtons(this.onTop, false);
1511
1510
  this.clearInputs();
1512
1511
  };
@@ -2604,8 +2603,9 @@
2604
2603
  };
2605
2604
  TableRowComponent.prototype.edit = function () {
2606
2605
  var _this = this;
2606
+ var editAccess = this.table.permissions.getAccess('Update');
2607
2607
  if (this.table.permissions.Type === exports.PermissionTypeEnum.Form) {
2608
- this.table.form.name = this.table.name + 'UpdateTitle';
2608
+ this.table.form.name = editAccess.Name;
2609
2609
  this.table.form.setData(this.row);
2610
2610
  this.table.form.setButtons(this.table.form.onTop, true, this.row.Id);
2611
2611
  this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
@@ -2613,7 +2613,7 @@
2613
2613
  }
2614
2614
  else {
2615
2615
  new RequestClass(this.table.environment, this.table.l).send(this.table.url + 'Get/' + this.row.Id, exports.Method.Post, null, this.optEdit, function (result) {
2616
- _this.table.form.name = _this.table.name + 'UpdateTitle';
2616
+ _this.table.form.name = editAccess.Name;
2617
2617
  _this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Id);
2618
2618
  _this.table.form.setData(result);
2619
2619
  _this.table.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = true; });
@@ -7043,7 +7043,9 @@
7043
7043
  return this.url + (this.isReport || isReport ? 'Report?' : 'List');
7044
7044
  };
7045
7045
  TableClass.prototype.showInsertModal = function () {
7046
+ var insertAccess = this.permissions.getAccess('Insert');
7046
7047
  this.form.url = this.form.baseUrl = this.url + 'Insert';
7048
+ this.form.name = insertAccess.Name;
7047
7049
  this.form.method = exports.Method.Post;
7048
7050
  this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
7049
7051
  this.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = true; });