tnx-shared 5.3.324 → 5.3.325

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.
@@ -21257,8 +21257,12 @@
21257
21257
  }
21258
21258
  ExportService.prototype.objectToExcel = function (data, fileName, numOfHeaderRow) {
21259
21259
  var _this = this;
21260
+ var model = {
21261
+ dataExport: data,
21262
+ pageTitle: fileName
21263
+ };
21260
21264
  return this._http
21261
- .post(this.serviceUri + "/ObjectToExcel?numOfHeaderRow=" + numOfHeaderRow, data, { responseType: 'blob' })
21265
+ .post(this.serviceUri + "/ObjectToExcel?numOfHeaderRow=" + numOfHeaderRow, model, { responseType: 'blob' })
21262
21266
  .pipe(operators.catchError(function (err) { return _this._commonService.handleError(err, _this._injector); }))
21263
21267
  .subscribe(function (res) {
21264
21268
  _this.saveAsExcelFile(res, fileName);
@@ -28228,12 +28232,13 @@
28228
28232
  ListBase.prototype._exportAllData = function (event) {
28229
28233
  var _a;
28230
28234
  return __awaiter(this, void 0, void 0, function () {
28231
- var lstData, lstVisibleField, lstHeader, fieldSchemaMap, printData;
28235
+ var lstData, fileName, lstVisibleField, lstHeader, fieldSchemaMap, printData;
28232
28236
  return __generator(this, function (_b) {
28233
28237
  switch (_b.label) {
28234
28238
  case 0: return [4 /*yield*/, this.setting.baseService.getDataCustomRoute(this.plusUrl, this.currentGridInfo.filters, this.currentGridInfo.fields, this.currentGridInfo.sorts, -1, 1)];
28235
28239
  case 1:
28236
28240
  lstData = (_a = (_b.sent()).data) !== null && _a !== void 0 ? _a : [];
28241
+ fileName = this.setting.title ? this.setting.title : "Danh s\u00E1ch " + this.setting.objectName.toLocaleLowerCase();
28237
28242
  lstVisibleField = this.setting.cols
28238
28243
  .filter(function (item) { return item.visible && item.dataType !== 'trangThaiV5'; })
28239
28244
  .map(function (item) { return item.field; });
@@ -28261,7 +28266,7 @@
28261
28266
  });
28262
28267
  return row;
28263
28268
  })));
28264
- this._exportService.objectToExcel(printData, 'Danh sách ' + this.setting.objectName, 1);
28269
+ this._exportService.objectToExcel(printData, fileName, 1);
28265
28270
  return [2 /*return*/];
28266
28271
  }
28267
28272
  });