ps-toolkit-ui 0.0.28 → 0.0.32

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; });
@@ -5670,7 +5670,7 @@
5670
5670
  return _this.getSelected();
5671
5671
  };
5672
5672
  this.inp.setValue = function (v) {
5673
- _this.check(v);
5673
+ _this.check(v.map(String));
5674
5674
  };
5675
5675
  this.inp.clear = function () {
5676
5676
  _this.inp.setValue([], false);
@@ -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; });
@@ -7054,15 +7056,17 @@
7054
7056
  var _this = this;
7055
7057
  if (changeRows === void 0) { changeRows = null; }
7056
7058
  this.permission = true;
7057
- var listAccess = this.permissions.getAccess('List');
7058
- if (this.permissions && listAccess !== null) {
7059
- this.title = listAccess.Name;
7060
- this.url = this.permissions.getUrl();
7061
- if (this.permissions.Type !== exports.PermissionTypeEnum.Form) {
7062
- this.load();
7063
- }
7064
- else {
7065
- this.loading = false;
7059
+ if (this.permissions) {
7060
+ var listAccess = this.permissions.getAccess('List');
7061
+ if (listAccess !== null) {
7062
+ this.title = listAccess.Name;
7063
+ this.url = this.permissions.getUrl();
7064
+ if (this.permissions.Type !== exports.PermissionTypeEnum.Form) {
7065
+ this.load();
7066
+ }
7067
+ else {
7068
+ this.loading = false;
7069
+ }
7066
7070
  }
7067
7071
  }
7068
7072
  else {
@@ -7162,6 +7166,7 @@
7162
7166
  opt.modal.table.set();
7163
7167
  }
7164
7168
  if (opt.modal.form) {
7169
+ opt.modal.form.name = option.Name;
7165
7170
  opt.modal.form.url = opt.modal.form.baseUrl + 'Update/' + btn.row.Id;
7166
7171
  opt.modal.form.loadData(opt.modal.form.baseUrl + 'Get/' + btn.row.Id);
7167
7172
  opt.modal.form.onSuccessBase = function () {