tnx-shared 5.3.324 → 5.3.326
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.
- package/bundles/tnx-shared.umd.js +10 -3
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/list-base.d.ts +2 -2
- package/classes/base/list-base.d.ts.map +1 -1
- package/esm2015/classes/base/list-base.js +6 -3
- package/esm2015/services/export.service.js +6 -2
- package/fesm2015/tnx-shared.js +10 -3
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/export.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -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,
|
|
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);
|
|
@@ -28225,7 +28229,7 @@
|
|
|
28225
28229
|
ListBase.prototype.deepClone = function (data) {
|
|
28226
28230
|
return JSON.parse(JSON.stringify(data));
|
|
28227
28231
|
};
|
|
28228
|
-
ListBase.prototype._exportAllData = function (event) {
|
|
28232
|
+
ListBase.prototype._exportAllData = function (event, fileName) {
|
|
28229
28233
|
var _a;
|
|
28230
28234
|
return __awaiter(this, void 0, void 0, function () {
|
|
28231
28235
|
var lstData, lstVisibleField, lstHeader, fieldSchemaMap, printData;
|
|
@@ -28234,6 +28238,9 @@
|
|
|
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
|
+
if (!fileName) {
|
|
28242
|
+
fileName = this.setting.title ? this.setting.title : "Danh s\u00E1ch " + this.setting.objectName.toLocaleLowerCase();
|
|
28243
|
+
}
|
|
28237
28244
|
lstVisibleField = this.setting.cols
|
|
28238
28245
|
.filter(function (item) { return item.visible && item.dataType !== 'trangThaiV5'; })
|
|
28239
28246
|
.map(function (item) { return item.field; });
|
|
@@ -28261,7 +28268,7 @@
|
|
|
28261
28268
|
});
|
|
28262
28269
|
return row;
|
|
28263
28270
|
})));
|
|
28264
|
-
this._exportService.objectToExcel(printData,
|
|
28271
|
+
this._exportService.objectToExcel(printData, fileName, 1);
|
|
28265
28272
|
return [2 /*return*/];
|
|
28266
28273
|
}
|
|
28267
28274
|
});
|