tnx-shared 5.3.317 → 5.3.319

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.
@@ -19392,7 +19392,7 @@
19392
19392
  valueBefore: valueBefore,
19393
19393
  valueAfter: valueAfter,
19394
19394
  enumLogType: (control instanceof EditorControlSchema || control instanceof TextAreaControlSchema)
19395
- ? exports.EnumLogType.Table
19395
+ ? exports.EnumLogType.Html
19396
19396
  : exports.EnumLogType.Normal
19397
19397
  }));
19398
19398
  }
@@ -28239,6 +28239,60 @@
28239
28239
  });
28240
28240
  });
28241
28241
  };
28242
+ ListBase.prototype._exportAllDataWithTemplateCode = function (templateCode, isViewOnline) {
28243
+ if (isViewOnline === void 0) { isViewOnline = false; }
28244
+ var _a;
28245
+ return __awaiter(this, void 0, void 0, function () {
28246
+ var lstRawData, lstVisibleField, lstData, data, sheet, file, _templateInstanceService;
28247
+ var _this = this;
28248
+ return __generator(this, function (_b) {
28249
+ switch (_b.label) {
28250
+ case 0: return [4 /*yield*/, this.setting.baseService.getDataCustomRoute(this.plusUrl, this.currentGridInfo.filters, this.currentGridInfo.fields, this.currentGridInfo.sorts, -1, 1)];
28251
+ case 1:
28252
+ lstRawData = (_a = (_b.sent()).data) !== null && _a !== void 0 ? _a : [];
28253
+ lstVisibleField = this.setting.cols
28254
+ .filter(function (item) { return item.visible && item.dataType !== 'trangThaiV5'; })
28255
+ .map(function (item) { return item.field; });
28256
+ return [4 /*yield*/, this.beforeExportAllData(lstRawData, lstVisibleField)];
28257
+ case 2:
28258
+ _b.sent();
28259
+ return [4 /*yield*/, this._crudService.getRefDataInDatasource(lstRawData, this.setting.fieldNeedGetRef)];
28260
+ case 3:
28261
+ _b.sent();
28262
+ lstData = lstRawData.map(function (rowData) { return _this.modifyRowDataForExport(rowData); });
28263
+ data = {
28264
+ lstData: lstData
28265
+ };
28266
+ sheet = new ExportItem({
28267
+ type: exports.ExportItemType.ExcelSheet,
28268
+ templateCode: templateCode,
28269
+ data: this.stringifyData(data),
28270
+ name: 'Sheet1'
28271
+ });
28272
+ file = new ExportItem({
28273
+ type: exports.ExportItemType.ExcelFile,
28274
+ name: this.setting.title ? this.setting.title : "Danh s\u00E1ch " + this.setting.objectName.toLocaleLowerCase()
28275
+ });
28276
+ file.children = [sheet];
28277
+ return [4 /*yield*/, this.modifyDataForExportAll(data)];
28278
+ case 4:
28279
+ _b.sent();
28280
+ _templateInstanceService = this._injector.get(TemplateInstanceService);
28281
+ return [2 /*return*/, _templateInstanceService.exportNormal(file)];
28282
+ }
28283
+ });
28284
+ });
28285
+ };
28286
+ ListBase.prototype.modifyDataForExportAll = function (data) {
28287
+ return __awaiter(this, void 0, void 0, function () {
28288
+ return __generator(this, function (_b) {
28289
+ return [2 /*return*/];
28290
+ });
28291
+ });
28292
+ };
28293
+ ListBase.prototype.modifyRowDataForExport = function (rowData) {
28294
+ return rowData;
28295
+ };
28242
28296
  return ListBase;
28243
28297
  }(ComponentBaseWithButton));
28244
28298
  ListBase.decorators = [
@@ -53173,8 +53227,8 @@
53173
53227
  TnAppNotificationComponent.prototype.afterGetNotication = function () {
53174
53228
  return __awaiter(this, void 0, void 0, function () {
53175
53229
  var idsUserCreated, userRes, lstUserInfo;
53176
- return __generator(this, function (_b) {
53177
- switch (_b.label) {
53230
+ return __generator(this, function (_a) {
53231
+ switch (_a.label) {
53178
53232
  case 0:
53179
53233
  idsUserCreated = [];
53180
53234
  this.notifications.forEach(function (element) {
@@ -53188,7 +53242,7 @@
53188
53242
  }
53189
53243
  return [4 /*yield*/, this._userV5Service.getAll([this.newFilter('id', exports.Operator.in, idsUserCreated)], 'avatar,id')];
53190
53244
  case 1:
53191
- userRes = _b.sent();
53245
+ userRes = _a.sent();
53192
53246
  if (!userRes.success || !userRes.data || userRes.data.length === 0) {
53193
53247
  return [2 /*return*/];
53194
53248
  }
@@ -53240,15 +53294,15 @@
53240
53294
  TnAppNotificationComponent.prototype.goToLink = function (item) {
53241
53295
  return __awaiter(this, void 0, void 0, function () {
53242
53296
  var link;
53243
- return __generator(this, function (_b) {
53244
- switch (_b.label) {
53297
+ return __generator(this, function (_a) {
53298
+ switch (_a.label) {
53245
53299
  case 0:
53246
53300
  if (!!this.isReaded(item)) return [3 /*break*/, 2];
53247
53301
  return [4 /*yield*/, this.readById(item)];
53248
53302
  case 1:
53249
- _b.sent();
53303
+ _a.sent();
53250
53304
  this.totalUnRead--;
53251
- _b.label = 2;
53305
+ _a.label = 2;
53252
53306
  case 2:
53253
53307
  // Save current path to go back
53254
53308
  localStorage.setItem('currentUrl', top.location.href);
@@ -53284,9 +53338,7 @@
53284
53338
  this.bounceNoti = false;
53285
53339
  };
53286
53340
  TnAppNotificationComponent.prototype.handleClicked = function () {
53287
- var _a;
53288
- var appCode = (_a = window['appCode']) !== null && _a !== void 0 ? _a : '';
53289
- this._router.navigateByUrl("/" + appCode.toLowerCase() + "/thong-bao");
53341
+ top.location.href = window['baseHref'] + '/thong-bao';
53290
53342
  };
53291
53343
  return TnAppNotificationComponent;
53292
53344
  }(ComponentBase));