tnx-shared 5.3.356 → 5.3.357

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.
@@ -1697,6 +1697,7 @@
1697
1697
  _this.showEditLink = true;
1698
1698
  _this.titleUnPicked = 'Danh sách các mục chưa chọn';
1699
1699
  _this.titlePicked = 'Danh sách các mục đã chọn';
1700
+ _this.fieldsPicked = null;
1700
1701
  for (var key in init) {
1701
1702
  _this[key] = init[key];
1702
1703
  }
@@ -46908,14 +46909,14 @@
46908
46909
  this.onPick.emit(data);
46909
46910
  };
46910
46911
  EntityPickerDataComponent.prototype.pickAll = function () {
46911
- var _a;
46912
+ var _a, _b;
46912
46913
  return __awaiter(this, void 0, void 0, function () {
46913
46914
  var lstData;
46914
- return __generator(this, function (_b) {
46915
- switch (_b.label) {
46916
- case 0: return [4 /*yield*/, this.setting.baseService.getDataCustomRoute(this.plusUrl, this.currentGridInfo.filters, this.control.valueField, this.currentGridInfo.sorts, -1)];
46915
+ return __generator(this, function (_c) {
46916
+ switch (_c.label) {
46917
+ case 0: return [4 /*yield*/, this.setting.baseService.getDataCustomRoute(this.plusUrl, this.currentGridInfo.filters, (_a = this.control.fieldsPicked) !== null && _a !== void 0 ? _a : this.control.valueField, this.currentGridInfo.sorts, -1)];
46917
46918
  case 1:
46918
- lstData = (_a = (_b.sent()).data) !== null && _a !== void 0 ? _a : [];
46919
+ lstData = (_b = (_c.sent()).data) !== null && _b !== void 0 ? _b : [];
46919
46920
  if (lstData.length) {
46920
46921
  this.onPickAll.emit(lstData);
46921
46922
  }
@@ -46930,8 +46931,8 @@
46930
46931
  EntityPickerDataComponent.prototype.modifyGridInfo = function (gridInfo) {
46931
46932
  return __awaiter(this, void 0, void 0, function () {
46932
46933
  var allow;
46933
- return __generator(this, function (_b) {
46934
- switch (_b.label) {
46934
+ return __generator(this, function (_c) {
46935
+ switch (_c.label) {
46935
46936
  case 0:
46936
46937
  gridInfo.fields = this.advanceData.fields;
46937
46938
  if (this.control.multiple) {
@@ -46946,20 +46947,20 @@
46946
46947
  }
46947
46948
  return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.defaultFilters)];
46948
46949
  case 1:
46949
- _b.sent();
46950
+ _c.sent();
46950
46951
  if (!this.control.modifyFilter) return [3 /*break*/, 3];
46951
46952
  return [4 /*yield*/, this.control.modifyFilter(gridInfo.filters, this, this.currentNode)];
46952
46953
  case 2:
46953
- allow = _b.sent();
46954
+ allow = _c.sent();
46954
46955
  if (allow === false)
46955
46956
  return [2 /*return*/, false];
46956
- _b.label = 3;
46957
+ _c.label = 3;
46957
46958
  case 3:
46958
46959
  if (!this.control.filterWhileProcess) return [3 /*break*/, 5];
46959
46960
  return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.filterWhileProcess)];
46960
46961
  case 4:
46961
- _b.sent();
46962
- _b.label = 5;
46962
+ _c.sent();
46963
+ _c.label = 5;
46963
46964
  case 5:
46964
46965
  // if (this.setting.columnSetting.sortField) {
46965
46966
  // gridInfo.sorts.push(<Sort>{
@@ -46978,7 +46979,7 @@
46978
46979
  EntityPickerDataComponent.prototype.beforeRenderDataSource = function (data) {
46979
46980
  return __awaiter(this, void 0, void 0, function () {
46980
46981
  var _this = this;
46981
- return __generator(this, function (_b) {
46982
+ return __generator(this, function (_c) {
46982
46983
  data.forEach(function (item) {
46983
46984
  item._dropdownvalue = _this.control.valueField;
46984
46985
  });
@@ -46990,14 +46991,14 @@
46990
46991
  return __awaiter(this, void 0, void 0, function () {
46991
46992
  var filterCheckExist, lstDataCheckExist_1;
46992
46993
  var _this = this;
46993
- return __generator(this, function (_b) {
46994
- switch (_b.label) {
46994
+ return __generator(this, function (_c) {
46995
+ switch (_c.label) {
46995
46996
  case 0:
46996
46997
  if (!this.control.afterGetDataUnPicked) return [3 /*break*/, 2];
46997
46998
  return [4 /*yield*/, this.control.afterGetDataUnPicked(this.model.dataSource, this)];
46998
46999
  case 1:
46999
- _b.sent();
47000
- _b.label = 2;
47000
+ _c.sent();
47001
+ _c.label = 2;
47001
47002
  case 2:
47002
47003
  if (!(this.searchData && this.showFormAdvancedSearch
47003
47004
  && this.model.dataSource.length != this.searchData.lstData.length
@@ -47005,12 +47006,12 @@
47005
47006
  filterCheckExist = [this.newFilter(this.searchData.fieldFilter, exports.Operator.in, this.searchData.lstData)];
47006
47007
  return [4 /*yield*/, this.setting.baseService.getAllWithIgnore(filterCheckExist, this.searchData.fieldFilter)];
47007
47008
  case 3:
47008
- lstDataCheckExist_1 = (_b.sent()).data;
47009
+ lstDataCheckExist_1 = (_c.sent()).data;
47009
47010
  this.lstDataNotExist = this.searchData.lstData.filter(function (p) { return !lstDataCheckExist_1.some(function (c) { return c[_this.searchData.fieldFilter] == p; }); });
47010
47011
  return [3 /*break*/, 5];
47011
47012
  case 4:
47012
47013
  this.showFormAdvancedSearch = false;
47013
- _b.label = 5;
47014
+ _c.label = 5;
47014
47015
  case 5: return [2 /*return*/];
47015
47016
  }
47016
47017
  });