ps-toolkit-ui 1.16.87 → 1.16.88

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.
@@ -3515,6 +3515,7 @@
3515
3515
  opt.modal.table.form.url = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
3516
3516
  opt.modal.table.form.baseUrl = option.Url.replace('{}', _this.row.Data.Id) + '-insert';
3517
3517
  }
3518
+ opt.modal.table.relatedRow = _this.row.Data;
3518
3519
  opt.modal.table.set();
3519
3520
  }
3520
3521
  if (opt.modal.form) {
@@ -9125,6 +9126,8 @@
9125
9126
  this.searchForm = null;
9126
9127
  this.modal = null;
9127
9128
  this.level = null;
9129
+ this.withRelatedRow = false;
9130
+ this.relatedRow = false;
9128
9131
  this.listAccess = null;
9129
9132
  this.insertAccess = null;
9130
9133
  this.onLoad = null;
@@ -9156,7 +9159,7 @@
9156
9159
  return (relatedId ? url.replace('{}', relatedId) : (url.match(/{}/g) || []).length > 1 ? url.replace('/{}', '') : url).replace('{}', rowId);
9157
9160
  };
9158
9161
  TableClass.prototype.searchData = function (report) {
9159
- var e_1, _a, e_2, _b;
9162
+ var e_1, _a;
9160
9163
  if (report === void 0) { report = false; }
9161
9164
  var d = {};
9162
9165
  if (!report) {
@@ -9175,42 +9178,50 @@
9175
9178
  d.SortType = this.sortType;
9176
9179
  }
9177
9180
  try {
9178
- for (var _c = __values(this.cols.filter(function (x) { return x.withSearch && x.search != null && x.search.data() != null && x.search.data() !== ''; })), _d = _c.next(); !_d.done; _d = _c.next()) {
9179
- var c = _d.value;
9181
+ for (var _b = __values(this.cols.filter(function (x) { return x.withSearch && x.search != null && x.search.data() != null && x.search.data() !== ''; })), _c = _b.next(); !_c.done; _c = _b.next()) {
9182
+ var c = _c.value;
9180
9183
  var vl = c.search.data();
9181
- if (typeof vl === 'object' && !(vl instanceof Array)) {
9182
- try {
9183
- for (var _e = (e_2 = void 0, __values(Object.entries(vl))), _f = _e.next(); !_f.done; _f = _e.next()) {
9184
- var _g = __read(_f.value, 2), key = _g[0], value = _g[1];
9185
- if (value != null) {
9186
- d[key] = value;
9187
- }
9188
- }
9189
- }
9190
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
9191
- finally {
9192
- try {
9193
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
9194
- }
9195
- finally { if (e_2) throw e_2.error; }
9196
- }
9197
- }
9198
- else {
9199
- if (vl != null) {
9200
- d[c.name] = vl;
9201
- }
9202
- }
9184
+ this.addData(d, c.name, vl);
9203
9185
  }
9204
9186
  }
9205
9187
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
9206
9188
  finally {
9207
9189
  try {
9208
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
9190
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
9209
9191
  }
9210
9192
  finally { if (e_1) throw e_1.error; }
9211
9193
  }
9194
+ if (this.withRelatedRow) {
9195
+ d = Object.assign({}, d, this.relatedRow);
9196
+ }
9197
+ console.log(d, 'dddddddddd');
9212
9198
  return this.searchForm ? this.searchForm.data(d) : d;
9213
9199
  };
9200
+ TableClass.prototype.addData = function (d, name, vl) {
9201
+ var e_2, _a;
9202
+ if (typeof vl === 'object' && !(vl instanceof Array)) {
9203
+ try {
9204
+ for (var _b = __values(Object.entries(vl)), _c = _b.next(); !_c.done; _c = _b.next()) {
9205
+ var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
9206
+ if (value != null) {
9207
+ d[key] = value;
9208
+ }
9209
+ }
9210
+ }
9211
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
9212
+ finally {
9213
+ try {
9214
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
9215
+ }
9216
+ finally { if (e_2) throw e_2.error; }
9217
+ }
9218
+ }
9219
+ else {
9220
+ if (vl != null) {
9221
+ d[name] = vl;
9222
+ }
9223
+ }
9224
+ };
9214
9225
  TableClass.prototype.getUrl = function (url) {
9215
9226
  return this.permissions.RelatedId ? url.replace('{}', this.permissions.RelatedId) : url.replace('/{}', '');
9216
9227
  };